bsd.dep.mk revision 1.22
1# $NetBSD: bsd.dep.mk,v 1.22 1998/08/18 17:31:21 tv Exp $ 2 3.PHONY: cleandepend 4cleandir distclean: cleandepend 5 6MKDEP?= mkdep 7 8# some of the rules involve .h sources, so remove them from mkdep line 9depend: beforedepend 10.if defined(SRCS) 11depend: .depend 12.NOPATH: .depend 13.depend: ${SRCS} ${DPSRCS} 14 @rm -f .depend 15 @files="${.ALLSRC:M*.s} ${.ALLSRC:M*.S}"; \ 16 if [ "$$files" != " " ]; then \ 17 echo ${MKDEP} -a ${MKDEPFLAGS} \ 18 ${CFLAGS:M-[ID]*} ${CPPFLAGS} ${AINC} $$files; \ 19 ${MKDEP} -a ${MKDEPFLAGS} \ 20 ${CFLAGS:M-[ID]*} ${CPPFLAGS} ${AINC} $$files; \ 21 fi 22 @files="${.ALLSRC:M*.c}"; \ 23 if [ "$$files" != "" ]; then \ 24 echo ${MKDEP} -a ${MKDEPFLAGS} \ 25 ${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 26 ${MKDEP} -a ${MKDEPFLAGS} \ 27 ${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 28 fi 29 @files="${.ALLSRC:M*.m}"; \ 30 if [ "$$files" != " " ]; then \ 31 echo ${MKDEP} -a ${MKDEPFLAGS} \ 32 ${OBJCFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 33 ${MKDEP} -a ${MKDEPFLAGS} \ 34 ${OBJCFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 35 fi 36 @files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}"; \ 37 if [ "$$files" != " " ]; then \ 38 echo ${MKDEP} -a ${MKDEPFLAGS} \ 39 ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 40 ${MKDEP} -a ${MKDEPFLAGS} \ 41 ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 42 fi 43cleandepend: 44 rm -f .depend ${.CURDIR}/tags 45.else 46cleandepend: 47.endif 48depend: afterdepend 49 50beforedepend: 51afterdepend: 52 53.if !target(tags) 54.if defined(SRCS) 55tags: ${SRCS} 56 -cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \ 57 sed "s;\${.CURDIR}/;;" > tags 58.else 59tags: 60.endif 61.endif 62