aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>2020-02-29 16:50:52 +0000
committerKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>2020-03-02 11:42:31 +0000
commita5100a0bd1f405f975d41f56a96f5f9569c572f8 (patch)
tree9e7975a98e8803034454b8cc2fe3c47f14046612
parent364739a491ef7f55c7c963c46831ab8487177c2f (diff)
downloadupstream-a5100a0bd1f405f975d41f56a96f5f9569c572f8.tar.gz
upstream-a5100a0bd1f405f975d41f56a96f5f9569c572f8.tar.bz2
upstream-a5100a0bd1f405f975d41f56a96f5f9569c572f8.zip
build: simplify gnu-getopt search
getopt is the only command where /usr/local/bin is specified explicitly. All other commands are assumed to exist in the PATH in one form or another. Remove this exception and require gnugetopt/getopt to be in the user's PATH. In the case of macos Homebrew, getopt is 'keg only' hence not linked into /usr/local/bin whilst other commands are linked and likely found by virtue of /usr/local/bin being in PATH. Since 2019 Homebrew is very reluctant to install links that have potential to override default OS behaviour, eg: following instructions on our current 'how to build on macos' wiki page: $ brew ln gnu-getopt --force Warning: Refusing to link macOS-provided software: gnu-getopt If you need to have gnu-getopt first in your PATH run: echo 'export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"' >> ~/.zshrc A better option for macos is to link getopt as 'gnugetopt' in /usr/local/bin, thus the build system will find 'gnugetopt' but other applications looking for just 'getopt' will find the original macos binary. Ultimately it makes sense that 'GNU' dependencies are placed in /usr/local/bin and /usr/local/bin is included in the user's PATH. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
-rw-r--r--include/prereq-build.mk1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index 6fec4c1a4a..19904853f1 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -125,7 +125,6 @@ $(eval $(call SetupHostCommand,grep,Please install GNU 'grep', \
$(eval $(call SetupHostCommand,getopt, \
Please install an extended getopt version that supports --long, \
gnugetopt -o t --long test -- --test | grep '^ *--test *--', \
- /usr/local/bin/getopt -o t --long test -- --test | grep '^ *--test *--', \
getopt -o t --long test -- --test | grep '^ *--test *--'))
$(eval $(call SetupHostCommand,stat,Cannot find a file stat utility, \