2017-03-16 06:06:12 +08:00
|
|
|
SUBDIRS= src dhcpcd-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
|
|
|
|
2014-01-04 01:16:12 +08:00
|
|
|
FOSSILID?= current
|
|
|
|
|
2009-07-14 21:59:30 +08:00
|
|
|
DISTPREFIX?= ${PROG}-${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
|
|
|
|
CKSUM?= cksum -a SHA256
|
|
|
|
PGP?= netpgp
|
2009-07-14 21:59:30 +08:00
|
|
|
|
2013-11-29 19:15:03 +08:00
|
|
|
HOST_SH?= /bin/sh
|
|
|
|
|
2015-05-18 19:21:50 +08:00
|
|
|
CLEANFILES+= *.tar.xz
|
2009-07-14 21:59:30 +08:00
|
|
|
|
2017-03-16 06:06:12 +08:00
|
|
|
.PHONY: import import-bsd test
|
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
|
|
|
|
2014-01-25 09:35:53 +08:00
|
|
|
test:
|
|
|
|
cd $@; ${MAKE} $@; ./$@
|
|
|
|
|
2016-09-19 21:00:45 +08:00
|
|
|
hooks:
|
|
|
|
cd dhcpcd-hooks; ${MAKE}; cd ..; done
|
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
|
|
|
|
|
|
|
clean:
|
2014-01-25 09:35:53 +08:00
|
|
|
for x in ${SUBDIRS} test; 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
|
|
|
|
2009-07-14 21:59:30 +08:00
|
|
|
dist:
|
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
|
|
|
|
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}
|
|
|
|
|
2016-09-19 21:00:45 +08:00
|
|
|
import: ${SRCS} hooks
|
2009-07-15 17:36:43 +08:00
|
|
|
rm -rf /tmp/${DISTPREFIX}
|
|
|
|
${INSTALL} -d /tmp/${DISTPREFIX}
|
2016-09-19 21:00:45 +08:00
|
|
|
cp genembedc genembedh /tmp/${DISTPREFIX}
|
|
|
|
cp $$(echo ${SRCS} | sed -e 's/\(dhcpcd-embedded.[ch]\)/\1.in/') \
|
|
|
|
/tmp/${DISTPREFIX}
|
|
|
|
cp dhcpcd.conf dhcpcd-definitions.conf *.in /tmp/${DISTPREFIX}
|
|
|
|
cp dhcpcd-definitions-small.conf *.in /tmp/${DISTPREFIX}
|
|
|
|
cp $$(${CC} ${CPPFLAGS} -DDEPGEN -MM \
|
|
|
|
$$(echo ${SRCS} | sed -e 's/dhcpcd-embedded.c//') | \
|
2010-02-27 23:33:18 +08:00
|
|
|
sed -e 's/^.*\.c //g' -e 's/.*\.c$$//g' -e 's/\\//g' | \
|
2009-07-15 17:36:43 +08:00
|
|
|
tr ' ' '\n' | \
|
2016-09-19 21:00:45 +08:00
|
|
|
sed -e '/^dhcpcd-embedded.h$$/d' | \
|
2009-11-20 20:40:59 +08:00
|
|
|
sed -e '/^compat\//d' | \
|
2014-01-31 23:55:16 +08:00
|
|
|
sed -e '/^crypt\//d' | \
|
|
|
|
sort -u) /tmp/${DISTPREFIX}; \
|
2016-10-07 17:42:38 +08:00
|
|
|
if test -n "${CRYPT_SRCS}"; then \
|
2014-01-31 23:55:16 +08:00
|
|
|
${INSTALL} -d /tmp/${DISTPREFIX}/crypt; \
|
2016-10-07 17:42:38 +08:00
|
|
|
cp ${CRYPT_SRCS} /tmp/${DISTPREFIX}/crypt; \
|
|
|
|
cp $$(${CC} ${CPPFLAGS} -DDEPGEN -MM ${CRYPT_SRCS} | \
|
2014-01-31 23:55:16 +08:00
|
|
|
sed -e 's/^.*c //g' -e 's/.*\.c$$//g' -e 's/\\//g' | \
|
2014-07-30 17:46:33 +08:00
|
|
|
tr ' ' '\n' | sed -e '/\/\.\.\//d' | \
|
2014-01-31 23:55:16 +08:00
|
|
|
sort -u) /tmp/${DISTPREFIX}/crypt; \
|
|
|
|
fi;
|
2009-10-09 04:21:23 +08:00
|
|
|
if test -n "${COMPAT_SRCS}"; then \
|
|
|
|
${INSTALL} -d /tmp/${DISTPREFIX}/compat; \
|
2014-02-03 21:09:13 +08:00
|
|
|
cp ${COMPAT_SRCS} /tmp/${DISTPREFIX}/compat; \
|
2014-07-30 18:58:20 +08:00
|
|
|
cp $$(${CC} ${CPPFLAGS} -DDEPGEN -MM ${COMPAT_SRCS} | \
|
2010-02-27 23:33:18 +08:00
|
|
|
sed -e 's/^.*c //g' -e 's/.*\.c$$//g' -e 's/\\//g' | \
|
2014-02-03 21:09:13 +08:00
|
|
|
tr ' ' '\n' | \
|
2009-10-09 04:21:23 +08:00
|
|
|
sort -u) /tmp/${DISTPREFIX}/compat; \
|
|
|
|
fi;
|
2009-07-15 17:36:43 +08:00
|
|
|
cd dhcpcd-hooks; ${MAKE} DISTPREFIX=${DISTPREFIX} $@
|
|
|
|
|
2009-07-14 21:59:30 +08:00
|
|
|
include Makefile.inc
|