1997-05-09 17:25:46 +04:00
|
|
|
# $NetBSD: bsd.dep.mk,v 1.20 1997/05/09 13:25:46 mycroft Exp $
|
1997-03-08 02:10:18 +03:00
|
|
|
|
1997-05-07 12:42:18 +04:00
|
|
|
.PHONY: cleandepend
|
1997-05-07 20:44:04 +04:00
|
|
|
cleandir: cleandepend
|
1997-05-07 00:54:31 +04:00
|
|
|
|
|
|
|
MKDEP?= mkdep
|
1993-08-15 23:37:04 +04:00
|
|
|
|
|
|
|
# some of the rules involve .h sources, so remove them from mkdep line
|
1997-05-07 20:44:04 +04:00
|
|
|
depend: beforedepend
|
1993-08-15 23:37:04 +04:00
|
|
|
.if defined(SRCS)
|
1997-05-07 20:44:04 +04:00
|
|
|
depend: .depend
|
1997-05-09 01:18:59 +04:00
|
|
|
.NOPATH: .depend
|
1997-05-09 17:25:46 +04:00
|
|
|
.depend: ${SRCS} ${DPSRCS}
|
1995-09-27 04:15:09 +03:00
|
|
|
@rm -f .depend
|
|
|
|
@files="${.ALLSRC:M*.s} ${.ALLSRC:M*.S}"; \
|
1993-12-05 05:42:42 +03:00
|
|
|
if [ "$$files" != " " ]; then \
|
1997-03-08 02:10:18 +03:00
|
|
|
echo ${MKDEP} -a ${MKDEPFLAGS} \
|
|
|
|
${CFLAGS:M-[ID]*} ${CPPFLAGS} ${AINC} $$files; \
|
|
|
|
${MKDEP} -a ${MKDEPFLAGS} \
|
|
|
|
${CFLAGS:M-[ID]*} ${CPPFLAGS} ${AINC} $$files; \
|
1993-09-05 21:46:15 +04:00
|
|
|
fi
|
1995-09-27 04:15:09 +03:00
|
|
|
@files="${.ALLSRC:M*.c}"; \
|
1993-08-15 23:37:04 +04:00
|
|
|
if [ "$$files" != "" ]; then \
|
1997-03-08 02:10:18 +03:00
|
|
|
echo ${MKDEP} -a ${MKDEPFLAGS} \
|
|
|
|
${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
|
|
|
|
${MKDEP} -a ${MKDEPFLAGS} \
|
|
|
|
${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
|
1993-08-15 23:37:04 +04:00
|
|
|
fi
|
1995-09-27 04:15:09 +03:00
|
|
|
@files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}"; \
|
1993-08-15 23:37:04 +04:00
|
|
|
if [ "$$files" != " " ]; then \
|
1997-03-08 02:10:18 +03:00
|
|
|
echo ${MKDEP} -a ${MKDEPFLAGS} \
|
|
|
|
${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
|
|
|
|
${MKDEP} -a ${MKDEPFLAGS} \
|
|
|
|
${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
|
1993-08-15 23:37:04 +04:00
|
|
|
fi
|
1997-05-09 11:56:00 +04:00
|
|
|
cleandepend:
|
|
|
|
rm -f .depend ${.CURDIR}/tags
|
|
|
|
.else
|
|
|
|
cleandepend:
|
1993-08-15 23:37:04 +04:00
|
|
|
.endif
|
1997-05-07 21:06:16 +04:00
|
|
|
depend: afterdepend
|
1997-05-09 11:56:00 +04:00
|
|
|
|
1993-08-16 01:09:20 +04:00
|
|
|
beforedepend:
|
|
|
|
afterdepend:
|
1993-08-16 00:42:39 +04:00
|
|
|
|
|
|
|
.if !target(tags)
|
1993-08-16 01:14:45 +04:00
|
|
|
.if defined(SRCS)
|
1997-05-07 21:06:16 +04:00
|
|
|
tags: ${SRCS}
|
1993-08-16 00:42:39 +04:00
|
|
|
-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \
|
|
|
|
sed "s;\${.CURDIR}/;;" > tags
|
1993-08-16 01:14:45 +04:00
|
|
|
.else
|
|
|
|
tags:
|
|
|
|
.endif
|
1993-08-16 00:42:39 +04:00
|
|
|
.endif
|