Resurrecting an old thread, for reference see: On Saturday 09 April 2011, Ralf Wildenhues wrote: > Hello Pitamila, > > let's keep the mailing list in Cc:, please. I would've seen your reply > earlier then. > > * pitamila@free.fr wrote on Mon, Apr 04, 2011 at 04:02:53PM CEST: > > ----- "Ralf Wildenhues" a écrit : > > > > > > thanks for the report. > > > > thanks for the support, I hope my answer is not too late. > > There's (almost) never a "too late" when giving useful feedback! > > > > * pitamila@free.fr wrote on Mon, Mar 28, 2011 at 09:17:09AM CEST: > > > > I'd like to make a rpm buildpackage in my distcheck-hook rule. > > > > My 'distcheck-hook' rule in my root Makefile.am is never called. > > > > I tryed to define a 'distcheck-local' too without success. > > > > Is there something more to know than 14.4 of automake manual? > > > > > > Can you show the Makefile.am file? distcheck-hook should work. > > > > Find attached the Makefile.am of my doc/ subdir > > In fact I try to call a clean-local without success (I suppose > > it's the same bug than my distcheck-local not beeing called > > in my top Makefile.am) > > Yep. And you have indeed stumbled over a limitation in automake; > I could call it a bug, but I'm inclined to document it rather than > fix it as it is worked around easily. > > Quoting your Makefile.am: > > clean-local : > -rm -rf html/* html @PACKAGE@.pdf latex/* latex > > There is a literal TAB after 'clean-local'. automake's parser is pretty > dumb when it comes to distinguishing rule commands from rule lines from > variable assignments, mostly because it is hard to get things right when > hard-core GNU make code is used. > > Anyway, in this case it gets things wrong due to the TAB. Solution is > to remove the TAB before the colon, maybe replacing it with a number of > spaces. Then everything will work out fine. > I've ended up writing a documentation patch for this, as well for another unrelated limitation encountered by Roberto Bagnara in an older thread on the automake list, see: Since I was at it, I've written two tests verifying the documented behaviour. I will wait a few hours before pushing (to maint), to allow for reviews. Regards, Stefano