Refactor paths using Context.
[hadrian.git] / src / Settings / Packages / Hp2ps.hs
1 module Settings.Packages.Hp2ps (hp2psPackageArgs) where
2
3 import Base
4 import Expression
5 import GHC (hp2ps)
6 import Predicates (builderGhc, package)
7 import Settings
8
9 hp2psPackageArgs :: Args
10 hp2psPackageArgs = package hp2ps ? do
11 path <- getContextPath
12 let cabalMacros = path -/- "build/autogen/cabal_macros.h"
13 mconcat [ builderGhc ?
14 mconcat [ arg "-no-hs-main"
15 , remove ["-hide-all-packages"]
16 , removePair "-optP-include" $ "-optP" ++ cabalMacros ] ]