gbuild: add gb_Helper_register_jars_for_install

Change-Id: I560a8eded4747a9332f5dac29009eafd3d6e68b7
This commit is contained in:
Michael Stahl 2014-02-04 18:01:24 +01:00
parent d3a19d8eb7
commit 429255d163
4 changed files with 21 additions and 4 deletions

View file

@ -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))

View file

@ -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

View file

@ -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

View file

@ -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}; \