Bug 197764 - bsd.dep.mk appears to missing a .ORDER: directive
Summary: bsd.dep.mk appears to missing a .ORDER: directive
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-17 17:43 UTC by cattelan
Modified: 2015-11-10 19:15 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cattelan 2015-02-17 17:43:27 UTC
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.
Comment 1 Enji Cooper freebsd_committer freebsd_triage 2015-11-10 13:02:59 UTC
Bryan: might want to look at this.
Comment 2 Bryan Drewery freebsd_committer freebsd_triage 2015-11-10 14:46:14 UTC
(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.
Comment 3 cattelan 2015-11-10 19:15:11 UTC
The original problem was not related to the use of .ORDER.

Closing as invalid