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