aboutsummaryrefslogtreecommitdiff
path: root/bin/csh/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'bin/csh/Makefile')
-rw-r--r--bin/csh/Makefile24
1 files changed, 12 insertions, 12 deletions
diff --git a/bin/csh/Makefile b/bin/csh/Makefile
index 2281c11538d0..5cbb58bd0ead 100644
--- a/bin/csh/Makefile
+++ b/bin/csh/Makefile
@@ -1,6 +1,3 @@
-# $FreeBSD$
-# @(#)Makefile 8.1 (Berkeley) 5/31/93
-#
# C Shell with process control; VM/UNIX VAX Makefile
# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
#
@@ -16,6 +13,7 @@ ROOTPACKAGE= csh
ETC= csh.cshrc csh.login csh.logout
ROOT= dot.cshrc dot.login
ROOTDIR= /root
+ROOTDIR_MODE= 0750
ROOTNAME_dot.cshrc= .cshrc
ROOTNAME_dot.login= .login
TCSHDIR= ${SRCTOP}/contrib/tcsh
@@ -118,15 +116,23 @@ NLSSRCFILES_${catalog:C/.*://}!= cd ${NLSSRCDIR_${catalog:C/.*://}}; echo charse
csh.1: tcsh.man
cat ${.ALLSRC} > ${.TARGET}
+.if ${MACHINE} == "host" || ${MK_DIRDEPS_BUILD} == "no"
build-tools: gethost
+tc.defs.c: gethost
DEPENDOBJS+= gethost
-gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META}
+gethost: gethost.c sh.err.h sh.h ${BUILD_TOOLS_META}
@rm -f ${.TARGET}
- ${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
+ # Define _h_tc_const so that tc.h will skip including tc.const.h.
+ # gethost.c does not actually require any of the definitions in there,
+ # and building tc.const.h requires target headers which are not
+ # available when we need to build gethost.
+ ${HOST_CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
+ -D_h_tc_const \
${TCSHDIR}/gethost.c
+.endif
-tc.defs.c: gethost ${TCSHDIR}/host.defs
+tc.defs.c: ${TCSHDIR}/host.defs
@rm -f ${.TARGET}
@echo "/* Do not edit this file, make creates it */" > ${.TARGET}
${BTOOLSPATH:U.}/gethost ${TCSHDIR}/host.defs >> ${.TARGET}
@@ -158,10 +164,4 @@ tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h ${BUILD
sort >> ${.TARGET}
@echo '#endif /* _h_tc_const */' >> ${.TARGET}
-beforeinstallconfig:
- rm -f ${DESTDIR}/.cshrc
-
-afterinstallconfig:
- ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
-
.include <bsd.prog.mk>