This is more correct
[dhcpcd-ui] / Makefile
1 PROG=           dhcpcd-ui
2 VERSION=        0.7.2
3
4 TOPDIR=         .
5 include ${TOPDIR}/iconfig.mk
6 include ${MKDIR}/subdir.mk
7
8 .PHONY:         icons
9
10 SUBDIR=         src ${MKICONS}
11
12 GITREF?=        HEAD
13 DISTPREFIX?=    ${PROG}-${VERSION}
14 DISTFILE?=      ${DISTPREFIX}.tar.bz2
15
16 CLEANFILES+=    *.tar.bz2
17
18 _SNAP_SH=       date -u +%Y%m%d%H%M
19 _SNAP!=         ${_SNAP_SH}
20 SNAP=           ${_SNAP}$(shell ${_SNAP_SH})
21 SNAPDIR=        ${DISTPREFIX}-${SNAP}
22 SNAPFILE=       ${SNAPDIR}.tar.bz2
23
24 dist:
25         mkdir /tmp/${DISTPREFIX}
26         cp -RPp * /tmp/${DISTPREFIX}
27         (cd /tmp/${DISTPREFIX}; \
28                 ./configure; make clean icons; rm config.h config.mk)
29         find /tmp/${DISTPREFIX} -name .gitignore -delete
30         tar -cvjpf ${DISTFILE} -C /tmp ${DISTPREFIX}
31         rm -rf /tmp/${DISTPREFIX}
32         ls -l ${DISTFILE}
33
34 distclean:
35         (cd src; make clean)
36         rm -f config.h config.mk config.log
37
38 snapshot: icons
39         mkdir /tmp/${SNAPDIR}
40         cp -RPp * /tmp/${SNAPDIR}
41         (cd /tmp/${SNAPDIR}; make clean; rm config.h config.mk)
42         find /tmp/${SNAPDIR} -name .gitignore -delete
43         tar -cvjpf ${SNAPFILE} -C /tmp ${SNAPDIR}
44         rm -rf /tmp/${SNAPDIR}
45         ls -l ${SNAPFILE}
46
47 snap: snapshot
48
49 icons:
50         ${MAKE} -C icons