Date: Tue, 6 Feb 2018 11:25:04 -0800 (PST) From: "Rodney W. Grimes" <freebsd@pdx.rh.CN85.dnsmgr.net> To: Alex Richardson <arichardson@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r328934 - in head: . bin/sh Message-ID: <201802061925.w16JP4aq017961@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201802061541.w16FfadO041469@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> Author: arichardson > Date: Tue Feb 6 15:41:35 2018 > New Revision: 328934 > URL: https://svnweb.freebsd.org/changeset/base/328934 > > Log: > 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 Would it be better to create the variable MKTEMP to point at either /bin/mktemp or /usr/bin/mktemp dependent on platform, there are reasons we use full paths in Makefiles, mostly to stop /usr/local/bin/foo contimaton, which I believe this change now opens up, though very slight as I dont know of a third party mktemp binary. > Modified: > head/Makefile.inc1 > head/bin/sh/mkbuiltins > head/bin/sh/mktokens > > Modified: head/Makefile.inc1 > ============================================================================== > --- head/Makefile.inc1 Tue Feb 6 15:41:26 2018 (r328933) > +++ head/Makefile.inc1 Tue Feb 6 15:41:35 2018 (r328934) > @@ -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) > > Modified: head/bin/sh/mkbuiltins > ============================================================================== > --- head/bin/sh/mkbuiltins Tue Feb 6 15:41:26 2018 (r328933) > +++ head/bin/sh/mkbuiltins Tue Feb 6 15:41:35 2018 (r328934) > @@ -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 > > Modified: head/bin/sh/mktokens > ============================================================================== > --- head/bin/sh/mktokens Tue Feb 6 15:41:26 2018 (r328933) > +++ head/bin/sh/mktokens Tue Feb 6 15:41:35 2018 (r328934) > @@ -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 > > -- Rod Grimes rgrimes@freebsd.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802061925.w16JP4aq017961>