solenv/gbuild/TargetLocations.mk | 2 + solenv/gbuild/UIConfig.mk | 48 ++++++++++++++++++++++++++++++-- solenv/gbuild/platform/IOS_ARM_GCC.mk | 10 ++++++ solenv/gbuild/platform/WNT_INTEL_GCC.mk | 10 ++++++ solenv/gbuild/platform/com_MSC_class.mk | 10 ++++++ solenv/gbuild/platform/macosx.mk | 15 ++++++++++ solenv/gbuild/platform/solaris.mk | 10 ++++++ solenv/gbuild/platform/unxgcc.mk | 10 ++++++ 8 files changed, 112 insertions(+), 3 deletions(-)
New commits: commit 7007f0db77241c8cb6c542918f417d6722723ae5 Author: David Tardon <dtar...@redhat.com> Date: Sun Apr 7 12:03:09 2013 +0200 impl. platform-specific processing for menubar configs This is the last step needed to obsolete postprocess/packconfig/packconfig.pl. Change-Id: Iad6de126a467aadc829244951f98fc8b202fbd95 Reviewed-on: https://gerrit.libreoffice.org/3232 Reviewed-by: David Tardon <dtar...@redhat.com> Tested-by: David Tardon <dtar...@redhat.com> diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk index 381c5d7..50d2d91 100644 --- a/solenv/gbuild/TargetLocations.mk +++ b/solenv/gbuild/TargetLocations.mk @@ -195,6 +195,7 @@ gb_ThesaurusIndexTarget_get_target = $(WORKDIR)/ThesaurusIndexTarget/$(basename gb_UIConfig_get_target = $(WORKDIR)/UIConfig/$(1) gb_UILocalizeTarget_get_target = $(WORKDIR)/UILocalizeTarget/$(1).done gb_UILocalizeTarget_get_workdir = $(WORKDIR)/UILocalizeTarget/$(1) +gb_UIMenubarTarget_get_target = $(WORKDIR)/UIMenubarTarget/$(1).xml gb_UnoApiTarget_get_external_headers_target = $(WORKDIR)/UnoApiTarget/$(1).external gb_UnoApiTarget_get_headers_target = $(WORKDIR)/UnoApiTarget/$(1).headers gb_UnoApiTarget_get_target = $(WORKDIR)/UnoApiTarget/$(1).rdb @@ -310,6 +311,7 @@ $(eval $(call gb_Helper_make_clean_targets,\ ExternalProject \ UIConfig \ UILocalizeTarget \ + UIMenubarTarget \ UnoApiHeadersTarget \ UnoApiTarget \ UnpackedTarball \ diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk index 3aa008f..cf56de6 100644 --- a/solenv/gbuild/UIConfig.mk +++ b/solenv/gbuild/UIConfig.mk @@ -78,6 +78,39 @@ $(call gb_UILocalizeTarget_get_target,$(1)) :| \ endef +# class UIMenubarTarget + +# Handles platform-specific processing of menubar config files. + +# defined by platform: +# gb_UIMenubarTarget_UIMenubarTarget_platform +# gb_UIMenubarTarget__command + +$(dir $(call gb_UIMenubarTarget_get_target,%)).dir : + $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) + +$(dir $(call gb_UIMenubarTarget_get_target,%))%/.dir : + $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) + +$(call gb_UIMenubarTarget_get_target,%) : + $(call gb_UIMenubarTarget__command,$@,$*,$<) + +.PHONY : $(call gb_UIMenubarTarget_get_clean_target,%) +$(call gb_UIMenubarTarget_get_clean_target,%) : + $(call gb_Output_announce,$(2),$(false),UIM,1) + rm -f $(call gb_UIMenubarTarget_get_target,$*) + +# Process a menubar configuration file. +# +# gb_UIMenubarTarget_UIMenubarTarget target source +define gb_UIMenubarTarget_UIMenubarTarget +$(call gb_UIMenubarTarget_get_target,$(1)) : $(2) +$(call gb_UIMenubarTarget_get_target,$(1)) :| $(dir $(call gb_UIMenubarTarget_get_target,$(1))).dir + +$(call gb_UIMenubarTarget_UIMenubarTarget_platform,$(1),$(2)) + +endef + # class UIConfig # Handles UI configuration files. @@ -242,13 +275,23 @@ $(call gb_UIConfig__package_file,$(1),$(call gb_UIConfig_get_packagename,$(2)),$ endef +define gb_UIConfig__add_menubarfile +$(call gb_UIMenubarTarget_UIMenubarTarget,$(2),$(3)) +$(call gb_Package_add_file,$(call gb_UIConfig_get_packagename,$(1)_generated),xml/uiconfig/$(1)/menubar/$(notdir $(2)).xml,$(subst $(WORKDIR)/,,$(call gb_UIMenubarTarget_get_target,$(2)))) +$(call gb_PackageSet_add_package,$(call gb_UIConfig_get_packagesetname,$(1)),$(call gb_UIConfig_get_packagename,$(1)_generated)) + +$(call gb_Package_get_target,$(call gb_UIConfig_get_packagename,$(1)_generated)) : $(call gb_UIMenubarTarget_get_target,$(2)) +$(call gb_Package_get_clean_target,$(call gb_UIConfig_get_packagename,$(1)_generated)) : $(call gb_UIMenubarTarget_get_clean_target,$(2)) + +endef + # Add menubar config file to the package. # # The file is relative to $(SRCDIR) and without extension. # # gb_UIConfig_add_menubarfile target file define gb_UIConfig_add_menubarfile -$(call gb_UIConfig__add_xmlfile,$(1),$(1),menubar,$(2)) +$(call gb_UIConfig__add_menubarfile,$(1),$(2),$(SRCDIR)/$(2).xml) endef @@ -266,8 +309,7 @@ endef # # gb_UIConfig_add_generated_menubarfile target file define gb_UIConfig_add_generated_menubarfile -$(call gb_UIConfig__add_xmlfile,$(1),$(1)_generated,menubar,$(2)) -$(call gb_PackageSet_add_package,$(call gb_UIConfig_get_packagesetname,$(1)),$(call gb_UIConfig_get_packagename,$(1)_generated)) +$(call gb_UIConfig__add_menubarfile,$(1),$(2),$(WORKDIR)/$(2).xml) endef diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk index e0d8b06..466a821 100644 --- a/solenv/gbuild/platform/IOS_ARM_GCC.mk +++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk @@ -286,6 +286,16 @@ endif # Package class gb_Package_SDKDIRNAME := sdk +# UIMenubarTarget class + +define gb_UIMenubarTarget__command +$(call gb_Output_announce,$(2),$(true),UIM,1) +cp $(3) $(1) + +endef + +gb_UIMenubarTarget_UIMenubarTarget_platform := + # Python gb_PYTHON_PRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk index 3529741..42e1dda 100644 --- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk +++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk @@ -420,6 +420,16 @@ endif # Package class gb_Package_SDKDIRNAME := sdk +# UIMenubarTarget class + +define gb_UIMenubarTarget__command +$(call gb_Output_announce,$(2),$(true),UIM,1) +cp $(3) $(1) + +endef + +gb_UIMenubarTarget_UIMenubarTarget_platform := + # Python gb_PYTHON_PRECOMMAND := PATH="$${PATH}:$(OUTDIR_FOR_BUILD)/bin" PYTHONHOME="$(OUTDIR_FOR_BUILD)/lib/python" PYTHONPATH="$(OUTDIR_FOR_BUILD)/lib/python;$(OUTDIR_FOR_BUILD)/lib/python/lib-dynload" diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk index e3f121e..12227ab 100755 --- a/solenv/gbuild/platform/com_MSC_class.mk +++ b/solenv/gbuild/platform/com_MSC_class.mk @@ -599,6 +599,16 @@ endif # Package class gb_Package_SDKDIRNAME := sdk +# UIMenubarTarget class + +define gb_UIMenubarTarget__command +$(call gb_Output_announce,$(2),$(true),UIM,1) +cp $(3) $(1) + +endef + +gb_UIMenubarTarget_UIMenubarTarget_platform := + # Python gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME="$(OUTDIR_FOR_BUILD)/lib/python" PYTHONPATH="$(OUTDIR_FOR_BUILD)/lib/python;$(OUTDIR_FOR_BUILD)/lib/python/lib-dynload" diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk index 37dbd6c..1d0f212 100644 --- a/solenv/gbuild/platform/macosx.mk +++ b/solenv/gbuild/platform/macosx.mk @@ -360,6 +360,21 @@ endif # Package class gb_Package_SDKDIRNAME := LibreOffice$(PRODUCTVERSION)_SDK +# UIMenubarTarget class + +define gb_UIMenubarTarget__command +$(call gb_Output_announce,$(2),$(true),UIM,1) +$(call gb_ExternalExecutable_get_command,xsltproc) -o $(1) $(UI_MENUBAR_XSLT) $(3) + +endef + +define gb_UIMenubarTarget_UIMenubarTarget_platform +$(call gb_UIMenubarTarget_get_target,$(1)) : UI_MENUBAR_XSLT := $(SRCDIR)/postprocess/packconfig/macosx/macosx_menubar_modification.xsl +$(call gb_UIMenubarTarget_get_target,$(1)) : $(SRCDIR)/postprocess/packconfig/macosx/macosx_menubar_modification.xsl +$(call gb_UIMenubarTarget_get_target,$(1)) :| $(call gb_ExternalExecutable_get_dependencies,xsltproc) + +endef + # Python gb_PYTHON_PRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk index 037a1a1..968b1a3 100644 --- a/solenv/gbuild/platform/solaris.mk +++ b/solenv/gbuild/platform/solaris.mk @@ -412,6 +412,16 @@ endif # Package class gb_Package_SDKDIRNAME := sdk +# UIMenubarTarget class + +define gb_UIMenubarTarget__command +$(call gb_Output_announce,$(2),$(true),UIM,1) +cp $(3) $(1) + +endef + +gb_UIMenubarTarget_UIMenubarTarget_platform := + # Python gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME=$(OUTDIR)/lib/python PYTHONPATH=$(OUTDIR)/lib/python:$(OUTDIR)/lib/python/lib-dynload diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index 14f5882..e295edb 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -410,6 +410,16 @@ endif # Package class gb_Package_SDKDIRNAME := sdk +# UIMenubarTarget class + +define gb_UIMenubarTarget__command +$(call gb_Output_announce,$(2),$(true),UIM,1) +cp $(3) $(1) + +endef + +gb_UIMenubarTarget_UIMenubarTarget_platform := + # Python gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME=$(OUTDIR)/lib/python PYTHONPATH=$(OUTDIR)/lib/python:$(OUTDIR)/lib/python/lib-dynload _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits