From 51488fab6df5f74132246c5bb9a4b188fe4b4dba Mon Sep 17 00:00:00 2001 From: Russ Magee Date: Tue, 28 Apr 2020 17:49:09 -0700 Subject: [PATCH] Allow override on cmdline of MAKE variable to support gmake in freeBSD or via both 'make and 'gmake' names in Linux Signed-off-by: Russ Magee --- Makefile | 14 +++++++------- README.freebsd | 6 ++++++ 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 README.freebsd diff --git a/Makefile b/Makefile index bc6f3de..7ea0b32 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,3 @@ -MAKE=gmake VERSION := 0.8.22 .PHONY: lint vis clean common client server passwd subpkgs install uninstall reinstall @@ -35,6 +34,7 @@ INSTPREFIX = /usr/local all: common client server passwd clean: + @echo "Make: $(MAKE)" go clean . for d in $(SUBDIRS); do\ $(MAKE) -C $$d clean;\ @@ -81,15 +81,15 @@ vis: stat=$$?; if [ $$stat -ne "0" ]; then \ /bin/echo "go-callvis not found. Run go get https://github.com/TrueFurby/go-callvis to install."; \ else \ - make -C xs vis;\ - make -C xsd vis;\ - make -C xspasswd vis; \ + $(MAKE) -C xs vis;\ + $(MAKE) -C xsd vis;\ + $(MAKE) -C xspasswd vis; \ fi lint: - make -C xspasswd lint - make -C xsd lint - make -C xs lint + $(MAKE) -C xspasswd lint + $(MAKE) -C xsd lint + $(MAKE) -C xs lint reinstall: uninstall install diff --git a/README.freebsd b/README.freebsd new file mode 100644 index 0000000..868094c --- /dev/null +++ b/README.freebsd @@ -0,0 +1,6 @@ +## The Makefile(s) to build require GNU make (gmake). +## Please install and invoke build via: +## $ MAKE=gmake make +## eg., +## $ MAKE=gmake make clean all +