Changeset 2531
- Timestamp:
- Aug 2, 2011, 2:07:35 PM (14 years ago)
- Location:
- trunk/kBuild
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer-pass2-compiling-targets.kmk
r2523 r2531 134 134 # @param $($(target)_CMDS_PREV_) The link commands from the previous run. 135 135 define def_link_rule 136 $$(call KB_FN_ASSERT_ABSPATH,out) 136 137 ifndef NO_LINK_CMDS_DEPS 137 138 $(out): .MUST_MAKE = $$(comp-cmds-ex $$($(target)_CMDS_PREV_),$$(commands $$@),FORCE) … … 170 171 # pre_install_cmds, post_install_cmds 171 172 define def_link_install_rule 173 $$(call KB_FN_ASSERT_ABSPATH,$(target)_1_INST_TARGET) 172 174 $($(target)_1_INST_TARGET): $(out) | $$$$(dir $$$$@) 173 175 %$$(call MSG_INST_TRG,$(target),$(out),$$@) … … 184 186 # pre_install_cmds, post_install_cmds 185 187 define def_link_stage_rule 188 $$(call KB_FN_ASSERT_ABSPATH,$(target)_1_STAGE_TARGET) 186 189 $($(target)_1_STAGE_TARGET): $(out) | $$$$(dir $$$$@) 187 190 %$$(call MSG_INST_TRG,$(target),$(out),$$@) … … 388 391 define def_link_install_debug_dir_rule 389 392 local dir := $(debug_inst_path)/$(debug_inst)$(debug_dir) 393 $$(call KB_FN_ASSERT_ABSPATH,dir) 390 394 $$(dir): | $$$$(dir $$$$(patsubst %/,%,$$$$@)) 391 395 %$$(call MSG_INST_DIR,$$@) … … 395 399 396 400 ## 397 # Install a debug file. 401 # Install a debug file. 398 402 # @param debug_file Src=>Dst file pair. 399 403 define def_link_install_debug_file_rule 400 404 local dst := $(debug_inst_path)/$(debug_inst)$(word 2, $(subst =>,$(SP),$(debug_file))) 401 $$(dst): $(word 1, $(subst =>,$(SP),$(debug_file))) | $$$$(dir $$$$@) 405 $$(call KB_FN_ASSERT_ABSPATH,dst) 406 local src := $(word 1, $(subst =>,$(SP),$(debug_file))) 407 $$(call KB_FN_ASSERT_ABSPATH,src) 408 $$(dst): $$(src) | $$$$(dir $$$$@) 402 409 %$$(call MSG_INST_FILE,$$@,$$<) 403 410 $$(QUIET)$(debug_install_cmd) $(if $(mode),-m $(mode)) $(if $(uid),-o $(uid)) $(if $(gid),-g $(gid)) -- $$< $$@ … … 406 413 407 414 ## 408 # Install debug info to $(debug_inst), where debug_inst can be a directory or 415 # Install debug info to $(debug_inst), where debug_inst can be a directory or 409 416 # file (just like $(inst) and $(stage). Used for both staging and installing. 410 417 define def_target_install_only_debug 411 418 if "$(substr $(debug_inst),-1,1)" == "/" 412 419 if "$(debug_inst)" == "./" 413 local debug_inst := 420 local debug_inst := 414 421 endif 415 422 local debug_dirs := $(patsubst $($(target)_0_OUTDIR)/%,%,$($(target)_2_OUTPUT_DEBUG_DIRS)) -
trunk/kBuild/footer-pass2-installs.kmk
r2530 r2531 41 41 # 42 42 define def_install_src_rule_staging 43 $$(call KB_FN_ASSERT_ABSPATH, stagedst) 44 $$(call KB_FN_ASSERT_ABSPATH, srcsrc) 43 45 $(stagedst) : $(srcsrc) | $(dir $(stagedst)) 44 46 %$$(call MSG_INST_FILE,$(srcsrc),$(stagedst)) … … 48 50 49 51 define def_install_src_rule_installing 52 $$(call KB_FN_ASSERT_ABSPATH, instdst) 53 $$(call KB_FN_ASSERT_ABSPATH, srcsrc) 50 54 $(instdst) : $(srcsrc) | $(dir $(instdst)) 51 55 %$$(call MSG_INST_FILE,$(srcsrc),$(instdst)) … … 72 76 local srcsrc := $(firstword $(srcdst)) 73 77 local srcdstdir := $(dir $(word 2,$(srcdst))) 78 ifeq ($(srcdstdir),./) 79 local srcdstdir:= 80 endif 74 81 local srcdst := $(word $(words $(srcdst)),$(srcdst)) 75 82 … … 234 241 # 235 242 define def_install_symlink_rule_staging 243 $$(call KB_FN_ASSERT_ABSPATH, stagedst) 236 244 $(stagedst) : | $(dir $(stagedst)) 237 245 %$$(call MSG_INST_SYM,$(stagedst),$(symdst)) … … 242 250 243 251 define def_install_symlink_rule_installing 252 $$(call KB_FN_ASSERT_ABSPATH, instdst) 244 253 $(instdst) : | $(dir $(instdst)) 245 254 %$$(call MSG_INST_SYM,$(instdst),$(symdst)) … … 319 328 # 320 329 define def_install_directory_rule 321 # the install rule 330 $$(call KB_FN_ASSERT_ABSPATH, insdst) 322 331 $(insdst): 323 332 %$$(call MSG_INST_DIR,$(insdst)) -
trunk/kBuild/header.kmk
r2528 r2531 847 847 else 848 848 KB_FN_ASSIGN_DEPRECATED = $(eval $(subst :,$$(COLON),$1) = $2$$(warning $1 is deprecated, use $3 instead)) 849 endif 850 851 ## 852 # Throw an error if the given path $1 isn't absolute and assertions are enabled. 853 # 854 # @param $1 The name of the path variable to check. 855 # 856 ifdef KBUILD_INTERNAL_STRICT 857 KB_FN_ASSERT_ABSPATH = $(if-expr "$(abspath $($(strip $1)))" != "$(strip $($(strip $1)))",\ 858 $(error kBuild abspath assertion failed: target=$(target) $1=$($(strip $1)))) 859 else 860 KB_FN_ASSERT_ABSPATH := 849 861 endif 850 862
Note:
See TracChangeset
for help on using the changeset viewer.