Use Perl for filtering MAKEFLAGS properly

Requires moving the checkflags code into CONFIG_BASE
as that's where FIND_TOOL gets defined.

Fixes #545
This commit is contained in:
Andrew Johnson
2024-09-02 20:13:30 -05:00
parent 022b8d468b
commit f47e1d94a3
4 changed files with 35 additions and 17 deletions

View File

@ -81,23 +81,6 @@ FINAL_LOCATION = $(INSTALL_ABSOLUTE)
# IOC's view of install path
IOCS_APPL_TOP = $(INSTALL_ABSOLUTE)
#-------------------------------------------------------
# How to portably check the flags to make
makeflags := $(firstword $(filter-out -,$(filter-out --%,$(MAKEFLAGS))))
define checkflags
make-$1 := $(findstring $1,$(makeflags))
endef
# This is extensible to most single letter flags:
$(foreach flag,s q, $(eval $(call checkflags,$(flag))))
# Silent builds - suppress messages during 'make -s'
NOP = :
ECHO = @$(if $(make-s),$(NOP),echo)
QUIET_FLAG := $(if $(make-s),-q,)
# Convert 'make -q' flag into '-i' for genVersionHeader.pl
QUESTION_FLAG := $(if $(make-q),-i,)
#-------------------------------------------------------
ifdef T_A