sbsv2/raptor/lib/flm/build.flm
branchwip
changeset 11 ea23b18a2ff6
parent 7 f9fd2a994239
child 12 2cfea3290625
equal deleted inserted replaced
8:34d87ffcc373 11:ea23b18a2ff6
    32 
    32 
    33 
    33 
    34 define doexports
    34 define doexports
    35 PP_EXPORTS::
    35 PP_EXPORTS::
    36 	$(call startrule,makefile_generation_exports) \
    36 	$(call startrule,makefile_generation_exports) \
    37 	$(SBS) --pp=slave --toolcheck=off --export-only $(component_list) $(config_list) -f- -m $(MAKEFILE_PATH).exports $(CLI_OPTIONS)  \
    37 	$(SBS) --toolcheck=off --export-only $(component_list) $(config_list) -f- -m $(MAKEFILE_PATH).exports $(CLI_OPTIONS)  \
    38 	$(call endrule,makefile_generation_exports)
    38 	$(call endrule,makefile_generation_exports)
    39 
    39 
    40 CLEANTARGETS:=$$(CLEANTARGETS) $(MAKEFILE_PATH).exports 
    40 CLEANTARGETS:=$$(CLEANTARGETS) $(MAKEFILE_PATH).exports 
    41 endef
    41 endef
    42 
    42 
    44 # $(1) = source target source target......
    44 # $(1) = source target source target......
    45 define generate_makefiles
    45 define generate_makefiles
    46 
    46 
    47 ALL:: $(MAKEFILE_PATH)
    47 ALL:: $(MAKEFILE_PATH)
    48 
    48 
    49 $(MAKEFILE_PATH): $(COMPONENT_PATHS) | PP_EXPORTS 
    49 $(MAKEFILE_PATH): $(COMPONENT_PATHS) $(if $(DOEXPORT),| PP_EXPORTS )
    50 	$(call startrule,makefile_generation) \
    50 	$(call startrule,makefile_generation) \
    51 	$(SBS) --pp=slave --toolcheck=off -n $(CLI_OPTIONS) $(component_list) $(config_list) -m $$@ -f- \
    51 	$(SBS) --noexport --toolcheck=off -n $(CLI_OPTIONS) $(component_list) $(config_list) -m $$@ -f- \
    52 	$(call endrule,makefile_generation)
    52 	$(call endrule,makefile_generation)
    53 
    53 
    54 CLEANTARGETS:=$$(CLEANTARGETS) $(MAKEFILE_PATH) 
    54 CLEANTARGETS:=$$(CLEANTARGETS) $(MAKEFILE_PATH) 
    55 
    55 
    56 endef
    56 endef
    57 
    57 
    58 # Create config list for commands
    58 # Create config list for commands
    59 config_list:=$(addprefix -c ,$(CONFIGS))
    59 config_list:=$(addprefix -c ,$(CONFIGS))
    60 component_list:=$(addprefix -b ,$(COMPONENT_PATHS))
    60 component_list:=$(addprefix -b ,$(COMPONENT_PATHS))
    61 $(info <debug>build.flm: configlist: $(config_list)</debug>)
       
    62 
    61 
    63 $(eval $(doexports))
    62 $(if $(FLMDEBUG),$(info <debug>build.flm: configlist: $(config_list)</debug>))
       
    63 
       
    64 # Do exports only if asked. This doesn't work brilliantly in emake
       
    65 # since exports are often duplicated in some components - leads to conflicts 
       
    66 # and rebuilds.  Better to export before trying to do parallel parsing at all.
       
    67 $(if $(DOEXPORT),$(eval $(doexports)),$(if $(FLMDEBUG),$(info <debug>build.flm: Exports off </debug>)))
    64 
    68 
    65 # Create the Makefiles
    69 # Create the Makefiles
    66 $(eval $(call generate_makefiles))
    70 $(eval $(call generate_makefiles))
    67 
    71 
    68 CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(MAKEFILE_PATH))
    72 CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(MAKEFILE_PATH))