aboutsummaryrefslogtreecommitdiffstats
path: root/shell_cmds/sh/Makefile
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-05-09 14:20:58 -0400
committerCameron Katri <me@cameronkatri.com>2021-05-09 14:20:58 -0400
commit5fd83771641d15c418f747bd343ba6738d3875f7 (patch)
tree5abf0f78f680d9837dbd93d4d4c3933bb7509599 /shell_cmds/sh/Makefile
downloadapple_cmds-5fd83771641d15c418f747bd343ba6738d3875f7.tar.gz
apple_cmds-5fd83771641d15c418f747bd343ba6738d3875f7.tar.zst
apple_cmds-5fd83771641d15c418f747bd343ba6738d3875f7.zip
Import macOS userland
adv_cmds-176 basic_cmds-55 bootstrap_cmds-116.100.1 developer_cmds-66 diskdev_cmds-667.40.1 doc_cmds-53.60.1 file_cmds-321.40.3 mail_cmds-35 misc_cmds-34 network_cmds-606.40.1 patch_cmds-17 remote_cmds-63 shell_cmds-216.60.1 system_cmds-880.60.2 text_cmds-106
Diffstat (limited to 'shell_cmds/sh/Makefile')
-rw-r--r--shell_cmds/sh/Makefile70
1 files changed, 70 insertions, 0 deletions
diff --git a/shell_cmds/sh/Makefile b/shell_cmds/sh/Makefile
new file mode 100644
index 0000000..8d08662
--- /dev/null
+++ b/shell_cmds/sh/Makefile
@@ -0,0 +1,70 @@
+# @(#)Makefile 8.4 (Berkeley) 5/5/95
+# $FreeBSD: head/bin/sh/Makefile 322515 2017-08-14 19:21:37Z ngie $
+
+.include <src.opts.mk>
+
+PACKAGE=runtime
+PROG= sh
+INSTALLFLAGS= -S
+SHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \
+ exec.c expand.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 nodes.c syntax.c
+GENHDRS= builtins.h nodes.h syntax.h token.h
+SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
+
+# MLINKS for Shell built in commands for which there are no userland
+# utilities of the same name are handled with the associated manpage,
+# builtin.1 in share/man/man1/.
+
+LIBADD= edit
+
+CFLAGS+=-DSHELL -I. -I${.CURDIR}
+# for debug:
+# DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
+WARNS?= 2
+WFORMAT=0
+
+.PATH: ${.CURDIR}/bltin \
+ ${.CURDIR:H}/kill \
+ ${.CURDIR:H}/test \
+ ${SRCTOP}/usr.bin/printf
+
+CLEANFILES+= mknodes mknodes.o \
+ mksyntax mksyntax.o
+CLEANFILES+= ${GENSRCS} ${GENHDRS}
+
+build-tools: mknodes mksyntax
+
+.ORDER: builtins.c builtins.h
+builtins.h: .NOMETA
+builtins.c builtins.h: mkbuiltins builtins.def
+ sh ${.CURDIR}/mkbuiltins ${.CURDIR}
+
+# 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.
+mknodes.o mksyntax.o: ${BUILD_TOOLS_META}
+ ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
+mknodes: mknodes.o ${BUILD_TOOLS_META}
+mksyntax: mksyntax.o ${BUILD_TOOLS_META}
+
+.ORDER: nodes.c nodes.h
+nodes.h: .NOMETA
+nodes.c nodes.h: mknodes nodetypes nodes.c.pat
+ ${BTOOLSPATH:U.}/mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
+
+.ORDER: syntax.c syntax.h
+syntax.h: .NOMETA
+syntax.c syntax.h: mksyntax
+ ${BTOOLSPATH:U.}/mksyntax
+
+token.h: mktokens
+ sh ${.CURDIR}/mktokens
+
+HAS_TESTS=
+SUBDIR.${MK_TESTS}+= tests
+
+.include <bsd.prog.mk>