Fix ECHO, QUIET_FLAG and QUESTION_FLAG

This commit is contained in:
Andrew Johnson
2022-08-26 15:22:30 -05:00
parent 52dfb89741
commit c0db7a0beb
2 changed files with 13 additions and 7 deletions

View File

@ -82,14 +82,20 @@ FINAL_LOCATION = $(INSTALL_ABSOLUTE)
IOCS_APPL_TOP = $(INSTALL_ABSOLUTE)
#-------------------------------------------------------
# Silencing the build - suppress messages during 'make -s'
NOP = :
ECHO = @$(if $(filter -s,$(MFLAGS)),$(NOP),echo)
QUIET_FLAG := $(if $(filter -s,$(MFLAGS)),-q,)
# How to portably check the flags to make
define checkflags
make-$1 = $(findstring $1,$(filter-out --%,$(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 $(filter -q,$(MFLAGS)),-i,)
QUESTION_FLAG := $(if $(make-q),-i,)
#-------------------------------------------------------
ifdef T_A

View File

@ -77,7 +77,7 @@ CPPFLAGS += $($(BUILD_CLASS)_CPPFLAGS) $(POSIX_CPPFLAGS) $(OPT_CPPFLAGS)\
$(USR_CPPFLAGS) $(CMD_CPPFLAGS) $(ARCH_DEP_CPPFLAGS) $(OP_SYS_CPPFLAGS)\
$(OP_SYS_INCLUDE_CPPFLAGS) $(CODE_CPPFLAGS)
ECHO = @$(if $(filter -s,$(MFLAGS)),$(NOP),echo)
ECHO = @$(if $(make-s),$(NOP),echo)
# Originally set in os/CONFIG.UnixCommon.Common
MKDIR = mkdir -p