• Niklas Hambuechen's avatar
    Add cabal file generation to Makefile.am · 3736b078
    Niklas Hambuechen authored
    This allows us to specify the exact version ranges of dependencies we
    support, across all operating systems.
    See issue #988.
    This commit only adds the cabal file and declares the dependencies.
    Enforcing them will be subject of a later commit.
    So far, we have only given the names of dependency in most cases,
    making sure that Ganeti builds with the dependency versions that are in
    This has caused problems for users that were not running Debian, or
    when there were packages installed in the compiling user's ~/.ghc
    directory, leading to compile-time type errors instead of pre-build
    configuration errors; for an example, see:
    By explicitly listing our dependencies, we make clear which versions
    are supported.
    Modules and executables listed in the cabal file are automatically
    generated from the Makefile; executables are symlinked in an apps/
    directory to avoid repeated compilation as explained in:
    For example, in apps/ there is:
      hluxid.hs -> ../src/hluxid.hs
    Each executable symlink has a stamp file to track its modification time
    because make follow symlinks and thus does not see symlink modification
    In addition to declaring our dependencies, this setup allows building
    Ganeti's Haskell code with cabal to support editor integration and
    cabal-based tooling, the Makefile remains the default way to build Ganeti.
    Signed-off-by: default avatarNiklas Hambuechen <niklash@google.com>
    Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>