[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

automake -a behavior

From: Sander Niemeijer
Subject: automake -a behavior
Date: Mon, 28 Apr 2003 14:11:25 +0200

It seems that when automake is trying to find missing standard files (such as install-sh and depcomp) by running automake -a it will also look into parent directories ($(srcdir)/.. and $(srcdir)/../..) whether these standard files might not already be there (the check happens on the 'install-sh' file).

The problem is that this can lead to very unexpected results:
1) In my case (that is how I discovered this) I had my development directory structure set up in such a way that there was a main package 'foo' which was located in dir foo/ with some subdirectories for source, etc. Inside this directory foo/ I created a directory foo/bar/ for my package 'bar' (a program that uses the 'foo' libraries) but which was not part of the 'foo' package. The problem in this case is that when I try to run automake -a -c for the 'bar' package (thus inside the foo/bar/ dir) it will use the standard files of the 'foo' package. However when I try to make a distribution of the 'bar' package the following happens: - the same standard files that were used from the foo/ dir will now be generated in the foo/bar/ directory (although the mkinstalldirs and install-sh scripts that are used to create the bar package are still the ones from foo/). I guess this is a result of 'make install' trying to copy the standard files to foo/bar/bar-1.0.0/.. - none of the standard files get included in the distribution for 'bar'. 2) In the previous case the parent directory of the 'bar' package contained another package called 'foo', but having a 'parent package' is not necessary to trigger this behavior. Consider the situation where the parent directory of 'foo' would contain only a 'install-sh' script (and no other standard files or files belonging to some package). In that case automake -a -c (run in the foo/ directory) would copy all needed standard files to the same directory as 'install-sh' is in and again none of the standard files would appear in the 'foo' distribution!

To me this seems highly unwanted behavior (although I do not know whether this may be classified as a bug).

I would therefore propose to either:
- remove the searching into parent directories for standard files (although I admit I don't know what consequences this may have) - document this parent searching behavior in the documentation of automake and provide an option to automake (in addition to -a and -c) that disables the parent dir searching (which, if used with the 'bar' package in the above example, would copy the standard files into foo/bar/ and thus properly include them into the 'bar' package.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]