From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14063 invoked by alias); 12 Jan 2014 21:56:15 -0000 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 Received: (qmail 14053 invoked by uid 89); 12 Jan 2014 21:56:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-qa0-f47.google.com Received: from mail-qa0-f47.google.com (HELO mail-qa0-f47.google.com) (209.85.216.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 12 Jan 2014 21:56:13 +0000 Received: by mail-qa0-f47.google.com with SMTP id j5so1586788qaq.6 for ; Sun, 12 Jan 2014 13:56:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=fPYEx7LKrKUQoiYFi8xZ+DcB0lpsIH1zqrIFCnbi9fs=; b=GxLgrn5I0DQZo/blSKmI+RE1esFVjcjPDQybCEP6N/sI4+jcijaqiHRNK5oEZk6Bmo 61aO3qCz5yipxFqzxuAxTPIPl8fIzS5joVMw9F31IXR29mRT5VT2o6dUN91rGR6hpcfk TRDngnMMSejI1QVcdCiyKgamFRFJxBfrC7kGfFnzCHGm2ULs7knnCaPD78XHYOHZFE34 HjUuUGOx3n8nen7Y/mUFAy63qOw4cVyeMSy69IDzf8HN0/cBj9KQM5VUav35VxvYK6E3 l5+d2l8ZYrr2FDATKgK2rMYs9SHnEesg6Ow294WkZJFBhCE9OtBRju1HmDLdySoypcO0 CVLQ== X-Gm-Message-State: ALoCoQnLveGXVjRueQcjcfn/D8XAqNPNAmW5fZGuUXeIiSXj2GvvYk4nHimKzTHUZF1s+gywlkiz X-Received: by 10.49.24.19 with SMTP id q19mr33014007qef.17.1389563771247; Sun, 12 Jan 2014 13:56:11 -0800 (PST) Received: from localhost.localdomain (ool-4353a9c4.dyn.optonline.net. [67.83.169.196]) by mx.google.com with ESMTPSA id i7sm25006965qeo.7.2014.01.12.13.56.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 12 Jan 2014 13:56:10 -0800 (PST) From: Patrick Palka To: gdb-patches@sourceware.org Cc: Patrick Palka Subject: [PATCH] gdb: replace suffix rules with pattern rules Date: Sun, 12 Jan 2014 21:56:00 -0000 Message-Id: <1389563743-29311-1-git-send-email-patrick@parcs.ath.cx> X-SW-Source: 2014-01/txt/msg00311.txt.bz2 Suffix rules (e.g. .c.o:) are error-prone and may not interact well with GNU make's -r/--no-builtin-rules flag. Replace them with otherwise-equivalent pattern rules (e.g. %.o: %.c). Since we no longer rely on suffix rules, we can also remove references to the magic .SUFFIXES target. As a result of this change, one can now successfully build gdb/ with make's -r flag which improves build time by a bit. --- gdb/ChangeLog | 5 +++++ gdb/Makefile.in | 12 +++++------- gdb/gdbserver/Makefile.in | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d5006ea..e2ab527 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-01-12 Patrick Palka + + * Makefile.in: Remove references to .SUFFIXES target. Replace + suffix rules with corresponding pattern rules. + 2014-01-10 Patrick Palka * regformats/regdat.sh: Always rewrite the register file. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 824b26b..3627e0e 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -992,7 +992,7 @@ DISTSTUFF = $(YYFILES) generated_files = config.h observer.h observer.inc ada-lex.c jit-reader.h \ $(GNULIB_H) $(NAT_GENERATED_FILES) gcore -.c.o: +%.o: %.c $(COMPILE) $< $(POSTCOMPILE) @@ -1621,7 +1621,6 @@ ada-exp.o: ada-exp.c # Rules for generating translated message descriptions. Disabled by # autoconf if the tools are not available. -.SUFFIXES: .po .gmo .pox .pot .PHONY: all-po install-po uninstall-po clean-po update-po $(PACKAGE).pot all-po: $(CATALOGS) @@ -1632,14 +1631,14 @@ update-po: $(CATALOGS:.gmo=.pox) # N.B. We do not attempt to copy these into $(srcdir). The snapshot # script does that. -.po.gmo: +%.gmo: %.po -test -d po || mkdir po $(GMSGFMT) --statistics -o $@ $< # The new .po has to be gone over by hand, so we deposit it into # build/po with a different extension. If build/po/$(PACKAGE).pot # exists, use it (it was just created), else use the one in srcdir. -.po.pox: +%.pox: %.po -test -d po || mkdir po $(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \ then echo po/$(PACKAGE).pot; \ @@ -1700,8 +1699,7 @@ po/$(PACKAGE).pot: force # Strictly speaking c-exp.c should therefore depend on # Makefile.in, but that was a pretty big annoyance. -.SUFFIXES: .y .l -.y.c: +%.c: %.y rm -f $@ $@.tmp $(SHELL) $(YLWRAP) $< y.tab.c $@ -- $(YACC) $(YFLAGS) && mv $@ $@.tmp \ || (rm -f $@; false) @@ -1717,7 +1715,7 @@ po/$(PACKAGE).pot: force -e "s/^\(#line.*\)`basename $<`/\1`echo $<|sed 's/\//\\\\\//g'`/" \ < $@.tmp > $@ rm -f $@.tmp -.l.c: +%.c: %.l if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \ $(FLEX) -o$@ $< && \ rm -f $@.new && \ diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index b58184d..0f62ca4 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -234,7 +234,7 @@ FLAGS_TO_PASS = \ # All generated files which can be included by another file. generated_files = config.h $(GNULIB_H) -.c.o: +%.o: %.c $(COMPILE) $< $(POSTCOMPILE) -- 1.8.5.2