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.
This commit is contained in:
parent
21eb01cbce
commit
9120686391
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=241752
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user