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