From patchwork Mon Jul 2 20:18:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 28194 Received: (qmail 6465 invoked by alias); 2 Jul 2018 20:18:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 6322 invoked by uid 89); 2 Jul 2018 20:18:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gateway36.websitewelcome.com Received: from gateway36.websitewelcome.com (HELO gateway36.websitewelcome.com) (192.185.200.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 02 Jul 2018 20:18:30 +0000 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway36.websitewelcome.com (Postfix) with ESMTP id C1FB4400C5EA0 for ; Mon, 2 Jul 2018 14:19:09 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id a5HJfuObJaSeya5HJfZ9yF; Mon, 02 Jul 2018 15:18:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+YhJfB6HjXIRoBf7L2tnZkme0qxFXqMTsFWM14qmUOQ=; b=N00Hxke0kBep/vnfgAuWOs8el5 zA2Hew62PEsRy+6Q7DF7wKzFDIYURLW7D9a3k9q1QMIUCxllGTSNkgA0L+4xc8Ag7pKcKP0Jnu8Qv Alg5yAwhwfkpypJw5ig3om3TX; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:46962 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fa5HI-0049YK-RK; Mon, 02 Jul 2018 15:18:28 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 08/10] Minimize yacc and lex output Date: Mon, 2 Jul 2018 14:18:22 -0600 Message-Id: <20180702201824.15005-9-tom@tromey.com> In-Reply-To: <20180702201824.15005-1-tom@tromey.com> References: <20180702201824.15005-1-tom@tromey.com> This minimizes the "make" output from the yacc and lex rules, following the same technique as the rest of the Makefile. The lex rule had a special case to deal with the situation where flex is not available. I don't think this is needed, so I removed it. If flex is truly unavailable, the person building gdb can simply "touch" the output file. gdb/ChangeLog 2018-07-02 Tom Tromey * Makefile.in (%.c: %.y): Use ECHO_YACC. (%.c: %.l): Use ECHO_LEX. Just fail if flex not available. * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables. --- gdb/ChangeLog | 6 ++++++ gdb/Makefile.in | 17 +++++------------ gdb/silent-rules.mk | 2 ++ 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 047d06b6121..36d2c44a2a1 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -2477,9 +2477,9 @@ po/$(PACKAGE).pot: force # Makefile.in, but that was a pretty big annoyance. %.c: %.y - $(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- $(YACC) $(YFLAGS) \ - || (rm -f $@.tmp; false) - sed -e '/extern.*malloc/d' \ + $(ECHO_YACC) $(SHELL) $(YLWRAP) $< y.tab.c $@.tmp -- \ + $(YACC) $(YFLAGS) || (rm -f $@.tmp; false) + @sed -e '/extern.*malloc/d' \ -e '/extern.*realloc/d' \ -e '/extern.*free/d' \ -e '/include.*malloc.h/d' \ @@ -2493,8 +2493,7 @@ po/$(PACKAGE).pot: force rm -f $@.tmp && \ mv $@.new $@ %.c: %.l - if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \ - $(FLEX) -t $< \ + $(ECHO_LEX) $(FLEX) -t $< \ | sed -e '/extern.*malloc/d' \ -e '/extern.*realloc/d' \ -e '/extern.*free/d' \ @@ -2505,13 +2504,7 @@ po/$(PACKAGE).pot: force -e 's/\([ \t;,(]\)free$$/\1xfree/g' \ -e 's/yy_flex_xrealloc/yyxrealloc/g' \ > $@.new && \ - mv $@.new $@; \ - elif [ -f $@ ]; then \ - echo "Warning: $*.c older than $*.l and flex not available."; \ - else \ - echo "$@ missing and flex not available."; \ - false; \ - fi + mv $@.new $@ .PRECIOUS: ada-lex.c diff --git a/gdb/silent-rules.mk b/gdb/silent-rules.mk index ade77ad1c51..7ed73a767c6 100644 --- a/gdb/silent-rules.mk +++ b/gdb/silent-rules.mk @@ -11,5 +11,7 @@ ECHO_GEN_XML_BUILTIN_GENERATED = \ @echo " GEN xml-builtin-generated.c"; ECHO_INIT_C = echo " GEN init.c" || ECHO_SIGN = @echo " SIGN gdb"; +ECHO_YACC = @echo " YACC $@"; +ECHO_LEX = @echo " LEX $@"; SILENCE = @ endif