diff --git a/.bzrignore b/.bzrignore index 4f0845f03cd..0d5a8647198 100644 --- a/.bzrignore +++ b/.bzrignore @@ -985,3 +985,4 @@ vio/test-sslserver vio/viotest-ssl extra/mysqld_error.h extra/sql_state.h +extra/created_include_files diff --git a/extra/Makefile.am b/extra/Makefile.am index 1ca7c9fb692..7bb401f0729 100644 --- a/extra/Makefile.am +++ b/extra/Makefile.am @@ -19,14 +19,21 @@ INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include \ -I$(top_srcdir)/extra LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \ ../dbug/libdbug.a ../strings/libmystrings.a -BUILT_SOURCES=mysqld_error.h sql_state.h -pkginclude_HEADERS=$(BUILT_SOURCES) +BUILT_SOURCES= mysqld_error.h sql_state.h +pkginclude_HEADERS= $(BUILT_SOURCES) +created_sources = created_include_files +CLEANFILES = $(created_sources) +SUPERCLEANFILES = $(BUILT_SOURCES) -mysqld_error.h: comp_err - $(top_builddir)/extra/comp_err --charset=$(srcdir)/../sql/share/charsets --out-dir=$(top_builddir)/sql/share/ --header_file=$(top_builddir)/extra/mysqld_error.h --state_file=$(top_builddir)/extra/sql_state.h --in_file=$(srcdir)/../sql/share/errmsg.txt +all: $(created_sources) -sql_state.h: comp_err +# This will build mysqld_error.h and sql_state.h +mysqld_error.h: created_include_files +sql_state.h: created_include_files + +created_include_files: comp_err $(top_builddir)/extra/comp_err --charset=$(srcdir)/../sql/share/charsets --out-dir=$(top_builddir)/sql/share/ --header_file=$(top_builddir)/extra/mysqld_error.h --state_file=$(top_builddir)/extra/sql_state.h --in_file=$(srcdir)/../sql/share/errmsg.txt + touch created_include_files bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \ resolve_stack_dump mysql_waitpid diff --git a/extra/comp_err.c b/extra/comp_err.c index fb5da3a066a..9bd0a1ec7a2 100644 --- a/extra/comp_err.c +++ b/extra/comp_err.c @@ -156,10 +156,8 @@ int main(int argc, char *argv[]) uint row_count; struct errors *error_head; struct languages *lang_head; - DBUG_ENTER("main"); - LINT_INIT(error_head); - LINT_INIT(lang_head); + charsets_dir= DEFAULT_CHARSET_DIR; if (get_options(&argc, &argv)) DBUG_RETURN(1); @@ -751,13 +749,10 @@ static struct errors *parse_error_string(char *str, int er_count) static struct languages *parse_charset_string(char *str) { - struct languages *head, *new_lang; - + struct languages *head=0, *new_lang; DBUG_ENTER("parse_charset_string"); DBUG_PRINT("enter", ("str: %s", str)); - LINT_INIT(head); - /* skip over keyword */ str= find_end_of_word(str); if (!*str) diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index aaf1bb54ecc..17410f02fe2 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -26,7 +26,9 @@ DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \ -DDATADIR="\"$(MYSQLDATAdir)\"" \ -DSHAREDIR="\"$(MYSQLSHAREdir)\"" INCLUDES= @MT_INCLUDES@ @bdb_includes@ -I$(top_srcdir)/include \ - -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples -I$(top_srcdir)/regex \ + -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples \ + -I$(top_srcdir)/regex \ + -I$(top_srcdir)/extra \ $(openssl_includes) @ZLIB_INCLUDES@ noinst_LIBRARIES = libmysqld_int.a diff --git a/libmysqld/examples/Makefile.am b/libmysqld/examples/Makefile.am index 5b0a86e679c..ba646e282b5 100644 --- a/libmysqld/examples/Makefile.am +++ b/libmysqld/examples/Makefile.am @@ -15,7 +15,7 @@ link_sources: DEFS = -DEMBEDDED_LIBRARY INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include -I$(srcdir) \ -I$(top_srcdir) -I$(top_srcdir)/client -I$(top_srcdir)/regex \ - $(openssl_includes) + -I$(top_srcdir)/extra $(openssl_includes) LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @innodb_system_libs@ @LIBDL@ $(CXXLDFLAGS) diff --git a/scripts/make_win_src_distribution.sh b/scripts/make_win_src_distribution.sh index fd7884068ba..e68b5bebbd4 100644 --- a/scripts/make_win_src_distribution.sh +++ b/scripts/make_win_src_distribution.sh @@ -281,6 +281,8 @@ do fi done +cp extra/sql_state.h extra/mysqld_error.h $BASE/include + # # support files #