From: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
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 [thread overview]
Message-ID: <20210615003949.6507-1-vapier@gentoo.org> (raw)
In-Reply-To: <875yzt9cij.fsf@tromey.com>
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
next prev parent reply other threads:[~2021-06-15 0:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-08 16:35 [PATCH/committed] sim: touch modules target Mike Frysinger via Gdb-patches
2021-05-08 20:49 ` Tom Tromey
2021-05-09 19:56 ` Mike Frysinger via Gdb-patches
2021-06-15 0:39 ` Mike Frysinger via Gdb-patches [this message]
2021-06-15 20:08 ` [PATCH] sim: switch modules.c & version.c to stamp files Tom Tromey
2021-06-15 21:01 ` Mike Frysinger via Gdb-patches
2021-06-15 21:07 ` [PATCH v2] " Mike Frysinger via Gdb-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210615003949.6507-1-vapier@gentoo.org \
--to=gdb-patches@sourceware.org \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox