- Timestamp:
- May 29, 2004 8:53:13 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/header.kmk
r69 r70 51 51 52 52 # 53 # . 54 # 55 PATH_ROOT := $(CURDIR) 56 define def_root_dir 57 PATH_ROOT := $(dir $(PATH_ROOT)) 58 endef 59 PATH_ROOT 60 61 # 53 62 # Common definitions. 54 63 # 55 64 PATH_CURRENT := $(CURDIR) 56 PATH_ROOT := $(DEPTH) 57 ifndef PATH_KBUILD 58 PATH_KBUILD := $(PATH_ROOT)/kBuild 65 # Get the real root path. 66 PATH_ROOT := $(CURDIR) 67 ifneq ($(DEPTH),.) 68 $(foreach d,$(subst /, ,$(DEPTH)), $(eval PATH_ROOT := $(patsubst %/,%,$(dir $(PATH_ROOT)))) ) 59 69 endif 60 70 # Subdirectory relative to the root. 71 DIR_DEPTH := $(patsubst $(PATH_ROOT)/%,%,$(CURDIR)) 72 # Output directories. 61 73 PATH_OUT := $(PATH_ROOT)/out/$(BUILD_TARGET)/$(BUILD_TYPE) 62 74 PATH_OBJ := $(PATH_OUT)/obj … … 64 76 PATH_LIB := $(PATH_OUT)/lib 65 77 PATH_DOC := $(PATH_ROOT)/out/doc 78 PATH_TARGET = $(PATH_OUT)/$(DIR_DEPTH) 79 80 # Usually kBuild is external to the source tree. 81 ifndef PATH_KBUILD 82 PATH_KBUILD := $(PATH_ROOT)/kBuild 83 endif 84 # kBuild tools 66 85 PATH_TOOLS_W32 := $(PATH_KBUILD)/bin/x86.win32 67 86 PATH_TOOLS_LNX := $(PATH_KBUILD)/bin/x86.linux 68 87 PATH_TOOLS_OS2 := $(PATH_KBUILD)/bin/x86.os2 69 # fixme70 PATH_TARGET = $(PATH_OUT)71 72 88 # kBuild files which might be of interest. 73 89 FILE_KBUILD_HEADER := $(PATH_KBUILD)/header.kmk … … 107 123 HOSTSUFF_EXE := 108 124 endif 109 125 110 126 # Win32 111 127 ifeq ($(BUILD_PLATFORM),WIN32) … … 145 161 # This is how we find the closest config.kmk. 146 162 # It's a little hacky but I think it works fine. 147 # 148 _CFGDIR 149 _CFGFILES 163 # 164 _CFGDIR := . 165 _CFGFILES := 150 166 define def_include_config 151 _CFGDIR 152 _CFGFILES 167 _CFGDIR := $(_CFGDIR)/$(1) 168 _CFGFILES += $(wildcard $(_CFGDIR)/config.kmk $(_CFGDIR)/config.kMk) 153 169 endef 154 170 # walk down the _RELATIVE_ path specified by DEPTH. 155 171 $(foreach d,$(subst /, ,$(DEPTH)), $(eval $(call def_include_config,$(d))) ) 156 172 # add the default config file. 157 _CFGFILE 173 _CFGFILE := $(firstword $(_CFGFILES) $(FILE_KBUILD_CONFIG)) 158 174 _CFGFILES := 159 175 _CFGDIR :=
Note:
See TracChangeset
for help on using the changeset viewer.