Build icons for distribution.
[dhcpcd-ui] / mk / dist.mk
1 # rules to make a distribution tarball from a svn repo
2 # Copyright 2008 Roy Marples <roy@marples.name>
3
4 GITREF?=        HEAD
5 DISTPREFIX?=    ${PROG}-${VERSION}
6 DISTFILE?=      ${DISTPREFIX}.tar.bz2
7
8 CLEANFILES+=    *.tar.bz2
9
10 _SNAP_SH=       date -u +%Y%m%d%H%M
11 _SNAP!=         ${_SNAP_SH}
12 SNAP=           ${_SNAP}$(shell ${_SNAP_SH})
13 SNAPDIR=        ${DISTPREFIX}-${SNAP}
14 SNAPFILE=       ${SNAPDIR}.tar.bz2
15
16 dist:
17         mkdir /tmp/${DISTPREFIX}
18         cp -RPp * /tmp/${DISTPREFIX}
19         (cd /tmp/${DISTPREFIX}; make clean icons)
20         tar -cvjpf ${DISTFILE} -C /tmp ${DISTPREFIX}
21         rm -rf /tmp/${DISTPREFIX}
22         ls -l ${DISTFILE}
23
24 snapshot: icons
25         mkdir /tmp/${SNAPDIR}
26         cp -RPp * /tmp/${SNAPDIR}
27         (cd /tmp/${SNAPDIR}; make clean)
28         tar -cvjpf ${SNAPFILE} -C /tmp ${SNAPDIR}
29         rm -rf /tmp/${SNAPDIR}
30         ls -l ${SNAPFILE}
31
32 snap: snapshot