Skip to content

Commit

Permalink
Pass the right -F and --framework flags when running hsc2hs on OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
igfoo committed Jul 29, 2008
1 parent 609c67b commit 8a4b73c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Distribution/Simple/PreProcess.hs
Original file line number Diff line number Diff line change
Expand Up @@ -352,12 +352,14 @@ ppHsc2hs bi lbi = standardPP lbi hsc2hsProgram $
, "--ld=" ++ programPath gccProg ]

-- OSX frameworks:
++ [ "--cflag=-F" ++ opt
++ [ what ++ "=-F" ++ opt
| isOSX
, opt <- nub (concatMap Installed.frameworkDirs pkgs) ]
++ [ "--cflag=-framework" ++ opt
, opt <- nub (concatMap Installed.frameworkDirs pkgs)
, what <- ["--cflag", "--lflag"] ]
++ [ "--lflag=" ++ arg
| isOSX
, opt <- PD.frameworks bi ++ concatMap Installed.frameworks pkgs ]
, opt <- PD.frameworks bi ++ concatMap Installed.frameworks pkgs
, arg <- ["-framework", opt] ]

-- Options from the current package:
++ [ "--cflag=" ++ opt | opt <- hcDefines (compiler lbi) ]
Expand Down

0 comments on commit 8a4b73c

Please sign in to comment.