From b50c843b2595b83fc55f1fe0452ba6fa9ba55d06 Mon Sep 17 00:00:00 2001 From: "msvensson@shellback.(none)" <> Date: Mon, 18 Sep 2006 21:11:34 +0200 Subject: [PATCH] BUG#19738 "make install" tries to build files that "make" should already have built - Make built sources only depend on it's sources not the built tool --- extra/Makefile.am | 11 ++++++++--- sql/Makefile.am | 6 +++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/extra/Makefile.am b/extra/Makefile.am index c0ad75059df..962dd212664 100644 --- a/extra/Makefile.am +++ b/extra/Makefile.am @@ -22,14 +22,19 @@ BUILT_SOURCES= $(top_builddir)/include/mysqld_error.h \ $(top_builddir)/include/sql_state.h \ $(top_builddir)/include/mysqld_ername.h pkginclude_HEADERS= $(BUILT_SOURCES) -CLEANFILES = $(BUILT_SOURCES) +DISTCLEANFILES = $(BUILT_SOURCES) # We never use SUBDIRS here, but needed for automake 1.6.3 # to generate code to handle DIST_SUBDIRS SUBDIRS= DIST_SUBDIRS= yassl -# This will build mysqld_error.h and sql_state.h -$(top_builddir)/include/mysqld_error.h: comp_err$(EXEEXT) +# This will build mysqld_error.h, mysqld_ername.h and sql_state.h +# NOTE Built files should depend on their sources to avoid +# the built files being rebuilt in source dist +$(top_builddir)/include/mysqld_error.h: comp_err.c \ + $(top_srcdir)/sql/share/errmsg.txt \ + $(wildcard $(top_srcdir)/sql/share/charsets/*.xml) + $(MAKE) $(AM_MAKEFLAGS) comp_err$(EXEEXT) $(top_builddir)/extra/comp_err$(EXEEXT) \ --charset=$(top_srcdir)/sql/share/charsets \ --out-dir=$(top_builddir)/sql/share/ \ diff --git a/sql/Makefile.am b/sql/Makefile.am index 8428d6401b5..a106a2773f1 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -150,7 +150,11 @@ sql_yacc.o: sql_yacc.cc sql_yacc.h $(HEADERS) @echo "If it fails, re-run configure with --with-low-memory" $(CXXCOMPILE) $(LM_CFLAGS) -c $< -lex_hash.h: gen_lex_hash$(EXEEXT) +# This generates lex_hash.h +# NOTE Built sources should depend on their sources not the tool +# this avoid the rebuild of the built files in a source dist +lex_hash.h: gen_lex_hash.cc lex.h + $(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT) ./gen_lex_hash$(EXEEXT) > $@ # For testing of udf_example.so