From b48a558a6b3a15ee90e6fe4c21cde7fa15c06e68 Mon Sep 17 00:00:00 2001 From: ru Date: Tue, 13 Jan 2004 17:37:45 +0000 Subject: 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. --- share/mk/bsd.dep.mk | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'share/mk/bsd.dep.mk') 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*} \ -- cgit v1.1