Don't install the dbdir
[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 _VERSION_SH=    sed -n 's/\#define VERSION[[:space:]]*"\(.*\)".*/\1/p' config.h
11 _VERSION!=      ${_VERSION_SH}
12 VERSION=        ${_VERSION}$(shell ${_VERSION_SH})
13
14 _SNAP_SH=       date -u +%Y%m%d%H%M
15 _SNAP!=         ${_SNAP_SH}
16 SNAP=           ${_SNAP}$(shell ${_SNAP_SH})
17 SNAPDIR=        ${DISTPREFIX}-${SNAP}
18 SNAPFILE=       ${SNAPDIR}.tar.bz2
19
20 dist:
21         svn export . ${DISTPREFIX}
22         tar cjpf ${DISTFILE} ${DISTPREFIX}
23         rm -rf ${DISTPREFIX}
24
25 snapshot:
26         mkdir /tmp/${SNAPDIR}
27         cp -RPp * /tmp/${SNAPDIR}
28         (cd /tmp/${SNAPDIR}; make clean)
29         tar -cvjpf ${SNAPFILE} -C /tmp ${SNAPDIR}
30         rm -rf /tmp/${SNAPDIR}
31         ls -l ${SNAPFILE}
32
33 snap: snapshot