From 20f24e68c5832e2e04e6f1ffb37a3a612a90117a Mon Sep 17 00:00:00 2001 From: arichardson Date: Tue, 6 Feb 2018 15:41:35 +0000 Subject: [PATCH] Don't hardcode /usr/bin as the path for mktemp in build tools It won't work e.g. when crossbuilding from Ubuntu Linux as mktemp is in /bin there. Reviewed By: bdrewery Approved By: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D13937 --- Makefile.inc1 | 2 +- bin/sh/mkbuiltins | 2 +- bin/sh/mktokens | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 8a10e614dea..d1f25e193a1 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -463,7 +463,7 @@ TMPPATH= ${STRICTTMPPATH}:${PATH} # when in the middle of installing over this system. # .if make(distributeworld) || make(installworld) || make(stageworld) -INSTALLTMP!= /usr/bin/mktemp -d -u -t install +INSTALLTMP!= mktemp -d -u -t install .endif .if make(stagekernel) || make(distributekernel) diff --git a/bin/sh/mkbuiltins b/bin/sh/mkbuiltins index fb77f509b0b..443a3dcbe70 100755 --- a/bin/sh/mkbuiltins +++ b/bin/sh/mkbuiltins @@ -34,7 +34,7 @@ # @(#)mkbuiltins 8.2 (Berkeley) 5/4/95 # $FreeBSD$ -temp=`/usr/bin/mktemp -t ka` +temp=`mktemp -t ka` havehist=1 if [ "X$1" = "X-h" ]; then havehist=0 diff --git a/bin/sh/mktokens b/bin/sh/mktokens index 8c65c8ddffa..b7213e6831f 100644 --- a/bin/sh/mktokens +++ b/bin/sh/mktokens @@ -38,7 +38,7 @@ # token marks the end of a list. The third column is the name to print in # error messages. -temp=`/usr/bin/mktemp -t ka` +temp=`mktemp -t ka` cat > $temp <<\! TEOF 1 end of file TNL 0 newline -- 2.45.0