From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Y51/Fu32x2AdVgAAWB0awg (envelope-from ) for ; Mon, 14 Jun 2021 20:40:13 -0400 Received: by simark.ca (Postfix, from userid 112) id 4D7BA1F163; Mon, 14 Jun 2021 20:40:13 -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 7BD7F1E939 for ; Mon, 14 Jun 2021 20:40:12 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AD353397EC14 for ; Tue, 15 Jun 2021 00:40:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD353397EC14 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1623717611; bh=dybsd4UNoTUyAsX1ZbnwpSUef6WFrpdMSnlcwYWSvhM=; 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=awrcNjtpR3P7/cefNBoAwYjWg83fYvLx5xlTKtwpmqxCFWkxg6n6SLonkPjK2amSp hsUvYMWqY1lUye3Ji3n+d/2ybmCXEm6r1dZcPrKAIJ90hJKFx5xx7TwwV2VFO46moD ZS9zDNN+TDX2RNYqs2CmBI0wEokRDtlNDL9fU6ww= Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 1FDDA385781D for ; Tue, 15 Jun 2021 00:39:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1FDDA385781D Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id E929C340B10 for ; Tue, 15 Jun 2021 00:39:50 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH] sim: switch modules.c & version.c to stamp files Date: Mon, 14 Jun 2021 20:39:49 -0400 Message-Id: <20210615003949.6507-1-vapier@gentoo.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <875yzt9cij.fsf@tromey.com> References: <875yzt9cij.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. --- sim/Makefile.in | 5 +++-- sim/common/Make-common.in | 5 +++-- sim/common/local.mk | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index 3dab9ca1fd14..cd50ad03e7e6 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 $@ diff --git a/sim/common/local.mk b/sim/common/local.mk index fc1149789a3c..01fb02750e89 100644 --- a/sim/common/local.mk +++ b/sim/common/local.mk @@ -38,7 +38,8 @@ 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 $@ -- 2.31.1