# Creates a dependency from the tests to the object files which it needs.
inter-depends:$(ALL_DEPENDS) Makefile
@for f in$(ALL_DEPENDS);do echo check-$$(basename$$(dirname$$f)): $$(for dir in$$(cat$$f)$$(dirname$$f);do["$$(echo $$dir/*.c)"="$$dir/*.c"]||echo ccan/"$$(basename$$dir)".o;done);done>$@
for f in$(ALL_DEPENDS);do echo check-$$(basename$$(dirname$$f)): $$(for dir in$$(cat$$f)$$(dirname$$f);do["$$(echo $$dir/*.c)"="$$dir/*.c"]||echo ccan/"$$(basename$$dir)".o;done);done>$@
# Creates dependencies between tests, so if foo depends on bar, bar is tested
# first
test-depends:$(ALL_DEPENDS) Makefile
@for f in$(ALL_DEPENDS);do echo check-`basename\`dirname$$f\``: `sed-n's,ccan/\(.*\),check-\1,p' < $$f`;done>$@
for f in$(ALL_DEPENDS);do echo check-`basename\`dirname$$f\``: `sed-n's,ccan/\(.*\),check-\1,p' < $$f`;done>$@