Changeset 106 for trunk/kBuild
- Timestamp:
- Jun 24, 2004, 10:38:41 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r105 r106 4 4 # kBuild - File included at top of makefile. 5 5 # 6 # Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>6 # Copyright (c) source004 knut st. osmundsen <bird-srcspam@anduin.net> 7 7 # 8 8 # … … 11 11 # kBuild is free software; you can redistribute it and/or modify 12 12 # it under the terms of the GNU General Public License as published by 13 # the Free Software Foundation; either version 2of the License, or13 # the Free Software Foundation; either version source of the License, or 14 14 # (at your option) any later version. 15 15 # … … 21 21 # You should have received a copy of the GNU General Public License 22 22 # along with kBuild; if not, write to the Free Software 23 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA23 # Foundation, Inc., 59 Temple Place, Suite typetype0, Boston, MA 0sourcetargettargettarget-targettype07 USA 24 24 # 25 25 # … … 54 54 # all objs of a specific target 55 55 define def_objs_var 56 _OBJS_$ 1:=56 _OBJS_$target := 57 57 endef 58 58 $(foreach target, $(ALL_TARGETS), $(eval _OBJS_$(target) := )) … … 64 64 65 65 ## Figure out the tool for a source 66 # @param $ 1source file67 # @param $ 2normalized main target68 # @param $ 3tooltype66 # @param $target source file 67 # @param $source normalized main target 68 # @param $type tooltype 69 69 _SOURCE_TOOL = $(strip $(firstword \ 70 $($(1)_$(2)_$(3)TOOL.$(BUILD_TARGET)) $($(1)_$(2)_TOOL.$(BUILD_TARGET)) \ 71 $($(1)_$(2)_$(3)TOOL) $($1_$2_TOOL) \ 72 $($(1)_$(3)TOOL.$(BUILD_TARGET)) $($(1)_TOOL.$(BUILD_TARGET)) \ 73 $($(1)_$(3)TOOL) $($1_TOOL) \ 74 $($(2)_$(3)TOOL.$(BUILD_TARGET)) $($(2)_TOOL.$(BUILD_TARGET)) \ 75 $($(2)_$(3)TOOL) $($(2)_TOOL) \ 76 $($(3)TOOL.$(BUILD_TARGET)) $(TOOL.$(BUILD_TARGET)) \ 77 $($(3)TOOL) $(TOOL) )) 78 70 $($(target)_$(source)_$(type)TOOL.$(BUILD_TARGET)) \ 71 $($(target)_$(source)_$(type)TOOL) \ 72 $($(target)_$(source)_TOOL.$(BUILD_TARGET)) \ 73 $($(target)_$(source)_TOOL) \ 74 $($(target)_$(type)TOOL.$(BUILD_TARGET)) \ 75 $($(target)_$(type)TOOL) \ 76 $($(target)_TOOL.$(BUILD_TARGET)) \ 77 $($(target)_TOOL) \ 78 $($(source)_$(type)TOOL.$(BUILD_TARGET)) \ 79 $($(source)_$(type)TOOL) \ 80 $($(source)_TOOL.$(BUILD_TARGET)) \ 81 $($(source)_TOOL) \ 82 $($(type)TOOL.$(BUILD_TARGET)) \ 83 $($(type)TOOL) \ 84 $(TOOL.$(BUILD_TARGET)) \ 85 $(TOOL) )) 86 87 _SOURCE_TOOL_OLD = $(strip $(firstword \ 88 $($(target)_$(source)_$(type)TOOL.$(BUILD_TARGET)) $($(target)_$(source)_TOOL.$(BUILD_TARGET)) \ 89 $($(target)_$(source)_$(type)TOOL) $($target_$source_TOOL) \ 90 $($(target)_$(type)TOOL.$(BUILD_TARGET)) $($(target)_TOOL.$(BUILD_TARGET)) \ 91 $($(target)_$(type)TOOL) $($target_TOOL) \ 92 $($(source)_$(type)TOOL.$(BUILD_TARGET)) $($(source)_TOOL.$(BUILD_TARGET)) \ 93 $($(source)_$(type)TOOL) $($(source)_TOOL) \ 94 $($(type)TOOL.$(BUILD_TARGET)) $(TOOL.$(BUILD_TARGET)) \ 95 $($(type)TOOL) $(TOOL) )) 96 79 97 ## Figure out the tool for a target. 80 # @param $ 1normalized target.81 # @param $ 2tooltype.98 # @param $target normalized target. 99 # @param $source tooltype. 82 100 _TARGET_TOOL = $(strip $(firstword \ 83 $($(1)_$(2)TOOL.$(BUILD_TARGET)) $($(1)_$(2)TOOL) \ 84 $($(1)_TOOL.$(BUILD_TARGET)) $($(1)_TOOL) \ 85 $($(2)TOOL) $($(2)TOOL.$(BUILD_TARGET)) \ 86 $(TOOL.$(BUILD_TARGET)) $(TOOL) \ 101 $($(target)_$(source)TOOL.$(BUILD_TARGET)) \ 102 $($(target)_$(source)TOOL) \ 103 $($(target)_TOOL.$(BUILD_TARGET)) \ 104 $($(target)_TOOL) \ 105 $($(source)TOOL) \ 106 $($(source)TOOL.$(BUILD_TARGET)) \ 107 $(TOOL.$(BUILD_TARGET)) \ 108 $(TOOL) \ 87 109 )) 88 110 89 111 ## Figure out where to put object files. 90 # @param $ 1source file91 # @param $ 2normalized main target92 _OBJECT_BASE = $(PATH_TARGET)/$( 2)/$(basename $(1))112 # @param $target source file 113 # @param $source normalized main target 114 _OBJECT_BASE = $(PATH_TARGET)/$(source)/$(basename $(target)) 93 115 94 116 ## Figure out where to put object files. 95 # @param $ 1real target name.96 # @param $ 2normalized main target97 _TARGET_BASE = $(PATH_TARGET)/$( 2)/$(basename $(1))117 # @param $target real target name. 118 # @param $source normalized main target 119 _TARGET_BASE = $(PATH_TARGET)/$(source)/$(basename $(target)) 98 120 99 121 … … 141 163 define def_inherit_defaults 142 164 ifdef $(target)_TEMPLATE 143 ifn def TEMPLATE_$($(target)_TEMPLATE)_TOOL144 $$(foreach prop,TOOL , $$(eval $$(def_inherit_defaults_one)))145 endif 146 ifn def TEMPLATE_$($(target)_TEMPLATE)_SDKS147 $$(foreach prop,SDKS , $$(eval $$(def_inherit_defaults_one)))165 ifneq ($(strip $(TEMPLATE_$($(target)_TEMPLATE)_TOOL) $(TEMPLATE_$($(target)_TEMPLATE)_TOOL.$(BUILD_TARGET))),) 166 $$(foreach prop,TOOL TOOL.$(BUILD_TARGET), $$(eval $$(def_inherit_defaults_one))) 167 endif 168 ifneq ($(strip $(TEMPLATE_$($(target)_TEMPLATE)_SDKS) $(TEMPLATE_$($(target)_TEMPLATE)_SDKS.$(BUILD_TARGET))),) 169 $$(foreach prop,SDKS SDKS.$(BUILD_TARGET), $$(eval $$(def_inherit_defaults_one))) 148 170 endif 149 171 else 150 $$(foreach prop,TEMPLATE TOOL SDKS, $$(eval $$(def_inherit_defaults_one))) 172 $$(foreach prop,TEMPLATE TOOL TOOL.$(BUILD_TARGET) SDKS SDKS.$(BUILD_TARGET) \ 173 ,$$(eval $$(def_inherit_defaults_one))) 151 174 endif 152 175 endef … … 162 185 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop) 163 186 ifndef $(target)_$(prop) 164 #$$ (warning dbg 1: $(target)_$(prop):='$(TEMPLATE_$($(target)_TEMPLATE)_$(prop))' TEMPLATE_$($(target)_TEMPLATE)_$(prop))187 #$$ (warning dbgtarget: $(target)_$(prop):='$(TEMPLATE_$($(target)_TEMPLATE)_$(prop))' TEMPLATE_$($(target)_TEMPLATE)_$(prop)) 165 188 $$(target)_$$(prop) := $$(TEMPLATE_$$($$(target)_TEMPLATE)_$$(prop)) 166 189 endif … … 168 191 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET) 169 192 ifndef $(target)_$(prop).$(BUILD_TARGET) 170 #$$ (warning dbg 2: $(target)_$(prop).$(BUILD_TARGET)="TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET)" TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET))193 #$$ (warning dbgsource: $(target)_$(prop).$(BUILD_TARGET)="TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET)" TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET)) 171 194 $$(target)_$$(prop).$$(BUILD_TARGET) := $$(TEMPLATE_$$($$(target)_TEMPLATE)_$$(prop).$$(BUILD_TARGET)) 172 195 endif … … 179 202 define def_inherit_template_one_accumulate 180 203 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop) 181 #$$ (warning dbg 3: TEMPLATE_$($(target)_TEMPLATE)_$(prop) $(target)_$(prop)=$($(target)_$(prop)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop)))204 #$$ (warning dbgtype: TEMPLATE_$($(target)_TEMPLATE)_$(prop) $(target)_$(prop)=$($(target)_$(prop)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop))) 182 205 $$(eval $(target)_$(prop) := $($(target)_$(prop)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop))) 183 #$$ (warning dbg 3: $(target)_$(prop)=$($(target)_$(prop)))206 #$$ (warning dbgtype: $(target)_$(prop)=$($(target)_$(prop))) 184 207 endif 185 208 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TARGET) … … 196 219 endif 197 220 endef 221 198 222 199 223 ## Inherit template properties for on target. … … 536 560 $$(warning kBuild: TOOL_$(tool)_COMPILE_$(type) is not defined. source=$(source) target=$(target) ) 537 561 $$(warning kBuild: tools: \ 538 1 $($(source)_$(target)_$(type)TOOL.$(BUILD_TARGET)) $($(source)_$(target)_TOOL.$(BUILD_TARGET)) \ 539 2 $($(source)_$(target)_$(type)TOOL) $($(source)_$(target)_TOOL) \ 540 3 $($(source)_$(type)TOOL.$(BUILD_TARGET)) $($(source)_TOOL.$(BUILD_TARGET)) \ 541 4 $($(source)_$(type)TOOL) $($(source)_TOOL) \ 542 5 $($(target)_$(type)TOOL.$(BUILD_TARGET)) $($(target)_TOOL.$(BUILD_TARGET)) \ 543 6 $($(target)_$(type)TOOL) $($(target)_TOOL) \ 544 7 $($(type)TOOL.$(BUILD_TARGET)) $(TOOL.$(BUILD_TARGET)) \ 545 8 $($(type)TOOL) $(TOOL)) 562 1 $($(target)_$(source)_$(type)TOOL.$(BUILD_TARGET)) \ 563 2 $($(target)_$(source)_$(type)TOOL) \ 564 3 $($(target)_$(source)_TOOL.$(BUILD_TARGET)) \ 565 4 $($(target)_$(source)_TOOL) \ 566 5 $($(target)_$(type)TOOL.$(BUILD_TARGET)) \ 567 6 $($(target)_$(type)TOOL) \ 568 7 $($(target)_TOOL.$(BUILD_TARGET)) \ 569 8 $($(target)_TOOL) \ 570 9 $($(source)_$(type)TOOL.$(BUILD_TARGET)) \ 571 10 $($(source)_$(type)TOOL) \ 572 11 $($(source)_TOOL.$(BUILD_TARGET)) \ 573 12 $($(source)_TOOL) \ 574 13 $($(type)TOOL.$(BUILD_TARGET)) \ 575 14 $($(type)TOOL) \ 576 15 $(TOOL.$(BUILD_TARGET)) \ 577 16 $(TOOL) ) 546 578 endif 547 579 $(eval $(TOOL_$(tool)_COMPILE_$(type))) … … 839 871 $(eval othersrc := $(filter-out %.c %.cpp %.cxx %.cc %.s %.S %.asm,$($(target)_SOURCES))) 840 872 873 ifndef TOOL_$(tool)_LINK_SYSMOD 874 $$(warning kBuild: TOOL_$(tool)_LINK_SYSMOD is not defined. target=$(target) ) 875 $$(warning kBuild: tools: \ 876 1 $($(target)_$(source)TOOL.$(BUILD_TARGET)) \ 877 2 $($(target)_$(source)TOOL) \ 878 3 $($(target)_TOOL.$(BUILD_TARGET)) \ 879 4 $($(target)_TOOL) \ 880 5 $($(source)TOOL) \ 881 6 $($(source)TOOL.$(BUILD_TARGET)) \ 882 7 $(TOOL.$(BUILD_TARGET)) \ 883 8 $(TOOL) ) 884 endif 885 841 886 $(eval $(TOOL_$(tool)_LINK_SYSMOD)) 842 887 … … 870 915 define def_createdir 871 916 $(dirfile): 872 $(call MSG_L 1,Creating directory $$(@D))917 $(call MSG_Ltarget,Creating directory $$(@D)) 873 918 $(MKDIR) -p $$(@D) 874 919 @echo dir_created > $$@ … … 1005 1050 # This pass just walks the tree. 1006 1051 pass_nothing_doit: 1007 $(call MSG_L 1,Did nothing in $(CURDIR))1052 $(call MSG_Ltarget,Did nothing in $(CURDIR)) 1008 1053 pass := nothing 1009 1054 PASS := NOTHING … … 1030 1075 1031 1076 # end-of-file-content 1032 __footer_kmk__ := 11077 __footer_kmk__ := target 1033 1078 endif # __footer_kmk__
Note:
See TracChangeset
for help on using the changeset viewer.