diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2017-12-08 16:46:25 +0200 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2018-01-18 14:10:26 +0100 |
commit | a4d9019b480ad59c3a496f83bc307bc299d6d9eb (patch) | |
tree | 7438c046fd0b2abca6d8ad242526c2c34f134414 /src/CabalHelper | |
parent | dbad8e29e272ad310c29eaa487aa8627c38c1521 (diff) |
Add CPP for earlier cabal versions
Diffstat (limited to 'src/CabalHelper')
-rw-r--r-- | src/CabalHelper/Runtime/Main.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/CabalHelper/Runtime/Main.hs b/src/CabalHelper/Runtime/Main.hs index e6d7a22..6e013a1 100644 --- a/src/CabalHelper/Runtime/Main.hs +++ b/src/CabalHelper/Runtime/Main.hs @@ -377,10 +377,15 @@ main = do return $ Just $ ChResponsePkgDbs $ map pkgDb $ withPackageDB lbi "entrypoints":[] -> do +#if CH_MIN_VERSION_Cabal(2,0,0) includeDirMap <- recursiveDepInfo lbi v distdir eps <- componentsMap lbi v distdir $ \c clbi _bi -> do let (_,_,seps) = recursiveIncludeDirs includeDirMap (componentUnitId clbi) return seps +#else + eps <- componentsMap lbi v distdir $ \c _clbi _bi -> + return $ componentEntrypoints c +#endif -- MUST append Setup component at the end otherwise CabalHelper gets -- confused let eps' = eps ++ [(ChSetupHsName, ChSetupEntrypoint)] @@ -459,7 +464,9 @@ componentsMap lbi _v _distdir f = do componentOptions' (lbi, v, distdir) inplaceFlag flags rf f = do let pd = localPkgDescr lbi +#if CH_MIN_VERSION_Cabal(2,0,0) includeDirMap <- recursiveDepInfo lbi v distdir +#endif componentsMap lbi v distdir $ \c clbi bi -> let |