Changeset 2475 for trunk/kBuild/header.kmk
- Timestamp:
- Jul 16, 2011, 10:08:07 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/header.kmk
r2441 r2475 390 390 endif 391 391 392 # Install directory layout. Relative to PATH_INS. 393 INST_BIN = bin/ 394 if1of ($(KBUILD_TARGET), win) 395 INST_DLL = bin/ 396 else 397 INST_DLL = lib/ 398 endif 399 if1of ($(KBUILD_TARGET), os2 win) 400 INST_SYS = drivers/ 401 else 402 INST_SYS = kernel/ 403 endif 404 INST_LIB = lib/ 405 INST_DOC = share/doc/ 406 INST_DEBUG = debug/ 407 INST_SBIN = sbin/ 408 INST_LIBEXEC = libexec/ 409 INST_SHARE = share/ 410 411 # Staging directory layout. Relative to PATH_STAGE. 412 STAGE_BIN = $(INST_BIN) 413 STAGE_DLL = $(INST_DLL) 414 STAGE_SYS = $(INST_SYS) 415 STAGE_LIB = $(INST_LIB) 416 STAGE_DOC = $(INST_DOC) 417 STAGE_DEBUG = $(INST_DEBUG) 418 STAGE_SBIN = $(INST_SBIN) 419 STAGE_LIBEXEC = $(INST_LIBEXEC) 420 STAGE_SHARE = $(INST_SHARE) 421 392 422 # Output directories. 393 423 ifndef PATH_OUT_BASE … … 404 434 PATH_OBJ = $(PATH_OUT)/obj 405 435 PATH_TARGET = $(PATH_OBJ)/$(CURSUBDIR) 406 PATH_INS = $(PATH_OUT) 407 PATH_BIN = $(PATH_INS)/bin 408 PATH_DLL = $(PATH_INS)/bin 409 PATH_SYS = $(PATH_INS)/bin 410 PATH_LIB = $(PATH_INS)/lib 411 PATH_DOC = $(PATH_INS)/doc 436 PATH_STAGE = $(PATH_OUT)/stage 437 ifndef PATH_INS 438 ifdef DESTROOT 439 PATH_INS = $(DESTROOT) 440 else 441 PATH_INS = $(PATH_OUT)/dist 442 endif 443 endif 412 444 413 445 # Development tool tree. … … 840 872 # A Config.kmk file can add it's own properties to this list and kBuild 841 873 # will do the necessary inheritance for templates, sdks, tools and targets. 842 PROPS_SINGLE := $(PROPS_TOOLS) TEMPLATE INST NOINST BLD_TYPE BLD_TRG BLD_TRG_ARCH BLD_TRG_CPU FETCHDIR \874 PROPS_SINGLE := $(PROPS_TOOLS) TEMPLATE INSTTYPE INST STAGE NOINST BLD_TYPE BLD_TRG BLD_TRG_ARCH BLD_TRG_CPU FETCHDIR \ 843 875 OBJSUFF COBJSUFF CXXOBJSUFF OBJCOBJSUFF OBJCXXOBJSUFF ASOBJSUFF RCOBJSUFF SYSSUFF BINSUFF EXESUFF DLLSUFF LIBSUFF ARLIBSUFF \ 844 876 MODE UID GID … … 853 885 # This list of non-accumulative target properties which are or may be 854 886 # functions, and thus should not be expanded until the very last moment. 855 PROPS_DEFERRED := INSTFUN INSTALLER PRE_CMDS POST_CMDS NAME SONAME887 PROPS_DEFERRED := INSTFUN INSTALLER PRE_CMDS POST_CMDS PRE_INST_CMDS POST_INST_CMDS NAME SONAME 856 888 857 889 ## PROPS_ACCUMULATE_R … … 949 981 PROPS_INSTALLS_SINGLE := TOOL TEMPLATE INST NOINST 950 982 PROPS_INSTALLS_DEFERRED := INSTFUN INSTALLER 951 PROPS_INSTALLS_ACCUMULATE_R := DEPS ORDERDEPS 983 PROPS_INSTALLS_ACCUMULATE_R := DEPS ORDERDEPS GOALS INST_ONLY_GOALS STAGE_ONLY_GOALS 952 984 PROPS_INSTALLS_ACCUMULATE_L := SOURCES DIRS CLEAN 953 985 ## @} 954 986 955 ## @name Properties valid on fetches ( INSTALLS)987 ## @name Properties valid on fetches (FETCHES) 956 988 ## @{ 957 989 PROPS_FETCHES_SINGLE := TOOL TEMPLATE FETCHTOOL UNPACKTOOL PATCHTOOL INST FETCHDIR … … 1069 1101 PASS_OTHERS_pass := others 1070 1102 1071 ## PASS: install1103 ## PASS: staging 1072 1104 # This pass installs the built entities to a sandbox area. 1073 1105 ## @todo split this up into build install (to sandbox) and real installation. 1106 PASS_STAGING := Staging 1107 PASS_STAGING_trgs := 1108 PASS_STAGING_vars := _STAGING_DIRS _INSTALLS _STAGING_FILES 1109 PASS_STAGING_pass := staging 1110 1111 ## PASS: install 1112 # This pass installs the built entities to where they will be used (using 1113 # DESTROOT or PATH_INS to indicate where this is). 1074 1114 PASS_INSTALLS := Install 1075 1115 PASS_INSTALLS_trgs := 1076 PASS_INSTALLS_vars := _INSTALLS_DIRS _INSTALLS _INSTALLS_FILES1116 PASS_INSTALLS_vars := _INSTALLS_DIRS _INSTALLS_FILES 1077 1117 PASS_INSTALLS_pass := installs 1078 1118 … … 1107 1147 ## DEFAULT_PASSES 1108 1148 # The default passes and their order. 1109 DEFAULT_PASSES := BLDPROGS LIBRARIES DLLS BINARIES OTHERS INSTALLS1149 DEFAULT_PASSES := BLDPROGS LIBRARIES DLLS BINARIES OTHERS STAGING 1110 1150 1111 1151 ## PASSES 1112 1152 # The passes that should be defined. This must include 1113 1153 # all passes mentioned by DEFAULT_PASSES. 1114 PASSES := FETCHES PATCHES $(DEFAULT_PASSES) TESTING PACKING CLEAN NOTHING1154 PASSES := FETCHES PATCHES $(DEFAULT_PASSES) INSTALLS TESTING PACKING CLEAN NOTHING 1115 1155 1116 1156 … … 1178 1218 # 1179 1219 PATH_OUT_BASE := $(abspath $(PATH_OUT_BASE)) 1180 PATH_OUT := $(abspath $(PATH_OUT)) 1181 PATH_OBJ := $(abspath $(PATH_OBJ)) 1182 PATH_TARGET := $(abspath $(PATH_TARGET)) 1183 PATH_INS := $(abspath $(PATH_INS)) 1184 PATH_BIN := $(abspath $(PATH_BIN)) 1185 PATH_DLL := $(abspath $(PATH_DLL)) 1186 PATH_SYS := $(abspath $(PATH_SYS)) 1187 PATH_LIB := $(abspath $(PATH_LIB)) 1188 PATH_DOC := $(abspath $(PATH_DOC)) 1220 PATH_OUT := $(abspath $(PATH_OUT)) 1221 PATH_OBJ := $(abspath $(PATH_OBJ)) 1222 PATH_TARGET := $(abspath $(PATH_TARGET)) 1223 PATH_INS := $(abspath $(PATH_INS)) 1224 PATH_STAGE := $(abspath $(PATH_STAGE)) 1225 1226 # Finalize the install and staging directory layouts. 1227 define def_kbuild_finalize_inst 1228 local val := $(strip $($(y)_$(x))) 1229 ifeq ($(val),) 1230 $(error kBuild: '$(y)_$(x)' is set to an empty value.) 1231 endif 1232 ifneq ($(words $(val)),1) 1233 $(error kBuild: The '$(y)_$(x)' value '$(val)' should not contain spaces.) 1234 endif 1235 ifneq ($(pos \,$(val)), 0) 1236 $(error kBuild: The '$(y)_$(x)' value '$(val)' contains DOS slashes: not allowed.) 1237 endif 1238 ifneq ($(pos $(COLON),$(val)), 0) 1239 $(error kBuild: The '$(y)_$(x)' value '$(val)' contains colon: not allowed.) 1240 endif 1241 ifneq ($(substr $(val),-1), /) 1242 $(error kBuild: The '$(y)_$(x)' value '$(val)' has no trailing slash.) 1243 endif 1244 if $(pos /../,$(val)) != 0 || "$(substr $(val), 3)" == "../" 1245 $(error kBuild: The '$(y)_$(x)' value '$(val)' contains dot-dot escape.) 1246 endif 1247 $($(y)_$(x) := $(val) 1248 endef 1249 $(foreach y, INST STAGE, $(foreach x, BIN DLL SYS LIB DOC SBIN LIBEXEC SHARE DEBUG, $(evalcall def_kbuild_finalize_inst))) 1189 1250 1190 1251
Note:
See TracChangeset
for help on using the changeset viewer.