Makefile.am:

  Handle the case "sql_yacc.cc" is pregenerated or not, and that the
  case where the source and build tree is the same or not.
parent d9e0763c
...@@ -148,12 +148,15 @@ mysql_tzinfo_to_sql.o: $(mysql_tzinfo_to_sql_SOURCES) ...@@ -148,12 +148,15 @@ mysql_tzinfo_to_sql.o: $(mysql_tzinfo_to_sql_SOURCES)
sql_yacc.cc: sql_yacc.yy sql_yacc.cc: sql_yacc.yy
sql_yacc.h: sql_yacc.yy sql_yacc.h: sql_yacc.yy
# Be careful here, note that we use VPATH and might or might not have
# a pregenerated "sql_yacc.cc" in $(srcdir) or one we just built in
# $(builddir). And it has to work if $(srcdir) == $(builddir).
sql_yacc.o: sql_yacc.cc sql_yacc.h $(HEADERS) sql_yacc.o: sql_yacc.cc sql_yacc.h $(HEADERS)
@SED@ -e 's/__attribute__ ((__unused__))//' sql_yacc.cc > sql_yacc.cc-new @SED@ -e 's/__attribute__ ((__unused__))//' $< > sql_yacc.cc-new
@MV@ sql_yacc.cc-new sql_yacc.cc @MV@ sql_yacc.cc-new sql_yacc.cc
@echo "Note: The following compile may take a long time." @echo "Note: The following compile may take a long time."
@echo "If it fails, re-run configure with --with-low-memory" @echo "If it fails, re-run configure with --with-low-memory"
$(CXXCOMPILE) $(LM_CFLAGS) -c $< $(CXXCOMPILE) $(LM_CFLAGS) -c sql_yacc.cc
# This generates lex_hash.h # This generates lex_hash.h
# NOTE Built sources should depend on their sources not the tool # NOTE Built sources should depend on their sources not the tool
......
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