bsd.dep.mk (35838) | bsd.dep.mk (35951) |
---|---|
1# $Id: bsd.dep.mk,v 1.20 1998/05/06 18:43:58 bde Exp $ | 1# $Id: bsd.dep.mk,v 1.21 1998/05/08 06:31:05 bde Exp $ |
2# 3# The include file <bsd.dep.mk> handles Makefile dependencies. 4# 5# 6# +++ variables +++ 7# 8# DEPENDFILE dependencies file [.depend] 9# --- 16 unchanged lines hidden (view full) --- 26# tags: 27# Create a (GLOBAL) gtags file for the source files. 28# If HTML is defined, htags is also run after gtags. 29 30 31MKDEPCMD?= mkdep 32DEPENDFILE?= .depend 33 | 2# 3# The include file <bsd.dep.mk> handles Makefile dependencies. 4# 5# 6# +++ variables +++ 7# 8# DEPENDFILE dependencies file [.depend] 9# --- 16 unchanged lines hidden (view full) --- 26# tags: 27# Create a (GLOBAL) gtags file for the source files. 28# If HTML is defined, htags is also run after gtags. 29 30 31MKDEPCMD?= mkdep 32DEPENDFILE?= .depend 33 |
34.if defined(SRCS) 35CLEANFILES?= 36 37.for _LSRC in ${SRCS:M*.l:N*/*} 38.for _LC in ${_LSRC:S/.l/.c/} 39${_LC}: ${_LSRC} 40 ${LEX} -t ${LFLAGS} ${.ALLSRC} > ${.TARGET} 41SRCS:= ${SRCS:S/${_LSRC}/${_LC}/} 42CLEANFILES:= ${CLEANFILES} ${_LC} 43.endfor 44.endfor 45 46.for _YSRC in ${SRCS:M*.y:N*/*} 47.for _YC in ${_YSRC:S/.y/.c/} 48SRCS:= ${SRCS:S/${_YSRC}/${_YC}/} 49CLEANFILES:= ${CLEANFILES} ${_YC} 50.if ${YFLAGS:M-d} != "" && ${SRCS:My.tab.h} 51.ORDER: ${_YC} y.tab.h 52${_YC} y.tab.h: ${_YSRC} 53 ${YACC} ${YFLAGS} ${.ALLSRC} 54 cp y.tab.c ${_YC} 55SRCS:= ${SRCS} y.tab.h 56CLEANFILES:= ${CLEANFILES} y.tab.c y.tab.h 57.elif ${YFLAGS:M-d} != "" 58.for _YH in ${_YC:S/.c/.h/} 59.ORDER: ${_YC} ${_YH} 60${_YC} ${_YH}: ${_YSRC} 61 ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} 62SRCS:= ${SRCS} ${_YH} 63CLEANFILES:= ${CLEANFILES} ${_YH} 64.endfor 65.else 66${_YC}: ${_YSRC} 67 ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} 68.endif 69.endfor 70.endfor 71.endif 72 |
|
34.if !target(depend) 35.if defined(SRCS) 36depend: beforedepend ${DEPENDFILE} afterdepend _SUBDIR 37 38# Different types of sources are compiled with slightly different flags. 39# Split up the sources, and filter out headers and non-applicable flags. 40${DEPENDFILE}: ${SRCS} 41 rm -f ${DEPENDFILE} --- 27 unchanged lines hidden (view full) --- 69.ORDER: beforedepend ${DEPENDFILE} 70.ORDER: beforedepend afterdepend 71.endif 72.if !target(afterdepend) 73afterdepend: 74.endif 75.endif 76 | 73.if !target(depend) 74.if defined(SRCS) 75depend: beforedepend ${DEPENDFILE} afterdepend _SUBDIR 76 77# Different types of sources are compiled with slightly different flags. 78# Split up the sources, and filter out headers and non-applicable flags. 79${DEPENDFILE}: ${SRCS} 80 rm -f ${DEPENDFILE} --- 27 unchanged lines hidden (view full) --- 108.ORDER: beforedepend ${DEPENDFILE} 109.ORDER: beforedepend afterdepend 110.endif 111.if !target(afterdepend) 112afterdepend: 113.endif 114.endif 115 |
77.if defined(SRCS) 78CLEANFILES?= 79 80.for _LSRC in ${SRCS:M*.l:N*/*} 81.for _LC in ${_LSRC:S/.l/.c/} 82${_LC}: ${_LSRC} 83 ${LEX} -t ${LFLAGS} ${.ALLSRC} > ${.TARGET} 84SRCS:= ${SRCS:S/${_LSRC}/${_LC}/} 85CLEANFILES:= ${CLEANFILES} ${_LC} 86.endfor 87.endfor 88 89.for _YSRC in ${SRCS:M*.y:N*/*} 90.for _YC in ${_YSRC:S/.y/.c/} 91SRCS:= ${SRCS:S/${_YSRC}/${_YC}/} 92CLEANFILES:= ${CLEANFILES} ${_YC} 93.if ${YFLAGS:M-d} != "" && ${SRCS:My.tab.h} 94.ORDER: ${_YC} y.tab.h 95${_YC} y.tab.h: ${_YSRC} 96 ${YACC} ${YFLAGS} ${.ALLSRC} 97 cp y.tab.c ${_YC} 98SRCS:= ${SRCS} y.tab.h 99CLEANFILES:= ${CLEANFILES} y.tab.c y.tab.h 100.elif ${YFLAGS:M-d} != "" 101.for _YH in ${_YC:S/.c/.h/} 102.ORDER: ${_YC} ${_YH} 103${_YC} ${_YH}: ${_YSRC} 104 ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} 105SRCS:= ${SRCS} ${_YH} 106CLEANFILES:= ${CLEANFILES} ${_YH} 107.endfor 108.else 109${_YC}: ${_YSRC} 110 ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} 111.endif 112.endfor 113.endfor 114.endif 115 | |
116.if defined(NOTAGS) 117tags: 118.endif 119 120.if !target(tags) 121tags: ${SRCS} _SUBDIR 122 @cd ${.CURDIR} && gtags ${GTAGSFLAGS} ${.OBJDIR} 123.if defined(HTML) --- 13 unchanged lines hidden --- | 116.if defined(NOTAGS) 117tags: 118.endif 119 120.if !target(tags) 121tags: ${SRCS} _SUBDIR 122 @cd ${.CURDIR} && gtags ${GTAGSFLAGS} ${.OBJDIR} 123.if defined(HTML) --- 13 unchanged lines hidden --- |