Changes to allow rebuild to work with parallel builds option, -j.
This commit is contained in:
@@ -12,8 +12,6 @@
|
||||
|
||||
all: install
|
||||
|
||||
rebuild: clean install
|
||||
|
||||
ACTIONS = inc
|
||||
ACTIONS += build
|
||||
ACTIONS += install
|
||||
@@ -46,7 +44,7 @@ CROSS_ARCHS += $(CROSS1) $(CROSS2)
|
||||
|
||||
define DEP_template
|
||||
$(2): $$(EPICS_HOST_ARCH)
|
||||
$(1)$$(DIVIDER)$(2): $(1)$$(DIVIDER)$$(EPICS_HOST_ARCH)
|
||||
$(1)$$(DIVIDER)$(2): $(1)$$(DIVIDER)$$(EPICS_HOST_ARCH) O.$(2)
|
||||
endef
|
||||
|
||||
$(foreach action, $(ACTIONS), $(foreach arch,\
|
||||
@@ -55,6 +53,12 @@ $(foreach action, $(ACTIONS), $(foreach arch,\
|
||||
#endif
|
||||
#*************************************************************************
|
||||
|
||||
# Allows rebuild to work with parallel builds option, -j.
|
||||
ifeq (rebuild,$(filter rebuild,$(MAKECMDGOALS)))
|
||||
$(buildDirs) O.Common : clean
|
||||
rebuild: install
|
||||
endif
|
||||
|
||||
$(actionArchTargets) : $(buildDirs) O.Common
|
||||
$(MAKE) -C O.$(archPart) -f ../Makefile TOP=$(TOP)/.. T_A=$(archPart) $(actionPart)
|
||||
|
||||
@@ -86,5 +90,5 @@ realclean ::
|
||||
|
||||
.PHONY : $(actionArchTargets)
|
||||
.PHONY : $(cleanArchTargets)
|
||||
.PHONY : $(BUILD_ARCHS)
|
||||
.PHONY : $(BUILD_ARCHS) rebuild
|
||||
.PHONY : $(ACTIONS) clean realclean archclean all
|
||||
|
||||
@@ -115,6 +115,9 @@ install: buildInstall
|
||||
|
||||
buildInstall : build
|
||||
|
||||
# Allows rebuild to work with parallel builds option, -j.
|
||||
install: $(patsubst rebuild,clean,$(filter rebuild,$(MAKECMDGOALS)))
|
||||
|
||||
rebuild: clean install
|
||||
|
||||
build : inc
|
||||
|
||||
@@ -35,7 +35,12 @@ actionArchTargets = $(foreach action, $(ACTIONS),\
|
||||
|
||||
all : install
|
||||
|
||||
rebuild : clean install
|
||||
# Allows rebuild to work with parallel builds option, -j.
|
||||
ifeq (rebuild,$(filter rebuild,$(MAKECMDGOALS)))
|
||||
$(foreach dir, $(DIRS), $(dir)$(DIVIDER)install): \
|
||||
$(foreach dir, $(DIRS), $(dir)$(DIVIDER)clean)
|
||||
rebuild: $(foreach dir, $(DIRS), $(dir)$(DIVIDER)install)
|
||||
endif
|
||||
|
||||
# Create directory dependancies lines for GNU make -j option
|
||||
# Only works with GNU make 3.81 or later (uses eval function)
|
||||
|
||||
Reference in New Issue
Block a user