From 095efe48a5eee7e25d0cbed551c70c3d24bd3855 Mon Sep 17 00:00:00 2001 From: "kent@mysql.com" <> Date: Sat, 24 Sep 2005 15:51:45 +0200 Subject: [PATCH 1/3] Makefile.am, configure.in: Enable "make distcheck" to work --- Docs/Makefile.am | 24 ++++++++++++---------- Makefile.am | 31 ++++++++++++++--------------- client/Makefile.am | 4 ++-- cmd-line-utils/libedit/Makefile.am | 16 +++++++-------- configure.in | 11 +++++++--- include/Makefile.am | 16 ++++----------- libmysql/Makefile.am | 32 +++++++++++++++--------------- libmysql_r/Makefile.am | 4 ++-- libmysqld/Makefile.am | 16 +++++++-------- libmysqld/examples/Makefile.am | 15 +++++++------- mysql-test/Makefile.am | 3 +++ ndb/docs/Makefile.am | 4 +--- netware/Makefile.am | 6 +++--- pstack/Makefile.am | 2 +- scripts/Makefile.am | 5 +++-- sql-bench/Makefile.am | 2 ++ sql/Makefile.am | 12 +++++------ sql/share/Makefile.am | 7 +++++++ support-files/Makefile.am | 2 -- 19 files changed, 111 insertions(+), 101 deletions(-) diff --git a/Docs/Makefile.am b/Docs/Makefile.am index b1f69381774..685eaeef7d1 100644 --- a/Docs/Makefile.am +++ b/Docs/Makefile.am @@ -18,11 +18,11 @@ noinst_SCRIPTS = Support/generate-text-files.pl EXTRA_DIST = $(noinst_SCRIPTS) mysql.info INSTALL-BINARY -all: txt_files - -txt_files: ../INSTALL-SOURCE ../INSTALL-WIN-SOURCE ../EXCEPTIONS-CLIENT \ +TXT_FILES= ../INSTALL-SOURCE ../INSTALL-WIN-SOURCE ../EXCEPTIONS-CLIENT \ INSTALL-BINARY ../support-files/MacOSX/ReadMe.txt +all-local: $(TXT_FILES) + # make sure that "make install" installs the info page, too # automake only seems to take care of this automatically, # if we're building the info page from texi directly. @@ -30,28 +30,32 @@ install-data-hook: mysql.info $(mkinstalldirs) $(DESTDIR)$(infodir) $(INSTALL_DATA) $(srcdir)/mysql.info $(DESTDIR)$(infodir) -CLEAN_FILES: $(txt_files) - touch $(txt_files) +uninstall-local: + @RM@ -f $(DESTDIR)$(infodir)/mysql.info + +# This target is not used in builds, just for convinience +CLEAN_FILES: $(TXT_FILES) + touch $(TXT_FILES) GT = $(srcdir)/Support/generate-text-files.pl ../INSTALL-SOURCE: mysql.info $(GT) - perl -w $(GT) mysql.info "installing-source" "windows-source-build" > $@ + perl -w $(GT) $< "installing-source" "windows-source-build" > $@ ../INSTALL-WIN-SOURCE: mysql.info $(GT) - perl -w $(GT) mysql.info "windows-source-build" "post-installation" > $@ + perl -w $(GT) $< "windows-source-build" "post-installation" > $@ # We put the description for the binary installation here so that # people who download source wont have to see it. It is moved up to # the toplevel by the script that makes the binary tar files. INSTALL-BINARY: mysql.info $(GT) - perl -w $(GT) mysql.info "installing-binary" "installing-source" > $@ + perl -w $(GT) $< "installing-binary" "installing-source" > $@ ../EXCEPTIONS-CLIENT: mysql.info $(GT) - perl -w $(GT) mysql.info "mysql-floss-license-exception" "function-index" > $@ + perl -w $(GT) $< "mysql-floss-license-exception" "function-index" > $@ ../support-files/MacOSX/ReadMe.txt: mysql.info $(GT) - perl -w $(GT) mysql.info "mac-os-x-installation" "netware-installation" > $@ + perl -w $(GT) $< "mac-os-x-installation" "netware-installation" > $@ # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/Makefile.am b/Makefile.am index 9025251ff2a..7b397189aee 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,8 @@ AUTOMAKE_OPTIONS = foreign # These are built from source in the Docs directory -EXTRA_DIST = INSTALL-SOURCE README COPYING EXCEPTIONS-CLIENT +EXTRA_DIST = INSTALL-SOURCE INSTALL-WIN-SOURCE \ + README COPYING EXCEPTIONS-CLIENT SUBDIRS = . include @docs_dirs@ @zlib_dir@ \ @readline_topdir@ sql-common \ @thread_dirs@ pstack \ @@ -34,16 +35,19 @@ DIST_SUBDIRS = . include @docs_dirs@ zlib \ BUILD netware os2 @libmysqld_dirs@ \ @bench_dirs@ support-files @fs_dirs@ @tools_dirs@ -# Relink after clean -linked_sources = linked_client_sources linked_server_sources \ - linked_libmysql_sources linked_libmysql_r_sources \ - linked_libmysqld_sources linked_libmysqldex_sources \ +# Run these targets before any others, also make part of clean target, +# to make sure we create new links after a clean. +BUILT_SOURCES = linked_client_sources linked_server_sources \ + @linked_client_targets@ \ + @linked_libmysqld_targets@ \ linked_include_sources @linked_netware_sources@ -CLEANFILES = $(linked_sources) - -# This is just so that the linking is done early. -all-local: $(linked_sources) +# The db.h file is a bit special, see note in "configure.in". +# In the case we didn't compile with bdb, a dummy file is put +# there, but will not be removed by the bdb make file becuase +# it will never be called. +CLEANFILES = $(BUILT_SOURCES) bdb/build_unix/db.h +DISTCLEANFILES = ac_available_languages_fragment linked_include_sources: cd include; $(MAKE) link_sources @@ -73,13 +77,8 @@ linked_netware_sources: cd @netware_dir@; $(MAKE) link_sources echo timestamp > linked_netware_sources -#avoid recursive make calls in sql directory linked_server_sources: - cd sql; rm -f mini_client_errors.c;\ - @LN_CP_F@ ../libmysql/errmsg.c mini_client_errors.c;\ - rm -f pack.c;@LN_CP_F@ ../sql-common/pack.c pack.c;\ - rm -f client.c;@LN_CP_F@ ../sql-common/client.c client.c;\ - rm -f my_time.c;@LN_CP_F@ ../sql-common/my_time.c my_time.c + cd sql; $(MAKE) link_sources echo timestamp > linked_server_sources # Create permission databases @@ -91,7 +90,7 @@ bin-dist: all # Remove BK's "SCCS" subdirectories from source distribution dist-hook: - rm -rf `find $(distdir) -type d -name SCCS` + rm -rf `find $(distdir) -type d -name SCCS -print` tags: support-files/build-tags diff --git a/client/Makefile.am b/client/Makefile.am index 1e8851fb3b9..c0569d5fa6f 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -41,8 +41,8 @@ DEFS = -DUNDEF_THREADS_HACK link_sources: for f in $(sql_src) ; do \ - rm -f $(srcdir)/$$f; \ - @LN_CP_F@ $(top_srcdir)/sql/$$f $(srcdir)/$$f; \ + rm -f $$f; \ + @LN_CP_F@ $(top_srcdir)/sql/$$f $$f; \ done; # Don't update the files from bitkeeper diff --git a/cmd-line-utils/libedit/Makefile.am b/cmd-line-utils/libedit/Makefile.am index af1bf8b2c97..ae6755f1c5c 100644 --- a/cmd-line-utils/libedit/Makefile.am +++ b/cmd-line-utils/libedit/Makefile.am @@ -2,8 +2,8 @@ # Makefile for the GNU readline library. # Copyright (C) 1994,1996,1997 Free Software Foundation, Inc. -ASRC=vi.c emacs.c common.c -AHDR=vi.h emacs.h common.h +ASRC = $(srcdir)/vi.c $(srcdir)/emacs.c $(srcdir)/common.c +AHDR = vi.h emacs.h common.h INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \ -I$(srcdir)/../.. -I.. @@ -42,16 +42,16 @@ SUFFIXES = .sh $< > $@-t @MV@ $@-t $@ -vi.h: vi.c makelist - sh ./makelist -h ./vi.c > $@.tmp && \ +vi.h: $(srcdir)/vi.c makelist + sh ./makelist -h $(srcdir)/vi.c > $@.tmp && \ mv $@.tmp $@ -emacs.h: emacs.c makelist - sh ./makelist -h ./emacs.c > $@.tmp && \ +emacs.h: $(srcdir)/emacs.c makelist + sh ./makelist -h $(srcdir)/emacs.c > $@.tmp && \ mv $@.tmp $@ -common.h: common.c makelist - sh ./makelist -h ./common.c > $@.tmp && \ +common.h: $(srcdir)/common.c makelist + sh ./makelist -h $(srcdir)/common.c > $@.tmp && \ mv $@.tmp $@ help.c: ${ASRC} makelist diff --git a/configure.in b/configure.in index 97eb0cb0edf..bce2aaef302 100644 --- a/configure.in +++ b/configure.in @@ -37,7 +37,7 @@ romanian russian serbian slovak spanish swedish ukrainian" # Generate make rules for all error messages AVAILABLE_LANGUAGES_ERRORS= -AVAILABLE_LANGUAGES_ERRORS_RULES=$srcdir/ac_available_languages_fragment +AVAILABLE_LANGUAGES_ERRORS_RULES=ac_available_languages_fragment rm -f $AVAILABLE_LANGUAGES_ERRORS_RULES for i in $AVAILABLE_LANGUAGES do @@ -2310,6 +2310,7 @@ then echo "Warning: extra-tools disabled because --enable-thread-safe-client wasn't used" else tools_dirs="tools" + AC_CONFIG_FILES(tools/Makefile) fi fi AC_SUBST(tools_dirs) @@ -2320,9 +2321,12 @@ MYSQL_CHECK_VIO MYSQL_CHECK_OPENSSL libmysqld_dirs= +linked_libmysqld_targets= if test "$with_embedded_server" = "yes" then libmysqld_dirs=libmysqld + linked_libmysqld_targets="linked_libmysqld_sources linked_libmysqldex_sources" + AC_CONFIG_FILES(libmysqld/Makefile libmysqld/examples/Makefile) # We can't build embedded library without building the server, because # we depend on libmysys, libmystrings, libmyisam, etc. with_server=yes @@ -2331,6 +2335,7 @@ fi # mysql_config --libmysqld-libs will print out something like # -L/path/to/lib/mysql -lmysqld -lmyisam -lmysys -lmystrings -ldbug ... AC_SUBST([libmysqld_dirs]) +AC_SUBST([linked_libmysqld_targets]) # Shall we build the docs? AC_ARG_WITH(docs, @@ -2921,6 +2926,7 @@ if test "$THREAD_SAFE_CLIENT" != "no" then sql_client_dirs="libmysql_r $sql_client_dirs" linked_client_targets="$linked_client_targets linked_libmysql_r_sources" + AC_CONFIG_FILES(libmysql_r/Makefile) AC_DEFINE([THREAD_SAFE_CLIENT], [1], [Should be client be thread safe]) fi @@ -3275,12 +3281,11 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl myisam/Makefile myisammrg/Makefile dnl os2/Makefile os2/include/Makefile os2/include/sys/Makefile dnl man/Makefile BUILD/Makefile vio/Makefile dnl - libmysql_r/Makefile libmysqld/Makefile libmysqld/examples/Makefile dnl libmysql/Makefile client/Makefile dnl pstack/Makefile pstack/aout/Makefile sql/Makefile sql/share/Makefile dnl sql-common/Makefile SSL/Makefile dnl dbug/Makefile scripts/Makefile dnl - include/Makefile sql-bench/Makefile tools/Makefile dnl + include/Makefile sql-bench/Makefile dnl tests/Makefile Docs/Makefile support-files/Makefile dnl support-files/MacOSX/Makefile mysql-test/Makefile dnl netware/Makefile dnl diff --git a/include/Makefile.am b/include/Makefile.am index 0c845900a4f..3fa7b04d69a 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -38,23 +38,15 @@ SUPERCLEANFILES = mysql_version.h my_config.h # Some include files that may be moved and patched by configure DISTCLEANFILES = sched.h $(SUPERCLEANFILES) -clean: +clean-local: $(RM) -fr readline -distclean: +distclean-local: $(RM) -fr readline -all-local: my_config.h - -# Since we include my_config.h it better exist from the beginning -link_sources: - $(CP) ../config.h my_config.h - -$(RM) -fr readline - @readline_h_ln_cmd@ - -# Keep automake happy - my_config.h: ../config.h $(CP) ../config.h my_config.h + +link_sources: -$(RM) -fr readline @readline_h_ln_cmd@ diff --git a/libmysql/Makefile.am b/libmysql/Makefile.am index 4bd9eddafb0..8e76d0f125d 100644 --- a/libmysql/Makefile.am +++ b/libmysql/Makefile.am @@ -43,33 +43,33 @@ link_sources: vs=`echo $(vio_objects) | sed "s;\.lo;.c;g"`; \ scs=`echo $(sql_cmn_objects) | sed "s;\.lo;.c;g"`; \ for f in $$ss; do \ - rm -f $(srcdir)/$$f; \ - @LN_CP_F@ $(srcdir)/../strings/$$f $(srcdir)/$$f; \ + rm -f $$f; \ + @LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \ done; \ for f in $$vs $(vioheaders); do \ - rm -f $(srcdir)/$$f; \ - @LN_CP_F@ $(srcdir)/../vio/$$f $(srcdir)/$$f; \ + rm -f $$f; \ + @LN_CP_F@ $(top_srcdir)/vio/$$f $$f; \ done; \ for f in $$scs; do \ - rm -f $(srcdir)/$$f; \ - @LN_CP_F@ $(srcdir)/../sql-common/$$f $(srcdir)/$$f; \ + rm -f $$f; \ + @LN_CP_F@ $(top_srcdir)/sql-common/$$f $$f; \ done; \ for f in $(mystringsextra); do \ - rm -f $(srcdir)/$$f; \ - @LN_CP_F@ $(srcdir)/../strings/$$f $(srcdir)/$$f; \ + rm -f $$f; \ + @LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \ done; \ for f in $$ds; do \ - rm -f $(srcdir)/$$f; \ - @LN_CP_F@ $(srcdir)/../dbug/$$f $(srcdir)/$$f; \ + rm -f $$f; \ + @LN_CP_F@ $(top_srcdir)/dbug/$$f $$f; \ done; \ for f in $$ms $(mysysheaders); do \ - rm -f $(srcdir)/$$f; \ - @LN_CP_F@ $(srcdir)/../mysys/$$f $(srcdir)/$$f; \ + rm -f $$f; \ + @LN_CP_F@ $(top_srcdir)/mysys/$$f $$f; \ done; \ - rm -f $(srcdir)/net.c; \ - @LN_CP_F@ $(srcdir)/../sql/net_serv.cc $(srcdir)/net.c ; \ - rm -f $(srcdir)/password.c; \ - @LN_CP_F@ $(srcdir)/../sql/password.c $(srcdir)/password.c + rm -f net.c; \ + @LN_CP_F@ $(top_srcdir)/sql/net_serv.cc net.c ; \ + rm -f password.c; \ + @LN_CP_F@ $(top_srcdir)/sql/password.c password.c # This part requires GNUmake # diff --git a/libmysql_r/Makefile.am b/libmysql_r/Makefile.am index a76ef675189..f7cf00321cb 100644 --- a/libmysql_r/Makefile.am +++ b/libmysql_r/Makefile.am @@ -41,6 +41,6 @@ libmysqlclient_r_la_LDFLAGS = $(target_ldflags) link_sources: set -x; \ for f in `cd $(libmysql_dir) && echo *.[ch]`; do \ - rm -f $(srcdir)/$$f; \ - @LN_CP_F@ $(libmysql_dir)/$$f $(srcdir)/$$f; \ + rm -f $$f; \ + @LN_CP_F@ $(libmysql_dir)/$$f $$f; \ done diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index f4e9d4e6b39..d6f68047296 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -122,19 +122,19 @@ endif link_sources: set -x; \ for f in $(sqlsources); do \ - rm -f $(srcdir)/$$f; \ - @LN_CP_F@ $(srcdir)/../sql/$$f $(srcdir)/$$f; \ + rm -f $$f; \ + @LN_CP_F@ $(top_srcdir)/sql/$$f $$f; \ done; \ for f in $(libmysqlsources); do \ - rm -f $(srcdir)/$$f; \ - @LN_CP_F@ $(srcdir)/../libmysql/$$f $(srcdir)/$$f; \ + rm -f $$f; \ + @LN_CP_F@ $(top_srcdir)/libmysql/$$f $$f; \ done; \ for f in $(sqlexamplessources); do \ - rm -f $(srcdir)/$$f; \ - @LN_CP_F@ $(srcdir)/../sql/examples/$$f $(srcdir)/$$f; \ + rm -f $$f; \ + @LN_CP_F@ $(top_srcdir)/sql/examples/$$f $$f; \ done; \ - rm -f $(srcdir)/client_settings.h; \ - @LN_CP_F@ $(srcdir)/../libmysql/client_settings.h $(srcdir)/client_settings.h; + rm -f client_settings.h; \ + @LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h client_settings.h clean-local: diff --git a/libmysqld/examples/Makefile.am b/libmysqld/examples/Makefile.am index d19023c100f..588a6153a3b 100644 --- a/libmysqld/examples/Makefile.am +++ b/libmysqld/examples/Makefile.am @@ -20,14 +20,15 @@ client_sources = $(mysqltest_embedded_SOURCES) $(mysql_SOURCES) tests_sources= $(mysql_client_test_embedded_SOURCES) link_sources: + set -x; \ for f in $(client_sources); do \ - rm -f $(srcdir)/$$f; \ - @LN_CP_F@ $(srcdir)/../../client/$$f $(srcdir)/$$f; \ - done; + rm -f $$f; \ + @LN_CP_F@ $(top_srcdir)/client/$$f $$f; \ + done; \ for f in $(tests_sources); do \ - rm -f $(srcdir)/$$f; \ - @LN_CP_F@ $(srcdir)/../../tests/$$f $(srcdir)/$$f; \ - done; + rm -f $$f; \ + @LN_CP_F@ $(top_srcdir)/tests/$$f $$f; \ + done DEFS = -DEMBEDDED_LIBRARY INCLUDES = @MT_INCLUDES@ \ @@ -48,7 +49,7 @@ mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD) mysql_client_test_embedded_LINK = $(CXXLINK) mysql_client_test_embedded_SOURCES = mysql_client_test.c -clean: +clean-local: rm -f $(client_sources) rm -f $(tests_sources) diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index e7abcd3fc95..f2a780cc550 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -82,6 +82,9 @@ install-data-local: $(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(DESTDIR)$(testdir)/lib $(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib +uninstall-local: + @RM@ -f -r $(DESTDIR)$(testdir) + std_data/client-key.pem: @CP@ $(top_srcdir)/SSL/$(@F) $(srcdir)/std_data std_data/client-cert.pem: diff --git a/ndb/docs/Makefile.am b/ndb/docs/Makefile.am index 1399ce3b6a5..9b7ec213e26 100644 --- a/ndb/docs/Makefile.am +++ b/ndb/docs/Makefile.am @@ -1,14 +1,12 @@ DOXYDIR = doxygen noinst_HEADERS = $(DOXYDIR)/predoxy.pl $(DOXYDIR)/postdoxy.pl $(DOXYDIR)/Doxyfile.ndbapi $(DOXYDIR)/Doxyfile.mgmapi $(DOXYDIR)/header.ndbapi.tex $(DOXYDIR)/header.mgmapi.tex -all: do-check ndbapidoc mgmapidoc - DOXYTMP = .doxytmp DOXYOUT = .doxyout NDB_RELEASE = @NDB_VERSION_MAJOR@.@NDB_VERSION_MINOR@.@NDB_VERSION_BUILD@-@NDB_VERSION_STATUS@ -clean: +clean-local: rm -rf ndbapi.pdf ndbapi.html mgmapi.pdf mgmapi.html rm -rf $(DOXYTMP) $(DOXYOUT) diff --git a/netware/Makefile.am b/netware/Makefile.am index aeb93d1575d..0588e6b1ade 100644 --- a/netware/Makefile.am +++ b/netware/Makefile.am @@ -42,10 +42,10 @@ netware_build_files = client/mysql.def client/mysqladmin.def \ link_sources: set -x; \ for f in $(netware_build_files); do \ - rm -f $(srcdir)/../$$f; \ + rm -f ../$$f; \ org=`echo $$f | sed -e 's/.*\/\(.*\)/\1/g'`; \ - @LN_CP_F@ $(srcdir)/$$org $(srcdir)/../$$f; \ - done; + @LN_CP_F@ $(srcdir)/$$org ../$$f; \ + done else EXTRA_DIST= comp_err.def init_db.sql install_test_db.ncf \ isamchk.def isamlog.def libmysql.def libmysql.imp \ diff --git a/pstack/Makefile.am b/pstack/Makefile.am index 77f84d212cd..20d5d8314ce 100644 --- a/pstack/Makefile.am +++ b/pstack/Makefile.am @@ -20,7 +20,7 @@ # SUBDIRS = aout -INCLUDES = -I$(top_srcdir)/include +INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include noinst_HEADERS = bucomm.h debug.h ieee.h budbg.h demangle.h \ linuxthreads.h pstack.h pstacktrace.h SRC= bucomm.c filemode.c linuxthreads.c rddbg.c \ diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 27b42314273..30ba75c551d 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -85,12 +85,13 @@ CLEANFILES = @server_scripts@ \ mysql_find_rows \ mysqlhotcopy \ mysqldumpslow \ + mysql_explain_log \ + mysql_tableinfo \ mysqld_multi \ make_win_src_distribution \ - make_win_binary_distribution \ mysql_create_system_tables -SUPERCLEANFILES = mysqlbug +DISTCLEANFILES = mysqlbug # We want the right version and configure comand line in mysqlbug mysqlbug: ${top_builddir}/config.status mysqlbug.sh diff --git a/sql-bench/Makefile.am b/sql-bench/Makefile.am index 579a2a9f7fe..12f3d5550b3 100644 --- a/sql-bench/Makefile.am +++ b/sql-bench/Makefile.am @@ -60,6 +60,8 @@ install-data-local: for i in $(srcdir)/limits/*.* ; do $(INSTALL_DATA) $$i $(DESTDIR)$(benchdir)/limits; done for i in $(srcdir)/Comments/*.* ; do $(INSTALL_DATA) $$i $(DESTDIR)$(benchdir)/Comments; done +uninstall-local: + @RM@ -f -r $(DESTDIR)$(benchdir) SUFFIXES = .sh diff --git a/sql/Makefile.am b/sql/Makefile.am index ea7cea9c7b9..218cf5dbca5 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -111,17 +111,17 @@ AM_YFLAGS = -d mysql_tzinfo_to_sql.cc: rm -f mysql_tzinfo_to_sql.cc - @LN_CP_F@ tztime.cc mysql_tzinfo_to_sql.cc + @LN_CP_F@ $(srcdir)/tztime.cc mysql_tzinfo_to_sql.cc link_sources: mysql_tzinfo_to_sql.cc rm -f mini_client_errors.c - @LN_CP_F@ ../libmysql/errmsg.c mini_client_errors.c + @LN_CP_F@ $(top_srcdir)/libmysql/errmsg.c mini_client_errors.c rm -f pack.c - @LN_CP_F@ ../sql-common/pack.c pack.c + @LN_CP_F@ $(top_srcdir)/sql-common/pack.c pack.c rm -f client.c - @LN_CP_F@ ../sql-common/client.c client.c + @LN_CP_F@ $(top_srcdir)/sql-common/client.c client.c rm -f my_time.c - @LN_CP_F@ ../sql-common/my_time.c my_time.c + @LN_CP_F@ $(top_srcdir)/sql-common/my_time.c my_time.c mysql_tzinfo_to_sql.o: $(mysql_tzinfo_to_sql_SOURCES) $(CXXCOMPILE) -c $(INCLUDES) -DTZINFO2SQL $< @@ -145,7 +145,7 @@ lex_hash.h: gen_lex_hash$(EXEEXT) udf_example.so: udf_example.cc $(CXXCOMPILE) -shared -o $@ $< -distclean: +distclean-local: rm -f lex_hash.h # Don't update the files from bitkeeper diff --git a/sql/share/Makefile.am b/sql/share/Makefile.am index f0207fdef03..3b13d73e8da 100644 --- a/sql/share/Makefile.am +++ b/sql/share/Makefile.am @@ -43,6 +43,13 @@ install-data-local: $(INSTALL_DATA) $(srcdir)/charsets/README $(DESTDIR)$(pkgdatadir)/charsets/README $(INSTALL_DATA) $(srcdir)/charsets/*.xml $(DESTDIR)$(pkgdatadir)/charsets +# FIXME maybe shouldn't remove, could be needed by other installation? +uninstall-local: + @RM@ -f -r $(DESTDIR)$(pkgdatadir) + +# Do nothing +link_sources: + fix_errors: for lang in @AVAILABLE_LANGUAGES@; \ do \ diff --git a/support-files/Makefile.am b/support-files/Makefile.am index 972d1dc7038..26d51438a1b 100644 --- a/support-files/Makefile.am +++ b/support-files/Makefile.am @@ -107,7 +107,5 @@ SUFFIXES = .sh $< > $@-t @MV@ $@-t $@ -all: binary-configure - # Don't update the files from bitkeeper %::SCCS/s.% From b269caecb12b6b7da093f6924e5a7326cc1b75e9 Mon Sep 17 00:00:00 2001 From: "kent@mysql.com" <> Date: Wed, 9 Nov 2005 11:56:04 +0200 Subject: [PATCH 2/3] Additional "make distcheck" changes specific to 5.0 --- Docs/Makefile.am | 5 +++++ client/Makefile.am | 2 +- configure.in | 3 +-- extra/Makefile.am | 3 +++ extra/yassl/Makefile.am | 2 +- extra/yassl/src/Makefile.am | 2 +- extra/yassl/taocrypt/src/Makefile.am | 2 +- server-tools/instance-manager/Makefile.am | 8 ++++---- sql/share/Makefile.am | 3 +++ 9 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Docs/Makefile.am b/Docs/Makefile.am index 685eaeef7d1..542c82d8f58 100644 --- a/Docs/Makefile.am +++ b/Docs/Makefile.am @@ -33,6 +33,11 @@ install-data-hook: mysql.info uninstall-local: @RM@ -f $(DESTDIR)$(infodir)/mysql.info +# Problems with "make distclean", works differently for make files +# generated by different versions of the automake. Some require the +# generated files explicitly in DISTCLEANFILES. +DISTCLEANFILES = $(TXT_FILES) + # This target is not used in builds, just for convinience CLEAN_FILES: $(TXT_FILES) touch $(TXT_FILES) diff --git a/client/Makefile.am b/client/Makefile.am index b1821c54b60..804f194085f 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -61,7 +61,7 @@ link_sources: done; \ for f in $(strings_src) ; do \ rm -f $(srcdir)/$$f; \ - @LN_CP_F@ $(top_srcdir)/strings/$$f $(srcdir)/$$f; \ + @LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \ done; # Don't update the files from bitkeeper diff --git a/configure.in b/configure.in index de162cdcd54..fa03aa08508 100644 --- a/configure.in +++ b/configure.in @@ -71,7 +71,6 @@ AC_DEFINE_UNQUOTED([DOT_FRM_VERSION], [$DOT_FRM_VERSION], [Version of .frm files]) AC_SUBST(SHARED_LIB_VERSION) AC_SUBST(AVAILABLE_LANGUAGES) -AC_SUBST(AVAILABLE_LANGUAGES_ERRORS) AC_SUBST([NDB_VERSION_MAJOR]) AC_SUBST([NDB_VERSION_MINOR]) @@ -2753,7 +2752,7 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl pstack/Makefile pstack/aout/Makefile sql/Makefile sql/share/Makefile dnl sql-common/Makefile SSL/Makefile dnl dbug/Makefile scripts/Makefile dnl - include/Makefile sql-bench/Makefile tools/Makefile dnl + include/Makefile sql-bench/Makefile dnl server-tools/Makefile server-tools/instance-manager/Makefile dnl tests/Makefile Docs/Makefile support-files/Makefile dnl support-files/MacOSX/Makefile mysql-test/Makefile dnl diff --git a/extra/Makefile.am b/extra/Makefile.am index 457fddce673..a60656cb5c6 100644 --- a/extra/Makefile.am +++ b/extra/Makefile.am @@ -23,6 +23,9 @@ BUILT_SOURCES= $(top_builddir)/include/mysqld_error.h \ $(top_builddir)/include/mysqld_ername.h pkginclude_HEADERS= $(BUILT_SOURCES) CLEANFILES = $(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 diff --git a/extra/yassl/Makefile.am b/extra/yassl/Makefile.am index 7c1f2ea5acb..41c4d84f24f 100644 --- a/extra/yassl/Makefile.am +++ b/extra/yassl/Makefile.am @@ -1,2 +1,2 @@ SUBDIRS = taocrypt src -EXTRA_DIST = yassl.dsp yassl.dsw mySTL/*.hpp +EXTRA_DIST = yassl.dsp yassl.dsw $(wildcard mySTL/*.hpp) diff --git a/extra/yassl/src/Makefile.am b/extra/yassl/src/Makefile.am index 4ebb9a2d862..df96018e1cf 100644 --- a/extra/yassl/src/Makefile.am +++ b/extra/yassl/src/Makefile.am @@ -4,5 +4,5 @@ noinst_LIBRARIES = libyassl.a libyassl_a_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \ handshake.cpp lock.cpp log.cpp socket_wrapper.cpp ssl.cpp \ template_instnt.cpp timer.cpp yassl_imp.cpp yassl_error.cpp yassl_int.cpp -EXTRA_DIST = ../include/*.hpp ../include/openssl/*.h +EXTRA_DIST = $(wildcard ../include/*.hpp) $(wildcard ../include/openssl/*.h) AM_CXXFLAGS = -DYASSL_PURE_C diff --git a/extra/yassl/taocrypt/src/Makefile.am b/extra/yassl/taocrypt/src/Makefile.am index 9ce083e9e56..0319fc6057b 100644 --- a/extra/yassl/taocrypt/src/Makefile.am +++ b/extra/yassl/taocrypt/src/Makefile.am @@ -11,5 +11,5 @@ libtaocrypt_a_SOURCES = aes.cpp aestables.cpp algebra.cpp arc4.cpp asn.cpp \ template_instnt.cpp libtaocrypt_a_LIBADD = libtaoint_a-integer.o -EXTRA_DIST = ../include/*.hpp +EXTRA_DIST = $(wildcard ../include/*.hpp) AM_CXXFLAGS = -DYASSL_PURE_C diff --git a/server-tools/instance-manager/Makefile.am b/server-tools/instance-manager/Makefile.am index 4fa2a0da405..7449735f0bf 100644 --- a/server-tools/instance-manager/Makefile.am +++ b/server-tools/instance-manager/Makefile.am @@ -53,12 +53,12 @@ libnet_a_LIBADD= $(top_builddir)/sql/password.$(OBJEXT) \ CLEANFILES= net_serv.cc client_settings.h net_serv.cc: - rm -f $(srcdir)/net_serv.cc - @LN_CP_F@ $(top_srcdir)/sql/net_serv.cc $(srcdir)/net_serv.cc + rm -f net_serv.cc + @LN_CP_F@ $(top_srcdir)/sql/net_serv.cc net_serv.cc client_settings.h: - rm -f $(srcdir)/client_settings.h - @LN_CP_F@ $(top_srcdir)/sql/client_settings.h $(srcdir)/client_settings.h + rm -f client_settings.h + @LN_CP_F@ $(top_srcdir)/sql/client_settings.h client_settings.h libexec_PROGRAMS= mysqlmanager diff --git a/sql/share/Makefile.am b/sql/share/Makefile.am index d860b2b40c1..6d905ba35dc 100644 --- a/sql/share/Makefile.am +++ b/sql/share/Makefile.am @@ -53,6 +53,9 @@ install-data-local: uninstall-local: @RM@ -f -r $(DESTDIR)$(pkgdatadir) +distclean-local: + @RM@ -f */errmsg.sys + # Do nothing link_sources: From 133c00beb4f17b96e9e6cf77d870726de61958e4 Mon Sep 17 00:00:00 2001 From: "kent@mysql.com" <> Date: Sat, 19 Nov 2005 12:58:22 +0100 Subject: [PATCH 3/3] configure.in: Corrected "include/readline" link for "make distcheck" --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 9894426b581..41475ffcd4a 100644 --- a/configure.in +++ b/configure.in @@ -2442,7 +2442,7 @@ then readline_basedir="libedit" readline_dir="$readline_topdir/$readline_basedir" readline_link="\$(top_builddir)/cmd-line-utils/libedit/libedit.a" - readline_h_ln_cmd="\$(LN) -s \$(top_builddir)/cmd-line-utils/libedit/readline readline" + readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/libedit/readline readline" compile_libedit=yes AC_DEFINE_UNQUOTED(HAVE_HIST_ENTRY, 1) AC_DEFINE_UNQUOTED(USE_LIBEDIT_INTERFACE, 1) @@ -2452,7 +2452,7 @@ then readline_basedir="readline" readline_dir="$readline_topdir/$readline_basedir" readline_link="\$(top_builddir)/cmd-line-utils/readline/libreadline.a" - readline_h_ln_cmd="\$(LN) -s \$(top_builddir)/cmd-line-utils/readline readline" + readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/readline readline" compile_readline=yes AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1) else