2017-03-16 17:54:30 +08:00
|
|
|
SUBDIRS= src hooks
|
2007-04-09 01:35:22 +08:00
|
|
|
|
2023-04-21 04:14:02 +08:00
|
|
|
PACKAGE= dhcpcd
|
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=
|
2023-04-21 04:14:02 +08:00
|
|
|
DISTPREFIX?= ${PACKAGE}-${VERSION}${DISTSUFFIX}
|
2015-05-18 19:21:50 +08:00
|
|
|
DISTFILE?= ${DISTPREFIX}.tar.xz
|
2016-11-04 23:37:43 +08:00
|
|
|
DISTINFO= ${DISTFILE}.distinfo
|
2023-04-20 19:00:32 +08:00
|
|
|
DISTINFOMD= ${DISTINFO}.md
|
|
|
|
DISTSIGN= ${DISTFILE}.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 \
|
2023-04-20 19:00:32 +08:00
|
|
|
${DISTFILE} ${DISTINFO} ${DISTINFOMD} ${DISTSIGN}
|
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:
|
2023-04-20 19:00:32 +08:00
|
|
|
git archive --prefix=${DISTPREFIX}/ v${VERSION} | xz >${DISTFILE}
|
2017-03-16 18:01:12 +08:00
|
|
|
|
|
|
|
dist-inst:
|
|
|
|
mkdir /tmp/${DISTPREFIX}
|
|
|
|
cp -RPp * /tmp/${DISTPREFIX}
|
|
|
|
(cd /tmp/${DISTPREFIX}; make clean)
|
2023-04-20 19:00:32 +08:00
|
|
|
tar -cvJpf ${DISTFILE} -C /tmp ${DISTPREFIX}
|
2017-03-16 18:01:12 +08:00
|
|
|
rm -rf /tmp/${DISTPREFIX}
|
|
|
|
|
|
|
|
dist: ${DIST}
|
|
|
|
|
2016-11-04 23:37:43 +08:00
|
|
|
distinfo: dist
|
2023-04-20 19:00:32 +08:00
|
|
|
rm -f ${DISTINFO} ${DISTSIGN}
|
|
|
|
${SHA256} ${DISTFILE} >${DISTINFO}
|
2023-04-21 21:58:25 +08:00
|
|
|
wc -c <${DISTFILE} \
|
|
|
|
| xargs printf 'Size (${DISTFILE}) = %s\n' >>${DISTINFO}
|
2023-04-20 19:00:32 +08:00
|
|
|
${PGP} --armour --detach-sign ${DISTFILE}
|
|
|
|
chmod 644 ${DISTSIGN}
|
|
|
|
ls -l ${DISTFILE} ${DISTINFO} ${DISTSIGN}
|
|
|
|
|
2023-04-20 19:12:14 +08:00
|
|
|
${DISTINFOMD}: ${DISTINFO}
|
2023-04-20 19:00:32 +08:00
|
|
|
echo '```' >${DISTINFOMD}
|
|
|
|
cat ${DISTINFO} >>${DISTINFOMD}
|
|
|
|
echo '```' >>${DISTINFOMD}
|
|
|
|
|
2023-04-20 19:12:14 +08:00
|
|
|
release: distinfo ${DISTINFOMD}
|
2023-04-20 19:00:32 +08:00
|
|
|
gh release create v${VERSION} \
|
2023-04-21 04:14:02 +08:00
|
|
|
--title "${PACKAGE} ${VERSION}" --draft --generate-notes \
|
2023-04-20 19:00:32 +08:00
|
|
|
--notes-file ${DISTINFOMD} \
|
|
|
|
${DISTFILE} ${DISTSIGN}
|
2016-11-04 23:37:43 +08:00
|
|
|
|
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} "============================================================="
|
2023-04-21 04:14:02 +08:00
|
|
|
@${ECHO} "${PACKAGE}-${VERSION} imported to ${DESTDIR}"
|
2019-08-29 05:30:52 +08:00
|
|
|
|
|
|
|
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} "============================================================="
|
2023-04-21 04:14:02 +08:00
|
|
|
@${ECHO} "${PACKAGE}-${VERSION} imported to ${DESTDIR}"
|
2019-08-29 03:35:27 +08:00
|
|
|
|
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
|