1995-02-08 22:35:31 +01:00
|
|
|
# $Id: bsd.dep.mk,v 1.1 1994/08/04 21:10:07 wollman Exp $
|
1994-08-04 23:10:08 +02:00
|
|
|
|
|
|
|
# some of the rules involve .h sources, so remove them from mkdep line
|
|
|
|
.if !target(depend)
|
1995-02-08 22:35:31 +01:00
|
|
|
depend: beforedepend .depend afterdepend ${_DEPSUBDIR}
|
1994-08-04 23:10:08 +02:00
|
|
|
.if defined(SRCS)
|
|
|
|
.depend: ${SRCS}
|
|
|
|
rm -f .depend
|
|
|
|
files="${.ALLSRC:M*.[sS]}"; \
|
|
|
|
if [ "$$files" != "" ]; then \
|
|
|
|
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-nostd*} ${CXXFLAGS:M-[ID]*} $$files; \
|
|
|
|
fi
|
|
|
|
.else
|
1995-02-08 22:35:31 +01:00
|
|
|
.depend: ${_DEPSUBDIR}
|
1994-08-04 23:10:08 +02:00
|
|
|
.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:
|
|
|
|
cleandir: cleandepend
|
|
|
|
cleandepend:
|
|
|
|
rm -f .depend ${.CURDIR}/tags
|
|
|
|
.endif
|