stagit

improve make dist, thanks Quentin Rameau

based on a patch from Quentin with some additions.

- don't build before make dist
- package in directory: stagit-VERSION.

Hiltjo Posthuma contact@arjunchoudhary.com

commit: 79a2474 parent: 42edbf9
1 files changed, 8 insertions(+), 8 deletions(-)
MMakefile+8-8
M · Makefile +8, -8
 1@@ -1,7 +1,7 @@
 2 include config.mk
 3 
 4 NAME = stagit
 5-VERSION = 0.4
 6+VERSION = 0.3
 7 SRC = \
 8 	stagit.c\
 9 	stagit-index.c
10@@ -33,18 +33,18 @@ all: $(BIN)
11 .c.o:
12 	${CC} -c ${CFLAGS} $<
13 
14-dist: $(BIN)
15-	rm -rf release/${VERSION}
16-	mkdir -p release/${VERSION}
17+dist:
18+	rm -rf stagit-${VERSION}
19+	mkdir -p stagit-${VERSION}
20 	cp -f ${MAN1} ${HDR} ${SCRIPTS} ${SRC} ${COMPATSRC} ${DOC} \
21 		Makefile config.def.h config.mk \
22 		favicon.png logo.png style.css \
23 		example.sh \
24-		release/${VERSION}/
25+		stagit-${VERSION}
26 	# make tarball
27-	rm -f stagit-${VERSION}.tar.gz
28-	(cd release/${VERSION}; \
29-	tar -czf ../../stagit-${VERSION}.tar.gz .)
30+	tar -cf - stagit-${VERSION} | \
31+		gzip -c > stagit-${VERSION}.tar.gz
32+	rm -rf stagit-${VERSION}
33 
34 ${OBJ}: config.h config.mk ${HDR}
35