List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:March 13 2009 11:15am
Subject:bzr commit into mysql-5.1-bugteam branch (joro:2838) Bug#43614
View as plain text  
#At file:///home/kgeorge/mysql/work/mysql-5.1-merge/ based on revid:sergey.glukhov@stripped

 2838 Georgi Kodinov	2009-03-13
      Bug #43614: make distcheck failure (ndb/Makefile is made, but not subdirs of ndb)
      There are some recursive targets that automake generates which reference
      DIST_SUBDIRS.  It's critical, then, for such subdirs to exist even if they
      won't be built as part of SUBDIRS.
      During a VPATH build, it is the configure script which creates the subdirs
      (when it processes the AC_CONFIG_FILES() for each subdir's Makefile).  If
      autoconf doesn't create a subdir's Makefile, then the recursive make will fail
      when it is unable to cd into that subdir.
      This isn't a problem in non-VPATH builds, because the subdirs are all present
      in the source tarball.  So the problem only shows up during 'make distcheck',
      which does a VPATH build.
      The fix is to look, when configure is being created by autoconf, for any
      plugin subdirectories.  These are the dynamic subdirectories which need to be
      handled specially.  It's enough to tell autoconf to generate a Makefile for
      any found in the plugin directory - all plugin subdirectories
      using automake (i.e., listed in the plugin's DIST_SUBDIRS) will have a
      This is done by calling 'find'.  This means that 'find' must be in the PATH on
      the host that is running autoconf.  'find' is NOT needed when calling
      configure, so it is not an additional dependency for the user.
      Finally, ha_ndbcluster.m4 had called AC_CONFIG_FILES() on all those subdir
      Makefiles, but only when the plugin was actually being built.  So it didn't
      work in the case that NDB was not being built.  All of those Makefiles have to
      be removed from this static list, since the plugin machinery is now adding
      them automatically.  autoconf fails if a file is duplicated in

=== modified file 'config/ac-macros/ha_ndbcluster.m4'
--- a/config/ac-macros/ha_ndbcluster.m4	2008-11-06 18:38:19 +0000
+++ b/config/ac-macros/ha_ndbcluster.m4	2009-03-13 11:13:55 +0000
@@ -330,41 +330,11 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
-  AC_CONFIG_FILES(storage/ndb/include/Makefile dnl
-   storage/ndb/src/Makefile storage/ndb/src/common/Makefile dnl
-   storage/ndb/docs/Makefile dnl
-   storage/ndb/tools/Makefile dnl
-   storage/ndb/src/common/debugger/Makefile dnl
-   storage/ndb/src/common/debugger/signaldata/Makefile dnl
-   storage/ndb/src/common/portlib/Makefile dnl
-   storage/ndb/src/common/util/Makefile dnl
-   storage/ndb/src/common/logger/Makefile dnl
-   storage/ndb/src/common/transporter/Makefile dnl
-   storage/ndb/src/common/mgmcommon/Makefile dnl
-   storage/ndb/src/kernel/Makefile dnl
-   storage/ndb/src/kernel/error/Makefile dnl
-   storage/ndb/src/kernel/blocks/Makefile dnl
-   storage/ndb/src/kernel/blocks/dbdict/Makefile dnl
-   storage/ndb/src/kernel/blocks/dbdih/Makefile dnl
-   storage/ndb/src/kernel/blocks/dblqh/Makefile dnl
-   storage/ndb/src/kernel/blocks/dbtup/Makefile dnl
-   storage/ndb/src/kernel/blocks/backup/Makefile dnl
-   storage/ndb/src/kernel/vm/Makefile dnl
-   storage/ndb/src/mgmapi/Makefile dnl
-   storage/ndb/src/ndbapi/Makefile dnl
-   storage/ndb/src/mgmsrv/Makefile dnl
-   storage/ndb/src/mgmclient/Makefile dnl
-   storage/ndb/src/cw/Makefile dnl
-   storage/ndb/src/cw/cpcd/Makefile dnl
-   storage/ndb/test/Makefile dnl
-   storage/ndb/test/src/Makefile dnl
-   storage/ndb/test/ndbapi/Makefile dnl
-   storage/ndb/test/ndbapi/bank/Makefile dnl
-   storage/ndb/test/tools/Makefile dnl
-   storage/ndb/test/run-test/Makefile dnl
-   storage/ndb/include/ndb_version.h storage/ndb/include/ndb_global.h dnl
-   storage/ndb/include/ndb_types.h dnl
-  )
+   storage/ndb/include/ndb_version.h
+   storage/ndb/include/ndb_global.h
+   storage/ndb/include/ndb_types.h
+  ])

=== modified file 'config/ac-macros/plugins.m4'
--- a/config/ac-macros/plugins.m4	2009-02-15 02:18:30 +0000
+++ b/config/ac-macros/plugins.m4	2009-03-13 11:13:55 +0000
@@ -477,10 +477,23 @@ dnl Although this is "pretty", it breaks
       # Even if we don't build a plugin, we bundle its source into the dist
       # file.  So its Makefile (and Makefiles for any subdirs) must be
       # generated for 'make dist' to work.
-      m4_syscmd(test -f "$6/configure")
+      m4_syscmd([test -f "]$6[/configure"])
       ifelse(m4_sysval, 0,
-        [AC_CONFIG_FILES($6/Makefile)]
+        [
+          # autoconf doesn't provide an automatic way to configure DIST_SUBDIRS of
+          # a subdir; for our purposes, it's enough to just check for existing
+          # files and add them in here
+dnl Warning, don't try to quote the m4_esyscmd() macro, it doesn't
+dnl work.  Quoting here is tricky.
+dnl The $FIND or $SED variable can be set by the user when calling autoconf itself
+dnl to if they need to pass a specific path.  This is *NOT* used when calling
+dnl running configure!
+          AC_CONFIG_FILES(m4_esyscmd([${FIND-find} "]$6[" -name -print | ${SED-sed} 's,\.am$,,']))
+        ]

Attachment: [text/bzr-bundle] bzr/
bzr commit into mysql-5.1-bugteam branch (joro:2838) Bug#43614Georgi Kodinov13 Mar