bsd.dep.mk revision 1.26
1# $NetBSD: bsd.dep.mk,v 1.26 1999/02/24 22:04:15 simonb 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 @true # hack to prevent "make depend" from using implicit rules 13.NOPATH: .depend 14.depend: ${SRCS} ${DPSRCS} 15 @rm -f .depend 16 @files="${.ALLSRC:M*.s} ${.ALLSRC:M*.S}"; \ 17 if [ "$$files" != " " ]; then \ 18 echo ${MKDEP} -a ${MKDEPFLAGS} \ 19 ${AFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} ${AINC:Q} $$files; \ 20 ${MKDEP} -a ${MKDEPFLAGS} \ 21 ${AFLAGS:M-[ID]*} ${CPPFLAGS} ${AINC} $$files; \ 22 fi 23 @files="${.ALLSRC:M*.c}"; \ 24 if [ "$$files" != "" ]; then \ 25 echo ${MKDEP} -a ${MKDEPFLAGS} \ 26 ${CFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \ 27 ${MKDEP} -a ${MKDEPFLAGS} \ 28 ${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 29 fi 30 @files="${.ALLSRC:M*.m}"; \ 31 if [ "$$files" != "" ]; then \ 32 echo ${MKDEP} -a ${MKDEPFLAGS} \ 33 ${OBJCFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \ 34 ${MKDEP} -a ${MKDEPFLAGS} \ 35 ${OBJCFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 36 fi 37 @files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}"; \ 38 if [ "$$files" != " " ]; then \ 39 echo ${MKDEP} -a ${MKDEPFLAGS} \ 40 ${CXXFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \ 41 ${MKDEP} -a ${MKDEPFLAGS} \ 42 ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 43 fi 44cleandepend: 45 rm -f .depend ${.CURDIR}/tags 46.else 47cleandepend: 48.endif 49depend: afterdepend 50 51beforedepend: 52afterdepend: 53 54.if !target(tags) 55.if defined(SRCS) 56tags: ${SRCS} 57 -cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \ 58 sed "s;\${.CURDIR}/;;" > tags 59.else 60tags: 61.endif 62.endif 63