refactor Makefile.config_if_required for easier reuse of variables
parent
e34e62253f
commit
3489e002c6
|
@ -13,15 +13,17 @@
|
|||
#* *
|
||||
#**************************************************************************
|
||||
|
||||
ifeq "$(MAKECMDGOALS)" ""
|
||||
MAKECMDGOALS += defaultentry
|
||||
endif
|
||||
|
||||
CLEAN_TARGET_NAMES=clean partialclean distclean
|
||||
|
||||
# Some special targets ('*clean' and 'configure') do not require configuration.
|
||||
# REQUIRES_CONFIGURATION is empty if only those targets are requested,
|
||||
# and non-empty if configuration is required.
|
||||
REQUIRES_CONFIGURATION := $(strip \
|
||||
$(filter-out partialclean clean distclean configure, \
|
||||
$(if $(MAKECMDGOALS),$(MAKECMDGOALS),defaultentry)))
|
||||
# If no goals were specified (i.e. `make`), we add defaultentry
|
||||
# (since it requires ./configure to be run) so that
|
||||
# REQUIRES_CONFIGURATION is non-empty.
|
||||
$(filter-out $(CLEAN_TARGET_NAMES) configure, $(MAKECMDGOALS)))
|
||||
|
||||
ifneq "$(REQUIRES_CONFIGURATION)" ""
|
||||
include $(ROOTDIR)/Makefile.build_config
|
||||
|
|
Loading…
Reference in New Issue