Changeset 1413 in kBuild
- Timestamp:
- Mar 18, 2008 9:22:32 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r1410 r1413 156 156 157 157 158 159 ## Inherit one keyword in a non-accumulative manner. 160 # @param $(trg) Target object. 161 # @param $(prop) The property. 162 # @param $(src_key) Source keyword. 163 # @param $(trg_key) Target keyword. 164 define def_inherit_one_keyword 165 ifdef $(trg)_$(prop).$(src_key) 166 ifndef $(trg)_$(prop).$(trg_key) 167 $(trg)_$(prop).$(trg_key) = $($(trg)_$(prop).$(src_key)) 168 endif 169 endif 170 endef 171 172 173 # EXPAND_BY = overriding 174 175 ## Inherit one keyword in a non-accumulative manner. 176 # @param $(trg) Target object. 177 # @param $(prop) The property. 178 # @param $(src_key) Source keyword. 179 # @param $(trg_key) Target keyword. 180 define def_inherit_one_keyword_overriding_now_l 181 ifdef $(trg)_$(prop).$(src_key) 182 ifndef $(trg)_$(prop).$(trg_key) 183 $(trg)_$(prop).$(trg_key) := $($(trg)_$(prop).$(src_key)) 184 endif 185 endif 186 endef 187 188 ## @copydoc def_inherit_one_overriding_now_l 189 define def_inherit_one_keyword_overriding_now_r 190 ifdef $(trg)_$(prop).$(src_key) 191 ifndef $(trg)_$(prop).$(trg_key) 192 $(trg)_$(prop).$(trg_key) := $($(trg)_$(prop).$(src_key)) 193 endif 194 endif 195 endef 196 197 ## Inherit one keyword in a non-accumulative manner, deferred expansion. 198 # @param $(trg) Target object. 199 # @param $(prop) The property. 200 # @param $(src_key) Source keyword. 201 # @param $(trg_key) Target keyword. 202 # @remark This define relies on double evaluation 203 define def_inherit_one_keyword_overriding_deferred 204 ifdef $(trg)_$(prop).$(src_key) 205 ifndef $(trg)_$(prop).$(trg_key) 206 $(trg)_$(prop).$(trg_key) = $$($(trg)_$(prop).$(src_key)) 207 endif 208 endif 209 endef 210 211 ## @copydoc def_inherit_one_overriding_deferred 212 define def_inherit_one_keyword_overriding_deferred_l 213 ifdef $(trg)_$(prop).$(src_key) 214 ifndef $(trg)_$(prop).$(trg_key) 215 $(trg)_$(prop).$(trg_key) = $$($(trg)_$(prop).$(src_key)) 216 endif 217 endif 218 endef 219 220 ## @copydoc def_inherit_one_overriding_deferred 221 define def_inherit_one_keyword_overriding_deferred_r 222 ifdef $(trg)_$(prop).$(src_key) 223 ifndef $(trg)_$(prop).$(trg_key) 224 $(trg)_$(prop).$(trg_key) = $$($(trg)_$(prop).$(src_key)) 225 endif 226 endif 227 endef 228 229 230 # EXPAND_BY = prepending 231 232 ## Inherit one keyword in a prepending manner. 233 # @param $(trg) Target object. 234 # @param $(prop) The property. 235 # @param $(src_key) Source keyword. 236 # @param $(trg_key) Target keyword. 237 define def_inherit_one_keyword_prepending_now_l 238 ifdef $(trg)_$(prop).$(src_key) 239 $(trg)_$(prop).$(trg_key) := $($(trg)_$(prop).$(src_key)) $($(trg)_$(prop).$(trg_key)) 240 endif 241 endef 242 243 ## @copydoc def_inherit_one_prepending_now_l 244 define def_inherit_one_keyword_prepending_now_r 245 ifdef $(trg)_$(prop).$(src_key) 246 $(trg)_$(prop).$(trg_key) := $($(trg)_$(prop).$(trg_key)) $($(trg)_$(prop).$(src_key)) 247 endif 248 endef 249 250 ## Inherit one keyword in a non-accumulative manner, deferred expansion. 251 # @param $(trg) Target object. 252 # @param $(prop) The property. 253 # @param $(src_key) Source keyword. 254 # @param $(trg_key) Target keyword. 255 # @remark This define relies on double evaluation 256 define def_inherit_one_keyword_prepending_deferred 257 ifdef $(trg)_$(prop).$(src_key) 258 ifndef $(trg)_$(prop).$(trg_key) 259 $(trg)_$(prop).$(trg_key) = $$($(trg)_$(prop).$(src_key)) 260 endif 261 endif 262 endef 263 264 ## Inherit one keyword in a prepending manner, deferred expansion. 265 # @param $(trg) Target object. 266 # @param $(prop) The property. 267 # @param $(src_key) Source keyword. 268 # @param $(trg_key) Target keyword. 269 define def_inherit_one_keyword_prepending_deferred_l 270 ifdef $(trg)_$(prop).$(src_key) 271 $(trg)_$(prop).$(trg_key) <= $$($(trg)_$(prop).$(src_key)) 272 endif 273 endef 274 275 ## @copydoc def_inherit_one_prepending_deferred_l 276 define def_inherit_one_keyword_prepending_deferred_r 277 ifdef $(trg)_$(prop).$(src_key) 278 $(trg)_$(prop).$(trg_key) += $$($(trg)_$(prop).$(src_key)) 279 endif 280 endef 281 282 283 # EXPAND_BY = appending 284 285 ## Inherit one keyword in an appending manner. 286 # @param $(trg) Target object. 287 # @param $(prop) The property. 288 # @param $(src_key) Source keyword. 289 # @param $(trg_key) Target keyword. 290 define def_inherit_one_keyword_appending_now_l 291 ifdef $(trg)_$(prop).$(src_key) 292 $(trg)_$(prop).$(trg_key) := $($(trg)_$(prop).$(trg_key)) $($(trg)_$(prop).$(src_key)) 293 endif 294 endef 295 296 ## @copydoc def_inherit_one_appending_now_l 297 define def_inherit_one_keyword_appending_now_r 298 ifdef $(trg)_$(prop).$(src_key) 299 $(trg)_$(prop).$(trg_key) := $($(trg)_$(prop).$(src_key)) $($(trg)_$(prop).$(trg_key)) 300 endif 301 endef 302 303 ## Inherit one keyword in a non-accumulative manner, deferred expansion. 304 # @param $(trg) Target object. 305 # @param $(prop) The property. 306 # @param $(src_key) Source keyword. 307 # @param $(trg_key) Target keyword. 308 # @remark This define relies on double evaluation 309 define def_inherit_one_keyword_appending_deferred 310 ifdef $(trg)_$(prop).$(src_key) 311 ifndef $(trg)_$(prop).$(trg_key) 312 $(trg)_$(prop).$(trg_key) = $$($(trg)_$(prop).$(src_key)) 313 endif 314 endif 315 endef 316 317 ## Inherit one keyword in an appending manner, deferred expansion. 318 # @param $(trg) Target object. 319 # @param $(prop) The property. 320 # @param $(src_key) Source keyword. 321 # @param $(trg_key) Target keyword. 322 define def_inherit_one_keyword_appending_deferred_l 323 ifdef $(trg)_$(prop).$(src_key) 324 $(trg)_$(prop).$(trg_key) += $$($(trg)_$(prop).$(src_key)) 325 endif 326 endef 327 328 ## @copydoc def_inherit_one_appending_deferred_l 329 define def_inherit_one_keyword_appending_deferred_r 330 ifdef $(trg)_$(prop).$(src_key) 331 $(trg)_$(prop).$(trg_key) <= $$($(trg)_$(prop).$(src_key)) 332 endif 333 endef 334 335 336 ## Worker fro def_inherit that deals with one keyword that makes 337 # use of inheritance. 338 # @param prefix_keyword key_prefix:keyword. The cool join/split game as usual. 339 # @param trg Object to consider for inheriting. 340 # @param properties List of the properties with straight expansion. 341 # @param properties_now_l List of the properties with immediate expansion, accumulating on the left side. 342 # @param properties_now_r List of the properties with immediate expansion, accumulating on the right side. 343 # @param properties_deferred List of the properties with deferred expansion (e.g. function), non-accumulative . 344 # @param properties_deferred_l List of the properties with deferred expansion (e.g. function), accumulating on the left side. 345 # @param properties_deferred_r List of the properties with deferred expansion (e.g. function), accumulating on the right side. 346 define def_inherit_keyword 347 prefix := $(word 1,$(subst :, ,$(prefix_keyword))) 348 trg_key := $(word 2,$(subst :, ,$(prefix_keyword))) 349 src_key := $($(prefix)_$(trg_key)_EXTENDS) 350 by := $($(prefix)_$(trg_key)_EXTENDS_BY) 351 352 # Inherit the properties. 353 $(foreach prop, $(properties), $(eval $(def_inherit_one_keyword))) 354 $(foreach prop, $(properties_now_l), $(eval $(def_inherit_one_keyword_$(by)_now_l))) 355 $(foreach prop, $(properties_now_r), $(eval $(def_inherit_one_keyword_$(by)_now_r))) 356 $(foreach prop, $(properties_deferred), $(eval $(def_inherit_one_keyword_$(by)_deferred))) 357 $(foreach prop, $(properties_deferred_l), $(eval $(def_inherit_one_keyword_$(by)_deferred_l))) 358 $(foreach prop, $(properties_deferred_r), $(eval $(def_inherit_one_keyword_$(by)_deferred_r))) 359 360 endef # def_inherit_keyword 361 362 158 363 ## Inherit one template property in a non-accumulative manner. 159 364 # @param $(prop) Property name … … 164 369 ifndef $(trg)_$(prop) 165 370 $(trg)_$(prop) = $($(src)_$(prop)) 166 #$ (warning def_inherit_one: $(trg)_$(prop) = $($(src)_$(prop)) )167 371 endif 168 372 endif 169 endef # def_inherit_one373 endef 170 374 171 375 … … 180 384 ifndef $(trg)_$(prop) 181 385 $(trg)_$(prop) := $($(src)_$(prop)) 182 #$ (warning def_inherit_one_overriding_now_l: $(trg)_$(prop) = $($(src)_$(prop)) )183 386 endif 184 387 endif 185 endef # def_inherit_one_overriding_now_l388 endef 186 389 187 390 ## @copydoc def_inherit_one_overriding_now_l … … 190 393 ifndef $(trg)_$(prop) 191 394 $(trg)_$(prop) := $($(src)_$(prop)) 192 #$ (warning def_inherit_one_overriding_now_r: $(trg)_$(prop) = $($(src)_$(prop)) )193 395 endif 194 396 endif 195 endef # def_inherit_one_overriding_now_r397 endef 196 398 197 399 ## Inherit one template property in a non-accumulative manner, deferred expansion. … … 204 406 ifndef $(trg)_$(prop) 205 407 $(trg)_$(prop) = $$($(src)_$(prop)) 206 #$ (warning def_inherit_one_overriding_deferred: $(trg)_$(prop) = $($(src)_$(prop)) )207 408 endif 208 409 endif 209 endef # def_inherit_one_overriding_deferred410 endef 210 411 211 412 ## @copydoc def_inherit_one_overriding_deferred … … 214 415 ifndef $(trg)_$(prop) 215 416 $(trg)_$(prop) = $$($(src)_$(prop)) 216 #$ (warning def_inherit_one_overriding_deferred_l: $(trg)_$(prop) = $($(src)_$(prop)) )217 417 endif 218 418 endif 219 endef # def_inherit_one_overriding_deferred_l419 endef 220 420 221 421 ## @copydoc def_inherit_one_overriding_deferred … … 224 424 ifndef $(trg)_$(prop) 225 425 $(trg)_$(prop) = $$($(src)_$(prop)) 226 #$ (warning def_inherit_one_overriding_deferred_r: $(trg)_$(prop) = $($(src)_$(prop)) )227 426 endif 228 427 endif 229 endef # def_inherit_one_overriding_deferred_r428 endef 230 429 231 430 … … 238 437 define def_inherit_one_prepending_now_l 239 438 ifdef $(src)_$(prop) 240 $(trg)_$(prop) := $(trg)_$(prop) $($(src)_$(prop)) 241 #$ (warning def_inherit_one_prepending_now_l: $(trg)_$(prop) = $($(trg)_$(prop)) ) 242 endif 243 endef # def_inherit_one_prepending_now_l 439 $(trg)_$(prop) := $($(src)_$(prop)) $($(trg)_$(prop)) 440 endif 441 endef 244 442 245 443 ## @copydoc def_inherit_one_prepending_now_l 246 444 define def_inherit_one_prepending_now_r 247 445 ifdef $(src)_$(prop) 248 $(trg)_$(prop) := $($(src)_$(prop)) $(trg)_$(prop) 249 #$ (warning def_inherit_one_prepending_now_r: $(trg)_$(prop) = $($(trg)_$(prop)) ) 250 endif 251 endef # def_inherit_one_prepending_now_r 446 $(trg)_$(prop) := $($(trg)_$(prop)) $($(src)_$(prop)) 447 endif 448 endef 252 449 253 450 ## Inherit one template property in a non-accumulative manner, deferred expansion. … … 260 457 ifndef $(trg)_$(prop) 261 458 $(trg)_$(prop) = $$($(src)_$(prop)) 262 #$ (warning def_inherit_one_prepending_deferred: $(trg)_$(prop) = $($(src)_$(prop)) )263 459 endif 264 460 endif 265 endef # def_inherit_one_prepending_deferred461 endef 266 462 267 463 ## Inherit one template property in a prepending manner, deferred expansion. … … 272 468 ifdef $(src)_$(prop) 273 469 $(trg)_$(prop) <= $$($(src)_$(prop)) 274 #$ (warning def_inherit_one_prepending_deferred_l: $(trg)_$(prop) = $($(trg)_$(prop)) ) 275 endif 276 endef # def_inherit_one_prepending_deferred_l 470 endif 471 endef 277 472 278 473 ## @copydoc def_inherit_one_prepending_deferred_l … … 280 475 ifdef $(src)_$(prop) 281 476 $(trg)_$(prop) += $$($(src)_$(prop)) 282 #$ (warning def_inherit_one_prepending_deferred_r: $(trg)_$(prop) = $($(trg)_$(prop)) ) 283 endif 284 endef # def_inherit_one_prepending_deferred_r 477 endif 478 endef 285 479 286 480 287 481 # EXPAND_BY = appending 288 482 289 ## Inherit one template property in a appending manner.483 ## Inherit one template property in an appending manner. 290 484 # @param $(prop) Property name 291 485 # @param $(src) Source (parent) object. … … 293 487 define def_inherit_one_appending_now_l 294 488 ifdef $(src)_$(prop) 295 $(trg)_$(prop) := $($(src)_$(prop)) $(trg)_$(prop) 296 #$ (warning def_inherit_one_appending_now_l: $(trg)_$(prop) = $($(trg)_$(prop)) ) 297 endif 298 endef # def_inherit_one_appending_now_l 489 $(trg)_$(prop) := $($(trg)_$(prop)) $($(src)_$(prop)) 490 endif 491 endef 299 492 300 493 ## @copydoc def_inherit_one_appending_now_l 301 494 define def_inherit_one_appending_now_r 302 495 ifdef $(src)_$(prop) 303 $(trg)_$(prop) := $(trg)_$(prop) $($(src)_$(prop)) 304 #$ (warning def_inherit_one_appending_now_r: $(trg)_$(prop) = $($(trg)_$(prop)) ) 305 endif 306 endef # def_inherit_one_appending_now_r 496 $(trg)_$(prop) := $($(src)_$(prop)) $($(trg)_$(prop)) 497 endif 498 endef 307 499 308 500 ## Inherit one template property in a non-accumulative manner, deferred expansion. … … 315 507 ifndef $(trg)_$(prop) 316 508 $(trg)_$(prop) = $$($(src)_$(prop)) 317 #$ (warning def_inherit_one_appending_deferred: $(trg)_$(prop) = $($(src)_$(prop)) )318 509 endif 319 510 endif 320 endef # def_inherit_one_appending_deferred321 322 ## Inherit one template property in a appending manner, deferred expansion.511 endef 512 513 ## Inherit one template property in an appending manner, deferred expansion. 323 514 # @param $(prop) Property name 324 515 # @param $(src) Source (parent) object. … … 327 518 ifdef $(src)_$(prop) 328 519 $(trg)_$(prop) += $$($(src)_$(prop)) 329 #$ (warning def_inherit_one_appending_deferred_l: $(trg)_$(prop) = $($(trg)_$(prop)) ) 330 endif 331 endef # def_inherit_one_appending_deferred_l 520 endif 521 endef 332 522 333 523 ## @copydoc def_inherit_one_appending_deferred_l … … 335 525 ifdef $(src)_$(prop) 336 526 $(trg)_$(prop) <= $$($(src)_$(prop)) 337 #$ (warning def_inherit_one_appending_deferred_r: $(trg)_$(prop) = $($(trg)_$(prop)) ) 338 endif 339 endef # def_inherit_one_appending_deferred_r 340 527 endif 528 endef 529 530 531 ## combines the specified properties $(1) with the $(_KEYWORDS) list. 532 _INHERIT_JOIN_KEYWORDS = $(1) $(foreach keyword,$(_KEYWORDS), $(addsuffix .$(keyword), $(1))) 341 533 342 534 … … 377 569 378 570 # Inherit the properties. 379 #$ (warning def_inherit: trg=$(trg) src=$(src)) 380 $(foreach prop, $(properties), $(eval $(def_inherit_one))) 381 $(foreach prop, $(properties_now_l), $(eval $(def_inherit_one_$(by)_now_l))) 382 $(foreach prop, $(properties_now_r), $(eval $(def_inherit_one_$(by)_now_r))) 383 $(foreach prop, $(properties_deferred), $(eval $(def_inherit_one_$(by)_deferred))) 384 $(foreach prop, $(properties_deferred_l), $(eval $(def_inherit_one_$(by)_deferred_l))) 385 $(foreach prop, $(properties_deferred_r), $(eval $(def_inherit_one_$(by)_deferred_r))) 571 $(foreach prop, $(call _INHERIT_JOIN_KEYWORDS,$(properties)), $(eval $(def_inherit_one))) 572 $(foreach prop, $(call _INHERIT_JOIN_KEYWORDS,$(properties_now_l)), $(eval $(def_inherit_one_$(by)_now_l))) 573 $(foreach prop, $(call _INHERIT_JOIN_KEYWORDS,$(properties_now_r)), $(eval $(def_inherit_one_$(by)_now_r))) 574 $(foreach prop, $(call _INHERIT_JOIN_KEYWORDS,$(properties_deferred)), $(eval $(def_inherit_one_$(by)_deferred))) 575 $(foreach prop, $(call _INHERIT_JOIN_KEYWORDS,$(properties_deferred_l)), $(eval $(def_inherit_one_$(by)_deferred_l))) 576 $(foreach prop, $(call _INHERIT_JOIN_KEYWORDS,$(properties_deferred_r)), $(eval $(def_inherit_one_$(by)_deferred_r))) 386 577 387 578 # Mark the target as done. … … 394 585 endif 395 586 endif 587 588 # Keyword inheritance. 589 $(foreach prefix_keyword, $(join $(_KEYWORDS_PREFIX), $(addprefix :,$(_KEYWORDS_EXTENDS))), $(eval $(value def_inherit_keyword))) 590 396 591 endef # def_inherit 397 398 399 ##400 # Function for $(call)'ing.401 # @param 1 trg Object to consider for inheriting.402 # @param 2 src_prefix What to prefix the value found in EXTENDS with to get the object.403 # @param 3 properties List of the properties with straight expansion.404 # @param 4 properties_now_l List of the properties with immediate expansion, accumulating on the left side.405 # @param 5 properties_now_r List of the properties with immediate expansion, accumulating on the right side.406 # @param 6 properties_deferred List of the properties with deferred expansion (e.g. function), non-accumulative .407 # @param 7 properties_deferred_l List of the properties with deferred expansion (e.g. function), accumulating on the left side.408 # @param 8 properties_deferred_r List of the properties with deferred expansion (e.g. function), accumulating on the right side.409 define fn_inherit410 src_prefix := $(2)411 properties := $(3)412 properties_now_l := $(4)413 properties_now_r := $(5)414 properties_deferred := $(6)415 properties_deferred_l := $(7)416 properties_deferred_r := $(8)417 $(foreach trg, $(1),$(eval $(value def_inherit)))418 endef419 420 592 421 593 … … 493 665 494 666 # Drop duplicate values. 667 # WARNING! These list might not include keywords only involved in inheritance. 495 668 _BLD_TYPES := $(sort $(_BLD_TYPES)) 496 669 _BLD_TARGETS := $(sort $(_BLD_TARGETS)) … … 498 671 _BLD_CPUS := $(sort $(_BLD_CPUS)) 499 672 500 # Construct all the possible keywords. 501 _KEYWORDS := $(_BLD_TYPES) $(_BLD_TARGETS) $(_BLD_ARCHES) $(_BLD_CPUS) \ 502 $(foreach bld_trg,$(_BLD_TARGETS),$(addprefix $(bld_trg).,$(_BLD_ARCHES))) 503 504 # Look for keywords which extends others and order them. 505 _KEYWORDS_ORDERED := 673 ## Look for keywords which extends others and order them. 674 # @param keyword 675 # @param prefix 676 # @param valid 506 677 define def_keyword_ordering 678 # Check for EXTENDS, fix and validate it if found. 507 679 src := $(strip $($(prefix)_$(keyword)_EXTENDS)) 508 680 ifneq ($(src),) 509 681 ifndef $(prefix)_$(keyword)_EXTENDS_STATUS_ 510 $(prefix)_$(keyword)_EXTENDS_STATUS_ := 0511 512 # Validate src.513 682 ifn1of ($(src), $(valid)) 514 683 $(error kBuild: $(keyword) tries to extend unknown keyword '$(src)'! (known = $(valid))) 515 684 endif 516 685 517 # Recursivly process the parent (src) if it's inherting from somebody too. 518 # If it isn't, then we'll have to add it to the ordered keyword list here. 686 # Recursivly process the parent (src). 519 687 ifneq ($($(prefix)_$(src)_EXTENDS_STATUS_),42) 520 ifneq ($($(prefix)_$(src)_EXTENDS_STATUS_),) 521 $(error kBuild: Keyword inheritance loop! keyword=$(src) $(prefix)_$(src)_EXTENDS_STATUS_=$($(prefix)_$(src)_EXTENDS_STATUS_)) 522 endif 523 ifdef $(prefix)_$(src)_EXTENDS 524 # 'foreach' will create 'keyword' in a new variable context hiding 525 # out current variable. 'src' OTOH will be overwritten. 526 $(foreach keyword, $(src), $(eval $(value def_keyword_ordering))) 527 src := $(strip $($(keyword)_EXTENDS)) 528 else 529 # Add it to the list and mark it as done. 530 _KEYWORDS_ORDERED += $(src) 531 $(prefix)_$(src)_EXTENDS_STATUS_ := 42 532 endif 688 $(prefix)_$(keyword)_EXTENDS_STATUS_ := 0 689 # 'foreach' will create 'keyword' in a new variable context hiding 690 # out current variable. 'src' OTOH will be overwritten. 691 $(foreach keyword, $(src), $(eval $(value def_keyword_ordering))) 692 src := $(strip $($(prefix)_$(keyword)_EXTENDS)) 533 693 endif 534 694 535 # Check EXTENDS_BY.536 by = $(strip $($( trg)_EXTENDS_BY))695 # Check and strip EXTENDS_BY. 696 by = $(strip $($(prefix)_$(keyword)_EXTENDS_BY)) 537 697 ifeq ($(by),) 538 698 by = overriding … … 541 701 endif 542 702 703 # Update the attributes with stripped 704 $(prefix)_$(keyword)_EXTENDS_BY := $(by) 705 $(prefix)_$(keyword)_EXTENDS := $(src) 706 543 707 # Add it to the list and mark it as done. 544 _KEYWORDS_ORDERED += $(keyword) 708 _KEYWORDS_EXTENDS += $(keyword) 709 _KEYWORDS_PREFIX += $(prefix) 545 710 $(prefix)_$(keyword)_EXTENDS_STATUS_ := 42 546 711 else … … 550 715 endif 551 716 endif 552 endif 553 554 endef 717 else 718 # Add it to the ordered list and mark it as done. 719 _KEYWORDS_ORDERED += $(keyword) 720 $(prefix)_$(src)_EXTENDS_STATUS_ := 42 721 endif 722 endef # def_keyword_ordering 723 724 # Look for keywords which extends others and their parents, and from this 725 # construct two lists. 726 _KEYWORDS_ORDERED := 727 _KEYWORDS_EXTENDS := 728 _KEYWORDS_PREFIX := 555 729 556 730 prefix := BLD_TYPE 557 731 valid := $(KBUILD_BLD_TYPES) 558 $(foreach keyword, $(_BLD_TYPES) , $(eval $(value def_keyword_ordering))) 732 $(foreach keyword, $(_BLD_TYPES) , $(eval $(value def_keyword_ordering))) 733 734 prefix := BLD_TRG 735 valid := $(KBUILD_OSES) 736 $(foreach keyword, $(_BLD_TARGETS), $(eval $(value def_keyword_ordering))) 559 737 560 738 prefix := BLD_ARCH 561 739 valid := $(KBUILD_ARCHES) 562 $(foreach keyword, $(_BLD_ARCHES) , $(eval $(value def_keyword_ordering)))740 $(foreach keyword, $(_BLD_ARCHES) , $(eval $(value def_keyword_ordering))) 563 741 564 742 prefix := BLD_CPU 565 743 valid := $(KBUILD_CPUS) 566 $(foreach keyword, $(_BLD_CPUS) , $(eval $(value def_keyword_ordering))) 567 568 # Update _KEYWORDS to the ordered list making sure parent keywords are included too. 569 _KEYWORDS := $(_KEYWORDS_ORDERED) $(filter-out $(_KEYWORDS_ORDERED), $(_KEYWORDS)) 744 $(foreach keyword, $(_BLD_CPUS) , $(eval $(value def_keyword_ordering))) 745 746 ## @todo Inherit bld_trg.bld_arch for too? 747 748 # Construct all the possible keywords. 749 _KEYWORDS := $(_KEYWORDS_ORDERED) $(_KEYWORDS_EXTENDS) \ 750 $(foreach bld_trg,$(_BLD_TARGETS),$(addprefix $(bld_trg).,$(_BLD_ARCHES))) 570 751 571 752 ifdef KBUILD_PROFILE_SELF … … 591 772 properties_deferred_r := 592 773 593 ## combines the specified properties $(1) with the $(_KEYWORDS).594 _COMB_KEY_PROP = $(1) $(foreach keyword,$(_KEYWORDS), $(addsuffix .$(keyword), $(1)))595 596 774 # Fetches. 597 properties := $( call _COMB_KEY_PROP,$(PROPS_FETCHES_SINGLE))598 properties_now_l := $( call _COMB_KEY_PROP,$(PROPS_FETCHES_ACCUMULATE_L))599 properties_now_r := $( call _COMB_KEY_PROP,$(PROPS_FETCHES_ACCUMULATE_R))600 properties_deferred := $( call _COMB_KEY_PROP,$(PROPS_FETCHES_DEFERRED))775 properties := $(PROPS_FETCHES_SINGLE) 776 properties_now_l := $(PROPS_FETCHES_ACCUMULATE_L) 777 properties_now_r := $(PROPS_FETCHES_ACCUMULATE_R) 778 properties_deferred := $(PROPS_FETCHES_DEFERRED) 601 779 $(foreach trg, $(_ALL_FETCHES),$(eval $(value def_inherit))) 602 780 603 781 ## Patches. - not implemented yet. 604 #properties := $( call _COMB_KEY_PROP,$(PROPS_PATCHES_SINGLE))605 #properties_now_l := $( call _COMB_KEY_PROP,$(PROPS_PATCHES_ACCUMULATE_L))606 #properties_now_r := $( call _COMB_KEY_PROP,$(PROPS_PATCHES_ACCUMULATE_R))607 #properties_deferred := $( call _COMB_KEY_PROP,$(PROPS_PATCHES_DEFERRED))782 #properties := $(PROPS_PATCHES_SINGLE) 783 #properties_now_l := $(PROPS_PATCHES_ACCUMULATE_L) 784 #properties_now_r := $(PROPS_PATCHES_ACCUMULATE_R) 785 #properties_deferred := $(PROPS_PATCHES_DEFERRED) 608 786 #$(foreach trg, $(_ALL_PATCHES),$(eval $(value def_inherit))) 609 787 610 788 # Programs and build programs. 611 properties := $( call _COMB_KEY_PROP,$(PROPS_PROGRAMS_SINGLE))612 properties_now_l := $( call _COMB_KEY_PROP,$(PROPS_PROGRAMS_ACCUMULATE_L))613 properties_now_r := $( call _COMB_KEY_PROP,$(PROPS_PROGRAMS_ACCUMULATE_R))614 properties_deferred := $( call _COMB_KEY_PROP,$(PROPS_PROGRAMS_DEFERRED))789 properties := $(PROPS_PROGRAMS_SINGLE) 790 properties_now_l := $(PROPS_PROGRAMS_ACCUMULATE_L) 791 properties_now_r := $(PROPS_PROGRAMS_ACCUMULATE_R) 792 properties_deferred := $(PROPS_PROGRAMS_DEFERRED) 615 793 $(foreach trg, $(_ALL_BLDPROGS) $(_ALL_PROGRAMS),$(eval $(value def_inherit))) 616 794 617 795 # Libraries and import libraries. 618 properties := $( call _COMB_KEY_PROP,$(PROPS_LIBRARIES_SINGLE))619 properties_now_l := $( call _COMB_KEY_PROP,$(PROPS_LIBRARIES_ACCUMULATE_L))620 properties_now_r := $( call _COMB_KEY_PROP,$(PROPS_LIBRARIES_ACCUMULATE_R))621 properties_deferred := $( call _COMB_KEY_PROP,$(PROPS_LIBRARIES_DEFERRED))796 properties := $(PROPS_LIBRARIES_SINGLE) 797 properties_now_l := $(PROPS_LIBRARIES_ACCUMULATE_L) 798 properties_now_r := $(PROPS_LIBRARIES_ACCUMULATE_R) 799 properties_deferred := $(PROPS_LIBRARIES_DEFERRED) 622 800 if1of ($(BUILD_TARGET), nt os2 win) 623 801 $(foreach trg, $(_ALL_LIBRARIES) $(_ALL_IMPORT_LIBS),$(eval $(value def_inherit))) … … 627 805 628 806 # DLLs. 629 properties := $( call _COMB_KEY_PROP,$(PROPS_DLLS_SINGLE))630 properties_now_l := $( call _COMB_KEY_PROP,$(PROPS_DLLS_ACCUMULATE_L))631 properties_now_r := $( call _COMB_KEY_PROP,$(PROPS_DLLS_ACCUMULATE_R))632 properties_deferred := $( call _COMB_KEY_PROP,$(PROPS_DLLS_DEFERRED))807 properties := $(PROPS_DLLS_SINGLE) 808 properties_now_l := $(PROPS_DLLS_ACCUMULATE_L) 809 properties_now_r := $(PROPS_DLLS_ACCUMULATE_R) 810 properties_deferred := $(PROPS_DLLS_DEFERRED) 633 811 if1of ($(BUILD_TARGET), nt os2 win) 634 812 $(foreach trg, $(_ALL_DLLS),$(eval $(value def_inherit))) … … 638 816 639 817 # System modules. 640 properties := $( call _COMB_KEY_PROP,$(PROPS_SYSMODS_SINGLE))641 properties_now_l := $( call _COMB_KEY_PROP,$(PROPS_SYSMODS_ACCUMULATE_L))642 properties_now_r := $( call _COMB_KEY_PROP,$(PROPS_SYSMODS_ACCUMULATE_R))643 properties_deferred := $( call _COMB_KEY_PROP,$(PROPS_SYSMODS_DEFERRED))818 properties := $(PROPS_SYSMODS_SINGLE) 819 properties_now_l := $(PROPS_SYSMODS_ACCUMULATE_L) 820 properties_now_r := $(PROPS_SYSMODS_ACCUMULATE_R) 821 properties_deferred := $(PROPS_SYSMODS_DEFERRED) 644 822 $(foreach trg, $(_ALL_SYSMODS),$(eval $(value def_inherit))) 645 823 646 824 # Installs. 647 properties := $( call _COMB_KEY_PROP,$(PROPS_INSTALLS_SINGLE))648 properties_now_l := $( call _COMB_KEY_PROP,$(PROPS_INSTALLS_ACCUMULATE_L))649 properties_now_r := $( call _COMB_KEY_PROP,$(PROPS_INSTALLS_ACCUMULATE_R))650 properties_deferred := $( call _COMB_KEY_PROP,$(PROPS_INSTALLS_DEFERRED))825 properties := $(PROPS_INSTALLS_SINGLE) 826 properties_now_l := $(PROPS_INSTALLS_ACCUMULATE_L) 827 properties_now_r := $(PROPS_INSTALLS_ACCUMULATE_R) 828 properties_deferred := $(PROPS_INSTALLS_DEFERRED) 651 829 $(foreach trg, $(_ALL_INSTALLS),$(eval $(value def_inherit))) 652 830 … … 673 851 properties_now_l := 674 852 properties_now_r := 675 properties_deferred := $( call _COMB_KEY_PROP,$(PROPS_SINGLE) $(PROPS_DEFERRED))676 properties_deferred_l := $( call _COMB_KEY_PROP,$(PROPS_ACCUMULATE_L))677 properties_deferred_r := $( call _COMB_KEY_PROP,$(PROPS_ACCUMULATE_R))853 properties_deferred := $(PROPS_SINGLE) $(PROPS_DEFERRED) 854 properties_deferred_l := $(PROPS_ACCUMULATE_L) 855 properties_deferred_r := $(PROPS_ACCUMULATE_R) 678 856 $(foreach trg, $(addprefix TEMPLATE_,$(_TEMPLATES)),$(eval $(value def_inherit))) 679 857 … … 878 1056 ifdef KBUILD_PROFILE_SELF 879 1057 _KBUILD_TS_NOW := $(nanots ) 880 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done common inheritance)1058 $(info prof: $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_HEADER_START)) - $(int-sub $(_KBUILD_TS_NOW), $(_KBUILD_TS_PREV)) - done template/target expansion) 881 1059 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW) 882 1060 endif
Note:
See TracChangeset
for help on using the changeset viewer.