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.
This commit is contained in:
Hiltjo Posthuma 2016-03-20 15:36:21 +01:00
parent 41c90a9173
commit 761417d254

View file

@ -1,7 +1,7 @@
include config.mk include config.mk
NAME = stagit NAME = stagit
VERSION = 0.4 VERSION = 0.3
SRC = \ SRC = \
stagit.c\ stagit.c\
stagit-index.c stagit-index.c
@ -33,18 +33,18 @@ all: $(BIN)
.c.o: .c.o:
${CC} -c ${CFLAGS} $< ${CC} -c ${CFLAGS} $<
dist: $(BIN) dist:
rm -rf release/${VERSION} rm -rf stagit-${VERSION}
mkdir -p release/${VERSION} mkdir -p stagit-${VERSION}
cp -f ${MAN1} ${HDR} ${SCRIPTS} ${SRC} ${COMPATSRC} ${DOC} \ cp -f ${MAN1} ${HDR} ${SCRIPTS} ${SRC} ${COMPATSRC} ${DOC} \
Makefile config.def.h config.mk \ Makefile config.def.h config.mk \
favicon.png logo.png style.css \ favicon.png logo.png style.css \
example.sh \ example.sh \
release/${VERSION}/ stagit-${VERSION}
# make tarball # make tarball
rm -f stagit-${VERSION}.tar.gz tar -cf - stagit-${VERSION} | \
(cd release/${VERSION}; \ gzip -c > stagit-${VERSION}.tar.gz
tar -czf ../../stagit-${VERSION}.tar.gz .) rm -rf stagit-${VERSION}
${OBJ}: config.h config.mk ${HDR} ${OBJ}: config.h config.mk ${HDR}