1 1.28 minoura # $NetBSD: bsd.dep.mk,v 1.28 1999/11/16 08:18:34 minoura Exp $ 2 1.13 gwr 3 1.15 mycroft .PHONY: cleandepend 4 1.21 lukem cleandir distclean: cleandepend 5 1.14 mycroft 6 1.14 mycroft MKDEP?= mkdep 7 1.1 mycroft 8 1.1 mycroft # some of the rules involve .h sources, so remove them from mkdep line 9 1.16 mycroft depend: beforedepend 10 1.1 mycroft .if defined(SRCS) 11 1.16 mycroft depend: .depend 12 1.24 tv @true # hack to prevent "make depend" from using implicit rules 13 1.18 gwr .NOPATH: .depend 14 1.20 mycroft .depend: ${SRCS} ${DPSRCS} 15 1.12 christos @rm -f .depend 16 1.12 christos @files="${.ALLSRC:M*.s} ${.ALLSRC:M*.S}"; \ 17 1.6 cgd if [ "$$files" != " " ]; then \ 18 1.13 gwr echo ${MKDEP} -a ${MKDEPFLAGS} \ 19 1.28 minoura ${AFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} -traditional-cpp ${AINC:Q} 20 1.28 minoura $$files; \ 21 1.13 gwr ${MKDEP} -a ${MKDEPFLAGS} \ 22 1.28 minoura ${AFLAGS:M-[ID]*} ${CPPFLAGS} -traditional-cpp ${AINC} $$files; \ 23 1.5 mycroft fi 24 1.12 christos @files="${.ALLSRC:M*.c}"; \ 25 1.1 mycroft if [ "$$files" != "" ]; then \ 26 1.13 gwr echo ${MKDEP} -a ${MKDEPFLAGS} \ 27 1.25 tv ${CFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \ 28 1.13 gwr ${MKDEP} -a ${MKDEPFLAGS} \ 29 1.13 gwr ${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 30 1.22 tv fi 31 1.22 tv @files="${.ALLSRC:M*.m}"; \ 32 1.23 tv if [ "$$files" != "" ]; then \ 33 1.22 tv echo ${MKDEP} -a ${MKDEPFLAGS} \ 34 1.25 tv ${OBJCFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \ 35 1.22 tv ${MKDEP} -a ${MKDEPFLAGS} \ 36 1.22 tv ${OBJCFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 37 1.1 mycroft fi 38 1.12 christos @files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}"; \ 39 1.1 mycroft if [ "$$files" != " " ]; then \ 40 1.13 gwr echo ${MKDEP} -a ${MKDEPFLAGS} \ 41 1.25 tv ${CXXFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \ 42 1.13 gwr ${MKDEP} -a ${MKDEPFLAGS} \ 43 1.13 gwr ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 44 1.1 mycroft fi 45 1.19 mycroft cleandepend: 46 1.27 sommerfe rm -f .depend ${.CURDIR}/tags ${CLEANDEPEND} 47 1.19 mycroft .else 48 1.19 mycroft cleandepend: 49 1.3 mycroft .endif 50 1.17 mycroft depend: afterdepend 51 1.19 mycroft 52 1.3 mycroft beforedepend: 53 1.3 mycroft afterdepend: 54 1.2 mycroft 55 1.2 mycroft .if !target(tags) 56 1.4 mycroft .if defined(SRCS) 57 1.17 mycroft tags: ${SRCS} 58 1.2 mycroft -cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \ 59 1.2 mycroft sed "s;\${.CURDIR}/;;" > tags 60 1.4 mycroft .else 61 1.4 mycroft tags: 62 1.4 mycroft .endif 63 1.4 mycroft .endif 64