[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: warning: module to simplify adding compiler warnings
From: |
Ralf Wildenhues |
Subject: |
Re: warning: module to simplify adding compiler warnings |
Date: |
Sun, 23 Nov 2008 15:07:39 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello Simon,
just a note:
* Simon Josefsson wrote on Mon, Nov 17, 2008 at 01:09:49PM CET:
> > What mechanism propagates the CFLAGS setting to sub-directories? I used
> > to add -W etc to CFLAGS in the top-level configure.ac, and they were
> > propagated into lib/Makefile and libextra/Makefile without problem. One
> > solution I thought about was if I could mark WARN_CFLAGS as a similar
> > variable to CFLAGS somehow.
>
> For the record, I found the solution to this problem, and it was to put
>
> export WARN_CFLAGS
>
> in the top-level configure.ac and to put
>
> AC_SUBST([WARN_CFLAGS])
>
> in sub-ordinate configure.ac's.
While this works, it is probably better to add "WARN_CFLAGS=$WARN_CFLAGS"
to ac_configure_args. That way, the settings get saved in the
subordinate config.status file, and if a rerun (config.status --recheck)
happens to be triggered in the sub package, then the flag settings won't
be lost.
In order for arbitrary contents of WARN_CFLAGS to survive here,
appropriate quoting has to be used. "$ac_configure_args" is eval'ed
when used inside Autoconf. Unfortunately, all that is not documented,
so it's best to look at Autoconf code for examples.
Cheers,
Ralf
- Re: warning: module to simplify adding compiler warnings, (continued)
Re: warning: module to simplify adding compiler warnings, Bruno Haible, 2008/11/11
Re: warning: module to simplify adding compiler warnings, Simon Josefsson, 2008/11/11