svn commit: r241752 - head/share/mk
Marcel Moolenaar
marcel at FreeBSD.org
Fri Oct 19 20:13:08 UTC 2012
Author: marcel
Date: Fri Oct 19 20:13:08 2012
New Revision: 241752
URL: http://svn.freebsd.org/changeset/base/241752
Log:
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.
Modified:
head/share/mk/bsd.dep.mk
Modified: head/share/mk/bsd.dep.mk
==============================================================================
--- head/share/mk/bsd.dep.mk Fri Oct 19 19:56:17 2012 (r241751)
+++ head/share/mk/bsd.dep.mk Fri Oct 19 20:13:08 2012 (r241752)
@@ -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
More information about the svn-src-head
mailing list