bug-make
[Top][All Lists]
Advanced

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

[bug #46596] Timestamp check behaviour difference in clean build and reb


From: Paul D. Smith
Subject: [bug #46596] Timestamp check behaviour difference in clean build and rebuild on rules without recipes
Date: Mon, 11 Apr 2016 14:36:27 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

Update of bug #46596 (project make):

                  Status:                    None => Duplicate              
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #4:

You can simplify your example down to this:


all: a

a: b ; cp $< $@

b: c

c: ; touch b


In this makefile you're lying to make by telling it that running the final
recipe will create a target "c", but in reality it doesn't do that; it creates
a target "b".

Make knows of no way to create target "b" itself (because the rule for "b" has
no recipe).

I think this may be an example of bug #41273; when the "b" file already exists
on disk then the last modified time will be cached internally to make. 
Because there is no recipe to update the "b" target, make will never
invalidate the cached modified time for "b".  So, if the timestamp of "b" when
make starts up is older than "a", then "a" will not be rebuilt.  If the
timestamp of "b" when make starts up is newer than "a", then "a" will be
rebuilt.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46596>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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