< prev index next >

make/common/NativeCompilation.gmk

Print this page




 783   # defined for it as otherwise make will think it has to run the rule before
 784   # being able to include the file, which would be wrong since we specifically
 785   # need the file as it was generated by a previous make invocation.
 786   ifneq ($$(wildcard $$($1_DEPS_FILE).old), )
 787     $1_DEPS_FILE_LOADED := true
 788     -include $$($1_DEPS_FILE).old
 789   endif
 790 
 791   # Now call SetupCompileNativeFile for each source file we are going to compile.
 792   $$(foreach file, $$($1_SRCS), \
 793       $$(eval $$(call SetupCompileNativeFile, $1_$$(notdir $$(file)),\
 794           FILE := $$(file), \
 795           BASE := $1, \
 796       )) \
 797   )
 798 
 799   # Setup rule for printing progress info when compiling source files.
 800   # This is a rough heuristic and may not always print accurate information.
 801   $$($1_BUILD_INFO): $$($1_SRCS) $$($1_COMPILE_VARDEPS_FILE)
 802         ifeq ($$(wildcard $$($1_TARGET)), )
 803           $$(call LogWarn, Creating $$(subst $$(OUTPUTDIR)/,,$$($1_TARGET)) from $$(words \
 804               $$(filter-out %.vardeps, $$?)) file(s))
 805         else
 806           $$(call LogWarn, $$(strip Updating $$(subst $$(OUTPUTDIR)/,,$$($1_TARGET)) \
 807               $$(if $$(filter-out %.vardeps, $$?), \
 808                 due to $$(words $$(filter-out %.vardeps, $$?)) file(s), \
 809               $$(if $$(filter %.vardeps, $$?), due to makefile changes))))
 810         endif
 811         $(TOUCH) $$@
 812 
 813   # On windows we need to create a resource file
 814   ifeq ($(call isTargetOs, windows), true)
 815     ifneq ($$($1_VERSIONINFO_RESOURCE), )
 816       $1_RES := $$($1_OBJECT_DIR)/$$($1_BASENAME).res
 817       $1_RES_DEPS_FILE := $$($1_RES).d
 818       $1_RES_DEPS_TARGETS_FILE := $$($1_RES).d.targets
 819       -include $$($1_RES_DEPS_FILE)
 820       -include $$($1_RES_DEPS_TARGETS_FILE)
 821 
 822       $1_RES_VARDEPS := $$($1_RC) $$($1_RC_FLAGS)
 823       $1_RES_VARDEPS_FILE := $$(call DependOnVariable, $1_RES_VARDEPS, \
 824           $$($1_RES).vardeps)
 825 
 826       $$($1_RES): $$($1_VERSIONINFO_RESOURCE) $$($1_RES_VARDEPS_FILE)
 827                 $$(call LogInfo, Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$($1_BASENAME)))
 828                 $$(call MakeDir, $$(@D) $$($1_OBJECT_DIR))
 829                 $$(call ExecuteWithLog, $$@, \




 783   # defined for it as otherwise make will think it has to run the rule before
 784   # being able to include the file, which would be wrong since we specifically
 785   # need the file as it was generated by a previous make invocation.
 786   ifneq ($$(wildcard $$($1_DEPS_FILE).old), )
 787     $1_DEPS_FILE_LOADED := true
 788     -include $$($1_DEPS_FILE).old
 789   endif
 790 
 791   # Now call SetupCompileNativeFile for each source file we are going to compile.
 792   $$(foreach file, $$($1_SRCS), \
 793       $$(eval $$(call SetupCompileNativeFile, $1_$$(notdir $$(file)),\
 794           FILE := $$(file), \
 795           BASE := $1, \
 796       )) \
 797   )
 798 
 799   # Setup rule for printing progress info when compiling source files.
 800   # This is a rough heuristic and may not always print accurate information.
 801   $$($1_BUILD_INFO): $$($1_SRCS) $$($1_COMPILE_VARDEPS_FILE)
 802         ifeq ($$(wildcard $$($1_TARGET)), )
 803           $(ECHO) 'Creating $$(subst $$(OUTPUTDIR)/,,$$($1_TARGET)) from $$(words \
 804               $$(filter-out %.vardeps, $$?)) file(s)'
 805         else
 806           $(ECHO) $$(strip 'Updating $$(subst $$(OUTPUTDIR)/,,$$($1_TARGET))' \
 807               $$(if $$(filter-out %.vardeps, $$?), \
 808                 'due to $$(words $$(filter-out %.vardeps, $$?)) file(s)', \
 809               $$(if $$(filter %.vardeps, $$?), 'due to makefile changes')))
 810         endif
 811         $(TOUCH) $$@
 812 
 813   # On windows we need to create a resource file
 814   ifeq ($(call isTargetOs, windows), true)
 815     ifneq ($$($1_VERSIONINFO_RESOURCE), )
 816       $1_RES := $$($1_OBJECT_DIR)/$$($1_BASENAME).res
 817       $1_RES_DEPS_FILE := $$($1_RES).d
 818       $1_RES_DEPS_TARGETS_FILE := $$($1_RES).d.targets
 819       -include $$($1_RES_DEPS_FILE)
 820       -include $$($1_RES_DEPS_TARGETS_FILE)
 821 
 822       $1_RES_VARDEPS := $$($1_RC) $$($1_RC_FLAGS)
 823       $1_RES_VARDEPS_FILE := $$(call DependOnVariable, $1_RES_VARDEPS, \
 824           $$($1_RES).vardeps)
 825 
 826       $$($1_RES): $$($1_VERSIONINFO_RESOURCE) $$($1_RES_VARDEPS_FILE)
 827                 $$(call LogInfo, Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$($1_BASENAME)))
 828                 $$(call MakeDir, $$(@D) $$($1_OBJECT_DIR))
 829                 $$(call ExecuteWithLog, $$@, \


< prev index next >