Add snapshot and snap targets
This commit is contained in:
parent
a52472c3c3
commit
2243c01390
21
mk/dist.mk
21
mk/dist.mk
@ -5,9 +5,28 @@
|
|||||||
DISTPREFIX?= ${NAME}-${VERSION}
|
DISTPREFIX?= ${NAME}-${VERSION}
|
||||||
DISTFILE?= ${DISTPREFIX}.tar.bz2
|
DISTFILE?= ${DISTPREFIX}.tar.bz2
|
||||||
|
|
||||||
CLEANFILES+= ${DISTFILE}
|
CLEANFILES+= ${NAME}-*.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:
|
dist:
|
||||||
svn export . ${DISTPREFIX}
|
svn export . ${DISTPREFIX}
|
||||||
tar cjpf ${DISTFILE} ${DISTPREFIX}
|
tar cjpf ${DISTFILE} ${DISTPREFIX}
|
||||||
rm -rf ${DISTPREFIX}
|
rm -rf ${DISTPREFIX}
|
||||||
|
|
||||||
|
snapshot:
|
||||||
|
rm -rf /tmp/${SNAPDIR}
|
||||||
|
mkdir /tmp/${SNAPDIR}
|
||||||
|
cp -RPp * /tmp/${SNAPDIR}
|
||||||
|
(cd /tmp/${SNAPDIR}; make clean)
|
||||||
|
find /tmp/${SNAPDIR} -name .svn -exec rm -rf -- {} \; 2>/dev/null || true
|
||||||
|
tar -cvjpf ${SNAPFILE} -C /tmp ${SNAPDIR}
|
||||||
|
rm -rf /tmp/${SNAPDIR}
|
||||||
|
ls -l ${SNAPFILE}
|
||||||
|
|
||||||
|
snap: snapshot
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user