This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFC: Use program_transform_name correctly
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 <jimb@redhat.com>
>
> * 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 <jimb@redhat.com>
>
> * Makefile.in (install-only, uninstall): Use
> program_transform_name properly.
>
> gdb/testsuite/Makefile.in:
> 2003-10-08 Jim Blandy <jimb@redhat.com>
>
> * 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`
>
>