Fix compile on Linux.
[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         svn export . ${DISTPREFIX}
18         tar cjpf ${DISTFILE} ${DISTPREFIX}
19         rm -rf ${DISTPREFIX}
20
21 snapshot:
22         mkdir /tmp/${SNAPDIR}
23         cp -RPp * /tmp/${SNAPDIR}
24         (cd /tmp/${SNAPDIR}; make clean)
25         tar -cvjpf ${SNAPFILE} -C /tmp ${SNAPDIR}
26         rm -rf /tmp/${SNAPDIR}
27         ls -l ${SNAPFILE}
28
29 snap: snapshot