bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #58734] gmake does not check for the existence of a file before com


From: Paul D. Smith
Subject: [bug #58734] gmake does not check for the existence of a file before complaining it is missing
Date: Wed, 8 Jul 2020 13:03:37 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36

Follow-up Comment #2, bug #58734 (project make):

> either the program is run twice

This can only happen if parallel mode is enabled, and is the correct behavior
assuming you've written your rule like this:


one two: three ; touch one two


This means the same thing as:


one: three ; touch one two
two: three ; touch one two


(this interpretation is required by the POSIX standard).  If parallelism is
enabled make may see that two is out of date before one finishes updating it,
and so it will run the rule twice.

In serial mode this should never happen (I've never seen it happen): if you
see it please give an example.

> or a depending rule that needs the created file incorrectly complains that
the file does not exist.

I've never seen this happen either: please provide an example.  The only
possible reason this could happen would be due to directory caching but I
don't think so.

If you want to declare a rule that builds multiple outputs, and you have GNU
make 4.3 or above, you can use the new "&:" separator to tell make that one
invocation will build both targets:


one two &: three ; touch one two


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58734>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]