Changeset 2475 for trunk/kBuild/footer.kmk
- Timestamp:
- Jul 16, 2011, 10:08:07 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r2436 r2475 121 121 _SYSMODS := 122 122 _MISCBINS := 123 _STAGE_FILES := 124 _STAGE_DIRS := 123 125 _INSTALLS := 124 126 _INSTALLS_FILES := … … 1281 1283 local out := $(outbase)$(suff) 1282 1284 1283 # TARGET_*1285 # Object directory target variable. 1284 1286 $(target)_1_TARGET := $(out) 1285 1287 $(call KB_FN_ASSIGN_DEPRECATED,TARGET_$(target),$($(target)_1_TARGET), $(target)_1_TARGET) 1286 1288 1287 # INSTARGET_* 1288 ifeq ($(strip $($(target)_NOINST) $($(target)_NOINST.$(bld_trg)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch).$(bld_type)) $($(target)_NOINST.$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg_cpu)) $($(target)_NOINST.$(bld_type))),) 1289 ifneq ($(strip $($(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type))),) 1290 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type))) 1291 else ifneq ($(strip $($(target)_INST.$(bld_trg).$(bld_trg_arch))),) 1292 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg).$(bld_trg_arch))) 1293 else ifneq ($(strip $($(target)_INST.$(bld_trg).$(bld_type))),) 1294 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg).$(bld_type))) 1295 else ifneq ($(strip $($(target)_INST.$(bld_trg_arch))),) 1296 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg_arch))) 1297 else ifneq ($(strip $($(target)_INST.$(bld_trg))),) 1298 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg))) 1299 else ifneq ($(strip $($(target)_INST.$(bld_type))),) 1300 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_type))) 1301 else ifneq ($(strip $($(target)_INST)),) 1302 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST)) 1289 # Staging and install directory target variables. 1290 local insttype := $(firstword \ 1291 $($(target)_INSTTYPE) \ 1292 $($(target)_INSTTYPE.$(bld_trg)) \ 1293 $($(target)_INSTTYPE.$(bld_trg).$(bld_trg_arch)) \ 1294 $($(target)_INSTTYPE.$(bld_trg).$(bld_trg_arch).$(bld_type)) \ 1295 $($(target)_INSTTYPE.$(bld_trg_arch)) \ 1296 $($(target)_INSTTYPE.$(bld_trg_cpu)) \ 1297 $($(target)_INSTTYPE.$(bld_type)) \ 1298 ) 1299 ifeq ($(insttype),) 1300 ifneq ($(firstword \ 1301 $($(target)_NOINST) \ 1302 $($(target)_NOINST.$(bld_trg)) \ 1303 $($(target)_NOINST.$(bld_trg).$(bld_trg_arch)) \ 1304 $($(target)_NOINST.$(bld_trg).$(bld_trg_arch).$(bld_type)) \ 1305 $($(target)_NOINST.$(bld_trg_arch)) \ 1306 $($(target)_NOINST.$(bld_trg_cpu)) \ 1307 $($(target)_NOINST.$(bld_type)) ),) 1308 local insttype := none 1303 1309 else 1304 local inst := $(definst)/ 1305 endif 1306 INSTARGET_$(target) := $(patsubst %/,%/$(notdir $(out)),$(inst)) 1307 1308 else # NOINST 1309 INSTARGET_$(target) := 1310 endif # NOINST 1311 1312 endef 1310 local insttype := both 1311 endif 1312 endif 1313 ifn1of ($(insttype), none both stage) 1314 $(error kBuild: Unknown value '$(insttype)' for '$(target)_INSTTYPE'. Valid values are 'none', 'both' and 'stage'.) 1315 endif 1316 $(target)_1_INSTTYPE := $(insttype) 1317 1318 if1of ($(insttype), stage both) 1319 local stage := $(strip $(firstword \ 1320 $($(target)_STAGE.$(bld_trg).$(bld_trg_arch).$(bld_type)) \ 1321 $($(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type)) \ 1322 $($(target)_STAGE.$(bld_trg).$(bld_trg_arch)) \ 1323 $($(target)_INST.$(bld_trg).$(bld_trg_arch)) \ 1324 $($(target)_STAGE.$(bld_trg).$(bld_type)) \ 1325 $($(target)_INST.$(bld_trg).$(bld_type)) \ 1326 $($(target)_STAGE.$(bld_trg_arch)) \ 1327 $($(target)_INST.$(bld_trg_arch)) \ 1328 $($(target)_STAGE.$(bld_trg)) \ 1329 $($(target)_INST.$(bld_trg)) \ 1330 $($(target)_STAGE.$(bld_type)) \ 1331 $($(target)_INST.$(bld_type)) \ 1332 $($(target)_STAGE) \ 1333 $($(target)_INST) \ 1334 $(definst) )) 1335 $(target)_1_STAGE := $(stage) 1336 $(target)_1_STAGE_TARGET := $(PATH_STAGE)/$(stage)$(notdir $(out)) 1337 else 1338 $(target)_1_STAGE := 1339 $(target)_1_STAGE_TARGET := 1340 endif 1341 INSTARGET_$(target) := $($(target)_1_STAGE_TARGET) 1342 1343 if1of ($(insttype), both) 1344 local inst := $(strip $(firstword \ 1345 $($(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type)) \ 1346 $($(target)_INST.$(bld_trg).$(bld_trg_arch)) \ 1347 $($(target)_INST.$(bld_trg).$(bld_type)) \ 1348 $($(target)_INST.$(bld_trg_arch)) \ 1349 $($(target)_INST.$(bld_trg)) \ 1350 $($(target)_INST.$(bld_type)) \ 1351 $($(target)_INST) \ 1352 $(definst) )) 1353 $(target)_1_INST := $(inst) 1354 $(target)_1_INST_TARGET := $(PATH_INS)/$(inst)$(notdir $(out)) 1355 else 1356 $(target)_1_INST := 1357 $(target)_1_INST_TARGET := 1358 endif 1359 1360 endef # def_pass1_link_common 1313 1361 $(eval-opt-var def_pass1_link_common) 1314 1362 … … 1320 1368 # set NOINST if not forced installation before doing the usual stuff. 1321 1369 ifndef $(target)_INST 1322 $(target)_ NOINST := 11370 $(target)_INSTTYPE := none 1323 1371 endif 1324 1372 $(evalval def_pass1_link_common) … … 1327 1375 EXT := EXE 1328 1376 EXTPRE := HOST 1329 definst := $( PATH_BIN)1377 definst := $(INST_BIN) 1330 1378 tool_prefix := LD 1331 1379 bld_trg_base_var := PLATFORM … … 1339 1387 EXT := LIB 1340 1388 EXTPRE := 1341 definst := $( PATH_LIB)1389 definst := $(INST_LIB) 1342 1390 tool_prefix := AR 1343 1391 bld_trg_base_var := TARGET … … 1351 1399 EXT := DLL 1352 1400 EXTPRE := 1353 definst := $( PATH_DLL)1401 definst := $(INST_DLL) 1354 1402 tool_prefix := LD 1355 1403 bld_trg_base_var := TARGET … … 1367 1415 EXT := LIB 1368 1416 EXTPRE := 1369 definst := $( PATH_LIB)1417 definst := $(INST_LIB) 1370 1418 tool_prefix := AR 1371 1419 bld_trg_base_var := TARGET … … 1375 1423 EXT := DLL 1376 1424 EXTPRE := 1377 definst := $( PATH_DLL)1425 definst := $(INST_DLL) 1378 1426 tool_prefix := LD 1379 1427 bld_trg_base_var := TARGET … … 1388 1436 EXT := EXE 1389 1437 EXTPRE := 1390 definst := $( PATH_BIN)1438 definst := $(INST_BIN) 1391 1439 tool_prefix := LD 1392 1440 bld_trg_base_var := TARGET … … 1400 1448 EXT := SYS 1401 1449 EXTPRE := 1402 definst := $( PATH_SYS)1450 definst := $(INST_SYS) 1403 1451 tool_prefix := LD 1404 1452 bld_trg_base_var := TARGET … … 1412 1460 EXT := BIN 1413 1461 EXTPRE := 1414 definst := $( PATH_BIN)1462 definst := $(INST_BIN) 1415 1463 tool_prefix := LD 1416 1464 bld_trg_base_var := TARGET … … 1428 1476 local bld_trg_arch := $(firstword $($(target)_BLD_TRG_ARCH) $(KBUILD_TARGET_ARCH)) 1429 1477 local bld_trg_cpu := $(firstword $($(target)_BLD_TRG_CPU) $(KBUILD_TARGET_CPU)) 1430 # TARGET_*1478 # _1_TARGET 1431 1479 $(target)_1_TARGET := $(PATH_TARGET)/$(target).ins 1432 1480 $(call KB_FN_ASSIGN_DEPRECATED,TARGET_$(target),$($(target)_1_TARGET), $(target)_1_TARGET) 1481 1482 # Determine and set 1_INSTTYPE. 1483 local insttype := $(firstword \ 1484 $($(target)_INSTTYPE) \ 1485 $($(target)_INSTTYPE.$(bld_trg)) \ 1486 $($(target)_INSTTYPE.$(bld_trg).$(bld_trg_arch)) \ 1487 $($(target)_INSTTYPE.$(bld_trg).$(bld_trg_arch).$(bld_type)) \ 1488 $($(target)_INSTTYPE.$(bld_trg_arch)) \ 1489 $($(target)_INSTTYPE.$(bld_trg_cpu)) \ 1490 $($(target)_INSTTYPE.$(bld_type)) \ 1491 ) 1492 ifeq ($(insttype),) 1493 ifneq ($(firstword \ 1494 $($(target)_NOINST) \ 1495 $($(target)_NOINST.$(bld_trg)) \ 1496 $($(target)_NOINST.$(bld_trg).$(bld_trg_arch)) \ 1497 $($(target)_NOINST.$(bld_trg).$(bld_trg_arch).$(bld_type)) \ 1498 $($(target)_NOINST.$(bld_trg_arch)) \ 1499 $($(target)_NOINST.$(bld_trg_cpu)) \ 1500 $($(target)_NOINST.$(bld_type)) ),) 1501 local insttype := none 1502 else 1503 local insttype := both 1504 endif 1505 endif 1506 ifn1of ($(insttype), none both stage) 1507 $(error kBuild: Unknown value '$(insttype)' for '$(target)_INSTTYPE'. Valid values are 'none', 'both' and 'stage'.) 1508 endif 1509 $(target)_1_INSTTYPE := $(insttype) 1510 1511 # Determine the actual INST and STAGE sub-dirs to use for this target. 1512 if1of ($(insttype), stage both) 1513 local stage := $(strip $(firstword \ 1514 $($(target)_STAGE.$(bld_trg).$(bld_trg_arch).$(bld_type)) \ 1515 $($(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type)) \ 1516 $($(target)_STAGE.$(bld_trg).$(bld_trg_arch)) \ 1517 $($(target)_INST.$(bld_trg).$(bld_trg_arch)) \ 1518 $($(target)_STAGE.$(bld_trg).$(bld_type)) \ 1519 $($(target)_INST.$(bld_trg).$(bld_type)) \ 1520 $($(target)_STAGE.$(bld_trg_arch)) \ 1521 $($(target)_INST.$(bld_trg_arch)) \ 1522 $($(target)_STAGE.$(bld_trg)) \ 1523 $($(target)_INST.$(bld_trg)) \ 1524 $($(target)_STAGE.$(bld_type)) \ 1525 $($(target)_INST.$(bld_type)) \ 1526 $($(target)_STAGE) \ 1527 $($(target)_INST) \ 1528 $(definst) )) 1529 $(target)_1_STAGE := $(stage) 1530 else 1531 $(target)_1_STAGE = $(error _1_STAGE not used) 1532 endif 1533 1534 if1of ($(insttype), both) 1535 local inst := $(strip $(firstword \ 1536 $($(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type)) \ 1537 $($(target)_INST.$(bld_trg).$(bld_trg_arch)) \ 1538 $($(target)_INST.$(bld_trg).$(bld_type)) \ 1539 $($(target)_INST.$(bld_trg_arch)) \ 1540 $($(target)_INST.$(bld_trg)) \ 1541 $($(target)_INST.$(bld_type)) \ 1542 $($(target)_INST) \ 1543 $(definst) )) 1544 $(target)_1_INST := $(inst) 1545 else 1546 $(target)_1_INST = $(error _1_INST not used) 1547 endif 1548 1549 # Block properties that we put off setting until pass 2 for INSTALLS. 1550 $(target)_1_STAGE_TARGET = $(error The '_1_STAGE_TARGET' property is not present on install targets. Use '_2_STAGE_TARGETS' instead (set by pass 2!).) 1551 $(target)_1_INST_TARGET = $(error The '_1_INST_TARGET' property is not present on install targets. Use '_2_INST_TARGETS' instead (set by pass 2!).) 1552 INSTARGET_$(target) = $(error The 'INSTARGET_' is deprecated and besides, it is being accessed to early. Consider '_2_STAGE_TARGETS' or '_2_INST_TARGETS'.) 1433 1553 1434 1554 # INSTARGET_ later. … … 1439 1559 endef # def_pass1_install 1440 1560 $(eval-opt-var def_pass1_install) 1561 1441 1562 $(foreach target, $(_ALL_INSTALLS), \ 1442 1563 $(evalval def_pass1_install)) … … 1587 1708 $(error kBuild: Bad or missing INST property for source '$(source)' in target '$(target)': $(inst)) 1588 1709 endif 1710 ## @todo Install-revamp: FIXME 1589 1711 INSTARGET_$(target)_$(srcname) := $(inst) 1590 1712 local fetchdir := $(firstword \ … … 1799 1921 define def_fetch 1800 1922 # common 1923 ## @todo Install-revamp: FIXME 1801 1924 INSTARGET_$(target) := $($(target)_INST) 1802 1925 ifneq ($(patsubst %/,ok,$(INSTARGET_$(target))),ok) … … 2004 2127 2005 2128 ## Generate the link & lib install rule 2006 # @param $(target) Normalized target name. 2007 # @param $(out) The build target. 2008 # @param $(INSTARGET_$(target)) The installation targets. 2009 # @param $(mode) The file mode (optional) 2129 # Implicit parameters: target, out, $(target)_1_STAGE_TARGET, mode, 2130 # pre_install_cmds, post_install_cmds 2010 2131 define def_link_install_rule 2011 $( INSTARGET_$(target)) : $(out) | $(call DIRDEP,$(dir $(INSTARGET_$(target))))2132 $($(target)_1_INST_TARGET): $(out) | $(dir $($(target)_1_INST_TARGET)) 2012 2133 %$$(call MSG_INST_TRG,$(target),$(out),$$@) 2134 $(pre_install_cmds) 2135 2013 2136 $$(QUIET)$$(INSTALL) $(if $(mode),-m $(mode)) $(if $(uid),-o $(uid)) $(if $(gid),-g $(gid)) -- $(out) $$@ 2014 2015 ifdef KBUILD_DO_AUTO_INSTALL 2016 $(basename $(notdir $(out))):: $(INSTARGET_$(target)) 2017 endif 2018 endef # def_link_install_rule 2137 $(post_install_cmds) 2138 2139 2140 endef 2141 2142 2143 ## Generate the link & lib stage installation rule 2144 # Implicit parameters: target, out, $(target)_1_STAGE_TARGET, mode, 2145 # pre_install_cmds, post_install_cmds 2146 define def_link_stage_rule 2147 $($(target)_1_STAGE_TARGET): $(out) | $(dir $($(target)_1_STAGE_TARGET)) 2148 %$$(call MSG_INST_TRG,$(target),$(out),$$@) 2149 $(pre_install_cmds) 2150 2151 $$(QUIET)$$(INSTALL) $(if $(mode),-m $(mode)) $(if $(uid),-o $(uid)) $(if $(gid),-g $(gid)) -- $(out) $$@ 2152 $(post_install_cmds) 2153 2154 2155 $(basename $(notdir $(out))):: $($(target)_1_STAGE_TARGET) 2156 2157 endef 2019 2158 2020 2159 … … 2072 2211 othersrc += $(source) 2073 2212 endif 2074 endef 2213 endef # def_src_handler_one 2075 2214 2076 2215 ## Generic macro for processing all target sources. … … 2106 2245 2107 2246 2108 2109 ## Generic macro for generating the install rule(s) for a target 2110 # and update the globals with default out. 2247 ## 2248 # Function for getting the first defined propert value. 2249 # 2250 # @param 1 The property name. 2251 # @note Implicit parameters: target, bld_trg, bld_trg_arch, bld_trg_cpu, bld_type. 2252 # @returns Expanded property value. 2253 # 2254 ## @todo bld_trg_cpu is missing here. 2255 define def_fn_prop_get_first_defined 2256 ifdef $(target)_$(1).$(bld_trg).$(bld_trg_arch).$(bld_type) 2257 local .RETURN := $($(target)_$(1).$(bld_trg).$(bld_trg_arch).$(bld_type)) 2258 else ifdef $(target)_$(1).$(bld_trg).$(bld_trg_arch) 2259 local .RETURN := $($(target)_$(1).$(bld_trg).$(bld_trg_arch)) 2260 else ifdef $(target)_$(1).$(bld_trg).$(bld_type) 2261 local .RETURN := $($(target)_$(1).$(bld_trg).$(bld_type)) 2262 else ifdef $(target)_$(1).$(bld_trg_arch) 2263 local .RETURN := $($(target)_$(1).$(bld_trg_arch)) 2264 else ifdef $(target)_$(1).$(bld_trg) 2265 local .RETURN := $($(target)_$(1).$(bld_trg)) 2266 else ifdef $(target)_$(1).$(bld_type) 2267 local .RETURN := $($(target)_$(1).$(bld_type)) 2268 else ifdef $(target)_$(1) 2269 local .RETURN := $($(target)_$(1)) 2270 else ifdef $(1).$(bld_trg).$(bld_trg_arch).$(bld_type) 2271 local .RETURN := $($(1).$(bld_trg).$(bld_trg_arch).$(bld_type)) 2272 else ifdef $(1).$(bld_trg).$(bld_trg_arch) 2273 local .RETURN := $($(1).$(bld_trg).$(bld_trg_arch)) 2274 else ifdef $(1).$(bld_trg).$(bld_type) 2275 local .RETURN := $($(1).$(bld_trg).$(bld_type)) 2276 else ifdef $(1).$(bld_trg_arch) 2277 local .RETURN := $($(1).$(bld_trg_arch)) 2278 else ifdef $(1).$(bld_trg) 2279 local .RETURN := $($(1).$(bld_trg)) 2280 else ifdef $(1).$(bld_type) 2281 local .RETURN := $($(1).$(bld_type)) 2282 else 2283 local .RETURN := $($(1)) 2284 endif 2285 endef # def_fn_prop_get_first_defined 2286 2287 2288 ## Generic macro for generating the install rule(s) for a target. 2111 2289 # 2112 2290 # @param $(target) Normalized target name. … … 2114 2292 # @param $(definst) The default _INST value. 2115 2293 # @param $(typevar) The name of the variable with all the root targets of its type. 2116 # @remark Only library uses this now. 2117 define def_target_install_pluss 2118 ifeq ($(strip $($(target)_NOINST) $($(target)_NOINST.$(bld_trg)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch).$(bld_type)) $($(target)_NOINST.$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg_cpu)) $($(target)_NOINST.$(bld_type))),) 2119 ifneq ($(strip $($(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type))),) 2120 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type))) 2121 else ifneq ($(strip $($(target)_INST.$(bld_trg).$(bld_trg_arch))),) 2122 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg).$(bld_trg_arch))) 2123 else ifneq ($(strip $($(target)_INST.$(bld_trg).$(bld_type))),) 2124 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg).$(bld_type))) 2125 else ifneq ($(strip $($(target)_INST.$(bld_trg_arch))),) 2126 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg_arch))) 2127 else ifneq ($(strip $($(target)_INST.$(bld_trg))),) 2128 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg))) 2129 else ifneq ($(strip $($(target)_INST.$(bld_type))),) 2130 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_type))) 2131 else ifneq ($(strip $($(target)_INST)),) 2132 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST)) 2133 else 2134 local inst := $(definst)/ 2135 endif 2136 INSTARGET_$(target) := $(patsubst %/,%/$(notdir $(out)),$(inst)) 2294 define def_target_install_only 2295 ifneq ($($(target)_1_INSTTYPE),none) 2137 2296 local mode := $(firstword \ 2138 2297 $($(target)_MODE.$(bld_trg).$(bld_trg_arch).$(bld_type)) \ … … 2159 2318 $($(target)_GID.$(bld_type)) \ 2160 2319 $($(target)_GID) ) 2161 2162 # generate the install rule 2320 local pre_install_cmds := $(evalcall def_fn_prop_get_first_defined,PRE_INST_CMDS) 2321 local post_install_cmds := $(evalcall def_fn_prop_get_first_defined,POST_INST_CMDS) 2322 2323 # Generate the rules 2324 ifeq ($($(target)_1_INSTTYPE),both) 2163 2325 $(eval $(def_link_install_rule)) 2164 2165 _INSTALLS_FILES += $(INSTARGET_$(target)) 2166 2167 ifdef KBUILD_DO_AUTO_INSTALL 2168 $(typevar) += $(INSTARGET_$(target)) 2169 else 2170 $(typevar) += $(out) 2171 endif 2172 else # _NOINST 2326 _INSTALLS_FILES += $($(target)_1_INST_TARGET) 2327 endif 2328 $(eval $(def_link_stage_rule)) 2329 _STAGE_FILES += $($(target)_1_STAGE_TARGET) 2330 $(typevar) += $($(target)_1_STAGE_TARGET) 2331 else # INSTTYPE == none 2173 2332 $(typevar) += $(out) 2174 endif 2175 2176 _OUT_FILES += $($(target)_2_OUTPUT) $($(target)_2_OUTPUT_MAYBE) $(out) 2177 _CLEAN_FILES += $($(target)_CLEAN) $($(target)_CLEAN.$(bld_trg)) $($(target)_CLEAN.$(bld_trg).$(bld_trg_arch)) $($(target)_CLEAN.$(bld_trg_arch)) $($(target)_CLEAN.$(bld_trg_cpu)) $($(target)_CLEAN.$(bld_type)) 2178 _DIRS += $($(target)_BLDDIRS) $($(target)_BLDDIRS.$(bld_trg)) $($(target)_BLDDIRS.$(bld_trg).$(bld_trg_arch)) $($(target)_BLDDIRS.$(bld_trg_arch)) $($(target)_BLDDIRS.$(bld_trg_cpu)) $($(target)_BLDDIRS.$(bld_type)) 2179 _OBJS += $($(target)_2_OBJS) 2180 2181 endef # def_target_install_pluss 2333 endif # INSTTYPE == none 2334 2335 endef # def_target_install_only 2182 2336 2183 2337 … … 2311 2465 2312 2466 # Custom pre-link actions. 2313 ## @todo bld_trg_cpu is missing here. 2314 ifdef $(target)_PRE_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type) 2315 local pre_cmds := $($(target)_PRE_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type)) 2316 else ifdef $(target)_PRE_CMDS.$(bld_trg).$(bld_trg_arch) 2317 local pre_cmds := $($(target)_PRE_CMDS.$(bld_trg).$(bld_trg_arch)) 2318 else ifdef $(target)_PRE_CMDS.$(bld_trg).$(bld_type) 2319 local pre_cmds := $($(target)_PRE_CMDS.$(bld_trg).$(bld_type)) 2320 else ifdef $(target)_PRE_CMDS.$(bld_trg_arch) 2321 local pre_cmds := $($(target)_PRE_CMDS.$(bld_trg_arch)) 2322 else ifdef $(target)_PRE_CMDS.$(bld_trg) 2323 local pre_cmds := $($(target)_PRE_CMDS.$(bld_trg)) 2324 else ifdef $(target)_PRE_CMDS.$(bld_type) 2325 local pre_cmds := $($(target)_PRE_CMDS.$(bld_type)) 2326 else ifdef $(target)_PRE_CMDS 2327 local pre_cmds := $($(target)_PRE_CMDS) 2328 else ifdef PRE_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type) 2329 local pre_cmds := $(PRE_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type)) 2330 else ifdef PRE_CMDS.$(bld_trg).$(bld_trg_arch) 2331 local pre_cmds := $(PRE_CMDS.$(bld_trg).$(bld_trg_arch)) 2332 else ifdef PRE_CMDS.$(bld_trg).$(bld_type) 2333 local pre_cmds := $(PRE_CMDS.$(bld_trg).$(bld_type)) 2334 else ifdef PRE_CMDS.$(bld_trg_arch) 2335 local pre_cmds := $(PRE_CMDS.$(bld_trg_arch)) 2336 else ifdef PRE_CMDS.$(bld_trg) 2337 local pre_cmds := $(PRE_CMDS.$(bld_trg)) 2338 else ifdef PRE_CMDS.$(bld_type) 2339 local pre_cmds := $(PRE_CMDS.$(bld_type)) 2340 else 2341 local pre_cmds := $(PRE_CMDS) 2342 endif 2343 2344 # Custom post-link actions. 2345 ifdef $(target)_POST_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type) 2346 local post_cmds := $($(target)_POST_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type)) 2347 else ifdef $(target)_POST_CMDS.$(bld_trg).$(bld_trg_arch) 2348 local post_cmds := $($(target)_POST_CMDS.$(bld_trg).$(bld_trg_arch)) 2349 else ifdef $(target)_POST_CMDS.$(bld_trg).$(bld_type) 2350 local post_cmds := $($(target)_POST_CMDS.$(bld_trg).$(bld_type)) 2351 else ifdef $(target)_POST_CMDS.$(bld_trg_arch) 2352 local post_cmds := $($(target)_POST_CMDS.$(bld_trg_arch)) 2353 else ifdef $(target)_POST_CMDS.$(bld_trg) 2354 local post_cmds := $($(target)_POST_CMDS.$(bld_trg)) 2355 else ifdef $(target)_POST_CMDS.$(bld_type) 2356 local post_cmds := $($(target)_POST_CMDS.$(bld_type)) 2357 else ifdef $(target)_POST_CMDS 2358 local post_cmds := $($(target)_POST_CMDS) 2359 else ifdef POST_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type) 2360 local post_cmds := $(POST_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type)) 2361 else ifdef POST_CMDS.$(bld_trg).$(bld_trg_arch) 2362 local post_cmds := $(POST_CMDS.$(bld_trg).$(bld_trg_arch)) 2363 else ifdef POST_CMDS.$(bld_trg).$(bld_type) 2364 local post_cmds := $(POST_CMDS.$(bld_trg).$(bld_type)) 2365 else ifdef POST_CMDS.$(bld_trg_arch) 2366 local post_cmds := $(POST_CMDS.$(bld_trg_arch)) 2367 else ifdef POST_CMDS.$(bld_trg) 2368 local post_cmds := $(POST_CMDS.$(bld_trg)) 2369 else ifdef POST_CMDS.$(bld_type) 2370 local post_cmds := $(POST_CMDS.$(bld_type)) 2371 else 2372 local post_cmds := $(POST_CMDS) 2373 endif 2467 local pre_cmds := $(evalcall def_fn_prop_get_first_defined,PRE_CMDS) 2468 local post_cmds := $(evalcall def_fn_prop_get_first_defined,POST_CMDS) 2374 2469 2375 2470 # eliminate this guy? … … 2421 2516 $(eval $(def_link_rule)) 2422 2517 2423 # installing and globals 2424 $(evalval def_target_install_pluss) 2425 endef 2518 # installing and globals. 2519 $(evalval def_target_install_only) 2520 2521 _OUT_FILES += $($(target)_2_OUTPUT) $($(target)_2_OUTPUT_MAYBE) $(out) 2522 _CLEAN_FILES += $($(target)_CLEAN) $($(target)_CLEAN.$(bld_trg)) $($(target)_CLEAN.$(bld_trg).$(bld_trg_arch)) $($(target)_CLEAN.$(bld_trg_arch)) $($(target)_CLEAN.$(bld_trg_cpu)) $($(target)_CLEAN.$(bld_type)) 2523 _DIRS += $($(target)_BLDDIRS) $($(target)_BLDDIRS.$(bld_trg)) $($(target)_BLDDIRS.$(bld_trg).$(bld_trg_arch)) $($(target)_BLDDIRS.$(bld_trg_arch)) $($(target)_BLDDIRS.$(bld_trg_cpu)) $($(target)_BLDDIRS.$(bld_type)) 2524 _OBJS += $($(target)_2_OBJS) 2525 2526 endef # def_lib 2426 2527 $(eval-opt-var def_lib) 2427 2528 2428 2529 # Process libraries 2429 definst := $(PATH_LIB)2430 2530 typevar := _LIBS 2431 2531 tool_do := LINK_LIBRARY … … 2447 2547 # @param $(target) Normalized target name. 2448 2548 # @param $(EXT) EXE,DLL,SYS. 2449 # @param $(definst) The default _INST value.2450 2549 # @param $(typevar) The name of the variable with all the root targets of its type. 2451 2550 define def_link_common … … 2680 2779 endif 2681 2780 2682 # Custom pre-link actions. 2683 ifdef $(target)_PRE_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type) 2684 local pre_cmds := $($(target)_PRE_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type)) 2685 else ifdef $(target)_PRE_CMDS.$(bld_trg).$(bld_trg_arch) 2686 local pre_cmds := $($(target)_PRE_CMDS.$(bld_trg).$(bld_trg_arch)) 2687 else ifdef $(target)_PRE_CMDS.$(bld_trg).$(bld_type) 2688 local pre_cmds := $($(target)_PRE_CMDS.$(bld_trg).$(bld_type)) 2689 else ifdef $(target)_PRE_CMDS.$(bld_trg_arch) 2690 local pre_cmds := $($(target)_PRE_CMDS.$(bld_trg_arch)) 2691 else ifdef $(target)_PRE_CMDS.$(bld_trg) 2692 local pre_cmds := $($(target)_PRE_CMDS.$(bld_trg)) 2693 else ifdef $(target)_PRE_CMDS.$(bld_type) 2694 local pre_cmds := $($(target)_PRE_CMDS.$(bld_type)) 2695 else ifdef $(target)_PRE_CMDS 2696 local pre_cmds := $($(target)_PRE_CMDS) 2697 else ifdef PRE_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type) 2698 local pre_cmds := $(PRE_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type)) 2699 else ifdef PRE_CMDS.$(bld_trg).$(bld_trg_arch) 2700 local pre_cmds := $(PRE_CMDS.$(bld_trg).$(bld_trg_arch)) 2701 else ifdef PRE_CMDS.$(bld_trg).$(bld_type) 2702 local pre_cmds := $(PRE_CMDS.$(bld_trg).$(bld_type)) 2703 else ifdef PRE_CMDS.$(bld_trg_arch) 2704 local pre_cmds := $(PRE_CMDS.$(bld_trg_arch)) 2705 else ifdef PRE_CMDS.$(bld_trg) 2706 local pre_cmds := $(PRE_CMDS.$(bld_trg)) 2707 else ifdef PRE_CMDS.$(bld_type) 2708 local pre_cmds := $(PRE_CMDS.$(bld_type)) 2709 else 2710 local pre_cmds := $(PRE_CMDS) 2711 endif 2712 2713 # Custom post-link actions. 2714 ifdef $(target)_POST_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type) 2715 local post_cmds := $($(target)_POST_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type)) 2716 else ifdef $(target)_POST_CMDS.$(bld_trg).$(bld_trg_arch) 2717 local post_cmds := $($(target)_POST_CMDS.$(bld_trg).$(bld_trg_arch)) 2718 else ifdef $(target)_POST_CMDS.$(bld_trg).$(bld_type) 2719 local post_cmds := $($(target)_POST_CMDS.$(bld_trg).$(bld_type)) 2720 else ifdef $(target)_POST_CMDS.$(bld_trg_arch) 2721 local post_cmds := $($(target)_POST_CMDS.$(bld_trg_arch)) 2722 else ifdef $(target)_POST_CMDS.$(bld_trg) 2723 local post_cmds := $($(target)_POST_CMDS.$(bld_trg)) 2724 else ifdef $(target)_POST_CMDS.$(bld_type) 2725 local post_cmds := $($(target)_POST_CMDS.$(bld_type)) 2726 else ifdef $(target)_POST_CMDS 2727 local post_cmds := $($(target)_POST_CMDS) 2728 else ifdef POST_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type) 2729 local post_cmds := $(POST_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type)) 2730 else ifdef POST_CMDS.$(bld_trg).$(bld_trg_arch) 2731 local post_cmds := $(POST_CMDS.$(bld_trg).$(bld_trg_arch)) 2732 else ifdef POST_CMDS.$(bld_trg).$(bld_type) 2733 local post_cmds := $(POST_CMDS.$(bld_trg).$(bld_type)) 2734 else ifdef POST_CMDS.$(bld_trg_arch) 2735 local post_cmds := $(POST_CMDS.$(bld_trg_arch)) 2736 else ifdef POST_CMDS.$(bld_trg) 2737 local post_cmds := $(POST_CMDS.$(bld_trg)) 2738 else ifdef POST_CMDS.$(bld_type) 2739 local post_cmds := $(POST_CMDS.$(bld_type)) 2740 else 2741 local post_cmds := $(POST_CMDS) 2742 endif 2781 # Custom pre/post-link actions. 2782 local pre_cmds := $(evalcall def_fn_prop_get_first_defined,PRE_CMDS) 2783 local post_cmds := $(evalcall def_fn_prop_get_first_defined,POST_CMDS) 2743 2784 2744 2785 # eliminate this guy? … … 2746 2787 2747 2788 # installation targets 2748 ifeq ($(strip $($(target)_NOINST) $($(target)_NOINST.$(bld_trg)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch).$(bld_type)) $($(target)_NOINST.$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg_cpu)) $($(target)_NOINST.$(bld_type))),) 2749 ifneq ($(strip $($(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type))),) 2750 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type))) 2751 else ifneq ($(strip $($(target)_INST.$(bld_trg).$(bld_trg_arch))),) 2752 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg).$(bld_trg_arch))) 2753 else ifneq ($(strip $($(target)_INST.$(bld_trg).$(bld_type))),) 2754 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg).$(bld_type))) 2755 else ifneq ($(strip $($(target)_INST.$(bld_trg_arch))),) 2756 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg_arch))) 2757 else ifneq ($(strip $($(target)_INST.$(bld_trg))),) 2758 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg))) 2759 else ifneq ($(strip $($(target)_INST.$(bld_type))),) 2760 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_type))) 2761 else ifneq ($(strip $($(target)_INST)),) 2762 local inst := $(addprefix $(PATH_INS)/,$($(target)_INST)) 2763 else 2764 local inst := $(definst)/ 2765 endif 2766 INSTARGET_$(target) := $(patsubst %/,%/$(notdir $(out)),$(inst)) 2767 ifdef KBUILD_DO_AUTO_INSTALL 2768 $(typevar) += $(INSTARGET_$(target)) 2769 else 2770 $(typevar) += $(out) 2771 endif 2772 local mode := $(firstword \ 2773 $($(target)_MODE.$(bld_trg).$(bld_trg_arch).$(bld_type)) \ 2774 $($(target)_MODE.$(bld_trg).$(bld_trg_arch)) \ 2775 $($(target)_MODE.$(bld_trg).$(bld_type)) \ 2776 $($(target)_MODE.$(bld_trg_arch)) \ 2777 $($(target)_MODE.$(bld_trg)) \ 2778 $($(target)_MODE.$(bld_type)) \ 2779 $($(target)_MODE) ) 2780 local uid := $(firstword \ 2781 $($(target)_UID.$(bld_trg).$(bld_trg_arch).$(bld_type)) \ 2782 $($(target)_UID.$(bld_trg).$(bld_trg_arch)) \ 2783 $($(target)_UID.$(bld_trg).$(bld_type)) \ 2784 $($(target)_UID.$(bld_trg_arch)) \ 2785 $($(target)_UID.$(bld_trg)) \ 2786 $($(target)_UID.$(bld_type)) \ 2787 $($(target)_UID) ) 2788 local gid := $(firstword \ 2789 $($(target)_GID.$(bld_trg).$(bld_trg_arch).$(bld_type)) \ 2790 $($(target)_GID.$(bld_trg).$(bld_trg_arch)) \ 2791 $($(target)_GID.$(bld_trg).$(bld_type)) \ 2792 $($(target)_GID.$(bld_trg_arch)) \ 2793 $($(target)_GID.$(bld_trg)) \ 2794 $($(target)_GID.$(bld_type)) \ 2795 $($(target)_GID) ) 2796 2797 # generate the install rule 2798 $(eval $(def_link_install_rule)) 2799 2800 else # NOINST 2801 INSTARGET_$(target) := 2802 $(typevar) += $(out) 2803 endif # NOINST 2789 $(evalval def_target_install_only) 2804 2790 2805 2791 # dependency file … … 2864 2850 # 2865 2851 2866 ## Build program (one).2867 # @param $(target) Normalized target (program) name.2868 define def_bldprog2869 2870 # set NOINST if not forced installation.2871 ifndef $(target)_INST2872 $(target)_NOINST := 12873 endif2874 2875 # do the usual stuff.2876 $(evalval def_link_common)2877 2878 endef2879 2880 2852 # Process build programs. 2881 2853 EXT := EXE 2882 2854 EXTPRE := HOST 2883 2855 tool_do := LINK_PROGRAM 2884 definst := $(PATH_BIN)2885 2856 typevar := _BLDPROGS 2886 2857 mode := 0755 2887 2858 bld_trg_base_var := PLATFORM 2888 $(foreach target, $(_ALL_BLDPROGS), $(evalval def_ bldprog))2859 $(foreach target, $(_ALL_BLDPROGS), $(evalval def_link_common)) 2889 2860 2890 2861 ifdef KBUILD_PROFILE_SELF … … 2901 2872 EXTPRE := 2902 2873 tool_do := LINK_DLL 2903 definst := $(PATH_DLL)2904 2874 typevar := _DLLS 2905 2875 mode := 0644 … … 2925 2895 EXT := LIB 2926 2896 tool_do := LINK_LIBRARY 2927 definst := $(PATH_LIB)2928 2897 $(foreach target, $(_ALL_IMPORT_LIBS), $(evalval def_lib)) 2929 2898 else 2930 2899 EXT := DLL 2931 2900 tool_do := LINK_DLL 2932 definst := $(PATH_DLL)2933 2901 $(foreach target, $(_ALL_IMPORT_LIBS), $(evalval def_link_common)) 2934 2902 endif … … 2947 2915 EXTPRE := 2948 2916 tool_do := LINK_PROGRAM 2949 definst := $(PATH_BIN)2950 2917 typevar := _PROGRAMS 2951 2918 mode := 0755 … … 2966 2933 EXTPRE := 2967 2934 tool_do := LINK_SYSMOD 2968 definst := $(PATH_SYS)2969 2935 typevar := _SYSMODS 2970 2936 mode := 0644 … … 2985 2951 EXTPRE := 2986 2952 tool_do := LINK_MISCBIN 2987 definst := $(PATH_BIN)2988 2953 typevar := _MISCBINS 2989 2954 mode := 0644 … … 3006 2971 # 3007 2972 3008 ## generate the install rule 3009 define def_install_src_rule 3010 # the install rule 3011 $(insdst) : $(srcsrc) | $(call DIRDEP,$(dir $(insdst))) 3012 %$$(call MSG_INST_FILE,$(srcsrc),$(insdst)) 3013 $$(QUIET)$(inscmd) 3014 endef 3015 $(eval-opt-var def_install_src_rule) 3016 3017 ## install one file 2973 ## 2974 # Generate the staging rules. 2975 # 2976 define def_install_src_rule_staging 2977 $(stagedst) : $(srcsrc) | $(dir $(stagedst)) 2978 %$$(call MSG_INST_FILE,$(srcsrc),$(stagedst)) 2979 $$(QUIET)$(stagecmd) 2980 endef 2981 $(eval-opt-var def_install_src_rule_staging) 2982 2983 define def_install_src_rule_installing 2984 $(instdst) : $(srcsrc) | $(dir $(instdst)) 2985 %$$(call MSG_INST_FILE,$(srcsrc),$(instdst)) 2986 $$(QUIET)$(instcmd) 2987 endef 2988 $(eval-opt-var def_install_src_rule_installing) 2989 2990 ## 2991 # Install one file. 2992 # 3018 2993 define def_install_src 3019 2994 … … 3028 3003 $(warning kBuild: Install target '$(target)' has a bad source specifier: $(src)) 3029 3004 endif 3030 local srcdst := $(subst =>, ,$(src))3031 local srcsrc := $(firstword $(srcdst))3005 local srcdst := $(subst =>, ,$(src)) 3006 local srcsrc := $(firstword $(srcdst)) 3032 3007 local srcdstdir := $(dir $(word 2,$(srcdst))) 3033 local srcdst := $(word $(words $(srcdst)),$(srcdst))3034 3035 # _INSTFUN3008 local srcdst := $(word $(words $(srcdst)),$(srcdst)) 3009 3010 # Calc destinations. 3036 3011 ifdef $(srcsrc)_INSTFUN 3037 3012 local instfun := $(srcsrc)_INSTFUN 3038 else ifdef $(target)_INSTFUN3039 local instfun := $(target)_INSTFUN3040 3013 else 3041 local instfun := _INSTALL_FILE 3042 endif 3043 3044 # _INST 3045 ifdef $(srcsrc)_INST 3046 local inst := $(patsubst %/,%,$($(srcsrc)_INST))/$(dir $(srcdstdir)) 3047 else ifdef $(target)_INST 3048 local inst := $(patsubst %/,%,$($(target)_INST))/$(dir $(srcdstdir)) 3049 else 3050 local inst := $(dir $(srcdstdir)) 3051 endif 3052 3053 # calc target 3054 local insdst := $(call $(instfun),$(srcdst),$(target),$(inst),$(PATH_INS)) 3055 #$(warning instfun=$(instfun) srcdst=$(srcdst) target=$(target) inst=$(inst) => insdst=$(insdst)) 3014 local instfun := $(top_instfun) 3015 endif 3016 3017 local stage := $(firstword $($(srcsrc)_STAGE) $($(target)_1_STAGE)) 3018 ifneq ($(substr $(stage),-1),/) 3019 $(warning kBuild: File $(srcsrc) in install target $(target) has a STAGE property without a trailing slash.) 3020 local stage := $(stage)/ 3021 endif 3022 local stage := $(stage)/$(dir $(srcdstdir)) 3023 local stagedst := $(call $(instfun),$(srcdst),$(target),$(stage),$(PATH_STAGE)) 3024 3025 local inst := $(firstword $($(srcsrc)_STAGE) $($(target)_1_STAGE)) 3026 ifneq ($(substr $(inst),-1),/) 3027 $(warning kBuild: File $(srcsrc) in install target $(target) has a INST property without a trailing slash.) 3028 local inst := $(inst)/ 3029 endif 3030 local inst := $(inst)/$(dir $(srcdstdir)) 3031 local instdst := $(call $(instfun),$(srcdst),$(target),$(inst),$(PATH_INS)) 3032 3033 #$(warning instfun=$(instfun) srcdst=$(srcdst) target=$(target) inst=$(inst) => instdst=$(instdst); stage=$(stage) => stagedst=$(stagedst)) 3056 3034 3057 3035 # mode, uid and gid … … 3069 3047 $($(srcdst)_MODE.$(bld_trg)) \ 3070 3048 $($(srcdst)_MODE) \ 3071 $($(target)_MODE.$(bld_trg).$(bld_trg_arch)) \ 3072 $($(target)_MODE.$(bld_trg)) \ 3073 $($(target)_MODE)) 3049 $(top_mode)) 3074 3050 local uid := $(firstword \ 3075 3051 $($(target)_$(srcsrc)_UID.$(bld_trg).$(bld_trg_arch)) \ … … 3085 3061 $($(srcdst)_UID.$(bld_trg)) \ 3086 3062 $($(srcdst)_UID) \ 3087 $($(target)_UID.$(bld_trg).$(bld_trg_arch)) \ 3088 $($(target)_UID.$(bld_trg)) \ 3089 $($(target)_UID)) 3063 $(top_uid)) 3090 3064 local gid := $(firstword \ 3091 3065 $($(target)_$(srcsrc)_GID.$(bld_trg).$(bld_trg_arch)) \ … … 3101 3075 $($(srcdst)_GID.$(bld_trg)) \ 3102 3076 $($(srcdst)_GID) \ 3103 $($(target)_GID.$(bld_trg).$(bld_trg_arch)) \ 3104 $($(target)_GID.$(bld_trg)) \ 3105 $($(target)_GID)) 3077 $(top_gid)) 3106 3078 local flags := \ 3107 $($(target)_IFFLAGS) \ 3108 $($(target)_IFFLAGS.$(bld_trg)) \ 3109 $($(target)_IFFLAGS.$(bld_trg).$(bld_trg_arch)) \ 3079 $(top_ifflags) \ 3110 3080 $($(srcdst)_IFFLAGS) \ 3111 3081 $($(srcdst)_IFFLAGS.$(bld_trg)) \ … … 3136 3106 3137 3107 # Adjust the source if we got a default PATH. (This must be done this late!) 3138 local defpath := $($(target)_DEFPATH) 3139 ifeq ($(defpath),) 3140 local defpath := $($(target)_PATH) 3141 endif 3108 local defpath := $(firstword $($(target)_DEFPATH) $($(target)_PATH)) 3142 3109 ifneq ($(defpath),) 3143 3110 local srcsrc := $(abspathex $(srcsrc),$(defpath)) 3144 3111 endif 3145 3112 3146 # create the command 3113 # create the commands 3147 3114 ifdef $(srcsrc)_INSTALLER 3148 local inscmd := $(call $(srcsrc)_INSTALLER,$(srcsrc),$(insdst),$(target),$(flags)) 3115 local stagecmd := $(call $(srcsrc)_INSTALLER,$(srcsrc),$(stagedst),$(target),$(flags)) 3116 local instcmd := $(call $(srcsrc)_INSTALLER,$(srcsrc),$(instdst),$(target),$(flags)) 3149 3117 else ifdef $(target)_INSTALLER 3150 local inscmd := $(call $(target)_INSTALLER,$(srcsrc),$(insdst),$(target),$(flags)) 3118 local stagecmd := $(call $(target)_INSTALLER,$(srcsrc),$(stagedst),$(target),$(flags)) 3119 local instcmd := $(call $(target)_INSTALLER,$(srcsrc),$(instdst),$(target),$(flags)) 3151 3120 else 3152 local inscmd := $$(INSTALL)\3121 local stagecmd := $$(INSTALL)\ 3153 3122 $(if $(uid),-o $(uid))\ 3154 3123 $(if $(gid),-g $(gid))\ 3155 3124 $(if $(mode),-m $(mode))\ 3156 3125 $(flags) -- \ 3157 $(srcsrc) $(insdst) 3158 endif 3159 3160 # generate the rule (need double evaluation here) 3161 $(eval $(def_install_src_rule)) 3162 3163 INSTARGET_$(target) += $(insdst) 3126 $(srcsrc) $(stagedst) 3127 local instcmd := $$(INSTALL)\ 3128 $(if $(uid),-o $(uid))\ 3129 $(if $(gid),-g $(gid))\ 3130 $(if $(mode),-m $(mode))\ 3131 $(flags) -- \ 3132 $(srcsrc) $(instdst) 3133 endif 3134 3135 # Generate the staging rule (requires double evaluation). 3136 $(eval $(def_install_src_rule_staging)) 3137 $(target)_2_STAGE_TARGETS += $(stagedst) 3138 3139 # Generate the install rule 3140 ifeq ($(insttype),both) 3141 $(eval $(def_install_src_rule_installing)) 3142 $(target)_2_INST_TARGETS += $(instdst) 3143 endif 3144 3164 3145 endef # def_install_src 3165 3146 $(eval-opt-var def_install_src) 3166 3147 3167 3148 3168 ## generate the symlink rule 3169 define def_install_symlink_rule 3170 # the install rule 3171 $(insdst) : | $(call DIRDEP,$(dir $(insdst))) 3172 %$$(call MSG_INST_SYM,$(insdst),$(symdst)) 3149 ## 3150 # Generate the symlink rules. 3151 # 3152 define def_install_symlink_rule_staging 3153 $(stagedst) : | $(dir $(stagedst)) 3154 %$$(call MSG_INST_SYM,$(stagedst),$(symdst)) 3173 3155 $$(QUIET)$$(RM) -f -- $$@ 3174 $$(QUIET)$$(LN_SYMLINK) $(symdst) $(insdst) 3175 endef # def_install_symlink_rule 3176 $(eval-opt-var def_install_symlink_rule) 3177 3178 ## create one symlink 3156 $$(QUIET)$$(LN_SYMLINK) $(symdst) $(stagedst) 3157 endef 3158 $(eval-opt-var def_install_symlink_rule_staging) 3159 3160 define def_install_symlink_rule_installing 3161 $(instdst) : | $(dir $(instdst)) 3162 %$$(call MSG_INST_SYM,$(instdst),$(symdst)) 3163 $$(QUIET)$$(RM) -f -- $$@ 3164 $$(QUIET)$$(LN_SYMLINK) $(symdst) $(instdst) 3165 endef 3166 $(eval-opt-var def_install_symlink_rule_installing) 3167 3168 3169 ## 3170 # Create one symlink. 3171 # 3179 3172 define def_install_symlink 3180 3173 … … 3184 3177 local symdst := $(word $(words $(symdst)),$(symdst)) 3185 3178 3186 # _INSTFUN3179 # Calc destinations 3187 3180 ifdef $(symlnk)_INSTFUN 3188 3181 local instfun := $(symlnk)_INSTFUN 3189 else ifdef $(target)_INSTFUN3190 local instfun := $(target)_INSTFUN3191 3182 else 3192 local instfun := _INSTALL_FILE 3193 endif 3194 3195 # _INST 3196 ifdef $(symlnk)_INST 3197 local inst := $(patsubst %/,%,$($(symlnk)_INST))/$(dir $(symlnk)) 3198 else ifdef $(target)_INST 3199 local inst := $(patsubst %/,%,$($(target)_INST))/$(dir $(symlnk)) 3200 else 3201 local inst := $(dir $(symlnk)) 3202 endif 3203 3204 # calc target 3205 local insdst := $(call $(instfun),$(symlnk),$(target),$(inst),$(PATH_INS)) 3206 #$(warning symlnk=$(symlnk) symdst=$(symdst) insdst=$(insdst) instfun=$(instfun) inst='$(inst)') 3207 3208 # generate the rule (need double evaluation here) 3209 $(eval $(def_install_symlink_rule)) 3210 3211 INSTARGET_$(target) += $(insdst) 3183 local instfun := $(top_instfun) 3184 endif 3185 3186 local stage := $(firstword $($(symlnk)_STAGE) $($(target)_1_STAGE)) 3187 ifneq ($(substr $(stage),-1),/) 3188 $(warning kBuild: Symlink $(symlnk) in install target $(target) has a STAGE property without a trailing slash.) 3189 local stage := $(stage)/ 3190 endif 3191 local stage := $(stage)/$(dir $(srcdstdir)) 3192 local stagedst := $(call $(instfun),$(symlnk),$(target),$(stage),$(PATH_STAGE)) 3193 3194 local inst := $(firstword $($(symlnk)_STAGE) $($(target)_1_STAGE)) 3195 ifneq ($(substr $(inst),-1),/) 3196 $(warning kBuild: Symlnk $(symlnk) in install target $(target) has a INST property without a trailing slash.) 3197 local inst := $(inst)/ 3198 endif 3199 local inst := $(inst)/$(dir $(srcdstdir)) 3200 local instdst := $(call $(instfun),$(symlnk),$(target),$(inst),$(PATH_INS)) 3201 #$(warning symlnk=$(symlnk) symdst=$(symdst) instdst=$(instdst) stagedst=$(stagedst) instfun=$(instfun) inst=$(inst) stage='$(stage)') 3202 3203 # Generate the staging rule (requires double evaluation). 3204 $(eval $(def_install_symlink_rule_staging)) 3205 $(target)_2_STAGE_TARGETS += $(stagedst) 3206 3207 # Generate the install rule. 3208 ifeq ($(instmode),both) 3209 $(eval $(def_install_symlink_rule_installing)) 3210 $(target)_2_INST_TARGETS += $(instdst) 3211 endif 3212 3212 3213 endef # def_install_symlink 3213 3214 $(optmize def_install_symlink) 3214 3215 3215 3216 3216 ## generate the install rule 3217 ## 3218 # Generate an directory installtion rule. 3219 # Note. Used both for staging and real install rules. 3220 # 3217 3221 define def_install_directory_rule 3218 3222 # the install rule … … 3230 3234 $(eval-opt-var def_install_directory_rule) 3231 3235 3232 3233 ## create one directory 3236 ## 3237 # Create one directory. 3238 # 3234 3239 define def_install_directory 3235 3240 3236 # _INST3241 # gather common properties. 3237 3242 ifdef $(directory)_INST 3238 local inst := $(PATH_INS)/$(patsubst %/,%,$($(directory)_INST)) 3239 else ifdef $(target)_INST 3240 local inst := $(PATH_INS)/$(patsubst %/,%,$($(target)_INST)) 3243 local inst := $($(directory)_INST) 3241 3244 else 3242 local inst := $(PATH_INS) 3245 local inst := $($(target)_1_INST) 3246 endif 3247 ifneq ($(substr $(inst),-1),/) 3248 $(warning kBuild: Directory $(directory) in install target $(target) has a INST property without a trailing slash.) 3249 local inst := $(inst)/ 3250 endif 3251 ifdef $(directory)_STAGE 3252 local stage := $($(directory)_STAGE) 3253 else 3254 local stage := $($(target)_1_STAGE) 3255 endif 3256 ifneq ($(substr $(stage),-1),/) 3257 $(warning kBuild: Directory $(directory) in install target $(target) has a INST property without a trailing slash.) 3258 local stage := $(stage)/ 3243 3259 endif 3244 3260 … … 3250 3266 $($(directory)_MODE.$(bld_trg)) \ 3251 3267 $($(directory)_MODE) \ 3252 $($(target)_MODE.$(bld_trg).$(bld_trg_arch)) \ 3253 $($(target)_MODE.$(bld_trg)) \ 3254 $($(target)_MODE)) 3268 $(top_mode) ) 3255 3269 local uid := $(firstword \ 3256 3270 $($(target)_$(directory)_UID.$(bld_trg).$(bld_trg_arch)) \ … … 3260 3274 $($(directory)_UID.$(bld_trg)) \ 3261 3275 $($(directory)_UID) \ 3262 $($(target)_UID.$(bld_trg).$(bld_trg_arch)) \ 3263 $($(target)_UID.$(bld_trg)) \ 3264 $($(target)_UID)) 3276 $(top_uid) ) 3265 3277 local gid := $(firstword \ 3266 3278 $($(target)_$(directory)_GID.$(bld_trg).$(bld_trg_arch)) \ … … 3270 3282 $($(directory)_GID.$(bld_trg)) \ 3271 3283 $($(directory)_GID) \ 3272 $($(target)_GID.$(bld_trg).$(bld_trg_arch)) \ 3273 $($(target)_GID.$(bld_trg)) \ 3274 $($(target)_GID)) 3284 $(top_gid) ) 3275 3285 local flags := \ 3276 $($(target)_IDFLAGS)\ 3277 $($(target)_IDFLAGS.$(bld_trg)) \ 3278 $($(target)_IDFLAGS.$(bld_trg).$(bld_trg_arch)) \ 3286 $(top_idflags) \ 3279 3287 $($(directory)_IDFLAGS) \ 3280 3288 $($(directory)_IDFLAGS.$(bld_trg)) \ … … 3282 3290 $($(target)_$(directory)_IDFLAGS) \ 3283 3291 $($(target)_$(directory)_IDFLAGS.$(bld_trg)) \ 3284 $($(target)_$(directory)_IDFLAGS.$(bld_trg).$(bld_trg_arch)) 3285 3286 local insdst := $(inst)/$(directory)/ 3287 # $(warning directory=$(directory) inst=$(inst) insdst=$(insdst) mode=$(mode) gid=$(gid) uid=$(uid))3288 3289 # generate the rule (need double evaluation here)3292 $($(target)_$(directory)_IDFLAGS.$(bld_trg).$(bld_trg_arch)) \ 3293 #$(warning directory=$(directory) inst=$(inst) stage=$(stage) mode=$(mode) gid=$(gid) uid=$(uid)) 3294 3295 # The staging rule (requires double evaluation). 3296 local insdst := $(PATH_STAGE)$(stage)$(directory)/ 3297 $(target)_2_STAGE_DIR_TARGETS += $(insdst) 3290 3298 $(eval $(def_install_directory_rule)) 3291 3299 3292 INSTARGET_DIRS_$(target) += $(insdst) 3300 # The install rule. 3301 ifeq ($(insttype),both) 3302 local insdst := $(PATH_INS)$(inst)$(directory)/ 3303 $(target)_2_INST_DIR_TARGETS += $(insdst) 3304 $(eval $(def_install_directory_rule)) 3305 endif 3306 3293 3307 endef # def_install_directory 3294 3308 $(eval-opt-var def_install_directory) 3295 3309 3296 3310 3297 ## process one install target. 3311 ## 3312 # Process one install target. 3313 # 3298 3314 define def_install 3299 3315 # the basics. 3300 local bld_type := $(firstword $($(target)_BLD_TYPE) $(KBUILD_TYPE)) 3301 local bld_trg := $(firstword $($(target)_BLD_TRG) $(KBUILD_TARGET)) 3302 local bld_trg_arch:= $(firstword $($(target)_BLD_TRG_ARCH) $(KBUILD_TARGET_ARCH)) 3303 local bld_trg_cpu := $(firstword $($(target)_BLD_TRG_CPU) $(KBUILD_TARGET_CPU)) 3304 3305 INSTARGET_$(target) := $($(target)_GOALS) 3306 INSTARGET_DIRS_$(target) := 3307 local outbase := $(call TARGET_BASE,$(target),$(target)) 3316 local bld_type := $(firstword $($(target)_BLD_TYPE) $(KBUILD_TYPE)) 3317 local bld_trg := $(firstword $($(target)_BLD_TRG) $(KBUILD_TARGET)) 3318 local bld_trg_arch := $(firstword $($(target)_BLD_TRG_ARCH) $(KBUILD_TARGET_ARCH)) 3319 local bld_trg_cpu := $(firstword $($(target)_BLD_TRG_CPU) $(KBUILD_TARGET_CPU)) 3320 local insttype := $($(target)_1_INSTTYPE) 3321 3322 ifneq ($(insttype),none) 3323 $(target)_2_STAGE_TARGETS := $($(target)_GOALS) $($(target)_STAGE_ONLY_GOALS) 3324 else 3325 $(target)_2_STAGE_TARGETS := 3326 endif 3327 $(target)_2_STAGE_DIR_TARGETS := 3328 3329 ifeq ($(insttype),both) 3330 $(target)_2_INST_TARGETS := $($(target)_GOALS) $($(target)_INST_ONLY_GOALS) 3331 else 3332 $(target)_2_INST_TARGETS := 3333 endif 3334 $(target)_2_INST_DIR_TARGETS := 3335 3336 3337 local outbase := $(call TARGET_BASE,$(target),$(target)) 3308 3338 $(target)_0_OUTDIR := $(patsubst %/,%,$(dir $(outbase))) 3309 3339 $(call KB_FN_ASSIGN_DEPRECATED,PATH_$(target),$($(target)_0_OUTDIR), $(target)_0_OUTDIR) 3310 3340 3311 local clean_files := $($(target)_CLEAN) $($(target)_CLEAN.$(bld_trg)) $($(target)_CLEAN.$(bld_trg).$(bld_trg_arch)) $($(target)_CLEAN.$(bld_trg_arch)) $($(target)_CLEAN.$(bld_trg_cpu)) $($(target)_CLEAN.$(bld_type)) 3312 3313 $(foreach directory,$($(target)_DIRS) $($(target)_DIRS.$(bld_trg)) $($(target)_DIRS.$(bld_trg).$(bld_trg_arch)) $($(target)_DIRS.$(bld_trg_arch)) $($(target)_DIRS.$(bld_trg_cpu)) $($(target)_DIRS.$(bld_type)), \ 3314 $(evalval def_install_directory)) 3315 3316 $(foreach src,$($(target)_SOURCES) $($(target)_SOURCES.$(bld_trg)) $($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_arch)) $($(target)_SOURCES.$(bld_trg_cpu)) $($(target)_SOURCES.$(bld_type)), \ 3317 $(evalval def_install_src)) 3318 3319 $(foreach src,$($(target)_SYMLINKS) $($(target)_SYMLINKS.$(bld_trg)) $($(target)_SYMLINKS.$(bld_trg).$(bld_trg_arch)) $($(target)_SYMLINKS.$(bld_trg_arch)) $($(target)_SYMLINKS.$(bld_trg_cpu)) $($(target)_SYMLINKS.$(bld_type)), \ 3320 $(evalval def_install_symlink)) 3321 3322 # the collection target 3323 local clean_files += $(PATH_TARGET)/$(target).ins 3324 $(target)_1_TARGET := $(PATH_TARGET)/$(target).ins 3325 $(call KB_FN_ASSIGN_DEPRECATED,TARGET_$(target),$($(target)_1_TARGET), $(target)_1_TARGET) 3326 $($(target)_1_TARGET): $$(INSTARGET_$(target)) | $$(INSTARGET_DIRS_$(target)) $(call DIRDEP,$(PATH_TARGET)) 3341 ifneq ($(insttype),none) 3342 # cache top level target properties. 3343 local top_mode := $(firstword \ 3344 $($(target)_MODE.$(bld_trg).$(bld_trg_arch)) \ 3345 $($(target)_MODE.$(bld_trg)) \ 3346 $($(target)_MODE) ) 3347 local top_uid := $(firstword \ 3348 $($(target)_UID.$(bld_trg).$(bld_trg_arch)) \ 3349 $($(target)_UID.$(bld_trg)) \ 3350 $($(target)_UID) ) 3351 local top_gid := $(firstword \ 3352 $($(target)_GID.$(bld_trg).$(bld_trg_arch)) \ 3353 $($(target)_GID.$(bld_trg)) \ 3354 $($(target)_GID) ) 3355 local top_ifflags := \ 3356 $($(target)_IFFLAGS) \ 3357 $($(target)_IFFLAGS.$(bld_trg)) \ 3358 $($(target)_IFFLAGS.$(bld_trg).$(bld_trg_arch)) \ 3359 local top_idflags := \ 3360 $($(target)_IDFLAGS) \ 3361 $($(target)_IDFLAGS.$(bld_trg)) \ 3362 $($(target)_IDFLAGS.$(bld_trg).$(bld_trg_arch)) 3363 ifdef $(target)_INSTFUN 3364 local top_instfun := $(target)_INSTFUN 3365 else 3366 local top_instfun := _INSTALL_FILE 3367 endif 3368 3369 $(foreach directory, \ 3370 $($(target)_DIRS) \ 3371 $($(target)_DIRS.$(bld_trg)) \ 3372 $($(target)_DIRS.$(bld_trg).$(bld_trg_arch)) \ 3373 $($(target)_DIRS.$(bld_trg_arch)) \ 3374 $($(target)_DIRS.$(bld_trg_cpu)) \ 3375 $($(target)_DIRS.$(bld_type)), \ 3376 $(evalval def_install_directory)) 3377 3378 local clean_files := \ 3379 $($(target)_CLEAN) \ 3380 $($(target)_CLEAN.$(bld_trg)) \ 3381 $($(target)_CLEAN.$(bld_trg).$(bld_trg_arch)) \ 3382 $($(target)_CLEAN.$(bld_trg_arch)) \ 3383 $($(target)_CLEAN.$(bld_trg_cpu)) \ 3384 $($(target)_CLEAN.$(bld_type)) 3385 3386 $(foreach src,\ 3387 $($(target)_SOURCES) \ 3388 $($(target)_SOURCES.$(bld_trg)) \ 3389 $($(target)_SOURCES.$(bld_trg).$(bld_trg_arch)) \ 3390 $($(target)_SOURCES.$(bld_trg_arch)) \ 3391 $($(target)_SOURCES.$(bld_trg_cpu)) \ 3392 $($(target)_SOURCES.$(bld_type)), \ 3393 $(evalval def_install_src)) 3394 3395 $(foreach src,\ 3396 $($(target)_SYMLINKS) \ 3397 $($(target)_SYMLINKS.$(bld_trg)) \ 3398 $($(target)_SYMLINKS.$(bld_trg).$(bld_trg_arch)) \ 3399 $($(target)_SYMLINKS.$(bld_trg_arch)) \ 3400 $($(target)_SYMLINKS.$(bld_trg_cpu)) \ 3401 $($(target)_SYMLINKS.$(bld_type)), \ 3402 $(evalval def_install_symlink)) 3403 else # none 3404 local clean_files := 3405 endif 3406 3407 # The collection targets (staging only). 3408 local clean_files += $($(target)_1_TARGET) 3409 $($(target)_1_TARGET): $$($(target)_2_STAGE_TARGETS) | $$($(target)_2_STAGE_DIR_TARGETS) $$(dir $$@) 3327 3410 @$(QUIET2)$(APPEND) $@ 3328 3411 3329 3412 $(target): $$($(target)_1_TARGET) 3330 3413 3331 _INSTALLS += $($(target)_1_TARGET) 3332 _INSTALLS_FILES += $(INSTARGET_$(target)) 3333 _INSTALLS_DIRS += $(INSTARGET_DIRS_$(target)) 3334 _CLEAN_FILES += $(clean_files) 3335 _DIRS += $($(target)_0_OUTDIR) $($(target)_BLDDIRS) $($(target)_BLDDIRS.$(bld_trg)) $($(target)_BLDDIRS.$(bld_trg).$(bld_trg_arch)) $($(target)_BLDDIRS.$(bld_trg_arch)) $($(target)_BLDDIRS.$(bld_trg_cpu)) $($(target)_BLDDIRS.$(bld_type)) 3414 # Update Global lists. 3415 _INSTALLS += $($(target)_1_TARGET) 3416 _STAGE_FILES += $($(target)_2_STAGE_TARGETS) 3417 _STAGE_DIRS += $($(target)_2_STAGE_DIR_TARGETS) 3418 _INSTALLS_FILES += $($(target)_2_INST_TARGETS) 3419 _INSTALLS_DIRS += $($(target)_2_INST_DIR_TARGETS) 3420 _CLEAN_FILES += $(clean_files) 3421 _DIRS += \ 3422 $($(target)_0_OUTDIR) \ 3423 $($(target)_BLDDIRS) \ 3424 $($(target)_BLDDIRS.$(bld_trg)) \ 3425 $($(target)_BLDDIRS.$(bld_trg).$(bld_trg_arch)) \ 3426 $($(target)_BLDDIRS.$(bld_trg_arch)) \ 3427 $($(target)_BLDDIRS.$(bld_trg_cpu)) \ 3428 $($(target)_BLDDIRS.$(bld_type)) 3429 3430 # Deprecated properties. 3431 INSTARGET_$(target) := $($(target)_2_STAGE_TARGETS) 3432 INSTARGET_DIRS_$(target) := $($(target)_2_STAGE_DIR_TARGETS) 3433 3336 3434 endef # def_install 3337 3435 $(eval-opt-var def_install) … … 3345 3443 endif 3346 3444 3445 # 3347 3446 # Some introspection targets that can be useful for package maintainers. 3447 # 3348 3448 .PHONY: kbuild-show-install-files kbuild-show-install-dirs 3349 3449 kbuild-show-install-files:: … … 3353 3453 $(addprefix $(NL)$(TAB)$(QUIET)$(ECHO) , $(subst $(PATH_INS)/,,$(_INSTALLS_DIRS))) 3354 3454 3455 kbuild-show-stage-files:: 3456 $(addprefix $(NL)$(TAB)$(QUIET)$(ECHO) , $(subst $(PATH_STAGE)/,,$(_STAGE_FILES))) 3457 3458 kbuild-show-stage-dirs:: 3459 $(addprefix $(NL)$(TAB)$(QUIET)$(ECHO) , $(subst $(PATH_STAGE)/,,$(_STAGE_DIRS))) 3460 3355 3461 3356 3462 # 3357 3463 # TESTING 3358 3464 # 3359 _TESTING += $(TESTING) $(TESTING.$(KBUILD_TARGET)) $(TESTING.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)) $(TESTING.$(KBUILD_TARGET_ARCH)) $(TESTING.$(KBUILD_TARGET_CPU)) 3465 _TESTING += $(TESTING) \ 3466 $(TESTING.$(KBUILD_TARGET)) \ 3467 $(TESTING.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)) \ 3468 $(TESTING.$(KBUILD_TARGET_ARCH)) \ 3469 $(TESTING.$(KBUILD_TARGET_CPU)) 3360 3470 3361 3471 … … 3363 3473 # PACKING 3364 3474 # 3365 _PACKING += $(PACKING) $(PACKING.$(KBUILD_TARGET)) $(PACKING.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)) $(PACKING.$(KBUILD_TARGET_ARCH)) $(PACKING.$(KBUILD_TARGET_CPU)) 3475 _PACKING += $(PACKING) \ 3476 $(PACKING.$(KBUILD_TARGET)) \ 3477 $(PACKING.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)) \ 3478 $(PACKING.$(KBUILD_TARGET_ARCH)) \ 3479 $(PACKING.$(KBUILD_TARGET_CPU)) 3366 3480 3367 3481 … … 3374 3488 # DIRECTORIES 3375 3489 # 3376 _DIR_ALL := $(sort $(addsuffix /,$(patsubst %/,%,$(_DIRS))) $(dir $(_OUT_FILES) $(_OBJS) $(_INSTALLS_FILES) ))3377 $(foreach directory,$(_INSTALLS_DIRS) , $(eval _DIR_ALL := $(filter-out $(directory),$(_DIR_ALL))))3490 _DIR_ALL := $(sort $(addsuffix /,$(patsubst %/,%,$(_DIRS))) $(dir $(_OUT_FILES) $(_OBJS) $(_INSTALLS_FILES) $(_STAGE_FILES))) 3491 $(foreach directory,$(_INSTALLS_DIRS) $(_STAGE_DIRS), $(eval _DIR_ALL := $(filter-out $(directory),$(_DIR_ALL)))) 3378 3492 3379 3493 … … 3409 3523 do-clean: 3410 3524 %$(call MSG_CLEAN) 3411 $(QUIET)$(RM) -f -- $(_OUT_FILES) $(_OBJS) $(_DEPFILES) $(_DEPFILES_INCLUDED) $(_CLEAN_FILES) $(OTHER_CLEAN) 3412 $(QUIET)$(RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist -- $(rsort $(dir $(_OUT_FILES) $(_OBJS) $(_DEPFILES) $(_DEPFILES_INCLUDED) $(_CLEAN_FILES) $(OTHER_CLEAN))) 3525 $(QUIET)$(RM) -f -- \ 3526 $(_OUT_FILES) \ 3527 $(_OBJS) \ 3528 $(_DEPFILES) \ 3529 $(_DEPFILES_INCLUDED) \ 3530 $(_CLEAN_FILES) \ 3531 $(OTHER_CLEAN) \ 3532 $(_STAGE_FILES) 3533 $(QUIET)$(RMDIR) -p --ignore-fail-on-non-empty --ignore-fail-on-not-exist -- \ 3534 $(rsort $(dir $(_OUT_FILES) \ 3535 $(_OBJS) \ 3536 $(_DEPFILES) \ 3537 $(_DEPFILES_INCLUDED) \ 3538 $(_CLEAN_FILES) \ 3539 $(OTHER_CLEAN))\ 3540 $(_STAGE_DIRS) ) 3413 3541 3414 3542 … … 3620 3748 nothing: pass_nothing 3621 3749 3750 .PHONY: staging 3751 staging: pass_staging 3752 3622 3753 .PHONY: packing 3623 3754 packing: pass_packing … … 3657 3788 miscbins: $$(_MISCBINS) 3658 3789 others: $$(_OTHERS) 3659 installs: $$(_INSTALLS) $$(_INSTALLS_DIRS) $$(_INSTALLS_FILES) 3790 stagings: $$(_INSTALLS) $$(_STAGE_DIRS) $$(_STAGE_FILES) 3791 installs: $$(_INSTALLS_DIRS) $$(_INSTALLS_FILES) 3660 3792 3661 3793 … … 3717 3849 # end-of-file-content 3718 3850 __footer_kmk__ := target 3719 endif # __footer_kmk__3720 3851 endif # !defined(__footer_kmk__) 3852
Note:
See TracChangeset
for help on using the changeset viewer.