Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On 03/05/12 10:37, Noel Grandin wrote:


On 2012-05-02 19:54, Michael Stahl wrote:
so i've added a --with-solver-and-workdir-root to do that on master

Thanks, that's an awesome idea.

But now I'm getting all kinds of weird errors, see the attached log.

the gbuild ones apparently come from the path conversion stuff that is
needed on cygwin, apparently somebody broke that for the case where
$WORKDIR/$OUTDIR are not inside $SRCDIR, which used to work some time in
the past...

the attachment contains an utterly horrible workaround that you could
try out, but really why do we convert paths so much nowadays, apparently
there are 15 calls to gb_Helper_native_path scattered about, why did
this get so complicated and why isn't gb_Helper_abbreviate_dirs_native
sufficient for all cases?

Matus, is 8fd5ba3749aa740b3c060db775b42f15a5ce50a7 really necessary?
it seems to make everything more complex..

Also, I think "make clean" will need to explicitly clean out the solver 
and workdir options.

thanks for noticing, fixed on master
From b1121056260b978c8bb16eb5c3fdf5a092d05e73 Mon Sep 17 00:00:00 2001
From: Michael Stahl <mstahl@redhat.com>
Date: Thu, 3 May 2012 13:24:42 +0200
Subject: [PATCH] gbuild: awful path hackery to fix cygwin paths

---
 solenv/gbuild/Helper.mk                 |   14 +++++++++++++-
 solenv/gbuild/platform/WNT_INTEL_MSC.mk |    2 ++
 solenv/gbuild/platform/com_GCC_defs.mk  |    2 ++
 3 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/solenv/gbuild/Helper.mk b/solenv/gbuild/Helper.mk
index 495a3e0..4c00b45 100644
--- a/solenv/gbuild/Helper.mk
+++ b/solenv/gbuild/Helper.mk
@@ -56,14 +56,26 @@ endef
 # First convert to unix style to avoid problems when
 # $(SRCDIR) is substring of $(gb_Helper_SRCDIR_NATIVE)
 # and $(1) already contains $(gb_Helper_SRCDIR_NATIVE)
+ifeq ($(subst $(SRCDIR),,$(OUTDIR)),$(OUTDIR))
 define gb_Helper_native_path
-$(subst $(SRCDIR),$(gb_Helper_SRCDIR_NATIVE),$(call gb_Helper_unix_path,$(1)))
+$(subst $(SRCDIR),$(gb_Helper_SRCDIR_NATIVE),$(subst 
$(WORKDIR),$(gb_Helper_WORKDIR_NATIVE),$(subst $(OUTDIR),$(gb_Helper_OUTDIR_NATIVE),$(call 
gb_Helper_unix_path,$(1)))))
 endef
+else
+define gb_Helper_native_path
+$(subst $(SRCDIR),$(gb_Helper_SRCDIR_NATIVE),$(1))
+endef
+endif
 
 # $(gb_Helper_SRCDIR_NATIVE) can't be substring of $(SRCDIR)
+ifeq ($(subst $(SRCDIR),,$(OUTDIR)),$(OUTDIR))
+define gb_Helper_unix_path
+$(subst $(gb_Helper_SRCDIR_NATIVE),$(SRCDIR),$(subst $(gb_Helper_OUTDIR_NATIVE),$(OUTDIR),$(subst 
$(gb_Helper_WORKDIR_NATIVE),$(WORKDIR),$(1))))
+endef
+else
 define gb_Helper_unix_path
 $(subst $(gb_Helper_SRCDIR_NATIVE),$(SRCDIR),$(1))
 endef
+endif
 
 define gb_Helper_make_clean_target
 gb_$(1)_get_clean_target = $(WORKDIR)/Clean/$(1)/$$(1)
diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
index 9ee08e2..8100c07 100644
--- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
@@ -245,6 +245,8 @@ endif
 gb_Helper_OUTDIRLIBDIR := $(OUTDIR)/bin
 gb_Helper_OUTDIR_FOR_BUILDLIBDIR := $(OUTDIR_FOR_BUILD)/bin
 gb_Helper_SRCDIR_NATIVE := $(shell cygpath -m $(SRCDIR))
+gb_Helper_OUTDIR_NATIVE := $(shell cygpath -m $(OUTDIR))
+gb_Helper_WORKDIR_NATIVE := $(shell cygpath -m $(WORKDIR))
 
 gb_Helper_set_ld_path := PATH="$${PATH}:$(OUTDIR)/bin"
 
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index d84ab64..ea15b69 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -165,5 +165,7 @@ endef
 gb_Helper_OUTDIRLIBDIR := $(OUTDIR)/lib
 gb_Helper_OUTDIR_FOR_BUILDLIBDIR := $(OUTDIR_FOR_BUILD)/lib
 gb_Helper_SRCDIR_NATIVE := $(SRCDIR)
+gb_Helper_OUTDIR_NATIVE := $(OUTDIR)
+gb_Helper_WORKDIR_NATIVE := $(WORKDIR)
 
 gb_Helper_get_rcfile = $(1)rc
-- 
1.7.7.6


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.