While working with a beforedepends target we notices that in some cases the files generated by the beforedpends were not showing up in time for the depends phase to find the generated files. By adding a sleep to the beforedepends rule is was easy to see that the actually depends phase was not waiting for the beforedepends to finish. This look to be a simple omission of an .ORDER: iff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index cbbb4d6..db5ddd7 100644 --- a/share/mk/bsd.dep.mk +++ b/share/mk/bsd.dep.mk @@ -122,6 +122,7 @@ ${_YC:R}.o: ${_YC} .if !target(depend) .if defined(SRCS) depend: beforedepend ${DEPENDFILE} afterdepend +.ORDER: beforedepend ${DEPENDFILE} afterdepend # Different types of sources are compiled with slightly different flags. # Split up the sources, and filter out headers and non-applicable flags.
Bryan: might want to look at this.
(In reply to NGie Cooper from comment #1) > Bryan: might want to look at this. I don't think it's right. I recently was testing the ordering of these and didn't see problems. There's already an .ORDER for these targets in here.
The original problem was not related to the use of .ORDER. Closing as invalid