public inbox for
 help / color / mirror / Atom feed
From: Steve Tell <>
To: Bo Forslund <>
Cc: guile-gtk list <>
Subject: Re: SMP problems with examples/
Date: Sat, 29 Dec 2001 21:13:00 -0000	[thread overview]
Message-ID: <> (raw)
Message-ID: <20011229211300.TKH8DyIvo9D1vinycSxSygYq2yihGK5jclZEIp2fAIw@z> (raw)
In-Reply-To: <>

On Sun, 30 Dec 2001, Bo Forslund wrote:

> Makefile built by the original containing the lines
> foo-glue.c: foo.defs
>  build-guile-gtk glue $< >tmp && mv tmp $@
> main.c: foo.defs
>  build-guile-gtk main $< >tmp && mv tmp $@

I believe the point of the " >tmp && mv tmp $@" construct is that the
final target $@ is not touched unless build-guile-gtk completes
successfully with a zero exit status.

"A && B" is sh for "run A, and if successful then run B" 

If build-guile-gtk aborts due to signal or error, a subsequent make will
still find foo-glue.c or main.c out of date and rebuild them completely,
not being fooled by a recent modification time on an empty or incomplete

Using a parallel make, both rules can execute at once and stomp on each
other writing to the same "tmp" file simultaneously.

Perhaps best would be to use different temporary file names, say based on
(but not the same as) the final target name:

> foo-glue.c: foo.defs
>  build-guile-gtk glue $< >$ && mv $ $@
> main.c: foo.defs
>  build-guile-gtk main $< >$ && mv $ $@

Steve Tell 

  reply	other threads:[~2001-12-29 21:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-18 13:23 Bo Forslund
2001-11-19 14:42 ` Steve Tell [this message]
2001-11-19 14:44   ` Bo Forslund
2001-12-30  9:29     ` Bo Forslund
2001-12-29 21:13   ` Steve Tell
2001-12-29 19:12 ` Bo Forslund

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).