|
![](/i/fill.gif) |
On 28/01/2011 05:28 PM, Darren New wrote:
> But here's a question: Does it only regenerate the pages of
> documentation for the files where the source of the documentation has
> changed?
There are two kinds of documentation to consider.
GHC comes with a User Guide and a handful of other miscellaneous files,
which are written in DocBook. GHC also comes with a small handful of
Haskell libraries, which each have API reference documentation embedded
in the source code. This is extracted and turned into HTML by a tool
called Haddock.
Due to the amount of cross-referencing possible, editing any single
source file can potentially affect an arbitrary number of documentation
files. Short of a tool to actually analyse a source tree and figure out
all the dependencies, it's difficult to handle this properly. You would
need a tool to read the entire source and compute the dependencies.
GHC doesn't bother. If any source file changes, the whole documentation
is rebuilt. Notice, however, that if the source for document X changes,
only document X is rebuilt. So some level of dependency analysis *is*
being done. (And especially since the documentation is of more than one
form, so you have to know how to rebuild it correctly.)
> Does it only re-run test cases for code that has been
> recompiled since it last ran test cases?
AFAIK, all of the test cases work by running the final, finished
compiler. I don't think there are any "unit tests" that test just one
program module or something. Thus, if any compiler source code changes,
the entire compiler is recompiled, and the entire test suite rerun. Same
for the benchmarks. (Benchmarks of course depend on almost every part of
the compiler, so it would be infeasible to do it any other way.)
> Or is it more like "this would
> be a shell script, but we already have a makefile so we might as well
> put it in there"?
Well, to some extent, yes. Although Make is selecting the correct shell
script to run in each case...
Post a reply to this message
|
![](/i/fill.gif) |