summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2011-05-22 15:25:31 +0300
committerTor Lillqvist <tlillqvist@novell.com>2011-05-23 17:33:48 +0300
commit25ce4793bb6e005fe6e07bf29fad2d0e4441d3dc (patch)
tree2a445af69f2854e15a0c0a60aad8cffb4c9dc702 /solenv
parent7f99f234e06d3ea9c339d701f3e22e7eebb1d390 (diff)
Use cygpath only when building on Windows
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/BuildDirs.mk2
-rw-r--r--solenv/gbuild/platform/winmingw.mk11
2 files changed, 12 insertions, 1 deletions
diff --git a/solenv/gbuild/BuildDirs.mk b/solenv/gbuild/BuildDirs.mk
index a8a823b2406f..e2a7819826f2 100644
--- a/solenv/gbuild/BuildDirs.mk
+++ b/solenv/gbuild/BuildDirs.mk
@@ -42,7 +42,7 @@ endif
# HACK
# unixify windoze paths
-ifeq ($(OS),WNT)
+ifeq ($(OS_FOR_BUILD),WNT)
override WORKDIR := $(shell cygpath -u $(WORKDIR))
override OUTDIR := $(shell cygpath -u $(OUTDIR))
override gb_REPOS := $(shell cygpath -u $(gb_REPOS))
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index a7d77aa0fca9..b9e9e038dc05 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -29,7 +29,11 @@ GUI := WNT
COM := GCC
# set tmpdir to some mixed case path, suitable for native tools
+ifeq ($(OS_FOR_BUILD),WNT)
gb_TMPDIR:=$(if $(TMPDIR),$(shell cygpath -m $(TMPDIR)),$(shell cygpath -m /tmp))
+else
+gb_TMPDIR:=/tmp
+endif
gb_MKTEMP := mktemp --tmpdir=$(gb_TMPDIR) gbuild.XXXXXX
gb_CC := $(CC)
@@ -179,10 +183,17 @@ gb_STDLIBS := \
# Helper class
+ifeq ($(OS_FOR_BUILD),WNT)
gb_Helper_SRCDIR_NATIVE := $(shell cygpath -m $(SRCDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
gb_Helper_WORKDIR_NATIVE := $(shell cygpath -m $(WORKDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
gb_Helper_OUTDIR_NATIVE := $(shell cygpath -m $(OUTDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
gb_Helper_REPODIR_NATIVE := $(shell cygpath -m $(REPODIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
+else
+gb_Helper_SRCDIR_NATIVE := $(SRCDIR)
+gb_Helper_WORKDIR_NATIVE := $(WORKDIR)
+gb_Helper_OUTDIR_NATIVE := $(OUTDIR)
+gb_Helper_REPODIR_NATIVE := $(REPODIR)
+endif
define gb_Helper_abbreviate_dirs_native
R=$(gb_Helper_REPODIR_NATIVE) && $(subst $(REPODIR)/,$$R/,$(subst $(gb_Helper_REPODIR_NATIVE)/,$$R/,O=$(gb_Helper_OUTDIR_NATIVE) && W=$(gb_Helper_WORKDIR_NATIVE) && S=$(gb_Helper_SRCDIR_NATIVE))) && \