Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Unbreak program transformation name `configure' options
@ 2012-04-27 15:23 Maciej W. Rozycki
  2012-04-27 15:37 ` Tom Tromey
  2012-04-27 15:38 ` Pedro Alves
  0 siblings, 2 replies; 5+ messages in thread
From: Maciej W. Rozycki @ 2012-04-27 15:23 UTC (permalink / raw)
  To: gdb-patches; +Cc: Pedro Alves, Tom Tromey

Hi,

 This commit:

2012-04-19  Pedro Alves  <palves@redhat.com>

	gdb/
	* configure.ac: Remove gl_EARLY, gl_INIT and AM_INIT_AUTOMAKE
	calls.  Configure gnulib using ACX_CONFIGURE_DIR.

removed the handling of the program transformation name `configure' 
options in this subdirectory (that was pulled implicitly with 
AM_INIT_AUTOMAKE).

 OK to check in the following fix that reinstates it?

2012-04-26  Maciej W. Rozycki  <macro@codesourcery.com>

	gdb/
	* configure.ac: Add AC_ARG_PROGRAM.
	* configure: Regenerate.

  Maciej

gdb-ac-fix.diff
Index: gdb-fsf-trunk-quilt/gdb/configure
===================================================================
--- gdb-fsf-trunk-quilt.orig/gdb/configure	2012-04-26 18:06:36.000000000 +0100
+++ gdb-fsf-trunk-quilt/gdb/configure	2012-04-27 06:52:28.075588943 +0100
@@ -1426,6 +1426,11 @@ _ACEOF
 
   cat <<\_ACEOF
 
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
 X features:
   --x-includes=DIR    X include files are in DIR
   --x-libraries=DIR   X library files are in DIR
@@ -4371,6 +4376,16 @@ ac_configure="$SHELL $ac_aux_dir/configu
 
 
 
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
 
 # Dependency checking.
 rm -rf .tst 2>/dev/null
Index: gdb-fsf-trunk-quilt/gdb/configure.ac
===================================================================
--- gdb-fsf-trunk-quilt.orig/gdb/configure.ac	2012-04-26 18:06:36.000000000 +0100
+++ gdb-fsf-trunk-quilt/gdb/configure.ac	2012-04-27 06:51:40.705609266 +0100
@@ -30,6 +30,7 @@ AM_PROG_CC_STDC
 
 AC_CONFIG_AUX_DIR(..)
 AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM
 
 # Dependency checking.
 ZW_CREATE_DEPDIR


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

* Re: [PATCH] Unbreak program transformation name `configure' options
  2012-04-27 15:23 [PATCH] Unbreak program transformation name `configure' options Maciej W. Rozycki
@ 2012-04-27 15:37 ` Tom Tromey
  2012-04-27 15:38 ` Pedro Alves
  1 sibling, 0 replies; 5+ messages in thread
From: Tom Tromey @ 2012-04-27 15:37 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: gdb-patches, Pedro Alves

>>>>> "Maciej" == Maciej W Rozycki <macro@codesourcery.com> writes:

Maciej> 2012-04-26  Maciej W. Rozycki  <macro@codesourcery.com>
Maciej> 	gdb/
Maciej> 	* configure.ac: Add AC_ARG_PROGRAM.
Maciej> 	* configure: Regenerate.

Ok.

Tom


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

* Re: [PATCH] Unbreak program transformation name `configure' options
  2012-04-27 15:23 [PATCH] Unbreak program transformation name `configure' options Maciej W. Rozycki
  2012-04-27 15:37 ` Tom Tromey
@ 2012-04-27 15:38 ` Pedro Alves
  2012-04-27 15:50   ` Maciej W. Rozycki
  1 sibling, 1 reply; 5+ messages in thread
From: Pedro Alves @ 2012-04-27 15:38 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: gdb-patches, Tom Tromey

On 04/27/2012 04:15 PM, Maciej W. Rozycki wrote:

> Hi,
> 
>  This commit:
> 
> 2012-04-19  Pedro Alves  <palves@redhat.com>
> 
> 	gdb/
> 	* configure.ac: Remove gl_EARLY, gl_INIT and AM_INIT_AUTOMAKE
> 	calls.  Configure gnulib using ACX_CONFIGURE_DIR.
> 
> removed the handling of the program transformation name `configure' 
> options in this subdirectory (that was pulled implicitly with 
> AM_INIT_AUTOMAKE).
> 
>  OK to check in the following fix that reinstates it?


Yes, thanks.

I should have remembered to look at 9c9eabcbe003d635d12d43b5a926d7c01c2f5928 ,
the patch that originally added gnulib.

2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>

        * Makefile.in (LIBGNU, INCGNU): Define.
        (INTERNAL_CFLAGS_BASE): Add INCGNU.
        (INTERNAL_LIBS, CLIBS, CDEPS): Add LIBGNU.
        (CLEANDIRS): New.
        ($(LIBGNU), all-lib): New rules.
        (clean, distclean, do-maintainer-clean): Use CLEANDIRS.
        * configure.ac: Use gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE.
        Simplify AC_CONFIG_AUX_DIR.  Generate gnulib/Makefile.
        * gnulib: New directory, from gnulib-tool.
        * configure, aclocal.m4: Regenerated.

It indeed removed AC_ARG_PROGRAM.  It also does this though:

-AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
+AC_CONFIG_AUX_DIR(..)

I wonder if we need to restore that bit as well.

-- 
Pedro Alves


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

* Re: [PATCH] Unbreak program transformation name `configure' options
  2012-04-27 15:38 ` Pedro Alves
@ 2012-04-27 15:50   ` Maciej W. Rozycki
  2012-04-27 16:49     ` Pedro Alves
  0 siblings, 1 reply; 5+ messages in thread
From: Maciej W. Rozycki @ 2012-04-27 15:50 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches, Tom Tromey

On Fri, 27 Apr 2012, Pedro Alves wrote:

> It indeed removed AC_ARG_PROGRAM.  It also does this though:
> 
> -AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
> +AC_CONFIG_AUX_DIR(..)
> 
> I wonder if we need to restore that bit as well.

 I built out of the source directory so perhaps not?  This looks weird to 
me, autoconf should handle that just fine:

"-- Macro: AC_CONFIG_AUX_DIR (DIR)
     Use the auxiliary build tools (e.g., `install-sh', `config.sub',
     `config.guess', Cygnus `configure', Automake and Libtool scripts,
     etc.) that are in directory DIR.  These are auxiliary files used
     in configuration.  DIR can be either absolute or relative to
     `SRCDIR'.  The default is `SRCDIR' or `SRCDIR/..' or
     `SRCDIR/../..', whichever is the first that contains `install-sh'."

-- perhaps this was a left-over from times when autoconf was more fragile?  
I bet we have more places where we have some work-around logic left from 
the old days.

  Maciej


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

* Re: [PATCH] Unbreak program transformation name `configure' options
  2012-04-27 15:50   ` Maciej W. Rozycki
@ 2012-04-27 16:49     ` Pedro Alves
  0 siblings, 0 replies; 5+ messages in thread
From: Pedro Alves @ 2012-04-27 16:49 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: gdb-patches, Tom Tromey

On 04/27/2012 04:46 PM, Maciej W. Rozycki wrote:

> On Fri, 27 Apr 2012, Pedro Alves wrote:
> 
>> It indeed removed AC_ARG_PROGRAM.  It also does this though:
>>
>> -AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
>> +AC_CONFIG_AUX_DIR(..)
>>
>> I wonder if we need to restore that bit as well.
> 
>  I built out of the source directory so perhaps not?  This looks weird to 
> me, autoconf should handle that just fine:
> 
> "-- Macro: AC_CONFIG_AUX_DIR (DIR)
>      Use the auxiliary build tools (e.g., `install-sh', `config.sub',
>      `config.guess', Cygnus `configure', Automake and Libtool scripts,
>      etc.) that are in directory DIR.  These are auxiliary files used
>      in configuration.  DIR can be either absolute or relative to
>      `SRCDIR'.  The default is `SRCDIR' or `SRCDIR/..' or
>      `SRCDIR/../..', whichever is the first that contains `install-sh'."
> 
> -- perhaps this was a left-over from times when autoconf was more fragile?  
> I bet we have more places where we have some work-around logic left from 
> the old days.


Yeah, sounds like at some point AC_CONFIG_AUX_DIR didn't handle
relative paths to srcdir.  Thanks.

-- 
Pedro Alves


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

end of thread, other threads:[~2012-04-27 16:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-27 15:23 [PATCH] Unbreak program transformation name `configure' options Maciej W. Rozycki
2012-04-27 15:37 ` Tom Tromey
2012-04-27 15:38 ` Pedro Alves
2012-04-27 15:50   ` Maciej W. Rozycki
2012-04-27 16:49     ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox