forked from OSchip/llvm-project
Makefile.rules: Let OPTIONAL_PARALLEL_DIRS accept out-of-tree absolute path.
llvm-svn: 142101
This commit is contained in:
parent
4f539312df
commit
2c1a4cce4c
|
@ -806,7 +806,7 @@ endif
|
||||||
# Handle the OPTIONAL_PARALLEL_DIRS options for optional parallel construction
|
# Handle the OPTIONAL_PARALLEL_DIRS options for optional parallel construction
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
ifdef OPTIONAL_PARALLEL_DIRS
|
ifdef OPTIONAL_PARALLEL_DIRS
|
||||||
PARALLEL_DIRS += $(foreach T,$(OPTIONAL_PARALLEL_DIRS),$(shell test -d $(PROJ_SRC_DIR)/$(T) && echo "$(T)"))
|
PARALLEL_DIRS += $(foreach T,$(OPTIONAL_PARALLEL_DIRS),$(shell test -d $(PROJ_SRC_DIR)/$(T) -o -f $(T)/Makefile && echo "$(T)"))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
|
@ -828,13 +828,20 @@ unitcheck:: $(addsuffix /.makeunitcheck,$(PARALLEL_DIRS))
|
||||||
ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T))
|
ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T))
|
||||||
|
|
||||||
$(ParallelTargets) :
|
$(ParallelTargets) :
|
||||||
$(Verb) if ([ ! -f $(@D)/Makefile ] || \
|
$(Verb) \
|
||||||
command test $(@D)/Makefile -ot \
|
SD=$(PROJ_SRC_DIR)/$(@D); \
|
||||||
$(PROJ_SRC_DIR)/$(@D)/Makefile ); then \
|
DD=$(@D); \
|
||||||
$(MKDIR) $(@D); \
|
if [ ! -f $$SD/Makefile ]; then \
|
||||||
$(CP) $(PROJ_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \
|
SD=$(@D); \
|
||||||
|
DD=$(notdir $(@D)); \
|
||||||
fi; \
|
fi; \
|
||||||
$(MAKE) -C $(@D) $(subst $(@D)/.make,,$@)
|
if ([ ! -f $$DD/Makefile ] || \
|
||||||
|
command test $$DD/Makefile -ot \
|
||||||
|
$$SD/Makefile ); then \
|
||||||
|
$(MKDIR) $$DD; \
|
||||||
|
$(CP) $$SD/Makefile $$DD/Makefile; \
|
||||||
|
fi; \
|
||||||
|
$(MAKE) -C $$DD $(subst $(@D)/.make,,$@)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#---------------------------------------------------------
|
#---------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue