The documentation for the INCLUDES rule reads:
INCLUDES targets1 : targets2 ;
Builds a sibling dependency: makes each of targets2 depend on
anything upon which each of targets1 depends.
But the example given doesn't seem to agree with the documentation:
DEPENDS foo.o : foo.c ;
INCLUDES foo.c : foo.h ;
"foo.h" depends on "foo.c" and "foo.h" in this example.
According to the documentation, this would:
1. Make foo.o depend on foo.c
2. Make foo.h depend on anything on which foo.c depends
But in the example, there is no reason to think that foo.c depends on
anything. So what causes foo.h to depend on foo.c and foo.h? Is there some
information missing here? Also, isn't the circular self-dependency of foo.h
a problem?
Thanks in advance,
Dave