1 # $NetBSD: bsd.dep.mk,v 1.68 2008/10/25 22:27:36 apb Exp $
5 realdepend
: beforedepend .depend afterdepend
6 .ORDER
: beforedepend .depend afterdepend
8 beforedepend .depend afterdepend
: # ensure existence
15 # some of the rules involve .h sources, so remove them from mkdep line
18 #_TRADITIONAL_CPP?=-traditional-cpp
19 __acpp_flags
= ${_TRADITIONAL_CPP}
21 __DPSRCS.
all= ${SRCS
:C
/\.
(c|m|s|S|C|
cc|
cpp|
cxx)$/.d
/} \
22 ${DPSRCS
:C
/\.
(c|m|s|S|C|
cc|
cpp|
cxx)$/.d
/}
23 __DPSRCS.d
= ${__DPSRCS.
all:O
:u
:M
*.d
}
24 __DPSRCS.notd
= ${__DPSRCS.
all:O
:u
:N
*.d
}
26 .NOPATH
: .depend
${__DPSRCS.d
}
28 .if
!empty
(__DPSRCS.d
) # {
29 ${__DPSRCS.d
}: ${__DPSRCS.notd
} ${DPSRCS}
32 .depend
: ${__DPSRCS.d
}
35 # ${MKDEP} -d -f ${.TARGET} -s ${MKDEP_SUFFIXES:Q} ${__DPSRCS.d}
36 cat
${__DPSRCS.d
} > ${.TARGET
}
38 .SUFFIXES
: .d .s .S .c .C .
cc .
cpp .
cxx .m
42 # ${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} \
43 # ${CFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \
44 # ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
45 # mkdep -- ${MKDEPFLAGS} \
46 # ${CFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \
47 # ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} > ${.TARGET}
48 mkdep
"$(CC) ${CFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \
49 ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} -E" ${.IMPSRC
} > ${.TARGET
}
53 # ${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} \
54 # ${OBJCFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \
55 # ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
59 # ${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} \
60 # ${AFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \
61 # ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} ${__acpp_flags} ${.IMPSRC}
62 mkdep
"$(CC) ${AFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \
63 ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} -E" ${.IMPSRC
} > ${.TARGET
}
65 # .C.d .cc.d .cpp.d .cxx.d:
67 # ${MKDEP} -f ${.TARGET} -- ${MKDEPFLAGS} \
68 # ${CXXFLAGS:C/-([IDU])[ ]*/-\1/Wg:M-[IDU]*} \
69 # ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEMXX} \
70 # ${DESTDIR}/usr/include/g++} \
71 # ${CPPFLAGS} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
73 .
endif # defined(SRCS) # }
78 rm -f .depend
${__DPSRCS.d
} ${.CURDIR
}/tags ${CLEANDEPEND}
85 # -cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \
86 # ${TOOL_SED} "s;\${.CURDIR}/;;" > tags