From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19261 invoked by alias); 2 Jun 2009 16:34:07 -0000 Received: (qmail 19231 invoked by uid 22791); 2 Jun 2009 16:34:05 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,HK_OBFDOM,HK_OBFDOMREQ X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Jun 2009 16:33:59 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 2B33E290019; Tue, 2 Jun 2009 18:33:57 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ARoyLH4QN39t; Tue, 2 Jun 2009 18:33:56 +0200 (CEST) Received: from province.act-europe.fr (province.act-europe.fr [10.10.0.214]) by mel.act-europe.fr (Postfix) with ESMTP id 574DA29000F; Tue, 2 Jun 2009 18:33:56 +0200 (CEST) Received: by province.act-europe.fr (Postfix, from userid 560) id 3BDA316635F; Tue, 2 Jun 2009 18:33:56 +0200 (CEST) Date: Tue, 02 Jun 2009 16:34:00 -0000 From: Jerome Guitton To: gdb-patches@sourceware.org, gcc-patches@gcc.gnu.org, binutils@sourceware.org Subject: [RFA] trailing backslash in top-level Makefile Message-ID: <20090602163356.GB20678@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1LKvkjL3sHcu1TtY" Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) 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/msg00020.txt.bz2 --1LKvkjL3sHcu1TtY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 986 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: [...] all: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target \ .PHONY: all-build [...] 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 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? 2009-06-02 Jerome Guitton * Makefile.tpl: Remove a trailing backslash. * Makefile.in: Regenerate. --1LKvkjL3sHcu1TtY Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="toplevel.diff" Content-length: 1200 Index: Makefile.in =================================================================== RCS file: /cvs/src/src/Makefile.in,v retrieving revision 1.302 diff -u -r1.302 Makefile.in --- Makefile.in 2 Jun 2009 08:23:45 -0000 1.302 +++ Makefile.in 2 Jun 2009 15:18:31 -0000 @@ -859,11 +859,11 @@ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target; \ else \ @endif gcc-bootstrap - $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target \ + $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target ; \ @if gcc-bootstrap - ; \ fi @endif gcc-bootstrap + echo .PHONY: all-build Index: Makefile.tpl =================================================================== RCS file: /cvs/src/src/Makefile.tpl,v retrieving revision 1.206 diff -u -r1.206 Makefile.tpl --- Makefile.tpl 2 Jun 2009 08:23:45 -0000 1.206 +++ Makefile.tpl 2 Jun 2009 15:18:38 -0000 @@ -625,11 +625,11 @@ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target; \ else \ @endif gcc-bootstrap - $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target \ + $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target ; \ @if gcc-bootstrap - ; \ fi @endif gcc-bootstrap + echo .PHONY: all-build [+ FOR build_modules +] --1LKvkjL3sHcu1TtY--