« Previous | Next » 

Revision 9b6d2d92

ID9b6d2d928a0fa3b20a67cd408b03acc41c965a85
Parent 1551758e
Child f0ac917e

Added by Petr Pudlak almost 7 years ago

Compile every Haskell object file separately

This allows parallel compilation of all targets, including the Haskell
object files. While re-starting GHC for every Haskell source almost
doubles the total CPU time, allowing it run in parallel at the end cuts
down the wall-clock time to half.

Haskell targets are split into two: main ones and testing ones.
The testing targets (starting with "test/") are build with coverage
automatically. Therefore the testing object and interface files have
different extensions (this also allows their parallel compilation).

GHC is now used to produce a separate Makefile.ghc with all
dependencies. This is then included and used for compiling each object
file separately.

Note that the inclusion + generation of Makefile.ghc is turned off when
calling clean/ganeti/distclean. For some reason, Makefile infinitely
recurses when calling "make ganeti", if it includes Makefile.ghc. But
since using ifneq/endif in Makefile.am conflicts with Automake, it was
necessary to put the snippet into an Automake variable and substitute it
into the resulting Makefile.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences