Release 0.5.2
[dhcpcd-ui] / Makefile
index 4f78cdfb2a57ea0daac775c67e6135b0b49324d6..d378ef6edcfa7ca26c2d22f1755ed3691296d2bc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,49 @@
-SUBDIR=        src icons
+PROG=          dhcpcd-ui
+VERSION=       0.5.2
 
-MK=    mk
-include ${MK}/subdir.mk
+.PHONY:                icons
+
+SUBDIR=                src icons
+
+TOPDIR=                .
+include ${TOPDIR}/config.mk
+include ${MKDIR}/subdir.mk
+
+GITREF?=       HEAD
+DISTPREFIX?=   ${PROG}-${VERSION}
+DISTFILE?=     ${DISTPREFIX}.tar.bz2
+
+CLEANFILES+=   *.tar.bz2
+
+_SNAP_SH=      date -u +%Y%m%d%H%M
+_SNAP!=                ${_SNAP_SH}
+SNAP=          ${_SNAP}$(shell ${_SNAP_SH})
+SNAPDIR=       ${DISTPREFIX}-${SNAP}
+SNAPFILE=      ${SNAPDIR}.tar.bz2
+
+dist:
+       mkdir /tmp/${DISTPREFIX}
+       cp -RPp * /tmp/${DISTPREFIX}
+       (cd /tmp/${DISTPREFIX}; make clean icons; rm config.h config.mk)
+       find /tmp/${DISTPREFIX} -name .gitignore -delete
+       tar -cvjpf ${DISTFILE} -C /tmp ${DISTPREFIX}
+       rm -rf /tmp/${DISTPREFIX}
+       ls -l ${DISTFILE}
+
+distclean:
+       (cd src; make clean)
+       rm -f config.h config.mk
+
+snapshot: icons
+       mkdir /tmp/${SNAPDIR}
+       cp -RPp * /tmp/${SNAPDIR}
+       (cd /tmp/${SNAPDIR}; make clean; rm config.h config.mk)
+       find /tmp/${SNAPDIR} -name .gitignore -delete
+       tar -cvjpf ${SNAPFILE} -C /tmp ${SNAPDIR}
+       rm -rf /tmp/${SNAPDIR}
+       ls -l ${SNAPFILE}
+
+snap: snapshot
+
+icons:
+       ${MAKE} -C icons