summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.dep.mk
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2012-10-19 20:13:08 +0000
committermarcel <marcel@FreeBSD.org>2012-10-19 20:13:08 +0000
commitf4c22f128c1909257daabaf9d37e205ee39cb212 (patch)
tree829f0ff026e565354f87d55833cfc10e15178f40 /share/mk/bsd.dep.mk
parentc9d76d3d679748dc89ab517b7cf41ed5b2e3520a (diff)
downloadFreeBSD-src-f4c22f128c1909257daabaf9d37e205ee39cb212.zip
FreeBSD-src-f4c22f128c1909257daabaf9d37e205ee39cb212.tar.gz
Improve upon the previous commit to fix the yacc rule.
1. Have the resulting C file depend on the resulting H file as it should be. Touch the C file to make sure the C file is newer than the H file to keep make happy. 2. Apply the same fix to the other instance of .ORDER, missed in the previous commit.
Diffstat (limited to 'share/mk/bsd.dep.mk')
-rw-r--r--share/mk/bsd.dep.mk9
1 files changed, 5 insertions, 4 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
index deac736..3e7af05 100644
--- a/share/mk/bsd.dep.mk
+++ b/share/mk/bsd.dep.mk
@@ -95,16 +95,17 @@ CLEANFILES+= ${_LC}
SRCS:= ${SRCS:S/${_YSRC}/${_YC}/}
CLEANFILES+= ${_YC}
.if !empty(YFLAGS:M-d) && !empty(SRCS:My.tab.h)
-.ORDER: ${_YC} y.tab.h
-${_YC} y.tab.h: ${_YSRC}
+y.tab.h: ${_YSRC}
${YACC} ${YFLAGS} ${.ALLSRC}
+${_YC}: y.tab.h
cp y.tab.c ${_YC}
CLEANFILES+= y.tab.c y.tab.h
.elif !empty(YFLAGS:M-d)
.for _YH in ${_YC:R}.h
-${_YH}: ${_YC}
-${_YC}: ${_YSRC}
+${_YH}: ${_YSRC}
${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC}
+${_YC}: ${_YH}
+ @touch ${.TARGET}
SRCS+= ${_YH}
CLEANFILES+= ${_YH}
.endfor
OpenPOWER on IntegriCloud