public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: A question on ACX_BUGURL
       [not found]                 ` <4607D2B0.5080004@lu.unisi.ch>
@ 2007-03-26 14:41                   ` H. J. Lu
  2007-03-26 14:48                     ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: H. J. Lu @ 2007-03-26 14:41 UTC (permalink / raw)
  To: bonzini
  Cc: Dave Korn, 'Andreas Schwab', 'Joseph S. Myers',
	binutils, gcc-patches

On Mon, Mar 26, 2007 at 04:03:28PM +0200, Paolo Bonzini wrote:
> H. J. Lu wrote:
> > On Mon, Mar 26, 2007 at 09:13:30AM +0200, Paolo Bonzini wrote:
> >> Please do this instead:
> >>
> >>   REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
> >>
> > 
> > Will it work with spaces in $BUGURL?
> 
> Yes, it will.  You need quoting in the echo command, but
> not in the variable assignment.  Quoting both the echo
> command-line and the variable assignment is not portable.
> 
> Variable assignments (and case statements, as Andreas
> pointed out) do not perform word splitting of variables.
> 

Here it is.


H.J.
----
2007-03-26  H.J. Lu  <hongjiu.lu@intel.com>

	* acx.m4 (ACX_BUGURL): Set BUGURL first. Quote $BUGURL first
	when setting REPORT_BUGS_TEXI.

--- config/acx.m4.url	2007-03-24 09:18:59.000000000 -0700
+++ config/acx.m4	2007-03-26 07:21:24.000000000 -0700
@@ -577,16 +577,23 @@ AC_DEFUN([ACX_BUGURL],[
                    [Direct users to URL to report a bug]),
     [case "$withval" in
       yes) AC_MSG_ERROR([bug URL not specified]) ;;
-      no)  REPORT_BUGS_TO="";
-	   REPORT_BUGS_TEXI=""
+      no)  BUGURL=
 	   ;;
-      *)   REPORT_BUGS_TO="<$withval>"
-	   REPORT_BUGS_TEXI="@uref{`echo $withval | sed 's/@/@@/g'`}"
+      *)   BUGURL="$withval"
 	   ;;
      esac],
-     REPORT_BUGS_TO="<$1>"
-     REPORT_BUGS_TEXI="@uref{`echo $1 | sed 's/@/@@/g'`}"
+     BUGURL="$1"
   )
+  case ${BUGURL} in
+  "")
+    REPORT_BUGS_TO=
+    REPORT_BUGS_TEXI=
+    ;;
+  *)
+    REPORT_BUGS_TO="<$BUGURL>"
+    REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
+    ;;
+  esac;
   AC_SUBST(REPORT_BUGS_TO)
   AC_SUBST(REPORT_BUGS_TEXI)
 ])

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: A question on ACX_BUGURL
  2007-03-26 14:41                   ` A question on ACX_BUGURL H. J. Lu
@ 2007-03-26 14:48                     ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2007-03-26 14:48 UTC (permalink / raw)
  To: H. J. Lu
  Cc: bonzini, Dave Korn, 'Andreas Schwab',
	'Joseph S. Myers',
	binutils, gcc-patches


> Here it is.

Ok for gcc and src.  Thanks!

Paolo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-26 14:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20070323164757.GA1257@lucon.org>
     [not found] ` <Pine.LNX.4.64.0703231654580.829@digraph.polyomino.org.uk>
     [not found]   ` <20070323171037.GA4610@lucon.org>
     [not found]     ` <jelkhng7z9.fsf@sykes.suse.de>
     [not found]       ` <20070323181039.GA11052@lucon.org>
     [not found]         ` <007d01c76d77$e4c80cc0$2e08a8c0@CAM.ARTIMI.COM>
     [not found]           ` <20070323185157.GA11298@lucon.org>
     [not found]             ` <4607729A.6000107@lu.unisi.ch>
     [not found]               ` <20070326140037.GA17325@lucon.org>
     [not found]                 ` <4607D2B0.5080004@lu.unisi.ch>
2007-03-26 14:41                   ` A question on ACX_BUGURL H. J. Lu
2007-03-26 14:48                     ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).