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
|
|
|
|
2019-08-29 05:30:52 +08:00
|
|
|
DIST!= if test -d .git; then echo "dist-git"; \
|
2017-03-16 18:01:12 +08:00
|
|
|
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
|
|
|
|
2018-06-04 17:25:59 +08:00
|
|
|
DISTSUFFIX=
|
|
|
|
DISTPREFIX?= dhcpcd-${VERSION}${DISTSUFFIX}
|
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
|
2019-02-15 05:23:16 +08:00
|
|
|
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
|
2013-09-12 23:43:20 +08:00
|
|
|
|
2017-03-16 06:06:12 +08:00
|
|
|
depend: config.h
|
2019-02-15 05:23:16 +08:00
|
|
|
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; 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:
|
2019-02-15 05:23:16 +08:00
|
|
|
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
|
2015-12-23 07:46:17 +08:00
|
|
|
|
2017-03-16 06:06:12 +08:00
|
|
|
install:
|
2019-02-15 05:23:16 +08:00
|
|
|
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
|
2009-07-14 21:59:30 +08:00
|
|
|
|
2017-03-31 17:48:42 +08:00
|
|
|
proginstall:
|
2019-02-15 05:23:16 +08:00
|
|
|
for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
|
2017-03-31 17:48:42 +08:00
|
|
|
|
2009-07-14 21:59:30 +08:00
|
|
|
clean:
|
2017-04-14 17:34:18 +08:00
|
|
|
rm -rf cov-int dhcpcd.xz
|
2019-02-15 05:23:16 +08:00
|
|
|
for x in ${SUBDIRS} tests; do cd $$x; ${MAKE} $@ || exit $$?; 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}
|
2019-09-13 18:54:03 +08:00
|
|
|
rm -f *.diff *.patch *.orig *.rej
|
|
|
|
for x in ${SUBDIRS} tests; do cd $$x; ${MAKE} $@ || exit $$?; cd ..; done
|
2010-06-10 05:16:04 +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}
|
|
|
|
|
2019-08-29 05:30:52 +08:00
|
|
|
_import: dist
|
|
|
|
rm -rf ${DESTDIR}/*
|
|
|
|
${INSTALL} -d ${DESTDIR}
|
|
|
|
tar xvpf ${DISTFILE} -C ${DESTDIR} --strip 1
|
|
|
|
@${ECHO}
|
|
|
|
@${ECHO} "============================================================="
|
|
|
|
@${ECHO} "dhcpcd-${VERSION} imported to ${DESTDIR}"
|
|
|
|
|
|
|
|
import:
|
|
|
|
${MAKE} _import DESTDIR=`if [ -n "${DESTDIR}" ]; then echo "${DESTDIR}"; else echo /tmp/${DISTPREFIX}; fi`
|
|
|
|
|
2009-07-15 17:36:43 +08:00
|
|
|
|
2020-07-02 21:05:19 +08:00
|
|
|
_import-src: clean
|
2019-08-29 03:35:27 +08:00
|
|
|
rm -rf ${DESTDIR}/*
|
|
|
|
${INSTALL} -d ${DESTDIR}
|
|
|
|
cp LICENSE README.md ${DESTDIR};
|
|
|
|
for x in ${SUBDIRS}; do cd $$x; ${MAKE} DESTDIR=${DESTDIR} $@ || exit $$?; cd ..; done
|
|
|
|
@${ECHO}
|
|
|
|
@${ECHO} "============================================================="
|
|
|
|
@${ECHO} "dhcpcd-${VERSION} imported to ${DESTDIR}"
|
|
|
|
|
2019-08-28 23:15:04 +08:00
|
|
|
import-src:
|
2019-08-29 03:35:27 +08:00
|
|
|
${MAKE} _import-src DESTDIR=`if [ -n "${DESTDIR}" ]; then echo "${DESTDIR}"; else echo /tmp/${DISTPREFIX}; fi`
|
2019-08-28 23:15:04 +08:00
|
|
|
|
2009-07-14 21:59:30 +08:00
|
|
|
include Makefile.inc
|