[Libreoffice-commits] .: Branch 'libreoffice-3-5' - configure.in set_soenv.in solenv/gbuild

Thorsten Behrens thorsten at kemper.freedesktop.org
Thu Dec 8 03:24:20 PST 2011


 configure.in                            |    6 ++++++
 set_soenv.in                            |    1 +
 solenv/gbuild/platform/IOS_ARM_GCC.mk   |   11 -----------
 solenv/gbuild/platform/WNT_INTEL_GCC.mk |   10 ----------
 solenv/gbuild/platform/com_GCC_defs.mk  |   29 +++++++++++++++++++++++++++++
 solenv/gbuild/platform/macosx.mk        |   27 ---------------------------
 solenv/gbuild/platform/unxgcc.mk        |   11 -----------
 7 files changed, 36 insertions(+), 59 deletions(-)

New commits:
commit 06b2409631290e33007f87306c03ad6dc2545b9d
Author: Thorsten Behrens <tbehrens at suse.com>
Date:   Thu Dec 8 12:03:38 2011 +0100

    Rework yacc rule for gcc platforms.
    
    Generalized the OSX ppc workaround for ancient bison versions,
    factored out for all gcc platforms. Put bison version detection
    into configure accordingly, to switch on that, and not on platform.

diff --git a/configure.in b/configure.in
index 9cd71ed..1c9a08d 100644
--- a/configure.in
+++ b/configure.in
@@ -6790,6 +6790,7 @@ dnl ***************************************
 dnl Checking for bison and flex
 dnl ***************************************
 AC_PATH_PROG(BISON, bison)
+ANCIENT_BISON="NO"
 if test -z "$BISON"; then
     AC_MSG_ERROR([no bison found in \$PATH, install it])
 else
@@ -6807,7 +6808,12 @@ else
     else
         AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))])
     fi
+    if test "$_bison_longver" -lt 2000; then
+        ANCIENT_BISON="YES"
+    fi
 fi
+AC_SUBST(ANCIENT_BISON)
+
 AC_PATH_PROG(FLEX, flex)
 if test -z "$FLEX"; then
     AC_MSG_ERROR([no flex found in \$PATH, install it])
diff --git a/set_soenv.in b/set_soenv.in
index b3ae895..f9d2013 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1654,6 +1654,7 @@ ToFile( "DPKG",              "@DPKG@",           "e" );
 ToFile( "PKGMK",             "@PKGMK@",          "e" );
 ToFile( "GNUMAKE",           "@GNUMAKE@",        "e" );
 ToFile( "GNUTAR",            "@GNUTAR@",         "e" );
+ToFile( "ANCIENT_BISON",     "@ANCIENT_BISON@",  "e" );
 ToFile( "UPD",               $UPD,               "e" );
 ToFile( "WORK_STAMP",        $WORK_STAMP,        "e" );
 ToFile( "SOLARVER",          $SOLARVER,          "e" );
diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk
index f8d4454..4a41bba 100644
--- a/solenv/gbuild/platform/IOS_ARM_GCC.mk
+++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk
@@ -81,17 +81,6 @@ gb_LinkTarget_LDFLAGS := \
 	$(subst -L../lib , ,$(SOLARLIB)) \
 #man ld says: obsolete	-Wl,-multiply_defined,suppress \
 
-# YaccTarget class
-
-define gb_YaccTarget__command
-$(call gb_Output_announce,$(2),$(true),YAC,3)
-$(call gb_Helper_abbreviate_dirs,\
-	mkdir -p $(dir $(3)) && \
-	$(gb_YACC) $(T_YACCFLAGS) --defines=$(4) -o $(3) $(1) )
-
-endef
-
-
 # ObjCxxObject class
 
 define gb_ObjCxxObject__command
diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
index 78ce3bd..c0739f4 100644
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
@@ -124,16 +124,6 @@ define gb_Helper_convert_native
 $(1)
 endef
 
-# YaccTarget class
-
-define gb_YaccTarget__command
-$(call gb_Output_announce,$(2),$(true),YAC,3)
-$(call gb_Helper_abbreviate_dirs,\
-	mkdir -p $(dir $(3)) && \
-	$(gb_YACC) $(T_YACCFLAGS) --defines=$(4) -o $(3) $(1) )
-
-endef
-
 # AsmObject class
 
 gb_AsmObject_get_source = $(1)/$(2).s
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index f91b58e..03ac2a8 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -25,6 +25,35 @@ gb_YACC := bison
 
 gb_CLASSPATHSEP := :
 
+# YaccTarget class
+
+ifeq ($(ANCIENT_BISON),YES)
+#
+# There are ancient versions of bison out there, which do not handle
+# well .cxx extensions, nor do they support --defines=<file>. The
+# result is that the header is named <foo>.cxx.h instead of <foo>.hxx
+# so we queue a mv to rename the header accordingly.
+# One example is XCode versions 2.x, which are used on OSX ppc
+# machines.
+#
+define gb_YaccTarget__command
+$(call gb_Output_announce,$(2),$(true),YAC,3)
+$(call gb_Helper_abbreviate_dirs,\
+	mkdir -p $(dir $(3)) && \
+	$(gb_YACC) $(T_YACCFLAGS) -d -o $(3) $(1) && mv $(3).h $(4) )
+
+endef
+
+else
+define gb_YaccTarget__command
+$(call gb_Output_announce,$(2),$(true),YAC,3)
+$(call gb_Helper_abbreviate_dirs,\
+	mkdir -p $(dir $(3)) && \
+	$(gb_YACC) $(T_YACCFLAGS) --defines=$(4) -o $(3) $(1) )
+
+endef
+endif
+
 # use CC/CXX if they are nondefaults
 ifneq ($(origin CC),default)
 gb_CC := $(CC)
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 3beb093..5be5001 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -101,33 +101,6 @@ endif
 
 gb_COMPILERNOOPTFLAGS := -O0
 
-# YaccTarget class
-
-ifeq ($(CPUNAME),POWERPC)
-#
-# PowerPC mac version of bison is ancient. it does not handle well
-# .cxx extension nor does it support --defines=<file>
-# the result is that the header is named <foo>.cxx.h instead of <foo>.hxx
-# so we queue a mv to rename the header accordingly.
-#
-define gb_YaccTarget__command
-$(call gb_Output_announce,$(2),$(true),YAC,3)
-$(call gb_Helper_abbreviate_dirs,\
-	mkdir -p $(dir $(3)) && \
-	$(gb_YACC) $(T_YACCFLAGS) -d -o $(3) $(1) && mv $(3).h $(4) )
-
-endef
-
-else
-define gb_YaccTarget__command
-$(call gb_Output_announce,$(2),$(true),YAC,3)
-$(call gb_Helper_abbreviate_dirs,\
-	mkdir -p $(dir $(3)) && \
-	$(gb_YACC) $(T_YACCFLAGS) --defines=$(4) -o $(3) $(1) )
-
-endef
-endif
-
 # ObjCxxObject class
 
 define gb_ObjCxxObject__command
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 43d832a..7403488 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -165,17 +165,6 @@ gb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
 
 gb_COMPILERNOOPTFLAGS := -O0
 
-# YaccTarget class
-
-define gb_YaccTarget__command
-$(call gb_Output_announce,$(2),$(true),YAC,3)
-$(call gb_Helper_abbreviate_dirs,\
-	mkdir -p $(dir $(3)) && \
-	$(gb_YACC) $(T_YACCFLAGS) --defines=$(4) -o $(3) $(1) )
-
-endef
-
-
 # AsmObject class
 
 gb_AsmObject_get_source = $(1)/$(2).s


More information about the Libreoffice-commits mailing list