bug-gnulib
[Top][All Lists]
Advanced

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

Re: warning: module to simplify adding compiler warnings


From: Simon Josefsson
Subject: Re: warning: module to simplify adding compiler warnings
Date: Mon, 17 Nov 2008 13:09:49 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux)

Simon Josefsson <address@hidden> writes:

> This is likely a autoconf or automake question, but since it was related
> to the warnings module, and some of the relevant people is on this list
> as well, I'm trying to raise it here:
>
> How do I get the WARN_CFLAGS variable defined in all of my Makefile's?
> In GnuTLS, I now use AC_CONFIG_SUBDIR for lib/ and libextra/
> sub-directories.  I want to add this to my top-level configure.ac:
>
>   gl_WARN_ADD([-W])
>
> and then get the WARN_CFLAGS replicated into lib/Makefile and
> libextra/Makefile as well.
>
> I've tried adding AC_SUBST and AC_ARG_VAR for WARN_CFLAGS in
> lib/configure.ac, and the variables were defined in lib/Makefile but the
> content was empty.
>
> Any ideas?
>
> 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.

/Simon




reply via email to

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