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