* [RFA] sed bug in Makefile.in
@ 2003-07-11 17:08 Theodore A. Roth
2003-07-11 17:38 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Theodore A. Roth @ 2003-07-11 17:08 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1239 bytes --]
Hi,
I just tried to configure and build gdb with:
../configure --prefix=$HOME/local/avr --program-suffix=-6.0 --target=avr --enable-gdb-build-warnings=,-Werror
../configure --prefix=$HOME/local/avr --program-suffix=-6.0 --program-prefix=avr- --target=avr --enable-gdb-build-warnings=,-Werror
Both failed to install avr-gdb-6.0 which I expected.
The failure (on 'make install') is this:
make[1]: Leaving directory
`/home/roth/dev/tools/gdb-6.0-cvs/obj-avr/gdb'
transformed_name=`t='s,$,-6.0,; s,^,avr-,; '; \
echo gdb | sed -e $t` ; \
if test "x$transformed_name" = x; then \
transformed_name=gdb ; \
else \
true ; \
fi ; \
/bin/sh ../../gdb/../mkinstalldirs /home/roth/local/avr/bin ; \
/usr/bin/install -c gdb \
/home/roth/local/avr/bin/$transformed_name ; \
/bin/sh ../../gdb/../mkinstalldirs \
/home/roth/local/avr/man/man1 ; \
/usr/bin/install -c -m 644 ../../gdb/gdb.1 \
/home/roth/local/avr/man/man1/$transformed_name.1
sed: can't read s,^,avr-,;: No such file or directory
The attached patch seems to fix this.
Ok to commit? Should probably go on both head and branch.
Ted Roth
[-- Attachment #2: Type: TEXT/PLAIN, Size: 714 bytes --]
2003-07-11 Theodore A. Roth <troth@openavr.org>
* Makefile.in: Quote sed expression when generating transformed_name.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.410.2.5
diff -u -r1.410.2.5 Makefile.in
--- Makefile.in 8 Jul 2003 20:17:35 -0000 1.410.2.5
+++ Makefile.in 11 Jul 2003 16:56:23 -0000
@@ -956,7 +956,7 @@
install: all install-only
install-only: $(CONFIG_INSTALL)
transformed_name=`t='$(program_transform_name)'; \
- echo gdb | sed -e $$t` ; \
+ echo gdb | sed -e "$$t"` ; \
if test "x$$transformed_name" = x; then \
transformed_name=gdb ; \
else \
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] sed bug in Makefile.in
2003-07-11 17:08 [RFA] sed bug in Makefile.in Theodore A. Roth
@ 2003-07-11 17:38 ` Daniel Jacobowitz
2003-07-11 18:18 ` Theodore A. Roth
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2003-07-11 17:38 UTC (permalink / raw)
To: Theodore A. Roth; +Cc: gdb-patches
On Fri, Jul 11, 2003 at 10:14:01AM -0700, Theodore A. Roth wrote:
> Hi,
>
> I just tried to configure and build gdb with:
>
> ../configure --prefix=$HOME/local/avr --program-suffix=-6.0 --target=avr --enable-gdb-build-warnings=,-Werror
> ../configure --prefix=$HOME/local/avr --program-suffix=-6.0 --program-prefix=avr- --target=avr --enable-gdb-build-warnings=,-Werror
>
> Both failed to install avr-gdb-6.0 which I expected.
>
> The failure (on 'make install') is this:
>
> make[1]: Leaving directory
> `/home/roth/dev/tools/gdb-6.0-cvs/obj-avr/gdb'
> transformed_name=`t='s,$,-6.0,; s,^,avr-,; '; \
> echo gdb | sed -e $t` ; \
> if test "x$transformed_name" = x; then \
> transformed_name=gdb ; \
> else \
> true ; \
> fi ; \
> /bin/sh ../../gdb/../mkinstalldirs /home/roth/local/avr/bin ; \
> /usr/bin/install -c gdb \
> /home/roth/local/avr/bin/$transformed_name ; \
> /bin/sh ../../gdb/../mkinstalldirs \
> /home/roth/local/avr/man/man1 ; \
> /usr/bin/install -c -m 644 ../../gdb/gdb.1 \
> /home/roth/local/avr/man/man1/$transformed_name.1
> sed: can't read s,^,avr-,;: No such file or directory
>
>
> The attached patch seems to fix this.
>
> Ok to commit? Should probably go on both head and branch.
Yes, this is fine.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] sed bug in Makefile.in
2003-07-11 17:38 ` Daniel Jacobowitz
@ 2003-07-11 18:18 ` Theodore A. Roth
2003-07-11 19:35 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Theodore A. Roth @ 2003-07-11 18:18 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
On Fri, 11 Jul 2003, Daniel Jacobowitz wrote:
> On Fri, Jul 11, 2003 at 10:14:01AM -0700, Theodore A. Roth wrote:
> > Hi,
> >
> > I just tried to configure and build gdb with:
> >
> > ../configure --prefix=$HOME/local/avr --program-suffix=-6.0 --target=avr --enable-gdb-build-warnings=,-Werror
> > ../configure --prefix=$HOME/local/avr --program-suffix=-6.0 --program-prefix=avr- --target=avr --enable-gdb-build-warnings=,-Werror
> >
> > Both failed to install avr-gdb-6.0 which I expected.
> >
> > The failure (on 'make install') is this:
> >
> > make[1]: Leaving directory
> > `/home/roth/dev/tools/gdb-6.0-cvs/obj-avr/gdb'
> > transformed_name=`t='s,$,-6.0,; s,^,avr-,; '; \
> > echo gdb | sed -e $t` ; \
> > if test "x$transformed_name" = x; then \
> > transformed_name=gdb ; \
> > else \
> > true ; \
> > fi ; \
> > /bin/sh ../../gdb/../mkinstalldirs /home/roth/local/avr/bin ; \
> > /usr/bin/install -c gdb \
> > /home/roth/local/avr/bin/$transformed_name ; \
> > /bin/sh ../../gdb/../mkinstalldirs \
> > /home/roth/local/avr/man/man1 ; \
> > /usr/bin/install -c -m 644 ../../gdb/gdb.1 \
> > /home/roth/local/avr/man/man1/$transformed_name.1
> > sed: can't read s,^,avr-,;: No such file or directory
> >
> >
> > The attached patch seems to fix this.
> >
> > Ok to commit? Should probably go on both head and branch.
>
> Yes, this is fine.
Thanks.
This only fixes the case when both --program-prefix and
--program-suffix are specified.
There still seems to be a problem with the case where --target and
--program-suffix are specified. The result with just --target=avr is
the installed program being named avr-gdb, but when using --target and
--program-suffix, the avr- prefix is lost. This seems to caused by
this code in configure:
1148 test "$host_alias" != "$target_alias" &&
1149 test "$program_prefix$program_suffix$program_transform_name" = \
1150 NONENONEs,x,x, &&
1151 program_prefix=${target_alias}-
So, it may not be fixable (or need to be fixed). I guess the behavior
just surprised me.
Ted Roth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] sed bug in Makefile.in
2003-07-11 18:18 ` Theodore A. Roth
@ 2003-07-11 19:35 ` Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2003-07-11 19:35 UTC (permalink / raw)
To: gdb-patches
On Fri, Jul 11, 2003 at 11:23:57AM -0700, Theodore A. Roth wrote:
>
>
> On Fri, 11 Jul 2003, Daniel Jacobowitz wrote:
>
> > On Fri, Jul 11, 2003 at 10:14:01AM -0700, Theodore A. Roth wrote:
> > > Hi,
> > >
> > > I just tried to configure and build gdb with:
> > >
> > > ../configure --prefix=$HOME/local/avr --program-suffix=-6.0 --target=avr --enable-gdb-build-warnings=,-Werror
> > > ../configure --prefix=$HOME/local/avr --program-suffix=-6.0 --program-prefix=avr- --target=avr --enable-gdb-build-warnings=,-Werror
> > >
> > > Both failed to install avr-gdb-6.0 which I expected.
> > >
> > > The failure (on 'make install') is this:
> > >
> > > make[1]: Leaving directory
> > > `/home/roth/dev/tools/gdb-6.0-cvs/obj-avr/gdb'
> > > transformed_name=`t='s,$,-6.0,; s,^,avr-,; '; \
> > > echo gdb | sed -e $t` ; \
> > > if test "x$transformed_name" = x; then \
> > > transformed_name=gdb ; \
> > > else \
> > > true ; \
> > > fi ; \
> > > /bin/sh ../../gdb/../mkinstalldirs /home/roth/local/avr/bin ; \
> > > /usr/bin/install -c gdb \
> > > /home/roth/local/avr/bin/$transformed_name ; \
> > > /bin/sh ../../gdb/../mkinstalldirs \
> > > /home/roth/local/avr/man/man1 ; \
> > > /usr/bin/install -c -m 644 ../../gdb/gdb.1 \
> > > /home/roth/local/avr/man/man1/$transformed_name.1
> > > sed: can't read s,^,avr-,;: No such file or directory
> > >
> > >
> > > The attached patch seems to fix this.
> > >
> > > Ok to commit? Should probably go on both head and branch.
> >
> > Yes, this is fine.
>
> Thanks.
>
> This only fixes the case when both --program-prefix and
> --program-suffix are specified.
>
> There still seems to be a problem with the case where --target and
> --program-suffix are specified. The result with just --target=avr is
> the installed program being named avr-gdb, but when using --target and
> --program-suffix, the avr- prefix is lost. This seems to caused by
> this code in configure:
>
> 1148 test "$host_alias" != "$target_alias" &&
> 1149 test "$program_prefix$program_suffix$program_transform_name" = \
> 1150 NONENONEs,x,x, &&
> 1151 program_prefix=${target_alias}-
>
> So, it may not be fixable (or need to be fixed). I guess the behavior
> just surprised me.
Shouldn't be fixed, I think - Otherwise it's a nuisance to generate
gdb-avr if you want to do that.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-07-11 19:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-11 17:08 [RFA] sed bug in Makefile.in Theodore A. Roth
2003-07-11 17:38 ` Daniel Jacobowitz
2003-07-11 18:18 ` Theodore A. Roth
2003-07-11 19:35 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox