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 <rmagee@gmail.com>
This commit is contained in:
Russ Magee 2020-04-28 17:49:09 -07:00
parent 0962c0b811
commit 51488fab6d
2 changed files with 13 additions and 7 deletions

View File

@ -1,4 +1,3 @@
MAKE=gmake
VERSION := 0.8.22 VERSION := 0.8.22
.PHONY: lint vis clean common client server passwd subpkgs install uninstall reinstall .PHONY: lint vis clean common client server passwd subpkgs install uninstall reinstall
@ -35,6 +34,7 @@ INSTPREFIX = /usr/local
all: common client server passwd all: common client server passwd
clean: clean:
@echo "Make: $(MAKE)"
go clean . go clean .
for d in $(SUBDIRS); do\ for d in $(SUBDIRS); do\
$(MAKE) -C $$d clean;\ $(MAKE) -C $$d clean;\
@ -81,15 +81,15 @@ vis:
stat=$$?; if [ $$stat -ne "0" ]; then \ stat=$$?; if [ $$stat -ne "0" ]; then \
/bin/echo "go-callvis not found. Run go get https://github.com/TrueFurby/go-callvis to install."; \ /bin/echo "go-callvis not found. Run go get https://github.com/TrueFurby/go-callvis to install."; \
else \ else \
make -C xs vis;\ $(MAKE) -C xs vis;\
make -C xsd vis;\ $(MAKE) -C xsd vis;\
make -C xspasswd vis; \ $(MAKE) -C xspasswd vis; \
fi fi
lint: lint:
make -C xspasswd lint $(MAKE) -C xspasswd lint
make -C xsd lint $(MAKE) -C xsd lint
make -C xs lint $(MAKE) -C xs lint
reinstall: uninstall install reinstall: uninstall install

6
README.freebsd Normal file
View File

@ -0,0 +1,6 @@
## The Makefile(s) to build require GNU make (gmake).
## Please install and invoke build via:
## $ MAKE=gmake make <targets>
## eg.,
## $ MAKE=gmake make clean all