From 6b31158c5930ef8ba357e07d28ca56ff6104278e Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Wed, 9 Jan 2013 19:57:27 +0100 Subject: [PATCH] plans: we want to active subdir-objects unconditionally in automake 1.14 See automake bug#13378. * PLANS/subdir-objects.txt: New. * t/ccnoco4.sh: Improve heading comments a little. Signed-off-by: Stefano Lattarini --- PLANS/subdir-objects.txt | 67 ++++++++++++++++++++++++++++++++++++++++++++++++ t/ccnoco4.sh | 9 ++++--- 2 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 PLANS/subdir-objects.txt diff --git a/PLANS/subdir-objects.txt b/PLANS/subdir-objects.txt new file mode 100644 index 0000000..e3aec6b --- /dev/null +++ b/PLANS/subdir-objects.txt @@ -0,0 +1,67 @@ +Summary +------- + +We want to make the behaviour currently enabled by the 'subdir-objects' +the default one, and in fact the *only* one, in Automake 1.14. +See automake bug#13378: . + +Details +------- + +The fact that Automake-generated Makefiles place compiled object files in +the current directory by default, also when the corresponding source file +is in a subdirectory, is basically an historical accident, due to the fact +that the 'subdir-objects' option had only been introduced in April 1999, +starting with commit 'user-dep-gen-branchpoint-56-g88b5959', and never +made the default (likely to avoid backwards-compatibility issues). + +Since I believe the behaviour enabled by the 'subdir-objects' is the most +useful one, and in fact the *only* natural one, I'd like to make it the +only one available, simplifying the Automake implementation and APIs a +little in the process. + +Alas, since this also means changing the default behaviour of Automake +('subdir-objects' is not enabled by default, sadly), this means the +transition path will be less smooth than I'd like. + +For automake 1.13.2 (ASAP) +-------------------------- + +Fix the bug spotted by Nick Bowler: + + + + +and exposed in test case 't/ccnoco4.sh': currently, Automake-generated +C compilation rules mistakenly pass the "-c -o" options combination +unconditionally (even to losing compiler) when the 'subdir-objects' is +used but sources are only present in the top-level directory. + +For automake 1.13.2 (with more ease) +------------------------------------ + +Give a warning in the category 'unsupported' if the 'subdir-objects' +option is not specified. This should give the users enough forewarning +about the planned change, and give them time to update their packages +to the new semantic. + +This warning, when there are C sources in subdirs, should also mention the +need to use AM_PROG_CC_C_O in configure.ac (thanks to Peter Breitenlohner +for suggesting this). This is not strictly required, but will make +things a little simpler for the users, by giving a more complete feedback: + + +Be sure to avoid the warning when it would be irrelevant, i.e., if all +source files sit in "current" directory (thanks to Peter Johansson for +suggesting this). + +For automake 1.14 +----------------- + +Flip the 'subdir-object' option on by default. At the same time, +drop support for the "old" behaviour of having object files derived +from sources in a subdirectory being placed in the current directory +rather than in that same subdirectory. + +Still keep the 'subdir-object' option supported (as a simple no-op +now), to save useless churn in our user's build systems. diff --git a/t/ccnoco4.sh b/t/ccnoco4.sh index 54b857a..73dce9f 100755 --- a/t/ccnoco4.sh +++ b/t/ccnoco4.sh @@ -14,10 +14,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Check that Automake doesn't pass "-c -o" to losing compiler when -# the 'subdir-objects' is used but sources are only present in the -# top-level directory. Reported by Nick Bowler in the discussion on -# automake bug#13378: +# Check that Automake-generated C compilation rules don't mistakenly +# use the "-c -o" options combination unconditionally (even with losing +# compilers) when the 'subdir-objects' is used but sources are only +# present in the top-level directory. Reported by Nick Bowler in the +# discussion on automake bug#13378: # # -- 2.7.4