Changeset 1621 in kBuild
- Timestamp:
- May 12, 2008 7:44:45 PM (17 years ago)
- Location:
- trunk/kBuild
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r1614 r1621 1072 1072 1073 1073 # 1074 # Include tools & sdks1074 # Include tools, sdks and units. 1075 1075 # 1076 1076 # The first part of this exercise is to figure out which TOOLS and SDKS … … 1084 1084 $(SDKS.$(KBUILD_TYPE)) \ 1085 1085 $(SDKS) 1086 _USES := $(USES.$(KBUILD_TARGET)) $(USES.$(KBUILD_TARGET_ARCH)) $(USES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)) \ 1087 $(USES.$(KBUILD_HOST)) $(USES.$(KBUILD_HOST_ARCH)) $(USES.$(KBUILD_HOST).$(KBUILD_HOST_ARCH)) \ 1088 $(USES.$(KBUILD_TYPE)) \ 1089 $(USES) 1086 1090 define def_tools_sdks_target_source 1087 1091 $(eval _TOOLS += $(foreach prop, $(PROPS_TOOLS), \ … … 1105 1109 $($(source)_SDKS) \ 1106 1110 $($(target)_$(source)_SDKS)) 1111 $(eval _USES += \ 1112 $($(source)_USES.$(_bld_trg)) \ 1113 $($(target)_$(source)_USES.$(_bld_trg)) \ 1114 $($(source)_USES.$(_bld_trg).$(_bld_trg_arch)) \ 1115 $($(target)_$(source)_USES.$(_bld_trg).$(_bld_trg_arch)) \ 1116 $($(source)_USES.$(_bld_trg_arch)) \ 1117 $($(target)_$(source)_USES.$(_bld_trg_arch)) \ 1118 $($(source)_USES.$(KBUILD_TYPE)) \ 1119 $($(target)_$(source)_USES.$(KBUILD_TYPE)) \ 1120 $($(source)_USES) \ 1121 $($(target)_$(source)_USES)) 1107 1122 endef # def_tools_sdks_target_source 1108 1123 … … 1123 1138 $($(target)_SDKS.$(_bld_trg).$(_bld_trg_arch)) \ 1124 1139 $($(target)_SDKS)) 1140 $(eval _USES += \ 1141 $($(target)_USES.$(_bld_trg)) \ 1142 $($(target)_USES.$(_bld_trg_arch)) \ 1143 $($(target)_USES.$(_bld_trg).$(_bld_trg_arch)) \ 1144 $($(target)_USES)) 1125 1145 $(foreach source, \ 1126 1146 $($(target)_SOURCES.$(_bld_trg)) \ … … 1193 1213 endef # def_sdk_load_function 1194 1214 1215 ## Unit load function. 1216 # @param loading The unit name 1217 define def_unit_load_function 1218 ifndef UNIT_$(loading) 1219 UNIT_$(loading)_KMK_FILE := $(firstword $(foreach path, $(KBUILD_UNIT_PATHS) $(KBUILD_PATH)/units $(KBUILD_DEFAULT_PATHS), $(wildcard $(path)/$(loading).kmk))) 1220 ifeq ($(UNIT_$(loading)_KMK_FILE),) 1221 $(error kBuild: Cannot find include file for the unit '$(loading)'! Searched: $(KBUILD_UNIT_PATHS) $(KBUILD_PATH)/units $(KBUILD_DEFAULT_PATHS)) 1222 endif 1223 include $(UNIT_$(loading)_KMK_FILE) 1224 ifndef UNIT_$(loading) 1225 $(warning kBuild: UNIT_$(loading) was not defined by $(UNIT_$(loading)_KMK_FILE)!) 1226 endif 1227 endif 1228 endef # def_unit_load_function 1229 1195 1230 1196 1231 properties := … … 1219 1254 properties_deferred_r := 1220 1255 1256 # No inheriting for the uses, they're just global 'code'. 1257 $(foreach loading, $(_USES), $(evalval def_unit_load_function)) 1258 1221 1259 1222 1260 ifdef KBUILD_PROFILE_SELF 1223 1261 _KBUILD_TS_NOW := $(nanots ) 1224 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done tools and sdks)1262 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done tools, sdks and units) 1225 1263 $(info stat: $(make-stats )) 1226 1264 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW) … … 2016 2054 $($(target)_SOURCES.$(bld_trg_cpu))\ 2017 2055 $($(target)_SOURCES.$(bld_type))\ 2056 ,$(evalval def_src_handler_one) ) 2057 2058 $(foreach source,\ 2059 $($(target)_GEN_SOURCES_)\ 2060 $($(target)_GEN_SOURCES_.$(bld_trg))\ 2061 $($(target)_GEN_SOURCES_.$(bld_trg).$(bld_trg_arch))\ 2062 $($(target)_GEN_SOURCES_.$(bld_trg_arch))\ 2063 $($(target)_GEN_SOURCES_.$(bld_trg_cpu))\ 2064 $($(target)_GEN_SOURCES_.$(bld_type))\ 2018 2065 ,$(evalval def_src_handler_one) ) 2019 2066 endef -
trunk/kBuild/header.kmk
r1613 r1621 657 657 KBUILD_SDK_PATHS := 658 658 659 ## KBUILD_UNIT_PATHS 660 # List of paths (separated by space) where units (USES) can be found. 661 KBUILD_UNIT_PATHS := 662 659 663 ## KBUILD_DEFAULT_PATHS 660 664 # List of paths (separated by space) to search for stuff as a last resort. … … 690 694 ## PROPS_TOOLS 691 695 # This is a subset of PROPS_SINGLE. 692 PROPS_TOOLS := TOOL CTOOL CXXTOOL OBJCTOOL ASTOOL RCTOOL ARTOOL LDTOOL FETCHTOOL UNPACKTOOL PATCHTOOL696 PROPS_TOOLS := TOOL CTOOL CXXTOOL OBJCTOOL ASTOOL RCTOOL ARTOOL LDTOOL LEXTOOL FETCHTOOL UNPACKTOOL PATCHTOOL 693 697 694 698 ## PROPS_SINGLE … … 701 705 # Subset of PROPS_SINGLE which applies to all linkable targets. 702 706 PROPS_SINGLE_LNK := TOOL TEMPLATE CTOOL CXXTOOL OBJCTOOL ASTOOL RCTOOL \ 703 707 INST NOINST BLD_TYPE BLD_TRG BLD_TRG_ARCH BLD_TRG_CPU \ 704 708 OBJSUFF COBJSUFF CXXOBJSUFF OBJCOBJSUFF ASOBJSUFF RCOBJSUFF 705 709 … … 742 746 # will do the necessary inheritance from templates to targets. 743 747 PROPS_ACCUMULATE_L := \ 744 SDKS SOURCES SRC_HANDLERS INTERMEDIATES \748 SDKS USES SOURCES SRC_HANDLERS INTERMEDIATES \ 745 749 INCS CINCS CXXINCS OBJCINCS ASINCS RCINCS \ 746 750 LIBS LIBPATH \
Note:
See TracChangeset
for help on using the changeset viewer.