Changeset 729 for trunk/kBuild
- Timestamp:
- Dec 17, 2006, 3:12:07 AM (19 years ago)
- Location:
- trunk/kBuild
- Files:
-
- 4 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 -
trunk/kBuild/gnumake-footer.kmk
r723 r729 24 24 # 25 25 # 26 27 ## Figure out the tool for a source 28 # @param target source file 29 # @param source normalized main target 30 # @param type tooltype 31 # @param bld_trg build target. 32 # @param bld_trg_arch build target architecture. 33 # @remark Obsoleted by kBuild helpers in kmk. Only required for gmake compatbility. 34 _SOURCE_TOOL = $(strip $(firstword \ 35 $($(target)_$(source)_$(type)TOOL.$(bld_trg).$(bld_trg_arch)) \ 36 $($(target)_$(source)_$(type)TOOL.$(bld_trg)) \ 37 $($(target)_$(source)_$(type)TOOL) \ 38 $($(target)_$(source)_TOOL.$(bld_trg).$(bld_trg_arch)) \ 39 $($(target)_$(source)_TOOL.$(bld_trg)) \ 40 $($(target)_$(source)_TOOL) \ 41 $($(source)_$(type)TOOL.$(bld_trg).$(bld_trg_arch)) \ 42 $($(source)_$(type)TOOL.$(bld_trg)) \ 43 $($(source)_$(type)TOOL) \ 44 $($(source)_TOOL.$(bld_trg).$(bld_trg_arch)) \ 45 $($(source)_TOOL.$(bld_trg)) \ 46 $($(source)_TOOL) \ 47 $($(target)_$(type)TOOL.$(bld_trg).$(bld_trg_arch)) \ 48 $($(target)_$(type)TOOL.$(bld_trg)) \ 49 $($(target)_$(type)TOOL) \ 50 $($(target)_TOOL.$(bld_trg).$(bld_trg_arch)) \ 51 $($(target)_TOOL.$(bld_trg)) \ 52 $($(target)_TOOL) \ 53 $($(type)TOOL.$(bld_trg).$(bld_trg_arch)) \ 54 $($(type)TOOL.$(bld_trg)) \ 55 $($(type)TOOL) \ 56 $(TOOL.$(bld_trg).$(bld_trg_arch)) \ 57 $(TOOL.$(bld_trg)) \ 58 $(TOOL) )) 59 60 ## Figure out where to put object files. 61 # @param $1 source file 62 # @param $2 normalized main target 63 # @remark There are two major hacks here: 64 # 1. Source files in the output directory are translated into a gen/ subdir. 65 # 2. Catch anyone specifying $(PATH_SUB_CURRENT)/sourcefile.c. 66 # @remark obsoleted by kBuild helpers in kmk. Only required for gmake compatbility. 67 _OBJECT_BASE = $(PATH_TARGET)/$(2)/$(call no-root-slash,$(call no-drive,$(basename \ 68 $(patsubst $(PATH_ROOT)/%,%,$(patsubst $(PATH_SUB_CURRENT)/%,%,$(patsubst $(PATH_TARGET)/$(2)/%,gen/%,$(1))))))) 26 69 27 70 -
trunk/kBuild/subfooter.kmk
r725 r729 57 57 # 58 58 MAKEFILE_CURRENT := $(call stack-pop,_SUB_MAKEFILE_STACK) 59 PATH_SUB_CURRENT := $(abspath $( patsubst %/,%,$(dir $(MAKEFILE_CURRENT))))59 PATH_SUB_CURRENT := $(abspath $(dir $(MAKEFILE_CURRENT))) 60 60 61 61 # … … 66 66 endif 67 67 68 -
trunk/kBuild/subheader.kmk
r725 r729 25 25 # 26 26 27 ifndef _SUB_MAKEFILE_STACK 27 ifndef _SUB_MAKEFILE_NOT_FIRST 28 28 29 # 29 30 # The first time we just take the makefile context set by header.kmk. 30 31 # 32 _SUB_MAKEFILE_NOT_FIRST := 1 31 33 include $(PATH_KBUILD)/header.kmk 32 34 33 35 else 34 36 … … 63 65 # Switch context. 64 66 # 67 68 # push the current old makefile onto the stack. 69 $(call stack-push,_SUB_MAKEFILE_STACK,$(MAKEFILE_CURRENT)) 70 71 # the current makefile is the 2nd from the end of the MAKEFILE_LIST (we're the last one). 65 72 __tmp := $(MAKEFILE_LIST) 66 73 $(call stack-popv,__tmp) 67 74 MAKEFILE_CURRENT := $(call stack-top,__tmp) 68 PATH_SUB_CURRENT := $(abspath $( patsubst %/,%,$(dir $(MAKEFILE_CURRENT))))75 PATH_SUB_CURRENT := $(abspath $(dir $(MAKEFILE_CURRENT))) 69 76 endif 70 77 71 $(call stack-push,_SUB_MAKEFILE_STACK,$(MAKEFILE_CURRENT))72
Note:
See TracChangeset
for help on using the changeset viewer.