summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.dep.mk
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2004-01-13 17:37:45 +0000
committerru <ru@FreeBSD.org>2004-01-13 17:37:45 +0000
commitb48a558a6b3a15ee90e6fe4c21cde7fa15c06e68 (patch)
tree448ec9feec5e3da6ef91e4c9a3d0caee03ef8ad6 /share/mk/bsd.dep.mk
parent11c4902229ad8476248a27d2fa684452f1cdb7f5 (diff)
downloadFreeBSD-src-b48a558a6b3a15ee90e6fe4c21cde7fa15c06e68.zip
FreeBSD-src-b48a558a6b3a15ee90e6fe4c21cde7fa15c06e68.tar.gz
Introduce DPSRCS, that holds the list of source files which are
needed for generating dependencies. SRCS are always part of it, and normally only they. This can be useful in some random cases where it's necessary to have something in .depend that isn't part of SRCS. This will be used to replace a hack in lib/libpam/libpam/Makefile.
Diffstat (limited to 'share/mk/bsd.dep.mk')
-rw-r--r--share/mk/bsd.dep.mk13
1 files changed, 8 insertions, 5 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
index 9ae361e..228dc89 100644
--- a/share/mk/bsd.dep.mk
+++ b/share/mk/bsd.dep.mk
@@ -21,6 +21,8 @@
#
# SRCS List of source files (c, c++, assembler)
#
+# DPSRCS List of source files which are needed for generating
+# dependencies, ${SRCS} are always part of it.
#
# +++ targets +++
#
@@ -111,20 +113,21 @@ depend: beforedepend ${DEPENDFILE} afterdepend
# Different types of sources are compiled with slightly different flags.
# Split up the sources, and filter out headers and non-applicable flags.
-${DEPENDFILE}: ${SRCS}
+DPSRCS+= ${SRCS}
+${DEPENDFILE}: ${DPSRCS}
rm -f ${DEPENDFILE}
-.if ${SRCS:M*.[cS]} != ""
+.if ${DPSRCS:M*.[cS]} != ""
${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \
${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BID]*} \
${.ALLSRC:M*.[cS]}
.endif
-.if ${SRCS:M*.cc} != "" || ${SRCS:M*.C} != "" || ${SRCS:M*.cpp} != "" || \
- ${SRCS:M*.cxx} != ""
+.if ${DPSRCS:M*.cc} != "" || ${DPSRCS:M*.C} != "" || ${DPSRCS:M*.cpp} != "" || \
+ ${DPSRCS:M*.cxx} != ""
${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \
${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BID]*} \
${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cpp} ${.ALLSRC:M*.cxx}
.endif
-.if ${SRCS:M*.m} != ""
+.if ${DPSRCS:M*.m} != ""
${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \
${OBJCFLAGS:M-nostdinc*} ${OBJCFLAGS:M-[BID]*} \
${OBJCFLAGS:M-Wno-import*} \
OpenPOWER on IntegriCloud