From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: Jerome Guitton <guitton@adacore.com>
Cc: gdb-patches@sourceware.org, gcc-patches@gcc.gnu.org,
binutils@sourceware.org
Subject: Re: [RFA] trailing backslash in top-level Makefile
Date: Tue, 02 Jun 2009 18:00:00 -0000 [thread overview]
Message-ID: <20090602180020.GA3739@gmx.de> (raw)
In-Reply-To: <20090602163356.GB20678@adacore.com>
Hello Jerome,
* Jerome Guitton wrote on Tue, Jun 02, 2009 at 06:33:56PM CEST:
>
> The top-level Makefile.in may generate a trailing backslash at the end
> of the target "all" (if gcc-bootstrap is false). Something like that:
> @: $(MAKE); $(unstage)
> @r=`${PWD_COMMAND}`; export r; \
> s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
> $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target \
> On most system, that's fine. However, this is rejected by some shells.
> For example, the system bash on some solaris systems:
>
> ostende% bash --version
> GNU bash, version 2.03.0(1)-release (sparc-sun-solaris)
> Copyright 1998 Free Software Foundation, Inc.
> > bash -c "ls \\"
>
> bash: -c: line 2: syntax error: unexpected end of file
Thank you! I couldn't find this bit of information when last looking
for it; will update the Autoconf manual section about make/shell
portability issues with this.
> The patch in attachment would fix the problem. It's a little bit ugly
> though. "echo" is used as a "nop". Would someone have a better idea to fix
> the problem?
The fix is wrong as it disables transporting a nonzero exit status from
the $(MAKE) command back to the toplevel make.
I suggest this still-untested patch (gimme a couple of hours).
Thanks,
Ralf
* Makefile.tpl: Avoid a trailing backslash.
* Makefile.in: Regenerate.
diff --git a/Makefile.tpl b/Makefile.tpl
index f49f3fc..db10e71 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -628,8 +628,9 @@ all:
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target \
@if gcc-bootstrap
; \
- fi
+ fi \
@endif gcc-bootstrap
+ && :
.PHONY: all-build
[+ FOR build_modules +]
next prev parent reply other threads:[~2009-06-02 18:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-02 16:34 Jerome Guitton
2009-06-02 18:00 ` Ralf Wildenhues [this message]
2009-06-02 22:04 ` Ralf Wildenhues
2009-06-02 22:08 ` DJ Delorie
2009-06-03 6:16 ` Ralf Wildenhues
2009-06-02 23:16 ` Alexandre Oliva
2009-06-03 8:44 ` Jerome Guitton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090602180020.GA3739@gmx.de \
--to=ralf.wildenhues@gmx.de \
--cc=binutils@sourceware.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=guitton@adacore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox