Makefile
changeset 26548 3b002da2aee1
parent 26398 ca1f84f97e20
child 27595 cff167b3bfa2
child 27560 adc258b13e2c
equal deleted inserted replaced
26547:f8b190ea8955 26548:3b002da2aee1
    68   # We are potentially building multiple configurations.
    68   # We are potentially building multiple configurations.
    69   # First, find out the valid targets
    69   # First, find out the valid targets
    70   # Run the makefile with an arbitrary SPEC using -p -q (quiet dry-run and dump rules) to find
    70   # Run the makefile with an arbitrary SPEC using -p -q (quiet dry-run and dump rules) to find
    71   # available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
    71   # available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
    72   all_phony_targets := $(sort $(filter-out $(global_targets), $(strip $(shell \
    72   all_phony_targets := $(sort $(filter-out $(global_targets), $(strip $(shell \
    73       cd $(root_dir)/make && $(MAKE) -f Main.gmk -p -q FRC SPEC=$(firstword $(SPEC)) | \
    73       cd $(root_dir)/make && $(MAKE) -f Main.gmk -p -q FRC SPEC=$(firstword $(SPEC)) \
    74       grep "^.PHONY:" | head -n 1 | cut -d " " -f 2-))))
    74       -I $(root_dir)/make/common | grep "^.PHONY:" | head -n 1 | cut -d " " -f 2-))))
    75 
    75 
    76   # Loop through the configurations and call the main-wrapper for each one. The wrapper
    76   # Loop through the configurations and call the main-wrapper for each one. The wrapper
    77   # target will execute with a single configuration loaded.
    77   # target will execute with a single configuration loaded.
    78   $(all_phony_targets):
    78   $(all_phony_targets):
    79 	@$(if $(TARGET_RUN),,\
    79 	@$(if $(TARGET_RUN),,\
   113     SEQUENTIAL_TARGETS := $(filter dist-clean clean% reconfigure, $(MAIN_TARGETS))
   113     SEQUENTIAL_TARGETS := $(filter dist-clean clean% reconfigure, $(MAIN_TARGETS))
   114     PARALLEL_TARGETS := $(filter-out $(SEQUENTIAL_TARGETS), $(MAIN_TARGETS))
   114     PARALLEL_TARGETS := $(filter-out $(SEQUENTIAL_TARGETS), $(MAIN_TARGETS))
   115 
   115 
   116     main-wrapper:
   116     main-wrapper:
   117         ifneq ($(SEQUENTIAL_TARGETS), )
   117         ifneq ($(SEQUENTIAL_TARGETS), )
   118 	  (cd $(root_dir)/make && $(MAKE) -f Main.gmk SPEC=$(SPEC) -j 1 \
   118 	  (cd $(SRC_ROOT)/make && $(MAKE) -f Main.gmk SPEC=$(SPEC) -j 1 \
   119 	      $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $(SEQUENTIAL_TARGETS))
   119 	      $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $(SEQUENTIAL_TARGETS))
   120         endif
   120         endif
   121         ifneq ($(PARALLEL_TARGETS), )
   121         ifneq ($(PARALLEL_TARGETS), )
   122 	  @$(call AtMakeStart)
   122 	  @$(call AtMakeStart)
   123 	  (cd $(root_dir)/make && $(BUILD_LOG_WRAPPER) $(MAKE) -f Main.gmk SPEC=$(SPEC) -j $(JOBS) \
   123 	  (cd $(SRC_ROOT)/make && $(BUILD_LOG_WRAPPER) $(MAKE) -f Main.gmk SPEC=$(SPEC) -j $(JOBS) \
   124 	      $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $(PARALLEL_TARGETS) \
   124 	      $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $(PARALLEL_TARGETS) \
   125 	      $(if $(filter true, $(OUTPUT_SYNC_SUPPORTED)), -O$(OUTPUT_SYNC)))
   125 	      $(if $(filter true, $(OUTPUT_SYNC_SUPPORTED)), -O$(OUTPUT_SYNC)))
   126 	  @$(call AtMakeEnd)
   126 	  @$(call AtMakeEnd)
   127         endif
   127         endif
   128 
   128