diff options
author | unknown <kent@mysql.com/kent-amd64.(none)> | 2006-11-28 18:08:30 +0100 |
---|---|---|
committer | unknown <kent@mysql.com/kent-amd64.(none)> | 2006-11-28 18:08:30 +0100 |
commit | 89a71063402dcdf91e184e52b28bfe994885f97a (patch) | |
tree | c38f424802d17bf2d4c24a43ffba055a025fea98 /sql | |
parent | 4d08b747f9fa3521c63b21d990066a71390bd175 (diff) | |
download | mariadb-git-89a71063402dcdf91e184e52b28bfe994885f97a.tar.gz |
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.
sql/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.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/Makefile.am | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/Makefile.am b/sql/Makefile.am index 6c685ba67c6..cbb87f16d80 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -148,12 +148,15 @@ mysql_tzinfo_to_sql.o: $(mysql_tzinfo_to_sql_SOURCES) sql_yacc.cc: 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) - @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 @echo "Note: The following compile may take a long time." @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 # NOTE Built sources should depend on their sources not the tool |