Source-Changes-HG archive

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

[src/trunk]: src/bin/sh use .ORDER for rules that create multiple files.



details:   https://anonhg.NetBSD.org/src/rev/564ae445da6a
branches:  trunk
changeset: 750018:564ae445da6a
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Dec 14 05:13:38 2009 +0000

description:
use .ORDER for rules that create multiple files.

diffstat:

 bin/sh/Makefile |  26 ++++++++------------------
 1 files changed, 8 insertions(+), 18 deletions(-)

diffs (61 lines):

diff -r 4051fdd779b9 -r 564ae445da6a bin/sh/Makefile
--- a/bin/sh/Makefile   Mon Dec 14 05:04:48 2009 +0000
+++ b/bin/sh/Makefile   Mon Dec 14 05:13:38 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.88 2009/12/11 08:39:42 uebayasi Exp $
+#      $NetBSD: Makefile,v 1.89 2009/12/14 05:13:38 christos Exp $
 #      @(#)Makefile    8.4 (Berkeley) 5/5/95
 
 .include <bsd.own.mk>
@@ -19,7 +19,6 @@
 DPADD+=        ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
 
 LFLAGS=        -8      # 8-bit lex scanner for arithmetic
-YFLAGS=        -d
 
 # Environment for scripts executed during build.
 SCRIPT_ENV= \
@@ -55,28 +54,23 @@
 
 token.h: mktokens
        ${_MKTARGET_CREATE}
-       ${GENCMD} ${.TARGET} \
        ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC}
 
-builtins.c builtins.h: mkbuiltins shell.h builtins.def
+.ORDER: builtins.h builtins.c
+builtins.h builtins.c: mkbuiltins shell.h builtins.def
        ${_MKTARGET_CREATE}
-       ${GENCMD} ${.TARGET} \
-       ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} .
+       ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} ${.OBJDIR}
+       [ -f builtins.h ]
 
 init.c: mkinit.sh ${SHSRCS}
        ${_MKTARGET_CREATE}
-       ${GENCMD} ${.TARGET} \
        ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC}
 
+.ORDER: nodes.h nodes.c
 nodes.c nodes.h: mknodes.sh nodetypes nodes.c.pat
        ${_MKTARGET_CREATE}
-       ${GENCMD} ${.TARGET} \
-       ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} .
-
-arith.c arith.h: arith.y
-       ${_MKTARGET_CREATE}
-       ${GENCMD} y.tab.${.TARGET:T:E} \
-       ${YACC.y} ${.ALLSRC}
+       ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} ${.OBJDIR}
+       [ -f nodes.h ]
 
 .if ${USETOOLS} == "yes"
 COMPATOBJDIR!= cd ${NETBSDSRCDIR}/tools/compat && ${PRINTOBJDIR}
@@ -84,7 +78,3 @@
 .endif
 
 .include <bsd.prog.mk>
-
-# override
-.y.c:
-.y.h:



Home | Main Index | Thread Index | Old Index