1 1.13 gwr # $NetBSD: bsd.dep.mk,v 1.13 1997/03/07 23:10:18 gwr Exp $ 2 1.13 gwr 3 1.13 gwr MKDEP?= mkdep 4 1.1 mycroft 5 1.1 mycroft # some of the rules involve .h sources, so remove them from mkdep line 6 1.1 mycroft .if !target(depend) 7 1.8 cgd depend: beforedepend .depend _SUBDIRUSE afterdepend 8 1.1 mycroft .if defined(SRCS) 9 1.1 mycroft .depend: ${SRCS} 10 1.12 christos @rm -f .depend 11 1.12 christos @files="${.ALLSRC:M*.s} ${.ALLSRC:M*.S}"; \ 12 1.6 cgd if [ "$$files" != " " ]; then \ 13 1.13 gwr echo ${MKDEP} -a ${MKDEPFLAGS} \ 14 1.13 gwr ${CFLAGS:M-[ID]*} ${CPPFLAGS} ${AINC} $$files; \ 15 1.13 gwr ${MKDEP} -a ${MKDEPFLAGS} \ 16 1.13 gwr ${CFLAGS:M-[ID]*} ${CPPFLAGS} ${AINC} $$files; \ 17 1.5 mycroft fi 18 1.12 christos @files="${.ALLSRC:M*.c}"; \ 19 1.1 mycroft if [ "$$files" != "" ]; then \ 20 1.13 gwr echo ${MKDEP} -a ${MKDEPFLAGS} \ 21 1.13 gwr ${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 22 1.13 gwr ${MKDEP} -a ${MKDEPFLAGS} \ 23 1.13 gwr ${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 24 1.1 mycroft fi 25 1.12 christos @files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}"; \ 26 1.1 mycroft if [ "$$files" != " " ]; then \ 27 1.13 gwr echo ${MKDEP} -a ${MKDEPFLAGS} \ 28 1.13 gwr ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 29 1.13 gwr ${MKDEP} -a ${MKDEPFLAGS} \ 30 1.13 gwr ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ 31 1.1 mycroft fi 32 1.4 mycroft .else 33 1.4 mycroft .depend: 34 1.3 mycroft .endif 35 1.3 mycroft .if !target(beforedepend) 36 1.3 mycroft beforedepend: 37 1.3 mycroft .endif 38 1.3 mycroft .if !target(afterdepend) 39 1.3 mycroft afterdepend: 40 1.1 mycroft .endif 41 1.1 mycroft .endif 42 1.2 mycroft 43 1.2 mycroft .if !target(tags) 44 1.4 mycroft .if defined(SRCS) 45 1.8 cgd tags: ${SRCS} _SUBDIRUSE 46 1.2 mycroft -cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \ 47 1.2 mycroft sed "s;\${.CURDIR}/;;" > tags 48 1.4 mycroft .else 49 1.4 mycroft tags: 50 1.4 mycroft .endif 51 1.2 mycroft .endif 52 1.2 mycroft 53 1.4 mycroft .if defined(SRCS) 54 1.7 cgd cleandir: cleandepend 55 1.2 mycroft cleandepend: 56 1.2 mycroft rm -f .depend ${.CURDIR}/tags 57 1.4 mycroft .endif 58