Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Oct 2012 20:13:08 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r241752 - head/share/mk
Message-ID:  <201210192013.q9JKD8si069344@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210192013.q9JKD8si069344>