diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-11-21 14:47:20 +0100 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2013-11-21 10:36:51 -0600 |
commit | 6991dd741e41055eb6e10865e40320ab966c85d7 (patch) | |
tree | ec6caf9a5bc62fde4c12c063af0c3c1d2d59cc28 /solenv | |
parent | a18b56c2253181d4da84980e84b35f27a667bc23 (diff) |
make packageinfo target
Change-Id: Id5f6f5c1f3e46df2d9033ccd5bbf2af6ab38a9e8
Reviewed-on: https://gerrit.libreoffice.org/6754
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/AllLangHelp.mk | 3 | ||||
-rw-r--r-- | solenv/gbuild/AllLangPackage.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/AllLangResTarget.mk | 3 | ||||
-rw-r--r-- | solenv/gbuild/TargetLocations.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/extensions/post_PackageInfo.mk | 71 |
5 files changed, 80 insertions, 0 deletions
diff --git a/solenv/gbuild/AllLangHelp.mk b/solenv/gbuild/AllLangHelp.mk index a5547dd27c86..dca6c7090b07 100644 --- a/solenv/gbuild/AllLangHelp.mk +++ b/solenv/gbuild/AllLangHelp.mk @@ -49,7 +49,10 @@ endef # Create and deliver help packs for a module for all languages. # # gb_AllLangHelp_AllLangHelp module +gb_AllLangHelp_ALLTARGETS := + define gb_AllLangHelp_AllLangHelp +gb_AllLangHelp_ALLTARGETS += $(1) $(foreach lang,$(gb_HELP_LANGS),\ $(call gb_AllLangHelp_AllLangHelp__one_lang,$(1),$(lang),$(call gb_AllLangHelp__get_helpname,$(1),$(lang)))) diff --git a/solenv/gbuild/AllLangPackage.mk b/solenv/gbuild/AllLangPackage.mk index cc8c0b8f2b3c..8a691cdc1018 100644 --- a/solenv/gbuild/AllLangPackage.mk +++ b/solenv/gbuild/AllLangPackage.mk @@ -68,7 +68,9 @@ endef # (i.e., if we are building with the language). # # gb_AllLangPackage_add_file target destination source +gb_AllLangPackage_ALLDIRS := define gb_AllLangPackage_add_file +gb_AllLangPackage_ALLDIRS := $(sort $(gb_AllLangPackage_ALLDIRS) $(patsubst %$(3),%,$(2))) $(call gb_AllLangPackage__add_file,$(1),$(2),$(3),$(firstword $(subst /, ,$(3)))) endef diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk index c1bf16a4aced..35afd1aaa5aa 100644 --- a/solenv/gbuild/AllLangResTarget.mk +++ b/solenv/gbuild/AllLangResTarget.mk @@ -401,6 +401,7 @@ $(call gb_ResTarget_get_target,%) : $(gb_Helper_MISCDUMMY) \ $(gb_ResTarget_RSCCOMMAND) @$${RESPONSEFILE} && \ rm -f $${RESPONSEFILE}) +#$(info $(call gb_ResTarget_get_target,$(1))) define gb_ResTarget_ResTarget $(call gb_ResTarget_get_target,$(1)) : LIBRARY = $(2) $(call gb_ResTarget_get_target,$(1)) : LANGUAGE = $(3) @@ -457,7 +458,9 @@ $(call gb_AllLangResTarget_get_target,%) : gb_ResTarget_get_install_target = $(INSTROOT)/$(LIBO_SHARE_RESOURCE_FOLDER)/$(1).res +gb_AllLangResTarget_ALLTARGETS := define gb_AllLangResTarget_AllLangResTarget +gb_AllLangResTarget_ALLTARGETS += $(1) $(foreach lang,$(gb_AllLangResTarget_LANGS),\ $(call gb_ResTarget_ResTarget,$(1)$(lang),$(1),$(lang))) diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk index 8976f446ad4e..d7855b3c0a44 100644 --- a/solenv/gbuild/TargetLocations.mk +++ b/solenv/gbuild/TargetLocations.mk @@ -126,6 +126,7 @@ gb_Package_get_preparation_target = $(WORKDIR)/Package/prepared/$(1) gb_Package_get_target = $(WORKDIR)/Package/$(1).filelist gb_Package_get_target_for_build = $(WORKDIR_FOR_BUILD)/Package/$(1).filelist gb_PackageSet_get_target = $(WORKDIR)/PackageSet/$(1).filelist +gb_PackageInfo_get_target = $(WORKDIR)/PackageInfo gb_Postprocess_get_target = $(WORKDIR)/Postprocess/$(1) gb_PrecompiledHeader_get_dep_target = $(WORKDIR)/Dep/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.gch.d gb_PrecompiledHeader_get_target = $(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.gch diff --git a/solenv/gbuild/extensions/post_PackageInfo.mk b/solenv/gbuild/extensions/post_PackageInfo.mk new file mode 100644 index 000000000000..9fd49e7f7b36 --- /dev/null +++ b/solenv/gbuild/extensions/post_PackageInfo.mk @@ -0,0 +1,71 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +gb_PackageInfo_InstallModules := \ + base \ + calc \ + graphicsfilter \ + tde \ + impress \ + onlineupdate \ + gnome \ + kde \ + math \ + ooo \ + writer \ + ure \ + activexbinarytable \ + ooobinarytable \ + winexplorerextbinarytable \ + +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 + +endef + +define gb_PackageInfo_emit_help_for_one_target +$(foreach suf,cfg db ht idxl/_0.cfs idxl/segments_3 idxl/segments.gen jar key tree,$(if $(wildcard $(INSTDIR)/help/$(1).$(suf)),echo "help/$(1).$(suf)" >> $(2) && )) true + +endef + +define gb_PackageInfo_emit_help_for_one_lang +@touch $(foreach suf,executables libraries files,$(gb_PackageInfo_get_target)/help-$(1).$(suf)) +$(foreach target,$(filter-out shared,$(gb_AllLangHelp_ALLTARGETS)),$(call gb_PackageInfo_emit_help_for_one_target,$(1)/$(target),$(gb_PackageInfo_get_target)/help-$(1).files)) + +endef + +#getting the package files post-hoc with wildcard isnt good and should be done better +define gb_PackageInfo_emit_l10n_for_one_alllangpackage +@$(foreach file,$(shell ls $(INSTDIR)/$(1)/$(2)),echo "$(1)/$(2)/$(file)" >> $(gb_PackageInfo_get_target)/l10n-$(2).files &&) true + +endef + +define gb_PackageInfo_emit_l10n_for_one_ressource +@echo "$(patsubst $(INSTDIR)/%,%,$(call gb_ResTarget_get_install_target,$(1)$(2)))" >> $(gb_PackageInfo_get_target)/l10n-$(2).files + +endef + +define gb_PackageInfo_emit_l10n_for_one_lang +@touch $(foreach suf,executables libraries files,$(gb_PackageInfo_get_target)/l10n-$(1).$(suf)) +$(if $(filter-out qtz en-US,$(1)),$(foreach packagedir,$(patsubst %/,%,$(gb_AllLangPackage_ALLDIRS)),$(call gb_PackageInfo_emit_l10n_for_one_alllangpackage,$(packagedir),$(1)))) +$(if $(filter $(gb_AllLangResTarget_LANGS),$(1)),$(foreach target,$(gb_AllLangResTarget_ALLTARGETS),$(call gb_PackageInfo_emit_l10n_for_one_ressource,$(target),$(1)))) + +endef + +.PHONY: packageinfo +packageinfo: + @rm -rf $(gb_PackageInfo_get_target) && mkdir $(gb_PackageInfo_get_target) + $(foreach installmodule,$(gb_PackageInfo_InstallModules),$(call gb_PackageInfo_emit_binaries_command,$(installmodule))) + $(foreach helplang,$(gb_HELP_LANGS),$(call gb_PackageInfo_emit_help_for_one_lang,$(helplang))) + $(foreach l10nlang,$(if $(strip $(gb_WITH_LANG)),$(gb_WITH_LANG),en-US),$(call gb_PackageInfo_emit_l10n_for_one_lang,$(l10nlang))) + + +# vim: set noet sw=4 ts=4: |