summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2011-09-09 10:52:37 +0300
committerTor Lillqvist <tlillqvist@novell.com>2011-09-09 10:53:11 +0300
commit54f82edbc31ab2844140cd7126b688decd6df862 (patch)
tree29cdc895b6abe37f56ca78f5f08b27d40614feeb /solenv
parent2e5c28651cd75aa8b4defc486389624aaffc0edc (diff)
We can simplify this as MinGW always is cross-compilation for us
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/winmingw.mk57
1 files changed, 19 insertions, 38 deletions
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index 3286d5e2b610..d5cdb3ec9ad0 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -29,12 +29,7 @@
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:=$(if $(TMPDIR),$(TMPDIR),/tmp)
-endif
gb_MKTEMP := mktemp --tmpdir=$(gb_TMPDIR) gbuild.XXXXXX
gb_CC := $(CC)
@@ -147,43 +142,29 @@ 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
+# For LibreOffice, MinGW is always cross-compilation, so the "native"
+# platform for the BUILD *is* Unix. No Cygwin/Win32 stuff needed.
+
gb_Helper_SRCDIR_NATIVE := $(SRCDIR)
gb_Helper_WORKDIR_NATIVE := $(WORKDIR)
gb_Helper_OUTDIR_NATIVE := $(OUTDIR)
gb_Helper_REPODIR_NATIVE := $(REPODIR)
-endif
-# convert parameters filesystem root to native notation
-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))) && \
-$(subst $(REPODIR)/,$$R/,$(subst $(SRCDIR)/,$$S/,$(subst $(OUTDIR)/,$$O/,$(subst $(WORKDIR)/,$$W/,$(subst $(gb_Helper_REPODIR_NATIVE)/,$$R/,$(subst $(gb_Helper_SRCDIR_NATIVE)/,$$S/,$(subst $(gb_Helper_OUTDIR_NATIVE)/,$$O/,$(subst $(gb_Helper_WORKDIR_NATIVE)/,$$W/,$(1)))))))))
-endef
+gb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)
# Set the proper enirotment variable so that our BUILD platform
# build-time shared libraries are found.
-ifeq ($(OS_FOR_BUILD),WNT)
-gb_Helper_set_ld_path := PATH=$(OUTDIR_FOR_BUILD)/bin:$$PATH
-else ifeq ($(OS_FOR_BUILD),MACOSX)
+ifeq ($(OS_FOR_BUILD),MACOSX)
gb_Helper_set_ld_path := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib
else
gb_Helper_set_ld_path := LD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib
endif
-# convert parameters filesystem root to native notation
-# does some real work only on windows, make sure not to
-# break the dummy implementations on unx*
+# Convert parameters filesystem root to native notation
+# does some real work only on Windows, and this file is for
+# cross-compilation.
define gb_Helper_convert_native
-$(patsubst -I$(OUTDIR)%,-I$(gb_Helper_OUTDIR_NATIVE)%, \
-$(patsubst $(OUTDIR)%,$(gb_Helper_OUTDIR_NATIVE)%, \
-$(patsubst $(WORKDIR)%,$(gb_Helper_WORKDIR_NATIVE)%, \
-$(patsubst $(SRCDIR)%,$(gb_Helper_SRCDIR_NATIVE)%, \
-$(1)))))
+$(1)
endef
# YaccObject class
@@ -247,7 +228,7 @@ gb_PrecompiledHeader_get_enableflags = -I$(WORKDIR)/PrecompiledHeader/$(gb_Preco
ifeq ($(gb_FULLDEPS),$(true))
define gb_PrecompiledHeader__command_deponcompile
-$(call gb_Helper_abbreviate_dirs_native,\
+$(call gb_Helper_abbreviate_dirs,\
$(OUTDIR_FOR_BUILD)/bin/makedepend \
$(4) $(5) \
-I$(dir $(3)) \
@@ -268,7 +249,7 @@ endif
define gb_PrecompiledHeader__command
$(call gb_Output_announce,$(2),$(true),PCH,1)
-$(call gb_Helper_abbreviate_dirs_native,\
+$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) $(dir $(call gb_PrecompiledHeader_get_dep_target,$(2))) && \
$(gb_CXX) \
-x c++-header \
@@ -290,7 +271,7 @@ gb_NoexPrecompiledHeader_get_enableflags = -I$(WORKDIR)/NoexPrecompiledHeader/$(
ifeq ($(gb_FULLDEPS),$(true))
define gb_NoexPrecompiledHeader__command_deponcompile
-$(call gb_Helper_abbreviate_dirs_native,\
+$(call gb_Helper_abbreviate_dirs,\
$(OUTDIR_FOR_BUILD)/bin/makedepend \
$(4) $(5) \
-I$(dir $(3)) \
@@ -311,7 +292,7 @@ endif
define gb_NoexPrecompiledHeader__command
$(call gb_Output_announce,$(2),$(true),PCH,1)
-$(call gb_Helper_abbreviate_dirs_native,\
+$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) $(dir $(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) && \
$(gb_CXX) \
-x c++-header \
@@ -363,7 +344,7 @@ gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
define gb_LinkTarget__command_dynamiclinkexecutable
$(call gb_Output_announce,$(2),$(true),LNK,4)
-$(call gb_Helper_abbreviate_dirs_native,\
+$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
$(gb_CXX) $(strip \
$(gb_Executable_TARGETTYPEFLAGS) \
@@ -383,7 +364,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
endef
define gb_LinkTarget__command_dynamiclinklibrary
-$(call gb_Helper_abbreviate_dirs_native,\
+$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
$(gb_CXX) $(strip \
$(gb_Library_TARGETTYPEFLAGS) \
@@ -403,7 +384,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
endef
define gb_LinkTarget__command_staticlinklibrary
-$(call gb_Helper_abbreviate_dirs_native,\
+$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
$(gb_AR) -rsu $(1) \
$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
@@ -622,7 +603,7 @@ gb_SrsPartTarget_RSCCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR
ifeq ($(gb_FULLDEPS),$(true))
define gb_SrsPartTarget__command_dep
-$(call gb_Helper_abbreviate_dirs_native,\
+$(call gb_Helper_abbreviate_dirs,\
$(OUTDIR_FOR_BUILD)/bin/makedepend \
$(INCLUDE) \
$(DEFS) \
@@ -646,7 +627,7 @@ gb_WinResTarget_POSTFIX :=.res
define gb_WinResTarget__command
$(call gb_Output_announce,$(2),$(true),RES,3)
-$(call gb_Helper_abbreviate_dirs_native,\
+$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
$(gb_RC) \
$(DEFS) $(FLAGS) \
@@ -662,7 +643,7 @@ $(eval $(call gb_Helper_make_dep_targets,\
ifeq ($(gb_FULLDEPS),$(true))
define gb_WinResTarget__command_dep
-$(call gb_Helper_abbreviate_dirs_native,\
+$(call gb_Helper_abbreviate_dirs,\
$(OUTDIR_FOR_BUILD)/bin/makedepend \
$(INCLUDE) \
$(DEFS) \