You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$(SRCBINDIR) is bin, so the rule is triggering on the mtime of a directory which has just been touched. The rule also depends on bin/podman, which seems weird, especially on platforms (Windows, Mac) that only have podman-remote.
As best I can tell it dates to #9381 (April 2021), but I think something has changed recently because I run make a lot, even on fresh-compiled directories, and am pretty sure I would've noticed this earlier.
Since Makefiles are fragile, and since I'm flying out for a few days without net access, and since I don't even have access to Windows or Mac systems, I'm not even going to think about touching this. I'm even going to keep quiet with my recommendation. I'll look into it next week if it hasn't been fixed by then.
The text was updated successfully, but these errors were encountered:
podman-remote has a dependency on $(SRCBINDIR), because on
Mac and Windows that's a special dir that may not exist.
But depending on a directory means depending on its mtime,
which changes every time a file in it is updated, which
means running 'make' twice in a row will rebuild podman-remote
for no good reason.
Solution: GNU Make has the concept of "order-only" prerequisites,
precisely for this situation. Use it. Since it's an obscure
feature, document it.
UPDATE: This exposed some nasty duplication wrt podman-remote rules.
Clean those up, and add comments to some confusing sections.
Fixes: containers#14756
(Also, drive-by edit to remove a stray misdocumented non-option)
Signed-off-by: Ed Santiago <[email protected]>
podman-remote has a dependency on $(SRCBINDIR), because on
Mac and Windows that's a special dir that may not exist.
But depending on a directory means depending on its mtime,
which changes every time a file in it is updated, which
means running 'make' twice in a row will rebuild podman-remote
for no good reason.
Solution: GNU Make has the concept of "order-only" prerequisites,
precisely for this situation. Use it. Since it's an obscure
feature, document it.
UPDATE: This exposed some nasty duplication wrt podman-remote rules.
Clean those up, and add comments to some confusing sections.
Fixes: containers#14756
(Also, drive-by edit to remove a stray misdocumented non-option)
Signed-off-by: Ed Santiago <[email protected]>
In short: run
make
, then runmake
again, andpodman-remote
gets rebuilt even though it just got built.Reason:
podman/Makefile
Lines 307 to 308 in d095053
$(SRCBINDIR)
isbin
, so the rule is triggering on the mtime of a directory which has just been touched. The rule also depends onbin/podman
, which seems weird, especially on platforms (Windows, Mac) that only havepodman-remote
.As best I can tell it dates to #9381 (April 2021), but I think something has changed recently because I run
make
a lot, even on fresh-compiled directories, and am pretty sure I would've noticed this earlier.Since Makefiles are fragile, and since I'm flying out for a few days without net access, and since I don't even have access to Windows or Mac systems, I'm not even going to think about touching this. I'm even going to keep quiet with my recommendation. I'll look into it next week if it hasn't been fixed by then.
The text was updated successfully, but these errors were encountered: