From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3107 invoked by alias); 2 Jun 2009 18:00:47 -0000 Received: (qmail 3055 invoked by uid 22791); 2 Jun 2009 18:00:40 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.gmx.net (HELO mail.gmx.net) (213.165.64.20) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Tue, 02 Jun 2009 18:00:33 +0000 Received: (qmail invoked by alias); 02 Jun 2009 18:00:30 -0000 Received: from xdsl-87-78-65-234.netcologne.de (EHLO localhost.localdomain) [87.78.65.234] by mail.gmx.net (mp025) with SMTP; 02 Jun 2009 20:00:30 +0200 Received: from ralf by localhost.localdomain with local (Exim 4.69) (envelope-from ) id 1MBYHd-0000zl-3b; Tue, 02 Jun 2009 20:00:21 +0200 Date: Tue, 02 Jun 2009 18:00:00 -0000 From: Ralf Wildenhues To: Jerome Guitton Cc: gdb-patches@sourceware.org, gcc-patches@gcc.gnu.org, binutils@sourceware.org Subject: Re: [RFA] trailing backslash in top-level Makefile Message-ID: <20090602180020.GA3739@gmx.de> Mail-Followup-To: Ralf Wildenhues , Jerome Guitton , gdb-patches@sourceware.org, gcc-patches@gcc.gnu.org, binutils@sourceware.org References: <20090602163356.GB20678@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090602163356.GB20678@adacore.com> User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00023.txt.bz2 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 +]