Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
To: Tom Tromey <tom@tromey.com>
Cc: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH/committed] sim: touch modules target
Date: Sun, 9 May 2021 15:56:27 -0400	[thread overview]
Message-ID: <YJg+a3qAKFB8Tyqv@vapier> (raw)
In-Reply-To: <875yzt9cij.fsf@tromey.com>

On 08 May 2021 14:49, Tom Tromey wrote:
> >>>>> "Mike" == Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Mike> If there are no updates to the file, touch the result so we don't
> Mike> keep trying to regenerate it.
> 
> Normally you don't want to do it this way.  I think it will result in
> recompilations if the inputs change but the output does not.  Since it
> depends on Makefile and all the source files, this may be pretty often.
> 
> Now, if that's ok with you, it's simpler to just replace the
> move-if-change with a $(MV).
> 
> The more common approach is to use a stamp file.  So you write:
> 
> modules.c: modules-c-stamp ; @true
> modules-c-stamp: ... the existing code, but also touch modules-c-stamp
> 
> There are a few examples of this idiom already in the tree.  hw-config.h
> uses this, in the same file.  You'd also want to add the stamp file to
> the clean rule.

thanks, i'll take a look.  i was trying trying to figure out how to use this
thing correctly to avoid the rebuilds.
-mike

  reply	other threads:[~2021-05-09 19:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08 16:35 Mike Frysinger via Gdb-patches
2021-05-08 20:49 ` Tom Tromey
2021-05-09 19:56   ` Mike Frysinger via Gdb-patches [this message]
2021-06-15  0:39   ` [PATCH] sim: switch modules.c & version.c to stamp files Mike Frysinger via Gdb-patches
2021-06-15 20:08     ` 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=YJg+a3qAKFB8Tyqv@vapier \
    --to=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    --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