public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/Makefile: rewrite dependencies for config.status target Date: Mon, 8 Apr 2024 09:27:04 +0000 (GMT) [thread overview] Message-ID: <20240408092704.5AE543858C32@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=766f411f084bd6c9a224300bf946a1bfd583ab5f commit 766f411f084bd6c9a224300bf946a1bfd583ab5f Author: Andrew Burgess <aburgess@redhat.com> Date: Fri Apr 5 10:50:27 2024 +0100 gdb/Makefile: rewrite dependencies for config.status target I noticed something weird, the rule for the config.status target looks like this: config.status: $(srcdir)/configure configure.nat configure.tgt configure.host ../bfd/development.sh $(SHELL) config.status --recheck What bothered me is that 'configure' is specified as being in $(srcdir), while all of the other files are not, even though those files are in the same $(srcdir) as the configure script. However, I tried touching one of those files, and the config.status rule does trigger! This is thanks to the VPATH variable, which is set to $(srcdir), so make looks in $(srcdir) for any dependencies. However, this inconsistency bothers me. Better, I think, to add the $(srcdir) prefix to each of these files. I also spotted that the configure script also includes the files ../bfd/config.bfd, yet that is missing from the include list, so in this commit I plan to add this as a dependency. The configure script also pulls in two TCL and TK related files: . ${TCL_BIN_DIR}/tclConfig.sh . ${TK_BIN_DIR}/tkConfig.sh However, I don't think ${TCL_BIN_DIR} and ${TK_BIN_DIR} are currently visible in GDB's Makefile, so I'm not planning to add these dependencies at this time. In this commit I add a new variable config_status_deps which holds the list of all the dependencies for config.status, with the $(srcdir) prefix included, and then I use this in the config.status rule. After this commit config.status will regenerate if config.bfd changes, which it wouldn't before, but nothing else changes. Approved-By: Simon Marchi <simon.marchi@efficios.com> Diff: --- gdb/Makefile.in | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index df044288b5e..9340becbdc9 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -2333,7 +2333,18 @@ nm.h: stamp-nmh ; @true stamp-nmh: config.status $(SHELL) config.status nm.h -config.status: $(srcdir)/configure configure.nat configure.tgt configure.host ../bfd/development.sh +# Files included from config.status or the configure script. When +# these change the configure script doesn't need regenerating, but its +# output (and so that of config.status) might change. +config_status_deps = \ + $(srcdir)/configure \ + $(srcdir)/configure.nat \ + $(srcdir)/configure.tgt \ + $(srcdir)/configure.host \ + $(srcdir)/../bfd/development.sh \ + $(srcdir)/../bfd/config.bfd + +config.status: $(config_status_deps) $(SHELL) config.status --recheck ACLOCAL = aclocal
reply other threads:[~2024-04-08 9:27 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240408092704.5AE543858C32@sourceware.org \ --to=aburgess@sourceware.org \ --cc=gdb-cvs@sourceware.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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).