Only enable for required targets
parent
f568f858f4
commit
a2ddf5571b
16
Makefile
16
Makefile
|
@ -17,8 +17,21 @@
|
|||
|
||||
ROOTDIR = .
|
||||
|
||||
# The configure and *clean targets can all be run without running ./configure
|
||||
# first.
|
||||
# If no goals were specified (i.e. `make`), add defaultentry (since it requires
|
||||
# ./configure to be run)
|
||||
CAN_BE_UNCONFIGURED := $(strip \
|
||||
$(filter-out partialclean clean distclean configure, \
|
||||
$(if $(MAKECMDGOALS),$(MAKECMDGOALS),defaultentry)))
|
||||
|
||||
ifeq "$(CAN_BE_UNCONFIGURED)" ""
|
||||
-include Makefile.config
|
||||
-include Makefile.common
|
||||
else
|
||||
include Makefile.config
|
||||
include Makefile.common
|
||||
endif
|
||||
|
||||
.PHONY: defaultentry
|
||||
ifeq "$(NATIVE_COMPILER)" "true"
|
||||
|
@ -1079,6 +1092,8 @@ distclean: clean
|
|||
|
||||
include .depend
|
||||
|
||||
|
||||
ifneq "$(strip $(CAN_BE_UNCONFIGURED))" ""
|
||||
Makefile.config Makefile.common: config.status
|
||||
|
||||
config.status:
|
||||
|
@ -1092,3 +1107,4 @@ config.status:
|
|||
@echo " make install"
|
||||
@echo "should work."
|
||||
@false
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue