1 1.18 gwr # $NetBSD: bsd.dep.mk,v 1.18 1997/05/08 21:18:59 gwr Exp $ 2 1.13 gwr 3 1.15 mycroft .PHONY: cleandepend 4 1.16 mycroft cleandir: 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.1 mycroft .if !target(depend) 10 1.16 mycroft depend: beforedepend 11 1.1 mycroft .if defined(SRCS) 12 1.16 mycroft depend: .depend 13 1.18 gwr .NOPATH: .depend 14 1.1 mycroft .depend: ${SRCS} 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.13 gwr ${CFLAGS:M-[ID]*} ${CPPFLAGS} ${AINC} $$files; \ 20 1.13 gwr ${MKDEP} -a ${MKDEPFLAGS} \ 21 1.13 gwr ${CFLAGS:M-[ID]*} ${CPPFLAGS} ${AINC} $$files; \ 22 1.5 mycroft fi 23 1.12 christos @files="${.ALLSRC:M*.c}"; \ 24 1.1 mycroft if [ "$$files" != "" ]; then \ 25 1.13 gwr echo ${MKDEP} -a ${MKDEPFLAGS} \ 26 1.13 gwr ${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 27 1.13 gwr ${MKDEP} -a ${MKDEPFLAGS} \ 28 1.13 gwr ${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 29 1.1 mycroft fi 30 1.12 christos @files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}"; \ 31 1.1 mycroft if [ "$$files" != " " ]; then \ 32 1.13 gwr echo ${MKDEP} -a ${MKDEPFLAGS} \ 33 1.13 gwr ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 34 1.13 gwr ${MKDEP} -a ${MKDEPFLAGS} \ 35 1.13 gwr ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 36 1.1 mycroft fi 37 1.3 mycroft .endif 38 1.17 mycroft depend: afterdepend 39 1.3 mycroft .if !target(beforedepend) 40 1.3 mycroft beforedepend: 41 1.3 mycroft .endif 42 1.3 mycroft .if !target(afterdepend) 43 1.3 mycroft afterdepend: 44 1.1 mycroft .endif 45 1.1 mycroft .endif 46 1.2 mycroft 47 1.2 mycroft .if !target(tags) 48 1.4 mycroft .if defined(SRCS) 49 1.17 mycroft tags: ${SRCS} 50 1.2 mycroft -cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \ 51 1.2 mycroft sed "s;\${.CURDIR}/;;" > tags 52 1.4 mycroft .else 53 1.4 mycroft tags: 54 1.4 mycroft .endif 55 1.2 mycroft .endif 56 1.2 mycroft 57 1.4 mycroft .if defined(SRCS) 58 1.2 mycroft cleandepend: 59 1.2 mycroft rm -f .depend ${.CURDIR}/tags 60 1.16 mycroft .else 61 1.16 mycroft cleandepend: 62 1.4 mycroft .endif 63