From b36a210f0fb8a41af16ffc3a14c74ac0d6349f42 Mon Sep 17 00:00:00 2001 From: jilles Date: Wed, 13 Apr 2016 20:32:35 +0000 Subject: sh: Simplify code by removing variable bracketed_name. --- bin/sh/parser.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/sh/parser.c b/bin/sh/parser.c index 3f9732c..e72a6f1 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -1616,7 +1616,6 @@ parsesub: { int flags; char *p; static const char types[] = "}-+?="; - int bracketed_name = 0; /* used to handle ${[0-9]*} variables */ int linno; int length; int c1; @@ -1640,7 +1639,6 @@ parsesub: { subtype = VSNORMAL; flags = 0; if (c == '{') { - bracketed_name = 1; c = pgetc_linecont(); subtype = 0; } @@ -1665,7 +1663,7 @@ varname: flags |= VSLINENO; } } else if (is_digit(c)) { - if (bracketed_name) { + if (subtype != VSNORMAL) { do { STPUTC(c, out); c = pgetc_linecont(); -- cgit v1.1 From b40d5fe0a7b8550ca5f6cfb5e750e946b12b1dcb Mon Sep 17 00:00:00 2001 From: bdrewery Date: Thu, 14 Apr 2016 21:06:10 +0000 Subject: META_MODE: Don't rebuild build-tools targets during normal build. This avoids 'build command changed' due to CFLAGS/CC changes during the normal build. Without this the build-tools targets end up rebuilding for the *target* rather than keeping the native versions built in build-tools. Sponsored by: EMC / Isilon Storage Division --- bin/csh/Makefile | 2 +- bin/sh/Makefile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/csh/Makefile b/bin/csh/Makefile index 2c9ae22..f55f241 100644 --- a/bin/csh/Makefile +++ b/bin/csh/Makefile @@ -109,7 +109,7 @@ csh.1: tcsh.man build-tools: gethost -gethost: gethost.c sh.err.h tc.const.h sh.h +gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META} @rm -f ${.TARGET} ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ ${TCSHDIR}/gethost.c diff --git a/bin/sh/Makefile b/bin/sh/Makefile index 3f28a12..e6d1d83 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -44,10 +44,10 @@ builtins.c builtins.h: mkbuiltins builtins.def # XXX this is just to stop the default .c rule being used, so that the # intermediate object has a fixed name. # XXX we have a default .c rule, but no default .o rule. -.o: +mknodes.o mksyntax.o: ${BUILD_TOOLS_META} ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} -mknodes: mknodes.o -mksyntax: mksyntax.o +mknodes: mknodes.o ${BUILD_TOOLS_META} +mksyntax: mksyntax.o ${BUILD_TOOLS_META} .ORDER: nodes.c nodes.h nodes.c nodes.h: mknodes nodetypes nodes.c.pat -- cgit v1.1