Update copyrights and grab version in configure.
[dhcpcd-ui] / Makefile
index 1767e6a3b9bf26f0ecba0dc720b217551fed0dce..4880876a96de02bf71f2def83cd7a2fb6d7f269f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,45 @@
-PROG=          dhcpcd-gtk
+PROG=          dhcpcd-ui
+VERSION=       0.4.3
 
-SUBDIR=        src icons
+.PHONY:                icons
 
-MK=    mk
-include ${MK}/subdir.mk
-include ${MK}/dist.mk
+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}
+
+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