From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8751 invoked by alias); 8 Oct 2003 19:52:50 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 8714 invoked from network); 8 Oct 2003 19:52:48 -0000 Received: from unknown (HELO planck.amplepower.com) (216.39.162.139) by sources.redhat.com with SMTP; 8 Oct 2003 19:52:48 -0000 Received: from [192.168.8.30] (helo=knuth.amplepower.com ident=roth) by planck.amplepower.com with esmtp (Exim 3.36 #1 (Debian)) id 1A7KM2-0001Un-00; Wed, 08 Oct 2003 12:52:14 -0700 Date: Wed, 08 Oct 2003 19:52:00 -0000 From: "Theodore A. Roth" X-X-Sender: roth@knuth.amplepower.com To: Jim Blandy cc: gdb-patches@sources.redhat.com Subject: Re: RFC: Use program_transform_name correctly In-Reply-To: Message-ID: References: <20031007225305.GA13082@nevyn.them.org> <20031007235921.8FB0B158F81@kanga.canids.net> <20031008010510.GA15693@nevyn.them.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2003-10/txt/msg00253.txt.bz2 On Wed, 8 Oct 2003, Jim Blandy wrote: > > Could someone proofread this boring patch very carefully? As long as gdb is using a autoconf-2.13 generated configure script, I think that this will still have a problem when the user tries to pass both --program-prefix=PREFIX and --program-suffix=SUFFIX to configure at the same time. That was why I had added the double quotes around $$t in the install-only rule. Ted Roth > > gdb/Makefile.in: > 2003-10-08 Jim Blandy > > * Makefile.in (CC_FOR_TARGET, CXX_FOR_TARGET, install-only): Use > program_transform_name properly. > * nlm/Makefile.in (CC_FOR_TARGET, NLMCONV_FOR_TARGET): Same. > > gdb/gdbserver/Makefile.in: > 2003-10-08 Jim Blandy > > * Makefile.in (install-only, uninstall): Use > program_transform_name properly. > > gdb/testsuite/Makefile.in: > 2003-10-08 Jim Blandy > > * Makefile.in (RUNTEST_FOR_TARGET): Use program_transform_name > properly. > > Index: gdb/Makefile.in > =================================================================== > RCS file: /cvs/src/src/gdb/Makefile.in,v > retrieving revision 1.454 > diff -c -r1.454 Makefile.in > *** gdb/Makefile.in 8 Oct 2003 02:41:49 -0000 1.454 > --- gdb/Makefile.in 8 Oct 2003 19:22:39 -0000 > *************** > *** 465,471 **** > if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ > echo $(CC); \ > else \ > ! t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ > fi; \ > fi` > > --- 465,471 ---- > if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ > echo $(CC); \ > else \ > ! t='$(program_transform_name)'; echo gcc | sed -e $$t; \ > fi; \ > fi` > > *************** > *** 481,487 **** > if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ > echo $(CXX); \ > else \ > ! t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ > fi; \ > fi` > > --- 481,487 ---- > if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ > echo $(CXX); \ > else \ > ! t='$(program_transform_name)'; echo gcc | sed -e $$t; \ > fi; \ > fi` > > *************** > *** 963,969 **** > install: all install-only > install-only: $(CONFIG_INSTALL) > transformed_name=`t='$(program_transform_name)'; \ > ! echo gdb | sed -e "$$t"` ; \ > if test "x$$transformed_name" = x; then \ > transformed_name=gdb ; \ > else \ > --- 963,969 ---- > install: all install-only > install-only: $(CONFIG_INSTALL) > transformed_name=`t='$(program_transform_name)'; \ > ! echo gdb | sed -e $$t` ; \ > if test "x$$transformed_name" = x; then \ > transformed_name=gdb ; \ > else \ > Index: gdb/gdbserver/Makefile.in > =================================================================== > RCS file: /cvs/src/src/gdb/gdbserver/Makefile.in,v > retrieving revision 1.24 > diff -c -r1.24 Makefile.in > *** gdb/gdbserver/Makefile.in 8 Aug 2003 17:30:36 -0000 1.24 > --- gdb/gdbserver/Makefile.in 8 Oct 2003 19:22:40 -0000 > *************** > *** 149,155 **** > # install-only is intended to address that need. > install: all install-only > install-only: > ! n=`echo gdbserver | sed '$(program_transform_name)'`; \ > if [ x$$n = x ]; then n=gdbserver; else true; fi; \ > $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir); \ > $(INSTALL_PROGRAM) gdbserver $(DESTDIR)$(bindir)/$$n; \ > --- 149,155 ---- > # install-only is intended to address that need. > install: all install-only > install-only: > ! n=`t='$(program_transform_name)'; echo gdbserver | sed $$t`; \ > if [ x$$n = x ]; then n=gdbserver; else true; fi; \ > $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir); \ > $(INSTALL_PROGRAM) gdbserver $(DESTDIR)$(bindir)/$$n; \ > *************** > *** 157,163 **** > $(INSTALL_DATA) $(srcdir)/gdbserver.1 $(DESTDIR)$(man1dir)/$$n.1 > > uninstall: force > ! n=`echo gdbserver | sed '$(program_transform_name)'`; \ > if [ x$$n = x ]; then n=gdbserver; else true; fi; \ > rm -f $(bindir)/$$n $(DESTDIR)$(man1dir)/$$n.1 > > --- 157,163 ---- > $(INSTALL_DATA) $(srcdir)/gdbserver.1 $(DESTDIR)$(man1dir)/$$n.1 > > uninstall: force > ! n=`t='$(program_transform_name)'; echo gdbserver | sed $$t`; \ > if [ x$$n = x ]; then n=gdbserver; else true; fi; \ > rm -f $(bindir)/$$n $(DESTDIR)$(man1dir)/$$n.1 > > Index: gdb/nlm/Makefile.in > =================================================================== > RCS file: /cvs/src/src/gdb/nlm/Makefile.in,v > retrieving revision 1.2 > diff -c -r1.2 Makefile.in > *** gdb/nlm/Makefile.in 6 Mar 2001 08:21:46 -0000 1.2 > --- gdb/nlm/Makefile.in 8 Oct 2003 19:22:40 -0000 > *************** > *** 55,68 **** > if [ -f ../../gcc/xgcc ] ; then \ > echo ../../gcc/xgcc -B../../gcc/; \ > else \ > ! t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ > fi` > > NLMCONV_FOR_TARGET = ` \ > if [ -f ../../binutils/nlmconv ] ; then \ > echo ../../binutils/nlmconv; \ > else \ > ! t='$(program_transform_name)'; echo nlmconv | sed -e '' $$t; \ > fi` > > # All the includes used for CFLAGS and for lint. > --- 55,68 ---- > if [ -f ../../gcc/xgcc ] ; then \ > echo ../../gcc/xgcc -B../../gcc/; \ > else \ > ! t='$(program_transform_name)'; echo gcc | sed -e $$t; \ > fi` > > NLMCONV_FOR_TARGET = ` \ > if [ -f ../../binutils/nlmconv ] ; then \ > echo ../../binutils/nlmconv; \ > else \ > ! t='$(program_transform_name)'; echo nlmconv | sed -e $$t; \ > fi` > > # All the includes used for CFLAGS and for lint. > Index: gdb/testsuite/Makefile.in > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/Makefile.in,v > retrieving revision 1.8 > diff -c -r1.8 Makefile.in > *** gdb/testsuite/Makefile.in 23 Aug 2003 03:55:58 -0000 1.8 > --- gdb/testsuite/Makefile.in 8 Oct 2003 19:22:48 -0000 > *************** > *** 53,59 **** > if [ "$(host_canonical)" = "$(target_canonical)" ]; then \ > echo runtest; \ > else \ > ! t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \ > fi; \ > fi` > > --- 53,59 ---- > if [ "$(host_canonical)" = "$(target_canonical)" ]; then \ > echo runtest; \ > else \ > ! t='$(program_transform_name)'; echo runtest | sed -e $$t; \ > fi; \ > fi` > >