Skip to content
Snippets Groups Projects
Commit e5933ca7 authored by Isaac Potoczny-Jones's avatar Isaac Potoczny-Jones
Browse files

fixed bug where we ignored hsSourceDir

parent d45f2742
No related branches found
No related tags found
No related merge requests found
......@@ -155,6 +155,8 @@ tests = [TestLabel "testing the HUnit package" $ TestCase $
"build returned error code"
doesFileExist "dist/build/testA" >>=
assertBool "build did not create the executable: testA"
doesFileExist "dist/build/testB" >>=
assertBool "build did not create the executable: testB"
assertCmd "./setup sdist"
"setup sdist returned error code"
doesFileExist "dist/test-1.0.tgz" >>=
......
......@@ -114,8 +114,8 @@ buildGHC pref pkg_descr lbi = do
-- build any executables
sequence_ [rawSystemExit (compilerPath (compiler lbi))
["--make", modPath, "-o", pathJoin [pref, exeName]]
| (Executable exeName modPath _) <- executables pkg_descr]
["--make", pathJoin [hsSourceDir bi, modPath], "-o", pathJoin [pref, exeName]]
| (Executable exeName modPath bi) <- executables pkg_descr]
-- now, build the library
let hObjs = map (++objsuffix) (map dotToSep (maybe [] modules (library pkg_descr)))
......
* 0.1
** Build executables for mainModules
** if library is Nothing, then don't build the library. sanity check
for both library and executables == nothing.
*** add test case for no libraries
** Extensions
- complain if their use makes the code non-portable?
- constructorless data-types
......
File moved
......@@ -7,5 +7,10 @@ Extensions: ForeignFunctionInterface
Executable: testA
Modules: A, Main
Main-is: Main.hs
Main-is: MainA.hs
Extensions: OverlappingInstances
Executable: testB
Modules: B, Main
Main-is: MainB.hs
hs-source-dir: B
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment