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
I did a recent build (1, 2), and noticed that several files were being removed; IDK why. I made some of the goals .PRECIOUS, which solved the problem for those. But the goal for one of these files, imports/ro_terms_combined.txt, is defined in the ODK Makefile: $(IMPORTDIR)/%_terms_combined.txt.
Should we make this goal .PRECIOUS to stop this from happening?
Additional information
The text was updated successfully, but these errors were encountered:
The reason they are removed is that they are intermediate files according to make, and not targets. This is very much expected. The solution of using .PRECIOUS is generally correct, but I am not so sure if this should be solved.
b.txt:
touch $@
a.txt: b.txt
Now if you run
make a.txt
I thinkb.txt will be removed in the end of the process.
Now the question is:
Why is that and should this indeed be considered "misbehaviour"? Because if I am not totally wrong, a.txt will besically be re-created every time?
I guess I might be wrong and this only happens when wild%cards are in play... Not sure.
I think b.txt will be removed in the end of the process.
No, b.txt is not an intermediate file, it’s an explicit target. “Intermediate files”, in GNU Make’s parlance, are only a thing when implicit rules are concerned (whether they are built-in implicit rules or custom pattern rules).
Overview
I did a recent build (1, 2), and noticed that several files were being removed; IDK why. I made some of the goals
.PRECIOUS
, which solved the problem for those. But the goal for one of these files,imports/ro_terms_combined.txt
, is defined in the ODKMakefile
:$(IMPORTDIR)/%_terms_combined.txt
.Should we make this goal
.PRECIOUS
to stop this from happening?Additional information
The text was updated successfully, but these errors were encountered: