2017-03-16 17:54:30 +08:00
|
|
|
SUBDIRS= src hooks
|
2007-04-09 01:35:22 +08:00
|
|
|
|
2017-03-16 06:06:12 +08:00
|
|
|
VERSION!= sed -n 's/\#define VERSION[[:space:]]*"\(.*\)".*/\1/p' src/defs.h
|
2009-07-14 21:59:30 +08:00
|
|
|
|
2017-03-16 18:01:12 +08:00
|
|
|
DIST!= if test -f .fslckout; then echo "dist-fossil"; \
|
|
|
|
elif test -d .git; then echo "dist-git"; \
|
|
|
|
else echo "dist-inst"; fi
|
2014-01-04 01:16:12 +08:00
|
|
|
FOSSILID?= current
|
2017-03-16 18:01:12 +08:00
|
|
|
GITREF?= HEAD
|
2014-01-04 01:16:12 +08:00
|
|
|
|
2017-03-16 18:01:12 +08:00
|
|
|
DISTPREFIX?= dhcpcd-${VERSION}
|
2014-01-04 01:16:12 +08:00
|
|
|
DISTFILEGZ?= ${DISTPREFIX}.tar.gz
|
2015-05-18 19:21:50 +08:00
|
|
|
DISTFILE?= ${DISTPREFIX}.tar.xz
|
2016-11-04 23:37:43 +08:00
|
|
|
DISTINFO= ${DISTFILE}.distinfo
|
|
|
|
DISTINFOSIGN= ${DISTINFO}.asc
|
2013-11-29 19:15:03 +08:00
|
|
|
|
2015-05-18 19:21:50 +08:00
|
|
|
CLEANFILES+= *.tar.xz
|
2009-07-14 21:59:30 +08:00
|
|
|
|
2017-04-13 21:50:58 +08:00
|
|
|
.PHONY: hooks import import-bsd tests
|
2009-07-15 17:36:43 +08:00
|
|
|
|
2009-07-14 21:59:30 +08:00
|
|
|
.SUFFIXES: .in
|
|
|
|
|
2017-03-16 06:06:12 +08:00
|
|
|
all: config.h
|
2013-09-12 23:43:20 +08:00
|
|
|
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done
|
|
|
|
|
2017-03-16 06:06:12 +08:00
|
|
|
depend: config.h
|
|
|
|
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done
|
2009-07-14 21:59:30 +08:00
|
|
|
|
2017-04-13 21:50:58 +08:00
|
|
|
tests:
|
|
|
|
cd $@; ${MAKE} $@
|
|
|
|
|
|
|
|
test: tests
|
2014-01-25 09:35:53 +08:00
|
|
|
|
2016-09-19 21:00:45 +08:00
|
|
|
hooks:
|
2017-03-16 17:54:30 +08:00
|
|
|
cd $@; ${MAKE}
|
2009-07-14 21:59:30 +08:00
|
|
|
|
2015-12-23 07:46:17 +08:00
|
|
|
eginstall:
|
|
|
|
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done
|
|
|
|
|
2017-03-16 06:06:12 +08:00
|
|
|
install:
|
|
|
|
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done
|
2009-07-14 21:59:30 +08:00
|
|
|
|
2017-03-31 17:48:42 +08:00
|
|
|
proginstall:
|
|
|
|
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done
|
|
|
|
|
2009-07-14 21:59:30 +08:00
|
|
|
clean:
|
2017-04-14 17:34:18 +08:00
|
|
|
rm -rf cov-int dhcpcd.xz
|
2017-04-13 21:50:58 +08:00
|
|
|
for x in ${SUBDIRS} tests; do cd $$x; ${MAKE} $@; cd ..; done
|
2009-07-14 21:59:30 +08:00
|
|
|
|
2010-06-10 05:16:04 +08:00
|
|
|
distclean: clean
|
2017-03-16 06:06:12 +08:00
|
|
|
rm -f config.h config.mk config.log \
|
2016-11-04 23:37:43 +08:00
|
|
|
${DISTFILE} ${DISTFILEGZ} ${DISTINFO} ${DISTINFOSIGN}
|
2010-06-10 05:16:04 +08:00
|
|
|
|
2017-03-16 18:01:12 +08:00
|
|
|
|
|
|
|
dist-fossil:
|
2014-01-04 01:16:12 +08:00
|
|
|
fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ}
|
2015-05-18 19:21:50 +08:00
|
|
|
gunzip -c ${DISTFILEGZ} | xz >${DISTFILE}
|
2014-01-04 01:16:12 +08:00
|
|
|
rm ${DISTFILEGZ}
|
2009-07-14 21:59:30 +08:00
|
|
|
|
2017-03-16 18:01:12 +08:00
|
|
|
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}
|
|
|
|
|
2016-11-04 23:37:43 +08:00
|
|
|
distinfo: dist
|
2016-11-05 19:35:13 +08:00
|
|
|
rm -f ${DISTINFO} ${DISTINFOSIGN}
|
2016-11-04 23:37:43 +08:00
|
|
|
${CKSUM} ${DISTFILE} >${DISTINFO}
|
|
|
|
#printf "SIZE (${DISTFILE}) = %s\n" $$(wc -c <${DISTFILE}) >>${DISTINFO}
|
2016-11-05 19:17:45 +08:00
|
|
|
${PGP} --clearsign --output=${DISTINFOSIGN} ${DISTINFO}
|
2016-11-04 23:37:43 +08:00
|
|
|
chmod 644 ${DISTINFOSIGN}
|
|
|
|
ls -l ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN}
|
|
|
|
|
2015-02-23 20:16:17 +08:00
|
|
|
snapshot:
|
|
|
|
rm -rf /tmp/${DISTPREFIX}
|
|
|
|
${INSTALL} -d /tmp/${DISTPREFIX}
|
|
|
|
cp -RPp * /tmp/${DISTPREFIX}
|
2016-02-15 22:23:51 +08:00
|
|
|
${MAKE} -C /tmp/${DISTPREFIX} distclean
|
|
|
|
tar cf - -C /tmp ${DISTPREFIX} | xz >${DISTFILE}
|
2015-02-23 20:16:17 +08:00
|
|
|
ls -l ${DISTFILE}
|
|
|
|
|
2017-04-02 19:40:27 +08:00
|
|
|
import: dist
|
2009-07-15 17:36:43 +08:00
|
|
|
rm -rf /tmp/${DISTPREFIX}
|
|
|
|
${INSTALL} -d /tmp/${DISTPREFIX}
|
2017-04-02 19:40:27 +08:00
|
|
|
tar xvJpf ${DISTFILE} -C /tmp
|
2009-07-15 17:36:43 +08:00
|
|
|
|
2009-07-14 21:59:30 +08:00
|
|
|
include Makefile.inc
|