diff options
author | unknown <malff/marcsql@weblab.(none)> | 2007-01-24 14:40:39 -0700 |
---|---|---|
committer | unknown <malff/marcsql@weblab.(none)> | 2007-01-24 14:40:39 -0700 |
commit | 39cc6d117bb7dafc0634082399e97c03a44dc1c4 (patch) | |
tree | 6c2570b265cf13754ed7b8941658cb8eba65a04f /sql/Makefile.am | |
parent | 5ed3d05e4078032f44d74c116919d2a0ec4aa550 (diff) | |
download | mariadb-git-39cc6d117bb7dafc0634082399e97c03a44dc1c4.tar.gz |
Bug#21029 (Dependencies between sql_yacc.cc and dependent headers not detected)
The build scripts in general, using automake, autoconf, etc, contain several
special commands and work around all related to the way the bison code in the
parser is built, for sql/sql_yacc.yy. These work arounds, accumulated over
time during development, ultimately cause the build scripts to be unstable
and cause build defects by not enforcing dependencies.
This fix simplifies the build process and aligns it with the automake tooling,
which provides native support for bison and *.yy files.
In particular, the following problem have been fixed:
- dependencies with sql_yacc.cc were not honored (Bug 21029), leading to
corrupted builds,
- the work around introduced by Bug 24557, to cleanup the generated files
sql_yacc.h and sql_yacc.cc, has been removed,
- the generated makefile, in a source distribution, used to destroy the files
sql_yacc.h and sql_yacc.cc on a 'make clean' target. This has been fixed:
these files are now removed by make maintainer-clean.
- The root cause of the problem found with gcc 4.1 (see Bug 24619) has been
clearly documented, and the "sed" hack has been replaced by a cleaner
work around, when building the code with bison 1.875.
- Removed the file sql/sql_yacc.yy.bak, added by WL 3031 by accident.
- Removed the unnecessary AM_YFLAG= --debug introduced by WL 3432, since
the compiling option DBUG_OFF takes precedence when setting YYDEBUG.
BitKeeper/deleted/.del-sql_yacc.yy.bak:
Rename: sql/sql_yacc.yy.bak -> BitKeeper/deleted/.del-sql_yacc.yy.bak
Makefile.am:
General cleanup of the build process for sql_yacc.yy
sql/Makefile.am:
General cleanup of the build process for sql_yacc.yy
sql/sql_yacc.yy:
General cleanup of the build process for sql_yacc.yy
Diffstat (limited to 'sql/Makefile.am')
-rw-r--r-- | sql/Makefile.am | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/sql/Makefile.am b/sql/Makefile.am index ab0d8c905aa..b2a521b354e 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -121,13 +121,14 @@ DEFS = -DMYSQL_SERVER \ -DLIBDIR="\"$(MYSQLLIBdir)\"" \ @DEFS@ -BUILT_DIST_SRC = sql_yacc.cc sql_yacc.h -BUILT_SOURCES = $(BUILT_DIST_SRC) lex_hash.h -EXTRA_DIST = udf_example.c udf_example.def $(BUILT_DIST_SRC) \ +BUILT_MAINT_SRC = sql_yacc.cc sql_yacc.h +BUILT_SOURCES = $(BUILT_MAINT_SRC) lex_hash.h +EXTRA_DIST = udf_example.c udf_example.def $(BUILT_MAINT_SRC) \ nt_servc.cc nt_servc.h message.mc CMakeLists.txt \ udf_example.c udf_example.def -CLEANFILES = lex_hash.h sql_yacc.cc sql_yacc.h sql_yacc.output -AM_YFLAGS = -d --debug --verbose +CLEANFILES = lex_hash.h sql_yacc.output +MAINTAINERCLEANFILES = $(BUILT_MAINT_SRC) +AM_YFLAGS = -d --verbose mysql_tzinfo_to_sql.cc: rm -f mysql_tzinfo_to_sql.cc @@ -148,23 +149,6 @@ link_sources: mysql_tzinfo_to_sql.cc mysql_tzinfo_to_sql.o: $(mysql_tzinfo_to_sql_SOURCES) $(CXXCOMPILE) -c $(INCLUDES) -DTZINFO2SQL $< -# Try to get better dependencies for the grammar. Othervise really bad -# things like different grammars for different pars of MySQL can -# happen if you are unlucky. -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-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 sql_yacc.cc - # FIXME seems like now "lex_hash.h" differs depending on configure # flags, so can't pregenerate and include in source TAR. Revert to # dist pregenerated if this changes, so the file doesn't differ. |