build system: add a target dist to makefile
Generate a tarbal for wmfs with make dist Version set to date +%Y%m in setlocalversion Move .PHONY BEFORE phony targets Signed-off-by: Philippe Pepiot <phil@philpep.org>
This commit is contained in:
parent
e57a6c5e62
commit
12aa86e914
@ -48,13 +48,14 @@ ${MAN}.gz: ${MAN}
|
||||
.c.o:
|
||||
${CC} -c ${CFLAGS} $< -o $@
|
||||
|
||||
.PHONY: all clean distclean install uninstall dist
|
||||
|
||||
clean:
|
||||
rm -f ${OBJS} wmfs ${MAN}.gz
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile
|
||||
|
||||
|
||||
install: all
|
||||
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
|
||||
mkdir -p ${DESTDIR}${PREFIX}/bin
|
||||
@ -80,7 +81,7 @@ uninstall:
|
||||
rm -f ${DESTDIR}${XDG_CONFIG_DIR}/wmfs/wmfsrc
|
||||
rmdir ${DESTDIR}${XDG_CONFIG_DIR}/wmfs/
|
||||
|
||||
|
||||
|
||||
.PHONY: all clean distclean install uninstall
|
||||
dist:
|
||||
@echo "Generate wmfs-`date +%Y%m`.tar.gz"
|
||||
git archive --format=tar --prefix=wmfs-`date +%Y%m`/ master | gzip -c > wmfs-`date +%Y%m`.tar.gz
|
||||
|
||||
|
||||
@ -70,3 +70,6 @@ if rev=`svn info 2>/dev/null | grep '^Last Changed Rev'`; then
|
||||
# All done with svn
|
||||
exit
|
||||
fi
|
||||
|
||||
# default version
|
||||
printf -- '-%s' "`date +%Y%m`"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user