From patchwork Fri Apr 4 08:14:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 336873 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 57F1C1400A1 for ; Fri, 4 Apr 2014 19:14:51 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=SWOcP1nPXb3qx11k si5DjACsquNUdkzyNyxuKqtdBwQE9uA9BGhLO3ku8lya8aqc7MhK5ZOBTYng5y7v aaieIN3vhtUJR9hAiSpeiEQSmxBbuQ6BlGGrzMdxDeU1xMXWm8QgUgk17hk8PksU 3KRnFBpSmpylFqxFVy5iWNSli1o= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=zwxH03RmyeBnJpNed1mEep sMDFo=; b=FTOW+BkUt6lrzFToCIUH787u3Djx+c1+5PKPGCGBhg9HCNnf4r+Eoo uQv857LpBmf+JNMIPdPLd12q6FvX0A4vScykbrqnLo6cHNrz9x9IeJRjPUb55uoQ Qz7o5W/OaQDOJJKXsZ7b2W9pOE42nltjK7SEWsUHiLhgkSBbBg2gc= Received: (qmail 27986 invoked by alias); 4 Apr 2014 08:14:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 27977 invoked by uid 89); 4 Apr 2014 08:14:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 04 Apr 2014 08:14:43 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WVzGn-0003uh-Mj from Thomas_Schwinge@mentor.com ; Fri, 04 Apr 2014 01:14:37 -0700 Received: from SVR-IES-FEM-02.mgc.mentorg.com ([137.202.0.106]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 4 Apr 2014 01:14:37 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.2.247.3; Fri, 4 Apr 2014 09:14:35 +0100 From: Thomas Schwinge To: Richard Biener CC: , "Joseph S. Myers" , Subject: Re: [PATCH] Guard special installs in install-driver In-Reply-To: References: User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.4.1 (i486-pc-linux-gnu) Date: Fri, 4 Apr 2014 10:14:24 +0200 Message-ID: <87vbuph5pb.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Mon, 31 Mar 2014 13:50:25 +0200 (CEST), Richard Biener wrote: > PR bootstrap/60719 > * Makefile.in (install-driver): Guard extra installs with special > names properly. > > Index: gcc/Makefile.in > =================================================================== > *** gcc/Makefile.in (revision 208955) > --- gcc/Makefile.in (working copy) > *************** install-common: native lang.install-comm > *** 3205,3214 **** > install-driver: installdirs xgcc$(exeext) > -rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) > -$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) > ! -rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext) > ! -( cd $(DESTDIR)$(bindir) && \ > ! $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) ) > ! -if [ ! -f gcc-cross$(exeext) ] ; then \ > rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \ > ( cd $(DESTDIR)$(bindir) && \ > $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-tmp$(exeext) && \ > --- 3205,3217 ---- > install-driver: installdirs xgcc$(exeext) > -rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) > -$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) > ! -if [ "$(GCC_INSTALL_NAME)" != "$(target_noncanonical)-gcc-$(version)" ]; then \ > ! -rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext) \ > ! -( cd $(DESTDIR)$(bindir) && \ > ! $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) ) \ > ! fi > ! -if [ ! -f gcc-cross$(exeext) ] \ > ! && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \ --- build/log_install +++ build/log_install @@ -332,10 +332,16 @@ mkdir -p -- /home/thomas/tmp/source/gcc/trunk-work/build.install/share/locale/zh /usr/bin/install -c -m 644 po/zh_TW.gmo /home/thomas/tmp/source/gcc/trunk-work/build.install/share/locale/zh_TW/LC_MESSAGES/gcc.mo rm -f /home/thomas/tmp/source/gcc/trunk-work/build.install/bin/gcc /usr/bin/install -c xgcc /home/thomas/tmp/source/gcc/trunk-work/build.install/bin/gcc -rm -f /home/thomas/tmp/source/gcc/trunk-work/build.install/bin/x86_64-unknown-linux-gnu-gcc-4.9.0 -( cd /home/thomas/tmp/source/gcc/trunk-work/build.install/bin && \ - ln gcc x86_64-unknown-linux-gnu-gcc-4.9.0 ) -if [ ! -f gcc-cross ] ; then \ +if [ "gcc" != "x86_64-unknown-linux-gnu-gcc-4.9.0" ]; then \ + -rm -f /home/thomas/tmp/source/gcc/trunk-work/build.install/bin/x86_64-unknown-linux-gnu-gcc-4.9.0 \ + -( cd /home/thomas/tmp/source/gcc/trunk-work/build.install/bin && \ + ln gcc x86_64-unknown-linux-gnu-gcc-4.9.0 ) \ + fi +/bin/bash: -c: line 2: syntax error near unexpected token `(' +/bin/bash: -c: line 2: ` -( cd /home/thomas/tmp/source/gcc/trunk-work/build.install/bin && \' +make[2]: [install-driver] Error 1 (ignored) +if [ ! -f gcc-cross ] \ + && [ "gcc" != "x86_64-unknown-linux-gnu-gcc" ]; then \ rm -f /home/thomas/tmp/source/gcc/trunk-work/build.install/bin/x86_64-unknown-linux-gnu-gcc-tmp; \ ( cd /home/thomas/tmp/source/gcc/trunk-work/build.install/bin && \ ln gcc x86_64-unknown-linux-gnu-gcc-tmp && \ The minus sign as the first character after the tab is special make syntax. The commands are now running in one subshell spawned by make, so need to be separated by semicolons. Fixed in r209072 as obvious: commit 23913915572ebc3bee410dc2b1115199865f179e Author: tschwinge Date: Fri Apr 4 08:09:23 2014 +0000 Fix shell scripting. PR bootstrap/60719 * Makefile.in (install-driver): Fix shell scripting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209072 138bc75d-0d04-0410-961f-82ee72b054a4 Grüße, Thomas diff --git gcc/ChangeLog gcc/ChangeLog index 2a2e948..5a25f78 100644 --- gcc/ChangeLog +++ gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-04-04 Thomas Schwinge + + PR bootstrap/60719 + * Makefile.in (install-driver): Fix shell scripting. + 2014-04-03 Cong Hou PR tree-optimization/60505 diff --git gcc/Makefile.in gcc/Makefile.in index 8cdee22..660616e 100644 --- gcc/Makefile.in +++ gcc/Makefile.in @@ -3206,9 +3206,9 @@ install-driver: installdirs xgcc$(exeext) -rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) -$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) -if [ "$(GCC_INSTALL_NAME)" != "$(target_noncanonical)-gcc-$(version)" ]; then \ - -rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext) \ - -( cd $(DESTDIR)$(bindir) && \ - $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) ) \ + rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext); \ + ( cd $(DESTDIR)$(bindir) && \ + $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) ); \ fi -if [ ! -f gcc-cross$(exeext) ] \ && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \