Home | History | Annotate | Line # | Download | only in mk
bsd.dep.mk revision 1.2
      1  1.2  mycroft #	$Id: bsd.dep.mk,v 1.2 1993/08/15 20:42:39 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.1  mycroft .endif
     18  1.1  mycroft .endif
     19  1.2  mycroft 
     20  1.2  mycroft .if !target(tags)
     21  1.2  mycroft tags: ${SRCS}
     22  1.2  mycroft 	-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \
     23  1.2  mycroft 	    sed "s;\${.CURDIR}/;;" > tags
     24  1.2  mycroft .endif
     25  1.2  mycroft 
     26  1.2  mycroft clean: cleandepend
     27  1.2  mycroft cleandepend:
     28  1.2  mycroft 	rm -f .depend ${.CURDIR}/tags
     29