- Timestamp:
- Mar 29, 2007 2:58:33 AM (18 years ago)
- Location:
- trunk/kBuild
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r854 r859 564 564 endef 565 565 566 _SDKS := $(sort $(_SDKS)) 566 _SDKS := $(sort $(_SDKS)) 567 567 $(foreach sdk, $(_SDKS), $(eval $(value def_sdks_include_one))) 568 568 … … 1180 1180 $$(call MSG_COMPILE,$(target),$(source),$$@,$(type)) 1181 1181 $$(QUIET)$$(RM) -f $(dep) $(obj) $($(target)_$(source)_OUTPUT_) 1182 $(custom_pre)1183 1182 1184 1183 $($(target)_$(source)_CMDS_) 1185 1184 1186 $( custom_post)1185 $($(target)_$(source)_CMDS_) 1187 1186 ifndef NO_COMPILE_CMDS_DEPS 1188 1187 $$(QUIET2)$$(APPEND) "$(dep)" … … 1226 1225 $$(call MSG_LINK,$(target),$$@,$(tool_do)) 1227 1226 $$(QUIET)$$(RM) -f $(dep) $(out) $($(target)_OUTPUT_) 1228 $(custom_pre)1229 1227 1230 1228 $($(target)_CMDS_) 1231 1229 1232 $(custom_post)1233 1230 ifndef NO_LINK_CMDS_DEPS 1234 1231 $$(QUIET2)$$(APPEND) "$(dep)" 'define $(target)_CMDS_PREV_' … … 1423 1420 endif 1424 1421 1422 1423 # Custom pre-link actions. 1424 ifdef $(target)_PRE_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type) 1425 pre_cmds := $($(target)_PRE_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type)) 1426 else ifdef $(target)_PRE_CMDS.$(bld_trg).$(bld_trg_arch) 1427 pre_cmds := $($(target)_PRE_CMDS.$(bld_trg).$(bld_trg_arch)) 1428 else ifdef $(target)_PRE_CMDS.$(bld_trg).$(bld_type) 1429 pre_cmds := $($(target)_PRE_CMDS.$(bld_trg).$(bld_type)) 1430 else ifdef $(target)_PRE_CMDS.$(bld_trg_arch) 1431 pre_cmds := $($(target)_PRE_CMDS.$(bld_trg_arch)) 1432 else ifdef $(target)_PRE_CMDS.$(bld_trg) 1433 pre_cmds := $($(target)_PRE_CMDS.$(bld_trg)) 1434 else ifdef $(target)_PRE_CMDS.$(bld_type) 1435 pre_cmds := $($(target)_PRE_CMDS.$(bld_type)) 1436 else ifdef $(target)_PRE_CMDS 1437 pre_cmds := $($(target)_PRE_CMDS) 1438 else ifdef PRE_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type) 1439 pre_cmds := $(PRE_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type)) 1440 else ifdef PRE_CMDS.$(bld_trg).$(bld_trg_arch) 1441 pre_cmds := $(PRE_CMDS.$(bld_trg).$(bld_trg_arch)) 1442 else ifdef PRE_CMDS.$(bld_trg).$(bld_type) 1443 pre_cmds := $(PRE_CMDS.$(bld_trg).$(bld_type)) 1444 else ifdef PRE_CMDS.$(bld_trg_arch) 1445 pre_cmds := $(PRE_CMDS.$(bld_trg_arch)) 1446 else ifdef PRE_CMDS.$(bld_trg) 1447 pre_cmds := $(PRE_CMDS.$(bld_trg)) 1448 else ifdef PRE_CMDS.$(bld_type) 1449 pre_cmds := $(PRE_CMDS.$(bld_type)) 1450 else 1451 pre_cmds := $(PRE_CMDS) 1452 endif 1453 1454 # Custom post-link actions. 1455 ifdef $(target)_POST_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type) 1456 post_cmds := $($(target)_POST_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type)) 1457 else ifdef $(target)_POST_CMDS.$(bld_trg).$(bld_trg_arch) 1458 post_cmds := $($(target)_POST_CMDS.$(bld_trg).$(bld_trg_arch)) 1459 else ifdef $(target)_POST_CMDS.$(bld_trg).$(bld_type) 1460 post_cmds := $($(target)_POST_CMDS.$(bld_trg).$(bld_type)) 1461 else ifdef $(target)_POST_CMDS.$(bld_trg_arch) 1462 post_cmds := $($(target)_POST_CMDS.$(bld_trg_arch)) 1463 else ifdef $(target)_POST_CMDS.$(bld_trg) 1464 post_cmds := $($(target)_POST_CMDS.$(bld_trg)) 1465 else ifdef $(target)_POST_CMDS.$(bld_type) 1466 post_cmds := $($(target)_POST_CMDS.$(bld_type)) 1467 else ifdef $(target)_POST_CMDS 1468 post_cmds := $($(target)_POST_CMDS) 1469 else ifdef POST_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type) 1470 post_cmds := $(POST_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type)) 1471 else ifdef POST_CMDS.$(bld_trg).$(bld_trg_arch) 1472 post_cmds := $(POST_CMDS.$(bld_trg).$(bld_trg_arch)) 1473 else ifdef POST_CMDS.$(bld_trg).$(bld_type) 1474 post_cmds := $(POST_CMDS.$(bld_trg).$(bld_type)) 1475 else ifdef POST_CMDS.$(bld_trg_arch) 1476 post_cmds := $(POST_CMDS.$(bld_trg_arch)) 1477 else ifdef POST_CMDS.$(bld_trg) 1478 post_cmds := $(POST_CMDS.$(bld_trg)) 1479 else ifdef POST_CMDS.$(bld_type) 1480 post_cmds := $(POST_CMDS.$(bld_type)) 1481 else 1482 post_cmds := $(POST_CMDS) 1483 endif 1484 1425 1485 # dependency file 1426 1486 dep := $(out)$(SUFF_DEP) … … 1450 1510 # call the tool 1451 1511 $(target)_CMDS_ := $(TOOL_$(tool)_LINK_LIBRARY_CMDS) 1512 ifneq ($(pre_cmds),) 1513 $(target)_CMDS_ := $(TAB)$(pre_cmds)$(NL)$(TAB)$($(target)_CMDS_) 1514 endif 1515 ifneq ($(post_cmds),) 1516 $(target)_CMDS_ := $($(target)_CMDS_)$(NL)$(TAB)$(post_cmds) 1517 endif 1452 1518 $(target)_OUTPUT_ := $(TOOL_$(tool)_LINK_LIBRARY_OUTPUT) 1453 1519 $(target)_DEPEND_ := $(TOOL_$(tool)_LINK_LIBRARY_DEPEND) $(deps) $(objs) … … 1458 1524 1459 1525 # installing and globals 1526 $(eval $(value def_target_install_pluss)) 1527 endef 1528 1529 # Process libraries 1460 1530 definst := $(PATH_LIB) 1461 1531 typevar := _LIBS 1462 $(eval $(value def_target_install_pluss))1463 endef1464 1465 # Process libraries1466 1532 tool_do := LINK_LIBRARY 1467 1533 mode := 0644 … … 1642 1708 endif 1643 1709 1644 ## @todo this stuff can't be working. 1645 custom_pre := $(strip $(firstword \ 1646 $($(target)_CUSTOM_PRE.$(bld_trg).$(bld_trg_arch))\ 1647 $($(target)_CUSTOM_PRE.$(bld_trg).$(bld_type))\ 1648 $($(target)_CUSTOM_PRE.$(bld_trg))\ 1649 $($(target)_CUSTOM_PRE.$(bld_type))\ 1650 $($(target)_CUSTOM_PRE)\ 1651 $(CUSTOM_PRE.$(bld_trg).$(bld_trg_arch))\ 1652 $(CUSTOM_PRE.$(bld_trg).$(bld_type))\ 1653 $(CUSTOM_PRE.$(bld_trg))\ 1654 $(CUSTOM_PRE.$(bld_type))\ 1655 $(CUSTOM_PRE)\ 1656 )) 1657 custom_post := $(strip $(firstword \ 1658 $($(target)_CUSTOM_POST.$(bld_trg).$(bld_trg_arch))\ 1659 $($(target)_CUSTOM_POST.$(bld_trg).$(bld_type))\ 1660 $($(target)_CUSTOM_POST.$(bld_trg))\ 1661 $($(target)_CUSTOM_POST.$(bld_type))\ 1662 $($(target)_CUSTOM_POST)\ 1663 $(CUSTOM_POST.$(bld_trg).$(bld_trg_arch))\ 1664 $(CUSTOM_POST.$(bld_trg).$(bld_type))\ 1665 $(CUSTOM_POST.$(bld_trg))\ 1666 $(CUSTOM_POST.$(bld_type))\ 1667 $(CUSTOM_POST)\ 1668 )) 1710 # Custom pre-link actions. 1711 ifdef $(target)_PRE_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type) 1712 pre_cmds := $($(target)_PRE_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type)) 1713 else ifdef $(target)_PRE_CMDS.$(bld_trg).$(bld_trg_arch) 1714 pre_cmds := $($(target)_PRE_CMDS.$(bld_trg).$(bld_trg_arch)) 1715 else ifdef $(target)_PRE_CMDS.$(bld_trg).$(bld_type) 1716 pre_cmds := $($(target)_PRE_CMDS.$(bld_trg).$(bld_type)) 1717 else ifdef $(target)_PRE_CMDS.$(bld_trg_arch) 1718 pre_cmds := $($(target)_PRE_CMDS.$(bld_trg_arch)) 1719 else ifdef $(target)_PRE_CMDS.$(bld_trg) 1720 pre_cmds := $($(target)_PRE_CMDS.$(bld_trg)) 1721 else ifdef $(target)_PRE_CMDS.$(bld_type) 1722 pre_cmds := $($(target)_PRE_CMDS.$(bld_type)) 1723 else ifdef $(target)_PRE_CMDS 1724 pre_cmds := $($(target)_PRE_CMDS) 1725 else ifdef PRE_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type) 1726 pre_cmds := $(PRE_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type)) 1727 else ifdef PRE_CMDS.$(bld_trg).$(bld_trg_arch) 1728 pre_cmds := $(PRE_CMDS.$(bld_trg).$(bld_trg_arch)) 1729 else ifdef PRE_CMDS.$(bld_trg).$(bld_type) 1730 pre_cmds := $(PRE_CMDS.$(bld_trg).$(bld_type)) 1731 else ifdef PRE_CMDS.$(bld_trg_arch) 1732 pre_cmds := $(PRE_CMDS.$(bld_trg_arch)) 1733 else ifdef PRE_CMDS.$(bld_trg) 1734 pre_cmds := $(PRE_CMDS.$(bld_trg)) 1735 else ifdef PRE_CMDS.$(bld_type) 1736 pre_cmds := $(PRE_CMDS.$(bld_type)) 1737 else 1738 pre_cmds := $(PRE_CMDS) 1739 endif 1740 1741 # Custom post-link actions. 1742 ifdef $(target)_POST_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type) 1743 post_cmds := $($(target)_POST_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type)) 1744 else ifdef $(target)_POST_CMDS.$(bld_trg).$(bld_trg_arch) 1745 post_cmds := $($(target)_POST_CMDS.$(bld_trg).$(bld_trg_arch)) 1746 else ifdef $(target)_POST_CMDS.$(bld_trg).$(bld_type) 1747 post_cmds := $($(target)_POST_CMDS.$(bld_trg).$(bld_type)) 1748 else ifdef $(target)_POST_CMDS.$(bld_trg_arch) 1749 post_cmds := $($(target)_POST_CMDS.$(bld_trg_arch)) 1750 else ifdef $(target)_POST_CMDS.$(bld_trg) 1751 post_cmds := $($(target)_POST_CMDS.$(bld_trg)) 1752 else ifdef $(target)_POST_CMDS.$(bld_type) 1753 post_cmds := $($(target)_POST_CMDS.$(bld_type)) 1754 else ifdef $(target)_POST_CMDS 1755 post_cmds := $($(target)_POST_CMDS) 1756 else ifdef POST_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type) 1757 post_cmds := $(POST_CMDS.$(bld_trg).$(bld_trg_arch).$(bld_type)) 1758 else ifdef POST_CMDS.$(bld_trg).$(bld_trg_arch) 1759 post_cmds := $(POST_CMDS.$(bld_trg).$(bld_trg_arch)) 1760 else ifdef POST_CMDS.$(bld_trg).$(bld_type) 1761 post_cmds := $(POST_CMDS.$(bld_trg).$(bld_type)) 1762 else ifdef POST_CMDS.$(bld_trg_arch) 1763 post_cmds := $(POST_CMDS.$(bld_trg_arch)) 1764 else ifdef POST_CMDS.$(bld_trg) 1765 post_cmds := $(POST_CMDS.$(bld_trg)) 1766 else ifdef POST_CMDS.$(bld_type) 1767 post_cmds := $(POST_CMDS.$(bld_type)) 1768 else 1769 post_cmds := $(POST_CMDS) 1770 endif 1669 1771 1670 1772 # installation targets … … 1712 1814 # call the tool 1713 1815 $(target)_CMDS_ := $(TOOL_$(tool)_$(tool_do)_CMDS) 1816 ifneq ($(pre_cmds),) 1817 $(target)_CMDS_ := $(TAB)$(pre_cmds)$(NL)$(TAB)$($(target)_CMDS_) 1818 endif 1819 ifneq ($(post_cmds),) 1820 $(target)_CMDS_ := $($(target)_CMDS_)$(NL)$(TAB)$(post_cmds) 1821 endif 1714 1822 $(target)_OUTPUT_ := $(TOOL_$(tool)_$(tool_do)_OUTPUT) 1715 1823 $(target)_DEPEND_ := $(TOOL_$(tool)_$(tool_do)_DEPEND) $(deps) $(objs) -
trunk/kBuild/header.kmk
r854 r859 549 549 # This list of non-accumulative target properties which are functions, 550 550 # and thus should not be expanded until the very last moment. 551 PROPS_DEFERRED := INSTFUN INSTALLER 551 PROPS_DEFERRED := INSTFUN INSTALLER PRE_CMDS POST_CMDS 552 552 553 553 ## PROPS_ACCUMULATE_R
Note:
See TracChangeset
for help on using the changeset viewer.