[Top][All Lists]
[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: |
Wed, 12 Nov 2008 12:20:10 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> Simon Josefsson wrote:
>> >> FWIW, I wouldn't use AC_ARG_VAR for gl_WARN_INIT.
>> >
>> > Yes, agreed: When the user wants to disable some warnings, he can do so by
>> > putting the opposite -W options into the CFLAGS when configuring. That's
>> > what my proposed piece of documentation says. Non-maintainers don't need
>> > to set different warning options on different subdirectories of the
>> > package.
>>
>> Wouldn't this make it impossible to set WARN_CFLAGS=-Werror when
>> invoking configure?
>
> No. Citing the autoconf documentation:
> "AC_ARG_VAR (VARIABLE, DESCRIPTION)
> Declare VARIABLE is a precious variable, and include its
> DESCRIPTION in the variable section of `./configure --help'.
> Being precious means that ..."
> etc. - Just keep WARN_CFLAGS uninitialized in the configure script, and
> you can give it an initial value from the environment variable.
>
>> Or at least make that usage undocumented.
>>
>> The original motivation for the module was that -Werror cannot go into
>> CFLAGS, so I need to provide the flag somewhere else, which ended up
>> being WARN_CFLAGS. If that variable isn't documented ...
>
> You write the documentation. I provided only a sketch of it.
My point was that AC_ARG_VAR documents the variable, through the --help
output.
However, now with your warnings.texi, it is documented in another way,
so I removed the entire gl_WARN_INIT function. Maintainers can add the
AC_ARG_VAR to their configure.ac if they want to expose the variable to
users.
Thanks,
/Simon
>From b383aaabadb883fa8be0a826500b516a2eee8f69 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <address@hidden>
Date: Wed, 12 Nov 2008 12:19:23 +0100
Subject: [PATCH] warnings: Remove gl_WARN_INIT.
---
ChangeLog | 7 +++++++
m4/warnings.m4 | 7 -------
modules/warnings | 1 -
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e610de6..fb5194d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2008-11-12 Simon Josefsson <address@hidden>
+ * m4/warnings.m4 (gl_WARN_INIT): Remove, suggested by Ralf
+ Wildenhues <address@hidden> and Bruno Haible
+ <address@hidden>.
+ * modules/warnings (configure.ac): Don't call gl_WARN_INIT.
+
+2008-11-12 Simon Josefsson <address@hidden>
+
* doc/warnings.texi: New file, from Bruno Haible <address@hidden>.
* doc/gnulib.texi: Add section for warnings.
diff --git a/m4/warnings.m4 b/m4/warnings.m4
index 71a8e56..d2854d9 100644
--- a/m4/warnings.m4
+++ b/m4/warnings.m4
@@ -6,13 +6,6 @@ dnl with or without modifications, as long as this notice is
preserved.
dnl From Simon Josefsson
-# gl_WARN_INIT
-# Initializes WARN_CFLAGS variable.
-AC_DEFUN([gl_WARN_INIT],
-[AC_SUBST([WARN_CFLAGS])dnl
-AC_ARG_VAR([WARN_CFLAGS], [C compiler warning flags])
-])
-
# gl_AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH])
# ----------------------------------------------------
# Provide the functionality of AS_VAR_IF if Autoconf does not have it.
diff --git a/modules/warnings b/modules/warnings
index bd757c5..f1baa6c 100644
--- a/modules/warnings
+++ b/modules/warnings
@@ -7,7 +7,6 @@ m4/warnings.m4
Depends-on:
configure.ac:
-gl_WARN_INIT
License:
unlimited
--
1.5.6.5
- Re: warning: module to simplify adding compiler warnings, (continued)
- Re: warning: module to simplify adding compiler warnings, Paolo Bonzini, 2008/11/11
- Re: warning: module to simplify adding compiler warnings, Simon Josefsson, 2008/11/11
- Re: warning: module to simplify adding compiler warnings, Paolo Bonzini, 2008/11/11
- Re: warning: module to simplify adding compiler warnings, Simon Josefsson, 2008/11/11
- Re: warning: module to simplify adding compiler warnings, Paolo Bonzini, 2008/11/11
- Re: warning: module to simplify adding compiler warnings, Simon Josefsson, 2008/11/11
- Re: warning: module to simplify adding compiler warnings, Ralf Wildenhues, 2008/11/11
- 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/12
- Re: warning: module to simplify adding compiler warnings, Bruno Haible, 2008/11/12
- Re: warning: module to simplify adding compiler warnings,
Simon Josefsson <=
- Re: warning: module to simplify adding compiler warnings, Simon Josefsson, 2008/11/12
- Re: warning: module to simplify adding compiler warnings, Bruno Haible, 2008/11/11
- Re: warning: module to simplify adding compiler warnings, Paolo Bonzini, 2008/11/11
- Re: warning: module to simplify adding compiler warnings, Simon Josefsson, 2008/11/12
- Re: warning: module to simplify adding compiler warnings, Simon Josefsson, 2008/11/11
- Re: warning: module to simplify adding compiler warnings, Bruno Haible, 2008/11/10
- Re: warning: module to simplify adding compiler warnings, Bruno Haible, 2008/11/11