summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2011-12-08 12:03:38 +0100
committerThorsten Behrens <tbehrens@suse.com>2011-12-08 12:22:57 +0100
commit456ec763d77a238967b866e2f90d1052626c2fdb (patch)
tree69414aa4f76ae410f220233c2f45c27be9fb2e83 /solenv
parent704ee5bc859499f5fe824f66f9607b554c135c66 (diff)
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.
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/IOS_ARM_GCC.mk11
-rw-r--r--solenv/gbuild/platform/WNT_INTEL_GCC.mk10
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk29
-rw-r--r--solenv/gbuild/platform/macosx.mk27
-rw-r--r--solenv/gbuild/platform/unxgcc.mk11
5 files changed, 29 insertions, 59 deletions
diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk
index f8d44546aded..4a41bba1a971 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 78ce3bd18342..c0739f4129d8 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 f91b58e30d5b..03ac2a892194 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 3beb09365ece..5be5001f22fd 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 43d832ad169d..74034881924a 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