Kaydet (Commit) daa2f80b authored tarafından Michael Stahl's avatar Michael Stahl

gbuild: InstallScript: use scripts from WORKDIR

Change-Id: I741edcabf86801f77ff58bc42a81372053c7901b
üst 7c409865
...@@ -78,7 +78,7 @@ LibreOffice ...@@ -78,7 +78,7 @@ LibreOffice
downloadname LibreOffice_{productversion}_{os}_install_{languages} downloadname LibreOffice_{productversion}_{os}_install_{languages}
langpackdownloadname LibreOffice_{productversion}_languagepack_{os}_install_{languages} langpackdownloadname LibreOffice_{productversion}_languagepack_{os}_install_{languages}
helppackdownloadname LibreOffice_{productversion}_helppack_{os}_install_{languages} helppackdownloadname LibreOffice_{productversion}_helppack_{os}_install_{languages}
include {solarpath}/bin.{minor}/osl,{customtargetpath}/readlicense_oo/readme,{customtargetpath}/sysui/{pkgtype},{customtargetpath}/setup_native/scripts,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor},{solarpath}/xml.{minor},{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{shlxthdlpath},{instdir},{instdir}/ure/lib,{extensionsdir},{packinfopath} include {solarpath}/bin.{minor}/osl,{installscriptdir},{customtargetpath}/readlicense_oo/readme,{customtargetpath}/sysui/{pkgtype},{customtargetpath}/setup_native,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor},{solarpath}/xml.{minor},{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{shlxthdlpath},{instdir},{instdir}/ure/lib,{extensionsdir},{packinfopath}
} }
} }
...@@ -131,7 +131,7 @@ LibreOffice_Dev ...@@ -131,7 +131,7 @@ LibreOffice_Dev
downloadname LibreOfficeDev_{productversion}_{os}_install_{languages} downloadname LibreOfficeDev_{productversion}_{os}_install_{languages}
langpackdownloadname LibreOfficeDev_{productversion}_languagepack_{os}_install_{languages} langpackdownloadname LibreOfficeDev_{productversion}_languagepack_{os}_install_{languages}
helppackdownloadname LibreOfficeDev_{productversion}_helppack_{os}_install_{languages} helppackdownloadname LibreOfficeDev_{productversion}_helppack_{os}_install_{languages}
include {solarpath}/bin.{minor}/osl,{customtargetpath}/readlicense_oo/readme,{customtargetpath}/sysui/{pkgtype},{customtargetpath}/setup_native/scripts,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/openoffice_dev,{solarpath}/pck.{minor},{solarpath}/xml.{minor},{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{shlxthdlpath},{instdir},{instdir}/ure/lib,{extensionsdir},{packinfopath} include {solarpath}/bin.{minor}/osl,{installscriptdir},{customtargetpath}/readlicense_oo/readme,{customtargetpath}/sysui/{pkgtype},{customtargetpath}/setup_native,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor}/openoffice_dev,{solarpath}/pck.{minor},{solarpath}/xml.{minor},{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{shlxthdlpath},{instdir},{instdir}/ure/lib,{extensionsdir},{packinfopath}
} }
} }
...@@ -170,7 +170,7 @@ LibreOffice_SDK ...@@ -170,7 +170,7 @@ LibreOffice_SDK
active 1 active 1
compression 5 compression 5
script sdkoo script sdkoo
include {solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor},{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{instdir},{instdir}/ure/lib,{packinfopath} include {solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor},{installscriptdir},{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{instdir},{instdir}/ure/lib,{packinfopath}
} }
} }
...@@ -216,6 +216,6 @@ LibreOffice_Dev_SDK ...@@ -216,6 +216,6 @@ LibreOffice_Dev_SDK
active 1 active 1
compression 5 compression 5
script sdkoo script sdkoo
include {solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor},{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{instdir},{instdir}/ure/lib,{packinfopath} include {solarpath}/bin.{minor}/osl,{solarpath}/bin.{minor},{solarpath}/lib.{minor},{solarpath}/pck.{minor},{installscriptdir},{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{instdir},{instdir}/ure/lib,{packinfopath}
} }
} }
...@@ -46,7 +46,7 @@ End ...@@ -46,7 +46,7 @@ End
#if !defined(WNT) && !defined(MACOSX) && defined(WITH_RPM) #if !defined(WNT) && !defined(MACOSX) && defined(WITH_RPM)
ScpAction scp_Copy_Install ScpAction scp_Copy_Install
Copy = "userscripts/install"; Copy = "scripts/install";
Name = "install"; Name = "install";
UnixRights = 755; UnixRights = 755;
End End
......
...@@ -61,6 +61,9 @@ sub create_pathvariables ...@@ -61,6 +61,9 @@ sub create_pathvariables
my $instdir = $ENV{'INSTDIR'}; my $instdir = $ENV{'INSTDIR'};
$variables{'instdir'} = $instdir; $variables{'instdir'} = $instdir;
my $installscriptdir = $environment->{'WORKDIR'} . $installer::globals::separator . "InstallScriptTarget";
$variables{'installscriptdir'} = $installscriptdir;
my $extensionsdir = $environment->{'WORKDIR'} . $installer::globals::separator . "Extension"; my $extensionsdir = $environment->{'WORKDIR'} . $installer::globals::separator . "Extension";
$variables{'extensionsdir'} = $extensionsdir; $variables{'extensionsdir'} = $extensionsdir;
......
...@@ -7,86 +7,60 @@ ...@@ -7,86 +7,60 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# #
# InstallScriptTarget class # InstallScript class
gb_InstallScriptTarget_TARGET := $(SOLARENV)/bin/par2script.pl gb_InstallScript_TARGET := $(SOLARENV)/bin/par2script.pl
gb_InstallScriptTarget_COMMAND := $(PERL) $(gb_InstallScriptTarget_TARGET) gb_InstallScript_COMMAND := $(PERL) $(gb_InstallScript_TARGET)
gb_InstallScriptTarget__make_arglist = $(subst $(WHITESPACE),$(COMMA),$(strip $(1))) gb_InstallScript__make_arglist = $(subst $(WHITESPACE),$(COMMA),$(strip $(1)))
define gb_InstallScriptTarget__get_files define gb_InstallScript__get_files
$(notdir $(shell cat $(foreach module,$(1),$(call gb_InstallModule_get_filelist,$(module))))) $(notdir $(shell cat $(foreach module,$(1),$(call gb_InstallModule_get_filelist,$(module)))))
endef endef
define gb_InstallScriptTarget__get_dirs define gb_InstallScript__get_dirs
$(sort $(dir $(shell cat $(foreach module,$(1),$(call gb_InstallModule_get_filelist,$(module)))))) $(sort $(dir $(shell cat $(foreach module,$(1),$(call gb_InstallModule_get_filelist,$(module))))))
endef endef
# Pass first arg if make is running in silent mode, second arg otherwise # Pass first arg if make is running in silent mode, second arg otherwise
define gb_InstallScriptTarget__if_silent define gb_InstallScript__if_silent
$(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),$(1),$(2)) $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),$(1),$(2))
endef endef
define gb_InstallScriptTarget__command define gb_InstallScript__command
$(call gb_Output_announce,$(2),$(true),INS,4) $(call gb_Output_announce,$(2),$(true),INS,4)
$(call gb_Helper_abbreviate_dirs,\ $(call gb_Helper_abbreviate_dirs,\
RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100,\ RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100,\
$(call gb_InstallScriptTarget__make_arglist,\ $(call gb_InstallScript__make_arglist,\
$(call gb_InstallScriptTarget__get_files,$(SCP_MODULES))) \ $(call gb_InstallScript__get_files,$(SCP_MODULES))) \
) && \ ) && \
$(gb_InstallScriptTarget_COMMAND) \ $(gb_InstallScript_COMMAND) \
$(call gb_InstallScriptTarget__if_silent,-q) \ $(call gb_InstallScript__if_silent,-q) \
-i $(call gb_InstallScriptTarget__make_arglist,$(call gb_InstallScriptTarget__get_dirs,$(SCP_MODULES))) \ -i $(call gb_InstallScript__make_arglist,$(call gb_InstallScript__get_dirs,$(SCP_MODULES))) \
-o $(1) \ -o $(1) \
@@$${RESPONSEFILE} && \ @@$${RESPONSEFILE} && \
rm -f $${RESPONSEFILE} \ rm -f $${RESPONSEFILE} \
) )
endef endef
$(dir $(call gb_InstallScriptTarget_get_target,%))%/.dir : $(dir $(call gb_InstallScript_get_target,%))%/.dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
$(dir $(call gb_InstallScriptTarget_get_target,%)).dir : $(dir $(call gb_InstallScript_get_target,%)).dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
$(call gb_InstallScriptTarget_get_target,%) : $(gb_InstallScriptTarget_TARGET) $(call gb_InstallScript_get_target,%) : $(gb_InstallScript_TARGET)
$(call gb_InstallScriptTarget__command,$@,$*) $(call gb_InstallScript__command,$@,$*)
.PHONY : $(call gb_InstallScriptTarget_get_clean_target,%) .PHONY : $(call gb_InstallScript_get_clean_target,%)
$(call gb_InstallScriptTarget_get_clean_target,%) : $(call gb_InstallScript_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),INS,4) $(call gb_Output_announce,$*,$(false),INS,4)
rm -f $(call gb_InstallScriptTarget_get_target,$*) rm -f $(call gb_InstallScript_get_target,$*)
# gb_InstallScriptTarget_InstallScriptTarget(<target>)
define gb_InstallScriptTarget_InstallScriptTarget
$(call gb_InstallScriptTarget_get_target,$(1)) :| $(dir $(call gb_InstallScriptTarget_get_target,$(1))).dir
$(call gb_InstallScriptTarget_get_target,$(1)) : SCP_MODULES :=
endef
define gb_InstallScriptTarget_use_module
$(call gb_InstallScriptTarget_get_target,$(1)) : $(call gb_InstallModule_get_target,$(2))
$(call gb_InstallScriptTarget_get_clean_target,$(1)) : $(call gb_InstallModule_get_clean_target,$(2))
$(call gb_InstallScriptTarget_get_target,$(1)) : SCP_MODULES += $(2)
endef
define gb_InstallScriptTarget_use_modules
$(foreach module,$(2),$(call gb_InstallScriptTarget_use_module,$(1),$(module)))
endef
# InstallScript class
# gb_InstallScript_InstallScript(<target>) # gb_InstallScript_InstallScript(<target>)
define gb_InstallScript_InstallScript define gb_InstallScript_InstallScript
$(call gb_InstallScriptTarget_InstallScriptTarget,$(1))
$(call gb_InstallScript_get_target,$(1)) : $(call gb_InstallScriptTarget_get_target,$(1))
$(call gb_InstallScript_get_target,$(1)) :| $(dir $(call gb_InstallScript_get_target,$(1))).dir $(call gb_InstallScript_get_target,$(1)) :| $(dir $(call gb_InstallScript_get_target,$(1))).dir
$(call gb_InstallScript_get_clean_target,$(1)) : $(call gb_InstallScriptTarget_get_clean_target,$(1)) $(call gb_InstallScript_get_target,$(1)) : SCP_MODULES :=
$(call gb_Deliver_add_deliverable,$(call gb_InstallScript_get_target,$(1)),$(call gb_InstallScriptTarget_get_target,$(1)),$(1))
$$(eval $$(call gb_Module_register_target,$(call gb_InstallScript_get_target,$(1)),$(call gb_InstallScript_get_clean_target,$(1)))) $$(eval $$(call gb_Module_register_target,$(call gb_InstallScript_get_target,$(1)),$(call gb_InstallScript_get_clean_target,$(1))))
$(call gb_Helper_make_userfriendly_targets,$(1),InstallScript) $(call gb_Helper_make_userfriendly_targets,$(1),InstallScript)
...@@ -94,12 +68,14 @@ $(call gb_Helper_make_userfriendly_targets,$(1),InstallScript) ...@@ -94,12 +68,14 @@ $(call gb_Helper_make_userfriendly_targets,$(1),InstallScript)
endef endef
define gb_InstallScript_use_module define gb_InstallScript_use_module
$(call gb_InstallScriptTarget_use_module,$(1),$(2)) $(call gb_InstallScript_get_target,$(1)) : $(call gb_InstallModule_get_target,$(2))
$(call gb_InstallScript_get_clean_target,$(1)) : $(call gb_InstallModule_get_clean_target,$(2))
$(call gb_InstallScript_get_target,$(1)) : SCP_MODULES += $(2)
endef endef
define gb_InstallScript_use_modules define gb_InstallScript_use_modules
$(call gb_InstallScriptTarget_use_modules,$(1),$(2)) $(foreach module,$(2),$(call gb_InstallScript_use_module,$(1),$(module)))
endef endef
......
...@@ -33,7 +33,6 @@ gb_PackagePart_get_destinations = \ ...@@ -33,7 +33,6 @@ gb_PackagePart_get_destinations = \
$(OUTDIR)/share \ $(OUTDIR)/share \
$(WORKDIR)/unittest \ $(WORKDIR)/unittest \
gb_InstallScript_get_target = $(OUTDIR)/bin/$(1)$(gb_InstallScript_EXT)
# kind of lame but with just 3 of these why bother with registration etc. # kind of lame but with just 3 of these why bother with registration etc.
gb_UnoApi_get_target = $(INSTROOT)/$(if $(filter udkapi,$(1)),$(LIBO_URE_SHARE_FOLDER)/misc/types,$(LIBO_ETC_FOLDER)/types/$(1)).rdb gb_UnoApi_get_target = $(INSTROOT)/$(if $(filter udkapi,$(1)),$(LIBO_URE_SHARE_FOLDER)/misc/types,$(LIBO_ETC_FOLDER)/types/$(1)).rdb
...@@ -113,7 +112,7 @@ gb_InstallModule_get_target = $(WORKDIR)/InstallModule/$(1).done ...@@ -113,7 +112,7 @@ gb_InstallModule_get_target = $(WORKDIR)/InstallModule/$(1).done
gb_InstallModuleTarget_get_external_target = $(WORKDIR)/InstallModuleTarget/$(1).external gb_InstallModuleTarget_get_external_target = $(WORKDIR)/InstallModuleTarget/$(1).external
gb_InstallModuleTarget_get_filelist = $(WORKDIR)/InstallModuleTarget/$(1).filelist gb_InstallModuleTarget_get_filelist = $(WORKDIR)/InstallModuleTarget/$(1).filelist
gb_InstallModuleTarget_get_target = $(WORKDIR)/InstallModuleTarget/$(1).filelist gb_InstallModuleTarget_get_target = $(WORKDIR)/InstallModuleTarget/$(1).filelist
gb_InstallScriptTarget_get_target = $(WORKDIR)/InstallScriptTarget/$(1)$(gb_InstallScript_EXT) gb_InstallScript_get_target = $(WORKDIR)/InstallScriptTarget/$(1)$(gb_InstallScript_EXT)
gb_InternalUnoApi_get_target = $(WORKDIR)/InternalUnoApi/$(1).done gb_InternalUnoApi_get_target = $(WORKDIR)/InternalUnoApi/$(1).done
gb_Jar_get_target = $(call gb_Jar_get_install_target,$(1)) gb_Jar_get_target = $(call gb_Jar_get_install_target,$(1))
gb_Jar_get_classsetname = Jar/$(1) gb_Jar_get_classsetname = Jar/$(1)
...@@ -267,7 +266,7 @@ $(eval $(call gb_Helper_make_clean_targets,\ ...@@ -267,7 +266,7 @@ $(eval $(call gb_Helper_make_clean_targets,\
HelpTreeTarget \ HelpTreeTarget \
InstallModule \ InstallModule \
InstallModuleTarget \ InstallModuleTarget \
InstallScriptTarget \ InstallScript \
InternalUnoApi \ InternalUnoApi \
JavaClassSet \ JavaClassSet \
Jar \ Jar \
...@@ -320,10 +319,6 @@ $(eval $(call gb_Helper_make_clean_targets,\ ...@@ -320,10 +319,6 @@ $(eval $(call gb_Helper_make_clean_targets,\
Configuration \ Configuration \
)) ))
$(eval $(call gb_Helper_make_outdir_clean_targets,\
InstallScript \
))
$(eval $(call gb_Helper_make_dep_targets,\ $(eval $(call gb_Helper_make_dep_targets,\
CObject \ CObject \
CxxObject \ CxxObject \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment