[Libreoffice-commits] core.git: Makefile.in solenv/gbuild

Bjoern Michaelsen bjoern.michaelsen at canonical.com
Thu Nov 21 08:37:10 PST 2013


 Makefile.in                                  |    6 +-
 solenv/gbuild/AllLangHelp.mk                 |    3 +
 solenv/gbuild/AllLangPackage.mk              |    2 
 solenv/gbuild/AllLangResTarget.mk            |    3 +
 solenv/gbuild/TargetLocations.mk             |    1 
 solenv/gbuild/extensions/post_PackageInfo.mk |   71 +++++++++++++++++++++++++++
 6 files changed, 83 insertions(+), 3 deletions(-)

New commits:
commit 6991dd741e41055eb6e10865e40320ab966c85d7
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Thu Nov 21 14:47:20 2013 +0100

    make packageinfo target
    
    Change-Id: Id5f6f5c1f3e46df2d9033ccd5bbf2af6ab38a9e8
    Reviewed-on: https://gerrit.libreoffice.org/6754
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
    Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>

diff --git a/Makefile.in b/Makefile.in
index 8c64940..fcfa6f2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -7,7 +7,7 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-.PHONY : all bootstrap gbuild build build-non-l10n-only build-l10n-only check clean clean-build clean-host test-install distclean distro-pack-install docs download fetch findunusedcode get-submodules id install install-strip subsequentcheck tags debugrun help slowcheck translations unitcheck
+.PHONY : all bootstrap gbuild build build-non-l10n-only build-l10n-only check clean clean-build clean-host test-install distclean distro-pack-install docs download fetch findunusedcode get-submodules id install install-strip subsequentcheck tags debugrun help slowcheck translations unitcheck packageinfo
 
 MAKECMDGOALS?=all
 
@@ -220,12 +220,12 @@ endif
 		$(if $(filter build check,$(MAKECMDGOALS)),all) \
 		$(if $(filter build-nocheck,$(MAKECMDGOALS)),build) \
 		$(if $(filter check,$(MAKECMDGOALS)),subsequentcheck) \
-		$(filter all build-l10n-only build-non-l10n-only debugrun help slowcheck translations unitcheck subsequentcheck check,$(MAKECMDGOALS))
+		$(filter all build-l10n-only build-non-l10n-only debugrun help slowcheck translations unitcheck subsequentcheck check packageinfo,$(MAKECMDGOALS))
 ifeq ($(OS),IOS)
 	$(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) ios
 endif
 
-build-non-l10n-only build-l10n-only build-nocheck check debugrun help slowcheck translations unitcheck subsequentcheck : build
+build-non-l10n-only build-l10n-only build-nocheck check debugrun help slowcheck translations unitcheck subsequentcheck packageinfo: build
 
 cross-toolset: bootstrap fetch
 	$(GNUMAKE) gb_Side=build -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild build-tools
diff --git a/solenv/gbuild/AllLangHelp.mk b/solenv/gbuild/AllLangHelp.mk
index a5547dd..dca6c70 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 cc8c0b8..8a691cd 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 c1bf16a..35afd1a 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 8976f44..d7855b3 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 0000000..9fd49e7
--- /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
+ at 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
+ at 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
+ at 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
+ at 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:


More information about the Libreoffice-commits mailing list