Changeset 827 in kBuild
- Timestamp:
- Feb 3, 2007 1:08:29 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r782 r827 110 110 _SYSMODS := 111 111 _INSTALLS := 112 _INSTALLS_FILES := 112 113 _INSTALLS_DIRS := 113 114 _OTHERS := … … 708 709 $($(srcname)_DEPS)\ 709 710 $($(target)_DEPS) 711 orderdeps := \ 712 $($(target)_$(source)_ORDERDEPS)\ 713 $($(target)_$(srcname)_ORDERDEPS)\ 714 $($(source)_ORDERDEPS)\ 715 $($(srcname)_ORDERDEPS)\ 716 $($(target)_ORDERDEPS) 710 717 md5 := $(firstword \ 711 718 $($(target)_$(source)_MD5)\ … … 774 781 $(target)_$(srcname)_FETCH_OUTPUT_ := $(TOOL_$(tool)_FETCH_OUTPUT) 775 782 $(target)_$(srcname)_FETCH_DEPEND_ := $(TOOL_$(tool)_FETCH_DEPEND) $(deps) 776 $(target)_$(srcname)_FETCH_DEPORD_ := $(TOOL_$(tool)_FETCH_DEPORD) $(dirdep) 783 $(target)_$(srcname)_FETCH_DEPORD_ := $(TOOL_$(tool)_FETCH_DEPORD) $(dirdep) $(orderdeps) 777 784 778 785 # generate the fetch rule. … … 832 839 $(target)_$(srcname)_UNPACK_OUTPUT_ := $(TOOL_$(tool)_UNPACK_OUTPUT) 833 840 $(target)_$(srcname)_UNPACK_DEPEND_ := $(TOOL_$(tool)_UNPACK_DEPEND) $(deps) 834 $(target)_$(srcname)_UNPACK_DEPORD_ := $(TOOL_$(tool)_UNPACK_DEPORD) $(dirdep) 841 $(target)_$(srcname)_UNPACK_DEPORD_ := $(TOOL_$(tool)_UNPACK_DEPORD) $(dirdep) $(orderdeps) 835 842 836 843 # generate the fetch rule. … … 1123 1130 $(eval $(def_link_install_rule)) 1124 1131 1125 _INSTALLS += $(INSTARGET_$(target))1132 _INSTALLS_FILES += $(INSTARGET_$(target)) 1126 1133 1127 1134 ifdef KBUILD_DO_AUTO_INSTALL … … 1213 1220 $($(target)_OBJS_) 1214 1221 dirdep := $(call DIRDEP,$(dir $(out))) 1215 ## @todo fix dependencies on makefiles an such1216 1222 deps := $($(target)_DEPS) 1223 orderdeps := $($(target)_ORDERDEPS) 1217 1224 1218 1225 # Adjust paths if we got a default path. … … 1220 1227 objs := $(call abspathex,$(objs),$(defpath)) 1221 1228 deps := $(call abspathex,$(deps),$(defpath)) 1229 orderdeps := $(call abspathex,$(orderdeps),$(defpath)) 1222 1230 othersrc := $(call abspathex,$(othersrc),$(defpath)) 1223 1231 endif … … 1252 1260 $(target)_OUTPUT_ := $(TOOL_$(tool)_LINK_LIBRARY_OUTPUT) 1253 1261 $(target)_DEPEND_ := $(TOOL_$(tool)_LINK_LIBRARY_DEPEND) $(deps) $(objs) 1254 $(target)_DEPORD_ := $(TOOL_$(tool)_LINK_LIBRARY_DEPORD) $(dirdep) 1262 $(target)_DEPORD_ := $(TOOL_$(tool)_LINK_LIBRARY_DEPORD) $(dirdep) $(orderdeps) 1255 1263 1256 1264 # generate the link rule. … … 1429 1437 $(TOOL_$(tool)_LIBPATH) 1430 1438 dirdep := $(call DIRDEP,$(dir $(out))) 1431 ## @todo fix dependencies1432 1439 deps := $($(target)_DEPS) 1440 orderdeps := $($(target)_ORDERDEPS) 1433 1441 1434 1442 # Adjust paths if we got a default path. … … 1437 1445 objs := $(call abspathex,$(objs),$(defpath)) 1438 1446 deps := $(call abspathex,$(deps),$(defpath)) 1447 orderdeps := $(call abspathex,$(orderdeps),$(defpath)) 1439 1448 othersrc := $(call abspathex,$(othersrc),$(defpath)) 1440 1449 # libs are not subject to this because of the the -l<lib> stuff. Use $(<target>_PATH)/lib if relative to current dir! … … 1442 1451 1443 1452 ## @todo this stuff can't be working. 1444 custom_pre 1453 custom_pre := $(strip $(firstword \ 1445 1454 $($(target)_CUSTOM_PRE.$(bld_trg).$(bld_trg_arch))\ 1446 1455 $($(target)_CUSTOM_PRE.$(bld_trg).$(bld_type))\ … … 1454 1463 $(CUSTOM_PRE)\ 1455 1464 )) 1456 custom_post 1465 custom_post := $(strip $(firstword \ 1457 1466 $($(target)_CUSTOM_POST.$(bld_trg).$(bld_trg_arch))\ 1458 1467 $($(target)_CUSTOM_POST.$(bld_trg).$(bld_type))\ … … 1513 1522 $(target)_OUTPUT_ := $(TOOL_$(tool)_$(tool_do)_OUTPUT) 1514 1523 $(target)_DEPEND_ := $(TOOL_$(tool)_$(tool_do)_DEPEND) $(deps) $(objs) 1515 $(target)_DEPORD_ := $(TOOL_$(tool)_$(tool_do)_DEPORD) $(dirdep) 1524 $(target)_DEPORD_ := $(TOOL_$(tool)_$(tool_do)_DEPORD) $(dirdep) $(orderdeps) 1516 1525 1517 1526 # generate the link rule. … … 1523 1532 _OUT_FILES += $($(target)_OUTPUT_) $(out) 1524 1533 _CLEAN_FILES += $($(target)_CLEAN) 1525 _INSTALLS += $(INSTARGET_$(target))1534 _INSTALLS_FILES += $(INSTARGET_$(target)) 1526 1535 1527 1536 endef … … 1769 1778 # _INSTFUN 1770 1779 ifdef $(symlnk)_INSTFUN 1771 instfun := $(symlnk)_INSTFUN 1772 else 1773 ifdef $(target)_INSTFUN 1780 instfun := $(symlnk)_INSTFUN 1781 else ifdef $(target)_INSTFUN 1774 1782 instfun := $(target)_INSTFUN 1775 1783 else 1776 instfun := _INSTALL_FILE 1777 endif 1784 instfun := _INSTALL_FILE 1778 1785 endif 1779 1786 … … 1781 1788 ifdef $(symlnk)_INST 1782 1789 inst := $(patsubst %/,%,$($(symlnk)_INST))/$(dir $(symlnk)) 1790 else ifdef $(target)_INST 1791 inst := $(patsubst %/,%,$($(target)_INST))/$(dir $(symlnk)) 1783 1792 else 1784 ifdef $(target)_INST 1785 inst := $(patsubst %/,%,$($(target)_INST))/$(dir $(symlnk)) 1786 else 1787 inst := $(dir $(symlnk)) 1788 endif 1793 inst := $(dir $(symlnk)) 1789 1794 endif 1790 1795 … … 1821 1826 ifdef $(directory)_INST 1822 1827 inst := $(PATH_INS)/$(patsubst %/,%,$($(directory)_INST)) 1828 else ifdef $(target)_INST 1829 inst := $(PATH_INS)/$(patsubst %/,%,$($(target)_INST)) 1823 1830 else 1824 ifdef $(target)_INST 1825 inst := $(PATH_INS)/$(patsubst %/,%,$($(target)_INST)) 1826 else 1827 inst := $(PATH_INS) 1828 endif 1831 inst := $(PATH_INS) 1829 1832 endif 1830 1833 … … 1878 1881 bld_trg_cpu := $(firstword $($(target)_BLD_TRG_CPU) $(BUILD_TARGET_CPU)) 1879 1882 1880 INSTARGET_$(target) := 1883 INSTARGET_$(target) := $($(target)_GOALS) 1881 1884 INSTARGET_DIRS_$(target) := 1882 1885 … … 1890 1893 $(eval $(value def_install_symlink))) 1891 1894 1892 _INSTALLS += $(INSTARGET_$(target)) $($(target)_GOALS) 1895 # the collection target 1896 TARGET_$(target) := $(PATH_TARGET)/$(target).ins 1897 $(TARGET_$(target)): $(INSTARGET_$(target)) | $(INSTARGET_DIRS_$(target)) 1898 @$(QUIET2)$(APPEND) $@ 1899 1900 $(target): $(TARGET_$(target)) 1901 1902 _INSTALLS += $(TARGET_$(target)) 1903 _INSTALLS_FILES += $(INSTARGET_$(target)) 1893 1904 _INSTALLS_DIRS += $(INSTARGET_DIRS_$(target)) 1894 1905 endef … … 1913 1924 # DIRECTORIES 1914 1925 # 1915 _DIR_ALL := $(sort $(addsuffix /,$(patsubst %/,%,$(_DIRS))) $(dir $(_OUT_FILES) $(_OBJS) $(_INSTALLS )))1926 _DIR_ALL := $(sort $(addsuffix /,$(patsubst %/,%,$(_DIRS))) $(dir $(_OUT_FILES) $(_OBJS) $(_INSTALLS_FILES))) 1916 1927 $(foreach directory,$(_INSTALLS_DIRS), $(eval _DIR_ALL := $(filter-out $(directory),$(_DIR_ALL)))) 1917 1928 … … 2078 2089 # @todo make this a non-default pass! 2079 2090 uninstall: 2080 $(RM) -f $(_INSTALLS )2091 $(RM) -f $(_INSTALLS_FILES) 2081 2092 2082 2093 install: pass_installs … … 2091 2102 sysmods: $(_SYSMODS) 2092 2103 others: $(_OTHERS) 2093 installs: $(_INSTALLS _DIRS) $(_INSTALLS)2104 installs: $(_INSTALLS) 2094 2105 2095 2106 -
trunk/src/gmake/kbuild.c
r813 r827 1335 1335 struct variable *pOutBase = kbuild_get_object_base(pTarget, pSource, "outbase"); 1336 1336 struct variable *pObjSuff = kbuild_get_object_suffix(pTarget, pSource, pTool, pType, pBldTrg, pBldTrgArch, "objsuff"); 1337 struct variable *pDefs, *pIncs, *pFlags, *pDeps, *p DirDep, *pDep, *pVar, *pOutput;1337 struct variable *pDefs, *pIncs, *pFlags, *pDeps, *pOrderDeps, *pDirDep, *pDep, *pVar, *pOutput; 1338 1338 struct variable *pObj = kbuild_set_object_name_and_dep_and_dirdep_and_PATH_target_source(pTarget, pSource, pOutBase, pObjSuff, "obj", &pDep, &pDirDep); 1339 1339 char *pszDstVar, *pszDst, *pszSrcVar, *pszSrc, *pszVal, *psz; … … 1350 1350 if (pDefPath && !pDefPath->value_length) 1351 1351 pDefPath = NULL; 1352 pDefs = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu, NULL, 1353 "DEFS", "defs", 1/* left-to-right */); 1354 pIncs = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu, pDefPath, 1355 "INCS", "incs", -1/* right-to-left */); 1356 pFlags = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu, NULL, 1357 "FLAGS", "flags", 1/* left-to-right */); 1358 pDeps = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu, pDefPath, 1359 "DEPS", "deps", 1/* left-to-right */); 1352 pDefs = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu, NULL, 1353 "DEFS", "defs", 1/* left-to-right */); 1354 pIncs = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu, pDefPath, 1355 "INCS", "incs", -1/* right-to-left */); 1356 pFlags = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu, NULL, 1357 "FLAGS", "flags", 1/* left-to-right */); 1358 pDeps = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu, pDefPath, 1359 "DEPS", "deps", 1/* left-to-right */); 1360 pOrderDeps = kbuild_collect_source_prop(pTarget, pSource, pTool, &Sdks, pType, pBldType, pBldTrg, pBldTrgArch, pBldTrgCpu, pDefPath, 1361 "ORDERDEPS", "orderdeps", 1/* left-to-right */); 1360 1362 1361 1363 /* … … 1429 1431 memcpy(pszDst, "_DEPORD_", sizeof("_DEPORD_")); 1430 1432 pVar = kbuild_get_recursive_variable(pszSrcVar); 1431 psz = pszVal = xmalloc(pVar->value_length + 1 + pDirDep->value_length + 1 );1433 psz = pszVal = xmalloc(pVar->value_length + 1 + pDirDep->value_length + 1 + pOrderDeps->value_length + 1); 1432 1434 memcpy(psz, pVar->value, pVar->value_length); psz += pVar->value_length; 1433 1435 *psz++ = ' '; 1434 memcpy(psz, pDirDep->value, pDirDep->value_length + 1); 1436 memcpy(psz, pDirDep->value, pDirDep->value_length); psz += pDirDep->value_length; 1437 *psz++ = ' '; 1438 memcpy(psz, pOrderDeps->value, pOrderDeps->value_length + 1); 1435 1439 do_variable_definition(NILF, pszDstVar, pszVal, o_file, f_simple, 0 /* !target_var */); 1436 1440 free(pszVal);
Note:
See TracChangeset
for help on using the changeset viewer.