summaryrefslogtreecommitdiffstats
path: root/bin/sh/Makefile
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-07-25 15:08:41 +0000
committerjilles <jilles@FreeBSD.org>2013-07-25 15:08:41 +0000
commit0ad2a46f33944b5fedbda54167af5739c8c5ed84 (patch)
tree4cdf5ff0108f4909c6111d72ffe6f925dec35704 /bin/sh/Makefile
parent34bfb313cd341ffba7e1c34cdc5f2aabc7cd8ec5 (diff)
downloadFreeBSD-src-0ad2a46f33944b5fedbda54167af5739c8c5ed84.zip
FreeBSD-src-0ad2a46f33944b5fedbda54167af5739c8c5ed84.tar.gz
sh: Remove mkinit.
Replace the RESET blocks with regular functions and a reset() function that calls them all. This code generation tool is unusual and does not appear to provide much benefit. I do not think isolating the knowledge about which modules need to be reset is worth an almost 500-line build tool and wider scope for variables used by the reset functions. Also, relying on reset functions is often wrong: the cleanup should be done in exception handlers so that no stale state remains after 'command eval' and the like.
Diffstat (limited to 'bin/sh/Makefile')
-rw-r--r--bin/sh/Makefile11
1 files changed, 3 insertions, 8 deletions
diff --git a/bin/sh/Makefile b/bin/sh/Makefile
index cc04aa4..00d34fa 100644
--- a/bin/sh/Makefile
+++ b/bin/sh/Makefile
@@ -8,7 +8,7 @@ SHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \
histedit.c input.c jobs.c kill.c mail.c main.c memalloc.c miscbltin.c \
mystring.c options.c output.c parser.c printf.c redir.c show.c \
test.c trap.c var.c
-GENSRCS= builtins.c init.c nodes.c syntax.c
+GENSRCS= builtins.c nodes.c syntax.c
GENHDRS= builtins.h nodes.h syntax.h token.h
SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
@@ -30,26 +30,21 @@ WFORMAT=0
${.CURDIR}/../test \
${.CURDIR}/../../usr.bin/printf
-CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \
+CLEANFILES+= mknodes mknodes.o \
mksyntax mksyntax.o
CLEANFILES+= ${GENSRCS} ${GENHDRS}
-build-tools: mkinit mknodes mksyntax
+build-tools: mknodes mksyntax
.ORDER: builtins.c builtins.h
builtins.c builtins.h: mkbuiltins builtins.def
sh ${.CURDIR}/mkbuiltins ${.CURDIR}
-init.c: mkinit alias.c eval.c exec.c input.c jobs.c options.c parser.c \
- redir.c trap.c var.c
- ./mkinit ${.ALLSRC:S/^mkinit$//}
-
# 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:
${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
-mkinit: mkinit.o
mknodes: mknodes.o
mksyntax: mksyntax.o
OpenPOWER on IntegriCloud