From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6PETCJgWyWCMcgAAWB0awg (envelope-from ) for ; Tue, 15 Jun 2021 17:07:36 -0400 Received: by simark.ca (Postfix, from userid 112) id 127E41F163; Tue, 15 Jun 2021 17:07:36 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 0D22E1E939 for ; Tue, 15 Jun 2021 17:07:35 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 97F09389364C for ; Tue, 15 Jun 2021 21:07:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 97F09389364C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1623791254; bh=xTYC1cCrkwqkPriqFjZYR6TXwMse7q6ZFDD47v4oWtM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Erws4wQvUNtrMdRiwmG0LnB0aXN4n6Cau3+pvubD6Zhd+XlvJm+d+hh/KBTXo+7eg D2avbB3orz34TTNrkrpShn0ChhNcWVpA91swY7g0uS5gnSM0Ph00zkUSKYHx9uJNXk lnsck6H9ajkYGZlrHj99SGDjhSuOJbps05cNsPk0= Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id EE9883851C29 for ; Tue, 15 Jun 2021 21:07:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EE9883851C29 Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 47C36340E26 for ; Tue, 15 Jun 2021 21:07:14 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH v2] sim: switch modules.c & version.c to stamp files Date: Tue, 15 Jun 2021 17:07:12 -0400 Message-Id: <20210615210712.7347-1-vapier@gentoo.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <87a6nqgabf.fsf@tromey.com> References: <87a6nqgabf.fsf@tromey.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" This fixes remaking of these files and avoids unnecessary rebuilds. Also add both to `make clean` to match other stamp files. --- sim/ChangeLog | 4 ++++ sim/Makefile.in | 8 +++++--- sim/common/ChangeLog | 7 +++++++ sim/common/Make-common.in | 6 ++++-- sim/common/local.mk | 8 ++++++-- 5 files changed, 26 insertions(+), 7 deletions(-) diff --git a/sim/ChangeLog b/sim/ChangeLog index 8df4fde31aac..79e9656f36d1 100644 --- a/sim/ChangeLog +++ b/sim/ChangeLog @@ -1,3 +1,7 @@ +2021-06-15 Mike Frysinger + + * Makefile.in: Regenerate. + 2021-06-14 Mike Frysinger * configure.ac: Call AM_SILENT_RULES. diff --git a/sim/Makefile.in b/sim/Makefile.in index b5a2c2608dbc..3ba80a463812 100644 --- a/sim/Makefile.in +++ b/sim/Makefile.in @@ -730,7 +730,8 @@ AM_MAKEFLAGS = SIM_PRIMARY_TARGET=$(SIM_PRIMARY_TARGET) # NB: libcommon.a isn't used directly by ports. We need a target for common # objects to be a part of, and ports use the individual objects directly. noinst_LIBRARIES = common/libcommon.a $(am__append_2) -CLEANFILES = testsuite/common/bits-gen testsuite/common/bits32m0.c \ +CLEANFILES = common/version.c common/version.c-stamp \ + testsuite/common/bits-gen testsuite/common/bits32m0.c \ testsuite/common/bits32m31.c testsuite/common/bits64m0.c \ testsuite/common/bits64m63.c DISTCLEANFILES = @@ -1584,9 +1585,10 @@ nltvals: $(abs_srcdir)/common/gennltvals.py --cpp "$(CPP)" --output nltvals.def --srcroot $(srcroot) $(SHELL) $(srcroot)/move-if-change nltvals.def $(abs_srcdir)/common/nltvals.def -common/version.c: $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcdir)/common/create-version.sh +common/version.c: common/version.c-stamp ; @true +common/version.c-stamp: $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcdir)/common/create-version.sh $(AM_V_GEN)$(SHELL) $(srcdir)/common/create-version.sh $(srcroot)/gdb $@.tmp - $(AM_V_at)$(SHELL) $(srcroot)/move-if-change $@.tmp $@ + $(AM_V_at)$(SHELL) $(srcroot)/move-if-change $@.tmp $(@:-stamp=) $(AM_V_at)touch $@ # Alias for developers. diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 14914dc04169..7e2170314ae7 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,10 @@ +2021-06-15 Mike Frysinger + + * Make-common.in: Add stamp-modules rule to avoid rebuilds. + (clean): Delete modules.c files. + * local.mk: Add version.c-stamp rule to avoid rebuilds. + (CLEANFILES): Add version.c files. + 2021-06-14 Mike Frysinger * local.mk (%D%/version.c): Use AM_V_GEN & AM_V_at wrappers. diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index 3dab9ca1fd14..12fb233c5ee4 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -465,7 +465,8 @@ test-hw-events: $(srccom)/hw-events.c libsim.a $(srccom)/hw-events.c libsim.a $(EXTRA_LIBS) # See sim_pre_argv_init and sim_module_install in sim-module.c for more details. -modules.c: Makefile $(SIM_OBJS:.o=.c) +modules.c: stamp-modules ; @true +stamp-modules: Makefile $(SIM_OBJS:.o=.c) @echo Generating $@ @LANG=C ; export LANG ; \ LC_ALL=C ; export LC_ALL ; \ @@ -481,7 +482,7 @@ modules.c: Makefile $(SIM_OBJS:.o=.c) echo '};'; \ echo 'const int sim_modules_detected_len = ARRAY_SIZE (sim_modules_detected);'; \ ) >$@.tmp - $(SHELL) $(srcroot)/move-if-change $@.tmp $@ + $(SHELL) $(srcroot)/move-if-change $@.tmp modules.c @rm -f $@.l-tmp $@.tmp touch $@ @@ -543,6 +544,7 @@ mostlyclean clean: $(SIM_EXTRA_CLEAN) rm -f *.[oa] *~ core rm -f run$(EXEEXT) libsim.a rm -f hw-config.h stamp-hw + rm -f modules.c stamp-modules rm -f gentmap targ-map.c targ-vals.h stamp-tvals if [ ! -f Make-common.in ] ; then \ rm -f $(BUILT_SRC_FROM_COMMON) ; \ diff --git a/sim/common/local.mk b/sim/common/local.mk index fc1149789a3c..25c7e5beb1f9 100644 --- a/sim/common/local.mk +++ b/sim/common/local.mk @@ -38,7 +38,11 @@ noinst_LIBRARIES += %D%/libcommon.a %D%/sim-load.c \ %D%/version.c -%D%/version.c: $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcdir)/%D%/create-version.sh +%D%/version.c: %D%/version.c-stamp ; @true +%D%/version.c-stamp: $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcdir)/%D%/create-version.sh $(AM_V_GEN)$(SHELL) $(srcdir)/%D%/create-version.sh $(srcroot)/gdb $@.tmp - $(AM_V_at)$(SHELL) $(srcroot)/move-if-change $@.tmp $@ + $(AM_V_at)$(SHELL) $(srcroot)/move-if-change $@.tmp $(@:-stamp=) $(AM_V_at)touch $@ + +CLEANFILES += \ + %D%/version.c %D%/version.c-stamp -- 2.31.1