Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sh Rewrite file generation rules using ${GENCMD}. No fu...



details:   https://anonhg.NetBSD.org/src/rev/91cd0ec964da
branches:  trunk
changeset: 749847:91cd0ec964da
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Fri Dec 11 08:39:42 2009 +0000

description:
Rewrite file generation rules using ${GENCMD}.  No functional changes intended.

diffstat:

 bin/sh/Makefile |  31 +++++++++++++++++--------------
 1 files changed, 17 insertions(+), 14 deletions(-)

diffs (59 lines):

diff -r afd58d22ef13 -r 91cd0ec964da bin/sh/Makefile
--- a/bin/sh/Makefile   Fri Dec 11 08:37:34 2009 +0000
+++ b/bin/sh/Makefile   Fri Dec 11 08:39:42 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.87 2009/12/07 16:22:41 uebayasi Exp $
+#      $NetBSD: Makefile,v 1.88 2009/12/11 08:39:42 uebayasi Exp $
 #      @(#)Makefile    8.4 (Berkeley) 5/5/95
 
 .include <bsd.own.mk>
@@ -55,29 +55,28 @@
 
 token.h: mktokens
        ${_MKTARGET_CREATE}
+       ${GENCMD} ${.TARGET} \
        ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC}
 
-builtins.h: builtins.c
+builtins.c builtins.h: mkbuiltins shell.h builtins.def
        ${_MKTARGET_CREATE}
-
-builtins.c: mkbuiltins shell.h builtins.def
-       ${_MKTARGET_CREATE}
-       ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} ${.OBJDIR}
-       [ -f builtins.h ]
+       ${GENCMD} ${.TARGET} \
+       ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} .
 
 init.c: mkinit.sh ${SHSRCS}
        ${_MKTARGET_CREATE}
+       ${GENCMD} ${.TARGET} \
        ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC}
 
-nodes.h: nodes.c
-
-nodes.c: mknodes.sh nodetypes nodes.c.pat
+nodes.c nodes.h: mknodes.sh nodetypes nodes.c.pat
        ${_MKTARGET_CREATE}
-       ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} ${.OBJDIR}
-       [ -f nodes.h ]
+       ${GENCMD} ${.TARGET} \
+       ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} .
 
-arith.h: arith.c
-arith.c: arith.y
+arith.c arith.h: arith.y
+       ${_MKTARGET_CREATE}
+       ${GENCMD} y.tab.${.TARGET:T:E} \
+       ${YACC.y} ${.ALLSRC}
 
 .if ${USETOOLS} == "yes"
 COMPATOBJDIR!= cd ${NETBSDSRCDIR}/tools/compat && ${PRINTOBJDIR}
@@ -85,3 +84,7 @@
 .endif
 
 .include <bsd.prog.mk>
+
+# override
+.y.c:
+.y.h:



Home | Main Index | Thread Index | Old Index