NetBSD/share/mk/bsd.dep.mk

47 lines
1.0 KiB
Makefile
Raw Normal View History

1993-12-05 05:42:42 +03:00
# $Id: bsd.dep.mk,v 1.6 1993/12/05 02:42:42 cgd Exp $
# some of the rules involve .h sources, so remove them from mkdep line
.if !target(depend)
depend: beforedepend .depend afterdepend
.if defined(SRCS)
.depend: ${SRCS}
rm -f .depend
1993-12-05 05:42:42 +03:00
files="${.ALLSRC:M*.s} ${.ALLSRC:M*.S}"; \
if [ "$$files" != " " ]; then \
1993-09-05 21:46:15 +04:00
mkdep -a ${MKDEP} ${CFLAGS:M-[ID]*} ${AINC} $$files; \
fi
files="${.ALLSRC:M*.c}"; \
if [ "$$files" != "" ]; then \
mkdep -a ${MKDEP} ${CFLAGS:M-[ID]*} $$files; \
fi
files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}"; \
if [ "$$files" != " " ]; then \
mkdep -a ${MKDEP} -+ ${CXXFLAGS:M-[ID]*} $$files; \
fi
.else
.depend:
.endif
.if !target(beforedepend)
beforedepend:
.endif
.if !target(afterdepend)
afterdepend:
.endif
.endif
.if !target(tags)
.if defined(SRCS)
tags: ${SRCS}
-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \
sed "s;\${.CURDIR}/;;" > tags
.else
tags:
.endif
.endif
.if defined(SRCS)
clean: cleandepend
cleandepend:
rm -f .depend ${.CURDIR}/tags
.endif