From a2a00c7c91185bf99b968a24a506cef0a391e6aa Mon Sep 17 00:00:00 2001 From: Janet Anderson Date: Wed, 19 Jan 2011 15:27:17 -0600 Subject: [PATCH] Make cross builds depend on host build only if -j option and make > 3.81 --- configure/RULES_ARCHS | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/configure/RULES_ARCHS b/configure/RULES_ARCHS index eba7cfab5..f1f8709e4 100644 --- a/configure/RULES_ARCHS +++ b/configure/RULES_ARCHS @@ -38,19 +38,20 @@ buildDirs = $(addprefix O.,$(BUILD_ARCHS)) CROSS_ARCHS += $(CROSS1) $(CROSS2) -# j is NOT found in MAKEFLAGS when using make 3.81 -# Hope to uncomment this for GNU make 3.82 -#ifeq ($(findstring j,$(MAKEFLAGS)),j) - define DEP_template $(2): $$(EPICS_HOST_ARCH) $(1)$$(DIVIDER)$(2): $(1)$$(DIVIDER)$$(EPICS_HOST_ARCH) O.$(2) endef -$(foreach action, $(ACTIONS), $(foreach arch,\ +ifeq (MAKE_VERSION,3.81) + $(foreach action, $(ACTIONS), $(foreach arch,\ $(CROSS_ARCHS),$(eval $(call DEP_template,$(action),$(arch))))) - -#endif +else +ifeq ($(findstring j,$(MAKEFLAGS)),j) + $(foreach action, $(ACTIONS), $(foreach arch,\ + $(CROSS_ARCHS),$(eval $(call DEP_template,$(action),$(arch))))) +endif +endif #************************************************************************* # Allows rebuild to work with parallel builds option, -j.