[Libreoffice-commits] core.git: config_host.mk.in configure.ac Makefile.in solenv/gbuild

David Tardon dtardon at redhat.com
Fri Apr 5 16:33:48 PDT 2013


 Makefile.in                      |    1 +
 config_host.mk.in                |    1 +
 configure.ac                     |    4 ++++
 solenv/gbuild/Package.mk         |   24 +++++++++++++++++++-----
 solenv/gbuild/TargetLocations.mk |    1 +
 5 files changed, 26 insertions(+), 5 deletions(-)

New commits:
commit bba6e9ebeb67235ee77e723af354474d5a3e9b85
Author: David Tardon <dtardon at redhat.com>
Date:   Wed Apr 3 17:13:32 2013 +0200

    allow Package to install to other dir than $OUTDIR
    
    This is preparatory work for creating installation directly by gbuild.
    
    Change-Id: I1b11db37c76ff781731845650169f39cb78fe820
    Reviewed-on: https://gerrit.libreoffice.org/3189
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/Makefile.in b/Makefile.in
index ecfbc1c..fd4cba6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -138,6 +138,7 @@ clean: clean-host clean-build
 
 clean-host:
 	rm -fr $(DEVINSTALLDIR)
+	rm -fr $(INSTDIR)
 	rm -fr $(OUTDIR)
 	rm -fr $(WORKDIR)
 	rm -fr install
diff --git a/config_host.mk.in b/config_host.mk.in
index e7c1a0e..66a5c68 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -247,6 +247,7 @@ export ICU_RECLASSIFIED_PREPEND_SET_EMPTY=@ICU_RECLASSIFIED_PREPEND_SET_EMPTY@
 export ILIB=@ILIB@
 export INPATH=@INPATH@
 export INPATH_FOR_BUILD=@INPATH_FOR_BUILD@
+export INSTDIR=@INSTDIR@
 export INSTALLDIR=@INSTALLDIR@
 export INSTALLDIRNAME=@INSTALLDIRNAME@
 export INTRO_BITMAP=@INTRO_BITMAP@
diff --git a/configure.ac b/configure.ac
index c460f73..912c111 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3896,11 +3896,14 @@ if test -n "${with_solver_and_workdir_root}"; then
     # IsValidFilePath in /sal/osl/w32/file_url.cxx rejects "X:\\" breaking idlc
     if echo ${formatted_path} | $GREP -q '/$'; then
         WORKDIR=${formatted_path}workdir/${INPATH}
+        INSTDIR=${formatted_path}instdir/${INPATH}
     else
         WORKDIR=${formatted_path}/workdir/${INPATH}
+        INSTDIR=${formatted_path}/instdir/${INPATH}
     fi
 else
     WORKDIR=${BUILDDIR}/workdir/${INPATH}
+    INSTDIR=${BUILDDIR}/instdir/${INPATH}
 fi
 OUTDIR="${SOLARVER}/${INPATH}"
 SOLARINC="-I. -I${SOLARVER}/$INPATH/inc/external -I${SOLARVER}/$INPATH/inc -I$SRC_ROOT/solenv/inc $SOLARINC"
@@ -3913,6 +3916,7 @@ AC_SUBST(EPM_FLAGS)
 AC_SUBST(GUI)
 AC_SUBST(GUIBASE)
 AC_SUBST(INPATH)
+AC_SUBST([INSTDIR])
 AC_SUBST(OS)
 AC_SUBST(OUTDIR)
 AC_SUBST(OUTPATH)
diff --git a/solenv/gbuild/Package.mk b/solenv/gbuild/Package.mk
index 6642a89..c239897 100644
--- a/solenv/gbuild/Package.mk
+++ b/solenv/gbuild/Package.mk
@@ -44,10 +44,13 @@ endef
 $(foreach destination,$(call gb_PackagePart_get_destinations),$(eval \
   $(call gb_PackagePart__rule,$(destination))))
 
+# Deliver one file to the output dir.
+#
+# gb_PackagePart_PackagePart destfile source prep-target outdir
 define gb_PackagePart_PackagePart
-$(OUTDIR)/$(1) : $(2) | $(dir $(OUTDIR)/$(1)).dir
+$(4)/$(1) : $(2) | $(dir $(4)/$(1)).dir
 $(2) :| $(3)
-$(call gb_Deliver_add_deliverable,$(OUTDIR)/$(1),$(2),$(3))
+$(call gb_Deliver_add_deliverable,$(4)/$(1),$(2),$(3))
 endef
 
 
@@ -70,6 +73,7 @@ $(call gb_Package_get_target,%) :
 # for other targets that want to create Packages, does not register at Module
 define gb_Package_Package_internal
 gb_Package_SOURCEDIR_$(1) := $(2)
+gb_Package_OUTDIR_$(1) := $(OUTDIR)
 $(call gb_Package_get_clean_target,$(1)) : FILES := $(call gb_Package_get_target,$(1)) $(call gb_Package_get_preparation_target,$(1))
 $(call gb_Package_get_target,$(1)) : $(call gb_Package_get_preparation_target,$(1))
 
@@ -83,10 +87,20 @@ $(call gb_Helper_make_userfriendly_targets,$(1),Package)
 
 endef
 
+# Set output dir for the package files.
+#
+# Default is $(OUTDIR).
+#
+# gb_Package_set_outdir package outdir
+define gb_Package_set_outdir
+gb_Package_OUTDIR_$(1) := $(2)
+
+endef
+
 define gb_Package_add_file
-$(call gb_Package_get_target,$(1)) : $(OUTDIR)/$(2)
-$(call gb_Package_get_clean_target,$(1)) : FILES += $(OUTDIR)/$(2)
-$(call gb_PackagePart_PackagePart,$(2),$$(gb_Package_SOURCEDIR_$(1))/$(3),$(call gb_Package_get_preparation_target,$(1)))
+$(call gb_Package_get_target,$(1)) : $$(gb_Package_OUTDIR_$(1))/$(2)
+$(call gb_Package_get_clean_target,$(1)) : FILES += $$(gb_Package_OUTDIR_$(1))/$(2)
+$(call gb_PackagePart_PackagePart,$(2),$$(gb_Package_SOURCEDIR_$(1))/$(3),$(call gb_Package_get_preparation_target,$(1)),$$(gb_Package_OUTDIR_$(1)))
 
 endef
 
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index b738b65..a8cf8a4 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -39,6 +39,7 @@ gb_Extension_get_target = $(OUTDIR)/bin/$(1).oxt
 gb_HelpTarget_get_outdir_target = $(OUTDIR)/pck/$(1).zip
 gb_Pagein_get_outdir_target = $(OUTDIR)/bin/pagein-$(1)
 gb_PackagePart_get_destinations = \
+	$(INSTDIR) \
 	$(OUTDIR)/bin \
 	$(OUTDIR)/inc \
 	$(OUTDIR)/lib \


More information about the Libreoffice-commits mailing list