Provide finer-grained control for turning off mk/target.mk's
'all', 'boot' and 'install' rules. i.e., instead of having
the variable NO_ALL_TARGETS control the defnition of rules
for all three, NO_ALL_TARGET, NO_BOOT_TARGET, and NO_INSTALL_TARGET
lets you individually control which ones you don't want.
Sub-projects (GC and HDirect, for example) have the need
to turn off the 'boot' rule, which is what motivated this
change.
+# Turn off target.mk's rules for 'all', 'boot' and 'install'.
+NO_BOOT_TARGET=YES
+NO_ALL_TARGET=YES
+NO_INSTALL_TARGET=YES
+
include $(TOP)/mk/target.mk
# -----------------------------------------------------------------------------
include $(TOP)/mk/target.mk
# -----------------------------------------------------------------------------
-# we override the boot & all targets in the top level Makefile
-ifneq "$(NO_ALL_TARGETS)" "YES"
+# we override the 'boot', 'all' and 'install' targets in the top
+# level Makefile. Some of the sub-projects also set 'boot' to empty.
+
+ifeq "$(NO_ALL_TARGET)" "YES"
+ALL_TARGET =
+else
+endif
+
+ifeq "$(NO_BOOT_TARGET)" "YES"
+BOOT_TARGET =
+else
+endif
+
+ifneq "$(NO_INSTALL_TARGET)" "YES"
+INSTALL_TARGET =
+else
INSTALL_TARGET = install
endif
INSTALL_TARGET = install
endif
# The boot target, at a minimum generates dependency information
.PHONY: boot
# The boot target, at a minimum generates dependency information
.PHONY: boot
+ifeq "$(NO_BOOT_TARGET)" "YES"
+boot ::
+else
+boot :: depend
+endif
##################################################################
# GNU Standard targets
##################################################################
# GNU Standard targets
$(HS_PROG) :: $(HS_OBJS)
$(HC) -o $@ $(HC_OPTS) $(LD_OPTS) $(HS_OBJS)
else
$(HS_PROG) :: $(HS_OBJS)
$(HC) -o $@ $(HC_OPTS) $(LD_OPTS) $(HS_OBJS)
else
$(HS_PROG) :: $(HS_OBJS)
$(CC) -o $@ $(HC_BOOT_CC_OPTS) $(HC_BOOT_LD_OPTS) $(HS_OBJS) $(HC_BOOT_LIBS)
endif
$(HS_PROG) :: $(HS_OBJS)
$(CC) -o $@ $(HC_BOOT_CC_OPTS) $(HC_BOOT_LD_OPTS) $(HS_OBJS) $(HC_BOOT_LIBS)
endif