bsd.dep.mk revision 1.19
1# $NetBSD: bsd.dep.mk,v 1.19 1997/05/09 07:56:00 mycroft Exp $ 2 3.PHONY: cleandepend 4cleandir: 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} 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*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}"; \ 30 if [ "$$files" != " " ]; then \ 31 echo ${MKDEP} -a ${MKDEPFLAGS} \ 32 ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 33 ${MKDEP} -a ${MKDEPFLAGS} \ 34 ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 35 fi 36cleandepend: 37 rm -f .depend ${.CURDIR}/tags 38.else 39cleandepend: 40.endif 41depend: afterdepend 42 43beforedepend: 44afterdepend: 45 46.if !target(tags) 47.if defined(SRCS) 48tags: ${SRCS} 49 -cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \ 50 sed "s;\${.CURDIR}/;;" > tags 51.else 52tags: 53.endif 54.endif 55