On Thursday 16 September 2010, Ralf Wildenhues wrote: > * Stefano Lattarini wrote on Thu, Sep 16, 2010 at 09:53:22PM CEST: > > On Thursday 16 September 2010, Ralf Wildenhues wrote: > > > With nits below addressed, the patch is OK for master, but > > > please commit to a new branch off of maint > > > > That's what I tried at first, but unfortunately the maint branch > > lacks support for silent-rules. However, it might be possible > > that $(AM_V_GEN) and friends behaves as no-op in maint, > > Yes you can assume that. OK. I'll rebase the patch on maint then. Proper testing will follow (on GNU/Linux and Solaris with several setups -- this might take a while, even a couple of days). If everything goes smoothly, I'll post the final "FYI" patch. > > > > --- a/tests/Makefile.am > > > > +++ b/tests/Makefile.am > > > > > > > > +$(instspc_tests): Makefile.am > > > > + $(AM_V_at)rm -f $@ $...@-t > > > > + $(AM_V_GEN) :; \ > > > > + base=`expr x'$@' : x'instspc-\(.*\)\.test$$'`; \ > > > > > > I think $@ could contain $(srcdir) here, no? > > > > Why? In "True VPATH Spirit", we generate tests in the builddir, > > not in the srcdir. > > Are they distributed? If yes, then from a tarball, they are in > srcdir. (The user might have botched time stamps, or modified an > input file on purpose, say for a bugfix.) Right, sorry for not havingh thought of that myself.
I've amended to this: base=`expr 'x/$@' : 'x.*/instspc-\(.*\)\.test$$'`; BUT... this still generates tests in the builddir, even if $(builddir) != $(srcdir) and the tests are already distributed in $(srcdir). Ouch. Luckily, in this case, the tests generated in the $(builddir) are preferred over those in $(srcdir), (by GNU make, Heirloom make and FreeBSD make at least), so the semantic is still right. Is the something we can live with? Should we try to adreess it in a follow-up? Regards, Stefano