From 429255d1636e364b8054cc8fc4c417f10f783a54 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 4 Feb 2014 18:01:24 +0100 Subject: [PATCH] gbuild: add gb_Helper_register_jars_for_install Change-Id: I560a8eded4747a9332f5dac29009eafd3d6e68b7 --- scp2/AutoInstall.mk | 2 +- solenv/gbuild/AutoInstall.mk | 10 +++++++--- solenv/gbuild/Helper.mk | 8 ++++++++ solenv/gbuild/extensions/post_PackageInfo.mk | 5 +++++ 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/scp2/AutoInstall.mk b/scp2/AutoInstall.mk index ca4b99d09ca5..6ec7d3220375 100644 --- a/scp2/AutoInstall.mk +++ b/scp2/AutoInstall.mk @@ -17,7 +17,7 @@ $(eval $(call gb_AutoInstall_add_module,graphicfilter,LIBO_LIB_FILE)) $(eval $(call gb_AutoInstall_add_module,impress,LIBO_LIB_FILE)) $(eval $(call gb_AutoInstall_add_module,kde,LIBO_LIB_FILE)) $(eval $(call gb_AutoInstall_add_module,math,LIBO_LIB_FILE)) -$(eval $(call gb_AutoInstall_add_module,onlineupdate,LIBO_LIB_FILE_COMPONENTCONDITION,,"ISCHECKFORPRODUCTUPDATES=1")) +$(eval $(call gb_AutoInstall_add_module,onlineupdate,LIBO_LIB_FILE_COMPONENTCONDITION,,,"ISCHECKFORPRODUCTUPDATES=1")) $(eval $(call gb_AutoInstall_add_module,ooo,LIBO_LIB_FILE,LIBO_EXECUTABLE)) $(eval $(call gb_AutoInstall_add_module,ooobinarytable,LIBO_LIB_FILE_BINARYTABLE)) $(eval $(call gb_AutoInstall_add_module,sdk,,SDK_EXECUTABLE)) diff --git a/solenv/gbuild/AutoInstall.mk b/solenv/gbuild/AutoInstall.mk index a7544857c48e..de3b67f3f384 100644 --- a/solenv/gbuild/AutoInstall.mk +++ b/solenv/gbuild/AutoInstall.mk @@ -24,11 +24,14 @@ $(call gb_AutoInstall_get_target,%) : $(SRCDIR)/Repository.mk $(GBUILDDIR)/AutoI echo "/* autogenerated installs for group $* */" > $@ $(call gb_AutoInstall__make_define,\ $(foreach lib,$(gb_Library_MODULE_$*),auto_$*_lib_$(lib)) \ - $(foreach exe,$(gb_Executable_MODULE_$*),auto_$*_exe_$(exe))) + $(foreach exe,$(gb_Executable_MODULE_$*),auto_$*_exe_$(exe)) \ + $(foreach jar,$(gb_Jar_MODULE_$*),auto_$*_jar_$(jar))) $(foreach lib,$(gb_Library_MODULE_$*),\ echo '$(SCP2LIBTEMPLATE)(auto_$*_lib_$(lib),$(call gb_Library_get_runtime_filename,$(lib))$(if $(SCP2COMPONENTCONDITION),$(COMMA)$(SCP2COMPONENTCONDITION)))' >> $@;) $(foreach exe,$(gb_Executable_MODULE_$*),\ echo "$(SCP2EXETEMPLATE)(auto_$*_exe_$(subst -,_,$(exe)),$(call gb_Executable_get_filename,$(exe)))" >> $@;) + $(foreach jar,$(gb_Jar_MODULE_$*),\ + echo '$(SCP2JARTEMPLATE)(auto_$*_jar_$(subst -,_,$(jar)),$(jar).jar)' >> $@;) $(call gb_AutoInstall_get_clean_target,%) : @@ -43,7 +46,7 @@ $(call gb_Helper_make_userfriendly_targets,all,AutoInstall) endef -# gb_AutoInstall_add_module module lib_template optional:exe_template +# gb_AutoInstall_add_module module lib_template exe_template jar_template componentcondition define gb_AutoInstall_add_module $(call gb_AutoInstall_get_target,all) : $(call gb_AutoInstall_get_target,$(1)) $(call gb_AutoInstall_get_clean_target,all) : $(call gb_AutoInstall_get_clean_target,$(1)) @@ -53,7 +56,8 @@ $(call gb_AutoInstall_get_target,$(1)) : $(gb_Module_CURRENTMAKEFILE) $(call gb_AutoInstall_get_target,$(1)) :| $(dir $(call gb_AutoInstall_get_target,$(1))).dir $(call gb_AutoInstall_get_target,$(1)) : SCP2LIBTEMPLATE := $(2) $(call gb_AutoInstall_get_target,$(1)) : SCP2EXETEMPLATE := $(3) -$(call gb_AutoInstall_get_target,$(1)) : SCP2COMPONENTCONDITION := $(4) +$(call gb_AutoInstall_get_target,$(1)) : SCP2JARTEMPLATE := $(4) +$(call gb_AutoInstall_get_target,$(1)) : SCP2COMPONENTCONDITION := $(5) endef diff --git a/solenv/gbuild/Helper.mk b/solenv/gbuild/Helper.mk index a22f2f807d38..16a991a27f21 100644 --- a/solenv/gbuild/Helper.mk +++ b/solenv/gbuild/Helper.mk @@ -178,6 +178,14 @@ gb_Jar_$(1) += $(2) endef +# $(call gb_Helper_register_jars_for_install,layer,installmodule,jars) +define gb_Helper_register_jars_for_install +$(call gb_Helper_register_jars,$(1),$(3)) + +gb_Jar_MODULE_$(2) += $(3) + +endef + define gb_Helper_define_if_set $(foreach def,$(1),$(if $(filter TRUE YES,$($(def))),-D$(def))) endef diff --git a/solenv/gbuild/extensions/post_PackageInfo.mk b/solenv/gbuild/extensions/post_PackageInfo.mk index 03a0f2439111..6ae47ee39229 100644 --- a/solenv/gbuild/extensions/post_PackageInfo.mk +++ b/solenv/gbuild/extensions/post_PackageInfo.mk @@ -28,6 +28,7 @@ define gb_PackageInfo_emit_binaries_command @touch $(foreach suf,executables libraries files,$(gb_PackageInfo_get_target)/$(1).$(suf)) @$(foreach executable,$(gb_Executable_MODULE_$(1)),echo "$(patsubst $(INSTDIR)/%,%,$(call gb_Executable_get_target,$(executable)))" >> $(gb_PackageInfo_get_target)/$(1).executables &&) true @$(foreach library,$(gb_Library_MODULE_$(1)),echo "$(patsubst $(INSTDIR)/%,%,$(call gb_Library_get_target,$(library)))" >> $(gb_PackageInfo_get_target)/$(1).libraries &&) true +@$(foreach jar,$(gb_Jar_MODULE_$(1)),echo "$(patsubst $(INSTDIR)/%,%,$(call gb_Jar_get_target,$(jar)))" >> $(gb_PackageInfo_get_target)/$(1).jars &&) true @echo "$(foreach suf,executables libraries files,$(gb_PackageInfo_get_target)/$(1).$(suf)) \\" >> $(WORKDIR)/Dep/packageinfo.d endef @@ -100,6 +101,10 @@ install-package-%: $(gb_PackageInfo_get_target)/packageinfo_all do \ install -D -m644 $(INSTDIR)/$${library} $(INSTALLDIR)/$${library}; \ done + for jar in `cat $(gb_PackageInfo_get_target)/$*.jars`; \ + do \ + install -D -m644 $(INSTDIR)/$${jar} $(INSTALLDIR)/$${jar}; \ + done for file in `cat $(gb_PackageInfo_get_target)/$*.files`; \ do \ install -D -m644 $(INSTDIR)/$${file} $(INSTALLDIR)/$${file}; \