Bug #3009 most client programs (in client/ dir) not remade if sql-common/client.c changed
Submitted: 28 Feb 2004 14:53 Modified: 30 Mar 2004 11:11
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:4.1 OS:Linux (Linux)
Assigned to: Michael Widenius CPU Architecture:Any

[28 Feb 2004 14:53] Guilhem Bichot
Maybe it happens in 4.0 but I did not check.
In 4.1: all client programs in client/ ('mysql', 'mysqladmin', 'mysqldump' etc) are logically dependent on the client source (e.g. sql-common/client.c which contains mysql_real_connect() etc). But client/Makefile does not reflect it. If I 'touch sql-common/client.c': of all the programs in client/, only mysqlmanager-pwgen is rebuilt. Not 'mysql', 'mysqladmin' etc. Indeed in client/Makefile.am, mysqlmanager-pwgen has no dependencies line, whereas others like 'mysqladmin' have:
mysqladmin_DEPENDENCIES=        $(LIBRARIES) $(pkglib_LTLIBRARIES)
LIBRARIES and pkglib_LTLIBRARIES are apparently not set anywhere (I mean that in Makefile.am and in the generated Makefile they are not set anywhere), so they are probably empty which explains the problem.

Maybe this is a problem with my installation (which is a non-hacked, freshly installed one, Mandrake 9.2):
[guilhem@gbichot2 mysql-4.1]$ automake --version
automake (GNU automake) 1.7.6
[guilhem@gbichot2 mysql-4.1]$ m4 --version
GNU m4 1.4
[guilhem@gbichot2 mysql-4.1]$ autoconf --version
autoconf (GNU Autoconf) 2.57

How to repeat:
ls --full-time client/mysqladmin
touch sql-common/client.c
Check that it was not rebuilt:
ls --full-time client/mysqladmin

Suggested fix:
fix something with Makefiles...
[30 Mar 2004 11:11] Michael Widenius
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at

Additional info:

Did a hack to get this to work (didn't know enough of automake to fix this in a clean way)