* Ralf Wildenhues wrote on Sun, Aug 08, 2010 at 01:58:45PM CEST: > * Stefano Lattarini wrote on Sun, Jun 27, 2010 at 06:14:41PM CEST: > > Modernize, improve and/or extend test scripts `conf*.test'. > > [...] > > * tests/confh.test: Use the `configure.in' stub created by ./defs, > > rather than writing one from scratch, and do not call AC_OUTPUT. > > Enable `errexit' shell flag, and related changes. Prefer diff over > > cmp to compare text files. Prefer perl over sed to fetch the value > > of $(DIST_COMMON) from Makefile.in. Make grepping of the contents > > of $(DIST_COMMON) stricter.
> > --- a/tests/confh.test > > +++ b/tests/confh.test > > > @@ -33,24 +33,26 @@ mkdir include > > : > include/Makefile.am > > : > include/config.h.in > > > > -$ACLOCAL || Exit 1 > > -$AUTOMAKE || Exit 1 > > - > > -(sed -n -e '/^DIST_COMMON =.*\\$/ { > > - :loop > > - p > > - n > > - t clear > > - :clear > > - s/\\$/\\/ > > - t loop > > - p > > - n > > - }' -e '/^DIST_COMMON =/ p' Makefile.in | grep acconfig.h) || Exit 1 > > +$ACLOCAL > > +$AUTOMAKE > > + > > +perl -ne ' > > +if (s/^DIST_COMMON *=//) > > +{ > > + $_ .= <> while (s/\\$//); > > + $_ = " $_ "; > > + s/\s+/ /g; > > + print "$_\n"; > > + exit 0; > > +}' Makefile.in > dc.txt > > This could instead use extract_variable which we've discussed before > somewhere, right? ;-) Also, this causes two maintainer-check failures (exit and perl). Cheers, Ralf