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