tools: more intelligent caching for compile _info.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 10 Sep 2012 05:03:01 +0000 (14:33 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 10 Sep 2012 05:03:01 +0000 (14:33 +0930)
commite2a53df3e1f5912c872f1906912053354d0d0c63
treeb3216c4533a4f993994915c062e0aed6af7dfffb
parent4c5f970e9e233c766699b1958a350ac3d3cb3f33
tools: more intelligent caching for compile _info.

We let the get_deps() caller hand us the compiled _info filename, but what
about recursive dependencies?  These we re-generate every time.

So fix this: hand a generator callback to get_deps(), expose the one
which simply compiles it, and add a ccanlint one which looks up the
manifest to see if we have one already.

Before:
$ ccanlint -vvvv ccan/failtest | grep -c 'Creating.*_info'
31

After:
$ ccanlint -vvvv ccan/failtest | grep -c 'Creating.*_info'
17
tools/ccan_depends.c
tools/ccanlint/ccanlint.h
tools/ccanlint/file_analysis.c
tools/ccanlint/tests/depends_exist.c
tools/ccanlint/tests/examples_compile.c
tools/depends.c
tools/namespacize.c
tools/tools.h