-
Petr Pudlak authored
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 <pudlak@google.com> Reviewed-by: Klaus Aehlig <aehlig@google.com>
9b6d2d92