aboutsummaryrefslogtreecommitdiff
path: root/bin/sh/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh/Makefile')
-rw-r--r--bin/sh/Makefile20
1 files changed, 13 insertions, 7 deletions
diff --git a/bin/sh/Makefile b/bin/sh/Makefile
index b074121d0ecd..d2043ecad269 100644
--- a/bin/sh/Makefile
+++ b/bin/sh/Makefile
@@ -1,5 +1,3 @@
-# @(#)Makefile 8.4 (Berkeley) 5/5/95
-# $FreeBSD$
.include <src.opts.mk>
@@ -7,6 +5,7 @@ CONFGROUPS= ETC ROOT
ETC= profile
ROOT= dot.shrc dot.profile
ROOTDIR= /root
+ROOTDIR_MODE= 0750
ROOTNAME_dot.shrc= .shrc
ROOTNAME_dot.profile= .profile
PACKAGE=runtime
@@ -39,24 +38,30 @@ CFLAGS+=-DSHELL -I. -I${.CURDIR}
CLEANFILES+= mknodes mksyntax
CLEANFILES+= ${GENSRCS} ${GENHDRS}
+.if ${MACHINE} == "host" || ${MK_DIRDEPS_BUILD} == "no"
build-tools: mknodes mksyntax
+DEPENDOBJS+= mknodes mksyntax
+mknodes mksyntax: ${BUILD_TOOLS_META}
+builtins.c builtins.h: mkbuiltins
+syntax.c syntax.h: mksyntax
+nodes.c nodes.h: mknodes
+.endif
+
.ORDER: builtins.c builtins.h
builtins.h: .NOMETA
-builtins.c builtins.h: mkbuiltins builtins.def
+builtins.c builtins.h: builtins.def
sh ${.CURDIR}/mkbuiltins ${.CURDIR}
-DEPENDOBJS+= mknodes mksyntax
-mknodes mksyntax: ${BUILD_TOOLS_META}
.ORDER: nodes.c nodes.h
nodes.h: .NOMETA
-nodes.c nodes.h: mknodes nodetypes nodes.c.pat
+nodes.c nodes.h: 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
+syntax.c syntax.h:
${BTOOLSPATH:U.}/mksyntax
token.h: mktokens
@@ -68,6 +73,7 @@ SUBDIR.${MK_TESTS}+= tests
beforeinstallconfig:
rm -f ${DESTDIR}/.profile
+LINKMODE=${CONFMODE}
afterinstallconfig:
${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile