automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SIMPLE PATCH] {maint} Add test for `AM_WITH_DMALLOC' macro.


From: Stefano Lattarini
Subject: Re: [SIMPLE PATCH] {maint} Add test for `AM_WITH_DMALLOC' macro.
Date: Sun, 26 Sep 2010 21:51:11 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

On Sunday 26 September 2010, Ralf Wildenhues wrote:
> * Stefano Lattarini wrote on Tue, Sep 21, 2010 at 12:57:10PM CEST:
> > The macro `AM_WITH_DMALLOC' is not checked by the testsuite.
> > The attached pach should provide at least a minimal coverage.
> > OK for maint?
> 
> OK with nits addressed.  Thanks.
> 
> > Subject: [PATCH] Add test for `AM_WITH_DMALLOC' macro.
> > 
> > * tests/dmalloc.test: New test.
> > * tests/Makefile.am (TESTS): Update.
> > 
> > --- /dev/null
> > +++ b/tests/dmalloc.test
> > 
> > +# Simple checks on the `AM_WITH_DMALLOC' macro.
> > +
> > +. ./defs || Exit 1
> > +
> > +set -e
> > +
> > +cat >> configure.in << 'END'
> > +AC_CONFIG_HEADERS([config.h])
> > +AM_WITH_DMALLOC
> > +AC_SUBST([LIBS])
> 
> Not needed.  Autoconf AC_SUBST's LIBS.
I'm ashamed to say I didn't know this (or I forgot it).  Thanks for 
the correction.

> 
> > +dnl Let's show some good practices ;-)
> > +AC_SUBST([AM_LDFLAGS], [$LDFLAGS])
> 
> This is not needed, nor would I recommend it.  LDFLAGS is
> AC_SUBSTed by Autoconf already, and used in link flags already
> anyway. 
You sure?  If I remove the AC_SUBST of LDFLAGS, the test fails
with:

 $ ./dmalloc.test 
 ...
 + cat config.h
 /* config.h.  Generated from config.h.in by configure.  */
 #define WITH_DMALLOC 1
 + grep '^# *define  *WITH_DMALLOC  *1 *$' config.h
 #define WITH_DMALLOC 1
 + make check-with-dmalloc
 echo ' '  ' ' | grep ' -g '
 make: *** [check-with-dmalloc] Error 1
 + exit_status=2
 + set +e
 + cd /home/stefano/src/automake/tests
 + case $exit_status,$keep_testdirs in
 +  test 0 '!=' 0
 + echo 'dmalloc: exit 2'
 dmalloc: exit 2
 + exit 2


Thanks,
  Stefano



reply via email to

[Prev in Thread] Current Thread [Next in Thread]