Home | History | Annotate | Line # | Download | only in mk
bsd.dep.mk revision 1.3
      1  1.3  mycroft #	$Id: bsd.dep.mk,v 1.3 1993/08/15 21:09:21 mycroft 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.1  mycroft depend: beforedepend .depend afterdepend
      6  1.1  mycroft .if defined(SRCS)
      7  1.1  mycroft .depend: ${SRCS}
      8  1.1  mycroft 	rm -f .depend
      9  1.1  mycroft 	files="${.ALLSRC:M*.c}"; \
     10  1.1  mycroft 	if [ "$$files" != "" ]; then \
     11  1.1  mycroft 	  mkdep -a ${MKDEP} ${CFLAGS:M-[ID]*} $$files; \
     12  1.1  mycroft 	fi
     13  1.1  mycroft 	files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}"; \
     14  1.1  mycroft 	if [ "$$files" != "  " ]; then \
     15  1.1  mycroft 	  mkdep -a ${MKDEP} -+ ${CXXFLAGS:M-[ID]*} $$files; \
     16  1.1  mycroft 	fi
     17  1.3  mycroft .endif
     18  1.3  mycroft .if !target(beforedepend)
     19  1.3  mycroft beforedepend:
     20  1.3  mycroft .endif
     21  1.3  mycroft .if !target(afterdepend)
     22  1.3  mycroft afterdepend:
     23  1.1  mycroft .endif
     24  1.1  mycroft .endif
     25  1.2  mycroft 
     26  1.2  mycroft .if !target(tags)
     27  1.2  mycroft tags: ${SRCS}
     28  1.2  mycroft 	-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \
     29  1.2  mycroft 	    sed "s;\${.CURDIR}/;;" > tags
     30  1.2  mycroft .endif
     31  1.2  mycroft 
     32  1.2  mycroft clean: cleandepend
     33  1.2  mycroft cleandepend:
     34  1.2  mycroft 	rm -f .depend ${.CURDIR}/tags
     35