Changeset 2479 in kBuild
- Timestamp:
- Jul 20, 2011 2:16:19 PM (13 years ago)
- Location:
- trunk/kBuild
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/footer.kmk
r2477 r2479 130 130 _DIRS := $(PATH_TARGET)/ $(PATH_TARGET) $(BLDDIRS) 131 131 _IMPORT_LIBS := 132 133 # Implicit targets added while processing other targets (usually by units). 134 _ALL_INSTALLS_IMPLICIT := 132 135 133 136 # misc … … 2149 2152 $(pre_install_cmds) 2150 2153 2151 $$(QUIET)$$(INSTALL ) $(if $(mode),-m $(mode)) $(if $(uid),-o $(uid)) $(if $(gid),-g $(gid)) -- $(out) $$@2154 $$(QUIET)$$(INSTALL_STAGING) $(if $(mode),-m $(mode)) $(if $(uid),-o $(uid)) $(if $(gid),-g $(gid)) -- $(out) $$@ 2152 2155 $(post_install_cmds) 2153 2156 … … 3023 3026 local stagedst := $(call $(instfun),$(srcdst),$(target),$(stage),$(PATH_STAGE)) 3024 3027 3025 local inst := $(firstword $($(srcsrc)_INST) $($(target)_1_INST)) 3026 ifneq ($(substr $(inst),-1),/) 3027 $(warning kBuild: File $(srcsrc) in install target $(target) has a INST property without a trailing slash.) 3028 local inst := $(inst)/ 3029 endif 3030 local inst := $(inst)$(dir $(srcdstdir)) 3031 local instdst := $(call $(instfun),$(srcdst),$(target),$(inst),$(PATH_INS)) 3028 ifeq ($(insttype),both) 3029 local inst := $(firstword $($(srcsrc)_INST) $($(target)_1_INST)) 3030 ifneq ($(substr $(inst),-1),/) 3031 $(warning kBuild: File $(srcsrc) in install target $(target) has a INST property without a trailing slash.) 3032 local inst := $(inst)/ 3033 endif 3034 local inst := $(inst)$(dir $(srcdstdir)) 3035 local instdst := $(call $(instfun),$(srcdst),$(target),$(inst),$(PATH_INS)) 3036 endif 3032 3037 3033 3038 #$(warning instfun=$(instfun) srcdst=$(srcdst) target=$(target) inst=$(inst) => instdst=$(instdst); stage=$(stage) => stagedst=$(stagedst)) … … 3117 3122 endif 3118 3123 3119 # create the commands3124 # Generate the staging rule (requires double evaluation). 3120 3125 ifdef $(srcsrc)_INSTALLER 3121 local stagecmd := $(call $(srcsrc)_INSTALLER,$(srcsrc),$(stagedst),$(target),$(flags)) 3122 local instcmd := $(call $(srcsrc)_INSTALLER,$(srcsrc),$(instdst),$(target),$(flags)) 3126 local stagecmd := $(call $(srcsrc)_INSTALLER,$(srcsrc),$(stagedst),$(target),$(flags),stage) 3123 3127 else ifdef $(target)_INSTALLER 3124 local stagecmd := $(call $(target)_INSTALLER,$(srcsrc),$(stagedst),$(target),$(flags)) 3125 local instcmd := $(call $(target)_INSTALLER,$(srcsrc),$(instdst),$(target),$(flags)) 3128 local stagecmd := $(call $(target)_INSTALLER,$(srcsrc),$(stagedst),$(target),$(flags),stage) 3126 3129 else 3127 local stagecmd := $$(INSTALL )\3130 local stagecmd := $$(INSTALL_STAGING)\ 3128 3131 $(if $(uid),-o $(uid))\ 3129 3132 $(if $(gid),-g $(gid))\ … … 3131 3134 $(flags) -- \ 3132 3135 $(srcsrc) $(stagedst) 3133 local instcmd := $$(INSTALL)\ 3134 $(if $(uid),-o $(uid))\ 3135 $(if $(gid),-g $(gid))\ 3136 $(if $(mode),-m $(mode))\ 3137 $(flags) -- \ 3138 $(srcsrc) $(instdst) 3139 endif 3140 3141 # Generate the staging rule (requires double evaluation). 3136 endif 3142 3137 $(eval $(def_install_src_rule_staging)) 3143 3138 $(target)_2_STAGE_TARGETS += $(stagedst) … … 3145 3140 # Generate the install rule 3146 3141 ifeq ($(insttype),both) 3142 ifdef $(srcsrc)_INSTALLER 3143 local instcmd := $(call $(srcsrc)_INSTALLER,$(srcsrc),$(instdst),$(target),$(flags),install) 3144 else ifdef $(target)_INSTALLER 3145 local instcmd := $(call $(target)_INSTALLER,$(srcsrc),$(instdst),$(target),$(flags),install) 3146 else 3147 local instcmd := $$(INSTALL)\ 3148 $(if $(uid),-o $(uid))\ 3149 $(if $(gid),-g $(gid))\ 3150 $(if $(mode),-m $(mode))\ 3151 $(flags) -- \ 3152 $(srcsrc) $(instdst) 3153 endif 3147 3154 $(eval $(def_install_src_rule_installing)) 3148 3155 $(target)_2_INST_TARGETS += $(instdst) … … 3443 3450 $(eval-opt-var def_install) 3444 3451 3445 ## process all install targets 3452 ## Do pass 1 on the implicit targets and add them to the list. 3453 $(foreach target, $(_ALL_INSTALLS_IMPLICIT), \ 3454 $(evalval def_pass1_install)) 3455 _ALL_INSTALLS += $(_ALL_INSTALLS_IMPLICIT) 3456 3457 ## Do pass 2 on all install targets. 3446 3458 $(foreach target, $(_ALL_INSTALLS), \ 3447 3459 $(evalvalctx def_install)) -
trunk/kBuild/header.kmk
r2475 r2479 391 391 392 392 # Install directory layout. Relative to PATH_INS. 393 KBUILD_INST_PATHS := BIN DLL SYS LIB DOC DEBUG SBIN LIBEXEC SHARE 393 394 INST_BIN = bin/ 394 395 if1of ($(KBUILD_TARGET), win) … … 419 420 STAGE_LIBEXEC = $(INST_LIBEXEC) 420 421 STAGE_SHARE = $(INST_SHARE) 422 423 # Install and staging directory paths. 424 $(foreach path, $(KBUILD_INST_PATHS), \ 425 $(eval PATH_STAGE_$(path) = $$(patsubst %/,%,$$(PATH_STAGE)/$$(STAGE_$(path)))) \ 426 $(eval PATH_INST_$(path) = $$(patsubst %/,%,$$(PATH_INS)/$$(INST_$(path)))) \ 427 ) 421 428 422 429 # Output directories. … … 689 696 # Symlinking is problematic on some platforms... 690 697 LN_SYMLINK := $(LN) -s 698 699 # When copying to the staging area, use hard links to save time and space. 700 if1of ($(KMK_FEATURES), install-hard-linking) 701 INSTALL_STAGING := $(INSTALL) --hard-link-files-when-possible 702 else 703 INSTALL_STAGING := $(INSTALL) 704 endif 691 705 692 706 … … 1246 1260 endif 1247 1261 $($(y)_$(x) := $(val) 1262 1263 local val := $(strip $(PATH_$(y)_$(x))) 1264 ifeq ($(val),) 1265 $(error kBuild: 'PATH_$(y)_$(x)' is set to an empty value.) 1266 endif 1267 PATH_$(y)_$(x) := $(val) 1248 1268 endef 1249 $(foreach y, INST STAGE, $(foreach x, BIN DLL SYS LIB DOC SBIN LIBEXEC SHARE DEBUG, $(evalcall def_kbuild_finalize_inst)))1269 $(foreach y, INST STAGE, $(foreach x, $(KBUILD_INST_PATHS), $(evalcall def_kbuild_finalize_inst))) 1250 1270 1251 1271 -
trunk/kBuild/units/qt3.kmk
r2413 r2479 905 905 $($(target)_QT_TRANSLATIONS) 906 906 ifneq ($(strip $(translations)),) 907 local expr := _ALL_INSTALLS += $(target)-inst-nls907 local expr := _ALL_INSTALLS_IMPLICIT += $(target)-inst-nls 908 908 $(eval $(expr)) 909 909 ifdef $(target)_QT_TRANSLATIONS_TEMPLATE -
trunk/kBuild/units/qt4.kmk
r2478 r2479 1032 1032 $($(target)_QT_TRANSLATIONS) 1033 1033 ifneq ($(strip $(translations)),) 1034 local expr := _ALL_INSTALLS += $(target)-inst-nls/1034 local expr := _ALL_INSTALLS_IMPLICIT += $(target)-inst-nls 1035 1035 $(eval $(expr)) 1036 1036 ifdef $(target)_QT_TRANSLATIONS_TEMPLATE
Note:
See TracChangeset
for help on using the changeset viewer.