Changeset 148 in kBuild
- Timestamp:
- Sep 7, 2004 8:16:14 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r146 r148 112 112 $(TOOL) \ 113 113 )) 114 115 ## Removes the drive letter from a path (if it has one) 116 # @param $1 the path 117 no-drive=$(word $(words $(subst :, ,$(1))),$(subst :, ,$(1))) 118 119 ## Removes the root slash from a path (if it has one) 120 # @param $1 the path 121 no-root-slash=$(patsubst /%,%,$(1)) 114 122 115 123 ## Figure out where to put object files. 116 124 # @param $1 source file 117 125 # @param $2 normalized main target 118 _OBJECT_BASE = $(PATH_TARGET)/$(2)/$( basename $(1))126 _OBJECT_BASE = $(PATH_TARGET)/$(2)/$(call no-root-slash,$(call no-drive,$(basename $(patsubst $(PATH_TARGET)/$(2)/%,gen/%,$(1))))) 119 127 120 128 ## Figure out where to put object files. 121 129 # @param $1 real target name. 122 130 # @param $2 normalized main target 123 _TARGET_BASE = $(PATH_TARGET)/$(2)/$( basename $(1))131 _TARGET_BASE = $(PATH_TARGET)/$(2)/$(call no-root-slash,$(call no-drive,$(basename $(1)))) 124 132 125 133 … … 631 639 $(eval outbase := $(call _TARGET_BASE,$(target),$(target))) 632 640 $(eval PATH_$(target) := $(patsubst %/,%,$(dir $(outbase)))) 633 $(eval PATH2_$(target) := $(subst :, ,$(PATH_$(target))))634 $(eval PATH2_$(target) := $(word $(words $(PATH2_$(target))),$(PATH2_$(target))))635 641 $(eval libsuff := $(firstword\ 636 642 $($(target)_LIBSUFF.$(BUILD_TARGET))\ … … 695 701 $(eval outbase := $(call _TARGET_BASE,$(target),$(target))) 696 702 $(eval PATH_$(target) := $(patsubst %/,%,$(dir $(outbase)))) 697 $(eval PATH2_$(target) := $(subst :, ,$(PATH_$(target))))698 $(eval PATH2_$(target) := $(word $(words $(PATH2_$(target))),$(PATH2_$(target))))699 703 $(eval exesuff := $(firstword $($(target)_EXESUFF) $($(target)_EXESUFF) $(TOOL_$(tool)_LDEXESUFF) $(SUFF_EXE))) 700 704 $(eval exe := $(outbase)$(exesuff)) … … 848 852 $(eval outbase := $(call _TARGET_BASE,$(target),$(target))) 849 853 $(eval PATH_$(target) := $(patsubst %/,%,$(dir $(outbase)))) 850 $(eval PATH2_$(target) := $(subst :, ,$(PATH_$(target))))851 $(eval PATH2_$(target) := $(word $(words $(PATH2_$(target))),$(PATH2_$(target))))852 854 $(eval dllsuff := $(firstword $($(target)_DLLSUFF) $($(target)_DLLSUFF) $(TOOL_$(tool)_LDDLLSUFF) $(SUFF_DLL))) 853 855 $(eval dll := $(outbase)$(dllsuff)) … … 1015 1017 $(eval outbase := $(call _TARGET_BASE,$(target),$(target))) 1016 1018 $(eval PATH_$(target) := $(patsubst %/,%,$(dir $(outbase)))) 1017 $(eval PATH2_$(target) := $(subst :, ,$(PATH_$(target))))1018 $(eval PATH2_$(target) := $(word $(words $(PATH2_$(target))),$(PATH2_$(target))))1019 1019 $(eval syssuff := $(firstword $($(target)_SYSSUFF) $($(target)_SYSSUFF) $(TOOL_$(tool)_LDSYSSUFF) $(SUFF_SYS))) 1020 1020 $(eval sys := $(outbase)$(syssuff))
Note:
See TracChangeset
for help on using the changeset viewer.