Cabal-1.22.3.0: A framework for packaging Haskell software

CopyrightSimon Marlow 2008
Maintainercabal-devel@haskell.org
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Distribution.Simple.Build.Macros

Description

Generate cabal_macros.h - CPP macros for package version testing

When using CPP you get

VERSION_<package>
MIN_VERSION_<package>(A,B,C)

for each package in build-depends, which is true if the version of package in use is >= A.B.C, using the normal ordering on version numbers.

Synopsis

Documentation

generate :: PackageDescription -> LocalBuildInfo -> String

The contents of the cabal_macros.h for the given configured package.

generatePackageVersionMacros :: [PackageIdentifier] -> String

Helper function that generates just the VERSION_pkg and MIN_VERSION_pkg macros for a list of package ids (usually used with the specific deps of a configured package).