From e3fc7d5ba956e7807adf760e020903bc67ee7cda Mon Sep 17 00:00:00 2001 From: christos Date: Mon, 14 Dec 2009 05:13:38 +0000 Subject: [PATCH] use .ORDER for rules that create multiple files. --- bin/sh/Makefile | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/bin/sh/Makefile b/bin/sh/Makefile index 5b6a3c9b4853..7f113ada021c 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -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 @@ -19,7 +19,6 @@ LDADD+= -ll -ledit -ltermcap 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 @@ CLEANFILES+= trace 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 @@ NBCOMPATLIB= -L${COMPATOBJDIR} -lnbcompat .endif .include - -# override -.y.c: -.y.h: