Am Donnerstag, 26. April 2007 11:58:26 schrieb Stepan Kasal: > Hello Florian, > > * Florian Briegel wrote on Mon, Apr 23, 2007 at 11:59:10AM CEST: > > Am Montag, 23. April 2007 schrieb Benoit Sigoure: > > > Is there any reason why you would not want to do this? > > > > Simplicity. > > > > aaa_SOURCES = foo.x > > > > is much more easy to handle [...] > > indeed. I believe you have found a bug, and I believe it is > desirable to fix it. > > Though I'm not able to write a patch right now, I can write down some > hints: perhaps they will inspire someone to contribute a patch. ;-) > > First, let's start with a completely different example: > > wow_SOURCES = boo.cc baux.h bleah.zz > .zz.cc: > cp $< $@ > > Then the generated Makefile.in contains: > > am_wow_OBJECTS = boo.$(OBJEXT) bleah.$(OBJEXT) > wow_OBJECTS = $(am_wow_OBJECTS) > > Why? Obviously, Automake knows there is a .cc.o rule, which results > in boo.o. Automake also knows there is no rule to compile *.h to an > object file, so there is no baux.o in the list. > > Most interestingly, Automake is able to discover that *.zz will be > eventually compiled into *.o, via a *.cc file. > Look at the procedure derive_suffix in automake/automake.in. > For example, derive_suffix('.zz', '$(OBJEXT)') evaluates to '.cc'. > > So back to your example: > I believe Automake knows foo.cc is the last step before foo.o, and I > believe the code should be fixed to use foo.cc instead of foo.x in > the `aaa-foo.o' rule. > > If you are willing to make a first iteration of the patch, I believe > it would be welcome. The next step would be to run "make check" with > that patch. > > Hope this helps, > Stepan
Yep that helped. Thanks. I have fixed it and checked it with autmake-1.10a from the cvs and all tests succeded. I have also written a test called suffix13.test. Hm Nr. 13, hope this means no bad luck ,-) I have checked it with my own stuff (Ice and Qt) and it worked too. So I will submit it to [EMAIL PROTECTED] and see what happens. Cheers Florian --- automake.in 2007-04-30 12:50:13.849125250 +0200 +++ automake.in 2007-04-30 13:04:41.407344250 +0200 @@ -1774,7 +1774,16 @@ { my $obj_sans_ext = substr ($object, 0, - length ($this_obj_ext)); - my $full_ansi = $full; + my $full_ansi; + if ($directory ne '') + { + $full_ansi = $directory . '/' . $base . $extension; + } + else + { + $full_ansi = $base . $extension; + } + if ($lang->ansi && option 'ansi2knr') { $full_ansi =~ s/$KNOWN_EXTENSIONS_PATTERN$/\$U$&/;