Skip to content

Commit cdcb745

Browse files
committed
Use DIR/.dirstamp idiom for dependency on DIR
The object file targets need to depend on the objects target to ensure the objects directory gets created before creating an object file in it. However, adding the objects target as a dependency has the undesirable side effect of causing Make to think that the object files are out of date whenever it tries to build them, so they are built every time. To overcome this, the creation of the objects directory was moved into each object file target. Then, it was suggested by GitHub user xaizek in a GitHub code review comment that a better approach would be to use the DIR/.dirstamp idiom for a dependency on directory DIR. This implements that suggestion, thereby removing the need to create the objects directory in each object file target.
1 parent 006af98 commit cdcb745

File tree

1 file changed

+104
-200
lines changed

1 file changed

+104
-200
lines changed

0 commit comments

Comments
 (0)