Changeset 729 for trunk/kBuild/footer.kmk
- Timestamp:
- Dec 17, 2006, 3:12:07 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r726 r729 123 123 # Basic macros 124 124 # 125 126 ## Figure out the tool for a source127 # @param target source file128 # @param source normalized main target129 # @param type tooltype130 # @param bld_trg build target.131 # @param bld_trg_arch build target architecture.132 # @remark Obsoleted by kBuild helpers in kmk. Only required for gmake compatbility.133 _SOURCE_TOOL = $(strip $(firstword \134 $($(target)_$(source)_$(type)TOOL.$(bld_trg).$(bld_trg_arch)) \135 $($(target)_$(source)_$(type)TOOL.$(bld_trg)) \136 $($(target)_$(source)_$(type)TOOL) \137 $($(target)_$(source)_TOOL.$(bld_trg).$(bld_trg_arch)) \138 $($(target)_$(source)_TOOL.$(bld_trg)) \139 $($(target)_$(source)_TOOL) \140 $($(source)_$(type)TOOL.$(bld_trg).$(bld_trg_arch)) \141 $($(source)_$(type)TOOL.$(bld_trg)) \142 $($(source)_$(type)TOOL) \143 $($(source)_TOOL.$(bld_trg).$(bld_trg_arch)) \144 $($(source)_TOOL.$(bld_trg)) \145 $($(source)_TOOL) \146 $($(target)_$(type)TOOL.$(bld_trg).$(bld_trg_arch)) \147 $($(target)_$(type)TOOL.$(bld_trg)) \148 $($(target)_$(type)TOOL) \149 $($(target)_TOOL.$(bld_trg).$(bld_trg_arch)) \150 $($(target)_TOOL.$(bld_trg)) \151 $($(target)_TOOL) \152 $($(type)TOOL.$(bld_trg).$(bld_trg_arch)) \153 $($(type)TOOL.$(bld_trg)) \154 $($(type)TOOL) \155 $(TOOL.$(bld_trg).$(bld_trg_arch)) \156 $(TOOL.$(bld_trg)) \157 $(TOOL) ))158 125 159 126 ## Figure out the tool for a target. … … 193 160 ,$(if $(subst :$(call no-root-slash,$(call no-drive,$(_fix_path))):,,:$(_fix_path):),$(_fix_path),$(abspath $2/$(_fix_path)))) 194 161 endif 195 196 ## Figure out where to put object files.197 # @param $1 source file198 # @param $2 normalized main target199 # @remark There are two major hacks here:200 # 1. Source files in the output directory are translated into a gen/ subdir.201 # 2. Catch anyone specifying $(PATH_SUB_CURRENT)/sourcefile.c.202 # @remark obsoleted by kBuild helpers in kmk. Only required for gmake compatbility.203 _OBJECT_BASE = $(PATH_TARGET)/$(2)/$(call no-root-slash,$(call no-drive,$(basename \204 $(patsubst $(PATH_ROOT)/%,%,$(patsubst $(PATH_SUB_CURRENT)/%,%,$(patsubst $(PATH_TARGET)/$(2)/%,gen/%,$(1)))))))205 162 206 163 ## Figure out where to put object files. … … 930 887 $(out): $(comp-vars _TARGET_$(target)_DIGEST_PREV,_TARGET_$(target)_DIGEST,FORCE) | $(call DIRDEP,$(inst)) 931 888 $$(QUIET)$$(RM) -f $$@ 932 $$(call MSG_L1,$$(if $$( _TARGET_$(target)_DIGEST),$$(if $$(wildcard $(out).lst),Re-fetching,Fetching),Removing) $(target)...)889 $$(call MSG_L1,$$(if $$(wildcard $(out).lst),$$(if $$(_TARGET_$(target)_DIGEST),Re-fetching,Removing),Fetching) $(target)...) 933 890 $$(QUIET)$$(if $$(wildcard $(out).lst ),$$(MAKE) -f $(MAKEFILE) --no-print-directory $(out)_unfetched) 934 891 $$(QUIET)$$(if $$(_TARGET_$(target)_DIGEST),$$(MAKE) -f $(MAKEFILE) --no-print-directory $(out).lst,$$(RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist $$(dir $$@)) … … 1127 1084 # @param bld_trg_arch Build target arch. 1128 1085 # @param bld_trg_cpu Build target cpu. 1129 def_target_source_c_cpp_asm_rc_new = $(kb-src-one x)1086 def_target_source_c_cpp_asm_rc_new = $(kb-src-one ) 1130 1087 ifneq ($(filter kb-src-one,$(KMK_FEATURES)),) 1131 1088 def_target_source_c_cpp_asm_rc_var = def_target_source_c_cpp_asm_rc_new … … 1139 1096 # @param much-more... 1140 1097 define def_target_sources 1141 1142 # Apply any default path on the sources first.1143 ifneq ($(defpath),)1144 ifdef $(target)_SOURCES1145 $(target)_SOURCES := $(call abspathex,$($(target)_SOURCES),$(defpath))1146 endif1147 ifdef $(target)_SOURCES.$(bld_trg)1148 $(target)_SOURCES.$(bld_trg) := $(call abspathex,$($(target)_SOURCES.$(bld_trg)),$(defpath))1149 endif1150 ifdef $(target)_SOURCES.$(bld_trg).$(bld_trg_arch)1151 $(target)_SOURCES.$(bld_trg).$(bld_trg_arch) := $(call abspathex,$($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)),$(defpath))1152 endif1153 ifdef $(target)_SOURCES.$(bld_trg_arch)1154 $(target)_SOURCES.$(bld_trg_arch) := $(call abspathex,$($(target)_SOURCES.$(bld_trg_arch)),$(defpath))1155 endif1156 ifdef $(target)_SOURCES.$(bld_trg_cpu)1157 $(target)_SOURCES.$(bld_trg_cpu) := $(call abspathex,$($(target)_SOURCES.$(bld_trg_cpu)),$(defpath))1158 endif1159 ifdef $(target)_SOURCES.$(bld_type)1160 $(target)_SOURCES.$(bld_type) := $(call abspathex,$($(target)_SOURCES.$(bld_type)),$(defpath))1161 endif1162 endif1163 1164 1098 #$ (warning def_target_sources) 1165 1099 # C sources … … 1194 1128 # @param $(definst) The default _INST value. 1195 1129 # @param $(typevar) The name of the variable with all the root targets of its type. 1196 # @ obsoleteOnly library uses this now.1130 # @remark Only library uses this now. 1197 1131 define def_target_install_pluss 1198 1132 ifndef $(target)_NOINST
Note:
See TracChangeset
for help on using the changeset viewer.