From: Roy Marples Date: Thu, 16 Mar 2017 10:01:12 +0000 (+0000) Subject: Fix building the distribution. X-Git-Tag: v7.0.0-beta1~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9b0e603aaca18599b88de25b3359d2af3d06277;p=thirdparty%2Fdhcpcd.git Fix building the distribution. --- diff --git a/Makefile b/Makefile index 5e2f3d0c..baa7caca 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,13 @@ SUBDIRS= src hooks VERSION!= sed -n 's/\#define VERSION[[:space:]]*"\(.*\)".*/\1/p' src/defs.h +DIST!= if test -f .fslckout; then echo "dist-fossil"; \ + elif test -d .git; then echo "dist-git"; \ + else echo "dist-inst"; fi FOSSILID?= current +GITREF?= HEAD -DISTPREFIX?= ${PROG}-${VERSION} +DISTPREFIX?= dhcpcd-${VERSION} DISTFILEGZ?= ${DISTPREFIX}.tar.gz DISTFILE?= ${DISTPREFIX}.tar.xz DISTINFO= ${DISTFILE}.distinfo @@ -45,11 +49,24 @@ distclean: clean rm -f config.h config.mk config.log \ ${DISTFILE} ${DISTFILEGZ} ${DISTINFO} ${DISTINFOSIGN} -dist: + +dist-fossil: fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ} gunzip -c ${DISTFILEGZ} | xz >${DISTFILE} rm ${DISTFILEGZ} +dist-git: + git archive --prefix=${DISTPREFIX}/ ${GITREF} | xz >${DISTFILE} + +dist-inst: + mkdir /tmp/${DISTPREFIX} + cp -RPp * /tmp/${DISTPREFIX} + (cd /tmp/${DISTPREFIX}; make clean) + tar -cvjpf ${DISTFILE} -C /tmp ${DISTPREFIX} + rm -rf /tmp/${DISTPREFIX} + +dist: ${DIST} + distinfo: dist rm -f ${DISTINFO} ${DISTINFOSIGN} ${CKSUM} ${DISTFILE} >${DISTINFO}