1 # $NetBSD: bsd.dep.mk,v 1.74 2012/02/19 23:19:37 matt Exp $
4 realdepend
: beforedepend .depend afterdepend
5 .ORDER
: beforedepend .depend afterdepend
7 beforedepend .depend afterdepend
: # ensure existence
14 # some of the rules involve .h sources, so remove them from mkdep line
17 __acpp_flags
= ${_ASM_TRADITIONAL_CPP}
20 .for f in
${SRCS} ${DPSRCS}
21 .if
"${NODPSRCS:M${f}}" == ""
22 __DPSRCS.
all+= ${f
:C
/\.
(c|m|s|S|C|
cc|
cpp|
cxx)$/.d
/}
25 beforedepend
: ${DPSRCS}
27 __DPSRCS.
all+= ${SRCS
:C
/\.
(c|m|s|S|C|
cc|
cpp|
cxx)$/.d
/} \
28 ${DPSRCS
:C
/\.
(c|m|s|S|C|
cc|
cpp|
cxx)$/.d
/}
30 __DPSRCS.d
= ${__DPSRCS.
all:O
:u
:M
*.d
}
31 __DPSRCS.notd
= ${__DPSRCS.
all:O
:u
:N
*.d
}
33 .NOPATH
: .depend
${__DPSRCS.d
}
35 .if
!empty
(__DPSRCS.d
) # {
36 ${__DPSRCS.d
}: ${__DPSRCS.notd
} ${DPSRCS}
39 .depend
: ${__DPSRCS.d
}
42 ${MKDEP} -d
-f
${.TARGET
} -s
${MKDEP_SUFFIXES
:Q
} ${__DPSRCS.d
}
44 .SUFFIXES
: .d .s .S .c .C .
cc .
cpp .
cxx .m
48 ${MKDEP} -f
${.TARGET
} -- ${MKDEPFLAGS} \
49 ${CFLAGS
:C
/-([IDU
])[ ]*/-\
1/Wg
:M-
[IDU
]*} \
50 ${CPPFLAGS} ${CPPFLAGS.
${.IMPSRC
:T
}} ${.IMPSRC
}
54 ${MKDEP} -f
${.TARGET
} -- ${MKDEPFLAGS} \
55 ${OBJCFLAGS
:C
/-([IDU
])[ ]*/-\
1/Wg
:M-
[IDU
]*} \
56 ${CPPFLAGS} ${CPPFLAGS.
${.IMPSRC
:T
}} ${.IMPSRC
}
60 ${MKDEP} -f
${.TARGET
} -- ${MKDEPFLAGS} \
61 ${AFLAGS
:C
/-([IDU
])[ ]*/-\
1/Wg
:M-
[IDU
]*} \
62 ${CPPFLAGS} ${CPPFLAGS.
${.IMPSRC
:T
}} ${__acpp_flags} ${.IMPSRC
}
64 .C.d .
cc.d .
cpp.d .
cxx.d
:
66 ${MKDEP} -f
${.TARGET
} -- ${MKDEPFLAGS} \
67 ${CXXFLAGS
:C
/-([IDU
])[ ]*/-\
1/Wg
:M-
[IDU
]*} \
68 ${CPPFLAGS} ${CPPFLAGS.
${.IMPSRC
:T
}} ${.IMPSRC
}
70 .
endif # defined(SRCS) # }
74 CLEANDIRFILES
+= .depend
${__DPSRCS.d
} ${.CURDIR
}/tags ${CLEANDEPEND}
81 -cd
"${.CURDIR}"; ctags
-f
/dev
/stdout
${.ALLSRC
:N
*.h
} | \
82 ${TOOL_SED} "s;\${.CURDIR}/;;" > tags
86 ##### Pull in related .mk logic
87 .
include <bsd.
clean.mk
>