2001-06-01 21:49:32 +04:00
|
|
|
# $NetBSD: bsd.dep.mk,v 1.31 2001/06/01 17:49:32 tv Exp $
|
1997-03-08 02:10:18 +03:00
|
|
|
|
1997-05-07 12:42:18 +04:00
|
|
|
.PHONY: cleandepend
|
2001-06-01 21:49:32 +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
|
2000-01-22 22:31:00 +03:00
|
|
|
realdepend: beforedepend
|
1993-08-15 23:37:04 +04:00
|
|
|
.if defined(SRCS)
|
2000-01-22 22:31:00 +03:00
|
|
|
realdepend: .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} \
|
1999-11-16 16:15:09 +03:00
|
|
|
${AFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} -traditional-cpp ${AINC:Q} \
|
1999-11-16 11:18:34 +03:00
|
|
|
$$files; \
|
1997-03-08 02:10:18 +03:00
|
|
|
${MKDEP} -a ${MKDEPFLAGS} \
|
1999-11-16 11:18:34 +03:00
|
|
|
${AFLAGS:M-[ID]*} ${CPPFLAGS} -traditional-cpp ${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} \
|
1999-02-07 20:29:40 +03:00
|
|
|
${CFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \
|
1997-03-08 02:10:18 +03:00
|
|
|
${MKDEP} -a ${MKDEPFLAGS} \
|
|
|
|
${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
|
1993-08-15 23:37:04 +04:00
|
|
|
fi
|
1998-08-18 21:31:21 +04:00
|
|
|
@files="${.ALLSRC:M*.m}"; \
|
1998-08-18 23:12:42 +04:00
|
|
|
if [ "$$files" != "" ]; then \
|
1998-08-18 21:31:21 +04:00
|
|
|
echo ${MKDEP} -a ${MKDEPFLAGS} \
|
1999-02-07 20:29:40 +03:00
|
|
|
${OBJCFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \
|
1998-08-18 21:31:21 +04:00
|
|
|
${MKDEP} -a ${MKDEPFLAGS} \
|
|
|
|
${OBJCFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
|
|
|
|
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} \
|
1999-02-07 20:29:40 +03:00
|
|
|
${CXXFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \
|
1997-03-08 02:10:18 +03:00
|
|
|
${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:
|
1999-08-11 06:00:15 +04:00
|
|
|
rm -f .depend ${.CURDIR}/tags ${CLEANDEPEND}
|
1997-05-09 11:56:00 +04:00
|
|
|
.else
|
|
|
|
cleandepend:
|
1993-08-15 23:37:04 +04:00
|
|
|
.endif
|
2000-01-22 22:31:00 +03:00
|
|
|
realdepend: 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
|