1997-05-07 00:54:31 +04:00
|
|
|
# $NetBSD: bsd.dep.mk,v 1.14 1997/05/06 20:54:31 mycroft Exp $
|
1997-03-08 02:10:18 +03:00
|
|
|
|
1997-05-07 00:54:31 +04:00
|
|
|
.PHONY: beforedepend afterdepend cleandepend
|
|
|
|
|
|
|
|
MKDEP?= mkdep
|
1993-08-15 23:37:04 +04:00
|
|
|
|
|
|
|
# some of the rules involve .h sources, so remove them from mkdep line
|
|
|
|
.if !target(depend)
|
1994-06-30 09:21:28 +04:00
|
|
|
depend: beforedepend .depend _SUBDIRUSE afterdepend
|
1993-08-15 23:37:04 +04:00
|
|
|
.if defined(SRCS)
|
|
|
|
.depend: ${SRCS}
|
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
|
1993-08-16 01:14:45 +04:00
|
|
|
.else
|
|
|
|
.depend:
|
1993-08-15 23:37:04 +04:00
|
|
|
.endif
|
1993-08-16 01:09:20 +04:00
|
|
|
.if !target(beforedepend)
|
|
|
|
beforedepend:
|
|
|
|
.endif
|
|
|
|
.if !target(afterdepend)
|
|
|
|
afterdepend:
|
|
|
|
.endif
|
1993-08-15 23:37:04 +04:00
|
|
|
.endif
|
1993-08-16 00:42:39 +04:00
|
|
|
|
|
|
|
.if !target(tags)
|
1993-08-16 01:14:45 +04:00
|
|
|
.if defined(SRCS)
|
1994-06-30 09:21:28 +04:00
|
|
|
tags: ${SRCS} _SUBDIRUSE
|
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
|
|
|
|
|
1993-08-16 01:14:45 +04:00
|
|
|
.if defined(SRCS)
|
1994-02-28 01:27:18 +03:00
|
|
|
cleandir: cleandepend
|
1993-08-16 00:42:39 +04:00
|
|
|
cleandepend:
|
|
|
|
rm -f .depend ${.CURDIR}/tags
|
1993-08-16 01:14:45 +04:00
|
|
|
.endif
|