[Libreoffice-commits] .: 2 commits - hwpfilter/source solenv/gbuild
Tor Lillqvist
tml at kemper.freedesktop.org
Fri Sep 9 00:56:40 PDT 2011
hwpfilter/source/precompile.h | 6 +--
solenv/gbuild/platform/winmingw.mk | 57 ++++++++++++-------------------------
2 files changed, 21 insertions(+), 42 deletions(-)
New commits:
commit 54f82edbc31ab2844140cd7126b688decd6df862
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Fri Sep 9 10:52:37 2011 +0300
We can simplify this as MinGW always is cross-compilation for us
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index 3286d5e..d5cdb3e 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) \
commit 2e5c28651cd75aa8b4defc486389624aaffc0edc
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Thu Sep 8 18:50:06 2011 +0300
I see no immediate reason for this #ifndef __MINGW32__
diff --git a/hwpfilter/source/precompile.h b/hwpfilter/source/precompile.h
index 4086191..4d16348 100644
--- a/hwpfilter/source/precompile.h
+++ b/hwpfilter/source/precompile.h
@@ -30,13 +30,11 @@
#if defined _MSC_VER
#pragma warning(push, 1)
#endif
-#include "windows.h"
-#ifndef __MINGW32__
-#include "crtdbg.h"
+ #include "windows.h"
+ #include "crtdbg.h"
#if defined _MSC_VER
#pragma warning(pop)
#endif
#endif
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list