[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature request: making invalid feature request error more friendly
From: |
Eric Blake |
Subject: |
Re: feature request: making invalid feature request error more friendly |
Date: |
Fri, 30 May 2014 08:56:35 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 05/30/2014 03:01 AM, Noel Grandin wrote:
> It would be really handy if we could we modify the following error message:
>
> configure: error: invalid feature name: debug
>
> so it reads something like
>
> configure: error: invalid feature name: 'debug '
Thanks for the report. I'll be pushing this patch, which matches with
the error reporting we already do elsewhere for invalid shell variable
names. (I don't like the fact that this uses `' instead of '' quoting,
but making autoconf consistent to modern GNU Coding Standards is a patch
for another day, while this one is at least consistent with the rest of
the file).
From da84360b9775510f219c6022514fe390c4fadf44 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Fri, 30 May 2014 08:55:10 -0600
Subject: [PATCH] AC_INIT: quote invalid feature names
Changes:
configure: error: invalid feature name: debug
to
configure: error: invalid feature name: `debug '
to make it obvious if trailing space is the reason why a feature
name was rejected.
* lib/autoconf/general.m4 (_AC_INIT_PARSE_ENABLE2): Add quotes.
Reported by Noel Grandin.
Signed-off-by: Eric Blake <address@hidden>
---
lib/autoconf/general.m4 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index e2e9b6a..696a9a1 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -998,8 +998,8 @@ m4_define([_AC_INIT_PARSE_ENABLE2],
ac_useropt=`expr "x$ac_option" : 'x-*$1-\(m4_if([$1], [$2],
[[[^=]]], [.])*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : "[.*[^-+._$as_cr_alnum]]" >/dev/null &&
- AC_MSG_ERROR(
- [invalid ]m4_if([$2], [with], [package], [feature])[ name: $ac_useropt])
+ AC_MSG_ERROR([invalid ]m4_if([$2], [with],
+ [package], [feature])[ name: `$ac_useropt'])
ac_useropt_orig=$ac_useropt
ac_useropt=`AS_ECHO(["$ac_useropt"]) | sed 's/[[-+.]]/_/g'`
case $ac_user_opts in
--
1.9.3
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: feature request: making invalid feature request error more friendly,
Eric Blake <=