diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2023-04-20 17:05:43 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2023-04-20 17:05:43 +0000 |
commit | 8fe4f8f7a75f3f6d1fc52e31a6d25a112d4644fd (patch) | |
tree | 9dfa80a120af5221ee8e2523c14efee1a5d5526b /bin/csh/Makefile | |
parent | de4da6cd04bf299e46f0c65d4bfd9fa94bf00f08 (diff) |
Fix building host tools for host
Several makefile depend on tools built for host.
At least when using DIRDEPS_BUILD we can build these for the
pseudo machine "host" to facilitate building on older host versions.
Ideally we would build these tools in their own directories to avoid
building more than needed.
For now, setting an appropriate default for BTOOLSPATH will suffice
Reviewed by: stevek
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D39708
Diffstat (limited to 'bin/csh/Makefile')
-rw-r--r-- | bin/csh/Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/csh/Makefile b/bin/csh/Makefile index d59626703685..2d1edcf53a80 100644 --- a/bin/csh/Makefile +++ b/bin/csh/Makefile @@ -118,15 +118,18 @@ 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} @rm -f ${.TARGET} ${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ ${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} |