Kaydet (Commit) d455d725 authored tarafından Matúš Kukan's avatar Matúš Kukan

gbuild: move YaccTarget__command to com_GCC_class

üst 0a45deba
......@@ -72,3 +72,33 @@ $(call gb_Helper_abbreviate_dirs,\
-o $(call gb_SrsPartTarget_get_dep_target,$(1)))
endef
# 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 $(5) $(1) && mv $(5).h $(4) && touch $(3) )
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 $(5) $(1) && touch $(3) )
endef
endif
# vim: set noet sw=4 ts=4:
......@@ -25,35 +25,6 @@ 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 $(5) $(1) && mv $(5).h $(4) && touch $(3) )
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 $(5) $(1) && touch $(3) )
endef
endif
# use CC/CXX if they are nondefaults
ifneq ($(origin CC),default)
gb_CC := $(CC)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment