Let's make things easier and split the example hooks out into

a new Makefile.
This commit is contained in:
roy 2017-04-02 20:18:37 +00:00
parent 1eb8783e7c
commit 7466388691
4 changed files with 36 additions and 28 deletions

View File

@ -1,5 +1,5 @@
# $NetBSD: Makefile,v 1.2 2017/03/31 21:02:08 roy Exp $
# $NetBSD: Makefile,v 1.3 2017/04/02 20:18:37 roy Exp $
SUBDIR= sbin libexec
SUBDIR= sbin libexec examples
.include <bsd.subdir.mk>

5
external/bsd/dhcpcd/examples/Makefile vendored Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2017/04/02 20:18:37 roy Exp $
SUBDIR= hooks
.include <bsd.subdir.mk>

View File

@ -0,0 +1,24 @@
# $NetBSD: Makefile,v 1.1 2017/04/02 20:18:37 roy Exp $
#
.include <bsd.own.mk>
.include "../../Makefile.inc"
.PATH: ${DIST}/hooks
.if ${MKSHARE} != "no"
FILES= 10-wpa_supplicant 15-timezone 29-lookup-hostname
FILES+= 50-ypbind
FILESBUILD_50-ypbind= YES
CLEANFILES+= 50-ypbind
FILESDIR= /usr/share/examples/dhcpcd/hooks
.SUFFIXES: .in
.in: ../../Makefile.inc
${TOOL_SED} ${SED_SYS} $< > $@
.endif
.include <bsd.prog.mk>

View File

@ -1,36 +1,15 @@
# $NetBSD: Makefile,v 1.2 2017/04/01 19:02:58 roy Exp $
# $NetBSD: Makefile,v 1.3 2017/04/02 20:18:38 roy Exp $
#
.include <bsd.own.mk>
.include "../../Makefile.inc"
HOOKSRC= ${DIST}/hooks
.PATH: ${HOOKSRC} ${OBJDIR}
HOOKS= 01-test 02-dump 20-resolv.conf 30-hostname
HOOKS+= 50-ntp.conf
.PATH: ${DIST}/hooks
FILES= 01-test 02-dump 20-resolv.conf 30-hostname
FILES+= 50-ntp.conf
FILES= ${HOOKS:C,^,${HOOKSRC}/,}
FILESDIR= /libexec/dhcpcd-hooks
EGHOOKS= 10-wpa_supplicant 15-timezone 29-lookup-hostname
MKEGHOOKS= 50-ypbind
CLEANFILES+= 50-ypbind
.if ${MKSHARE} != "no"
EGFILES= ${EGHOOKS:C,^,${HOOKSRC}/,}
EGFILES+= ${MKEGHOOKS:C,^,${.OBJDIR}/,}
FILES+= ${EGFILES}
.for f in ${EGFILES}
FILESDIR_${f}= /usr/share/examples/dhcpcd/hooks
.endfor
.endif
.SUFFIXES: .in
all: ${HOOKS} ${EGHOOKS} ${MKEGHOOKS}
.in: ../../Makefile.inc
${TOOL_SED} ${SED_SYS} $< > $@
.include <bsd.prog.mk>