Bug #15852 "make distclean" broken

Submitted: 19 Dec 2005 10:32 Modified: 3 Dec 2006 18:30
Reporter: Hartmut Holzgraefe Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.1 OS:*nix
Assigned to: Kent Boortz CPU Architecture:Any

[19 Dec 2005 10:32] Hartmut Holzgraefe
Description:
The "distclean" target (and probably others, too) is broken as DIST_SUBDIRS 
in the toplevel Makefile.am and storage/Makefile.am contain directories that 
are only configured coinditionally so that there might be no Makefile in them.

As the toplevel "distclean" target recursively dives into all DIST_SUBDIR 
entries this leads to errors as there is no Makefile in some of these that 
would define a "distclean" target.

How to repeat:
Simple testcases:

5.1 > configure && make distclean
...
Making distclean in tools
make[1]: Entering directory `/home/hartmut/projects/mysql/dev/5.1/tools'
make[1]: *** No rule to make target `distclean'.  Stop.
make[1]: Leaving directory `/home/hartmut/projects/mysql/dev/5.1/tools'
make: *** [distclean-recursive] Error 1

Full testcase

5.1 >  configure &&  make -k distclean
...make[1]: Entering directory `/home/hartmut/projects/mysql/dev/5.1/tools'
make[1]: *** No rule to make target `distclean'.
make[1]: Leaving directory `/home/hartmut/projects/mysql/dev/5.1/tools'
...
make[1]: Entering directory `/home/hartmut/projects/mysql/dev/5.1/libmysql_r'
make[1]: *** No rule to make target `distclean'.
make[1]: Leaving directory `/home/hartmut/projects/mysql/dev/5.1/libmysql_r'
...
make[2]: Entering directory `/home/hartmut/projects/mysql/dev/5.1/storage/ndb'
make[2]: *** No rule to make target `distclean'.
make[2]: Leaving directory `/home/hartmut/projects/mysql/dev/5.1/storage/ndb'
...
make[2]: Entering directory `/home/hartmut/projects/mysql/dev/5.1/storage/innobase'
make[2]: *** No rule to make target `distclean'.
make[2]: Leaving directory `/home/hartmut/projects/mysql/dev/5.1/storage/innobase'
...
make[2]: Entering directory `/home/hartmut/projects/mysql/dev/5.1/storage/bdb'
make[2]: *** No rule to make target `distclean'.
make[2]: Leaving directory `/home/hartmut/projects/mysql/dev/5.1/storage/bdb'
...

Suggested fix:
For the tools dir just change the last line of the DIST_SUBDIRS assignment
in Makefile.am back from

  @bench_dirs@ support-files server-tools tools

to 
 
  @bench_dirs@ support-files @tools_dirs@

as it used to be in previous releases?

For libmysql_r -> add and use a @libmysql_r_dir@ variable that is only
set when --enable-thread-safe-client is requested?

For storage/Makefile.am make the MYSQL_STORAGE_ENGINE in
config/ac-macros/storage.m4 maintain the DIST_SUBDIRS list based
on the actual configuration
[19 Dec 2005 11:24] Valeriy Kravchuk
Thank you for a bug report. Verified just as described:

bk clone ~/mysql-5.1-new/
cd mysql-5.1-new/
BUILD/autorun.sh
./configure --prefix=/home/openxs/dbs/5.1

and then:

[openxs@Fedora mysql-5.1-new]$ make distclean
Making distclean in tools
make[1]: Entering directory `/tmp/mysql-5.1-new/tools'
make[1]: *** No rule to make target `distclean'.  Stop.
make[1]: Leaving directory `/tmp/mysql-5.1-new/tools'
make: *** [distclean-recursive] Error 1

Verified on Linux with 5.1-BK (ChangeSet@1.1965, 2005-12-19 11:12:53+01:00)
[3 Dec 2006 18:30] Kent Boortz
Sources has changed a lot since this report,
I can't repeat the problem with the current
5.1 sources.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.