on master help sign in
move the home of the data files out of dist/ (cabal complained)
commite81e0c4424172176448ddd6220a930adfbee383a authorEvan Czaplicki <info@elm-lang.org> dateFri 9 Aug 2013, 23:20 (13 years ago) parentb23ff22
2 files changed+8−8
Elm.cabal+1−1 Setup.hs+7−7
Elm.cabal+1−1
@@ -21,7 +21,7 @@ Category: Compiler, Language
2121Build-type: Custom
2222
2323Extra-source-files: changelog.txt
24−Data-dir: dist/data
24+Data-dir: data
2525Data-files: elm-runtime.js interfaces.data
2626Cabal-version: >=1.9
2727
Setup.hs+7−7
@@ -33,10 +33,10 @@ import qualified Data.ByteString.Lazy as BS
3333-- Elm.cabal expects the generated files to end up in dist/data
3434-- git won't look in dist + cabal will clean it
3535rtsDir :: LocalBuildInfo -> FilePath
36−rtsDir lbi = buildDir lbi </> ".." </> "data"
36+rtsDir lbi = "data"
3737
3838tempDir :: LocalBuildInfo -> FilePath
39−tempDir lbi = buildDir lbi </> ".." </> "temp"
39+tempDir lbi = "temp"
4040
4141-- The runtime is called:
4242rts :: LocalBuildInfo -> FilePath
@@ -96,18 +96,18 @@ myPostBuild as bfs pd lbi = do
9696 buildInterfaces lbi elmis
9797 putStrLn "Custom build step: build elm-runtime.js"
9898 buildRuntime lbi elmos
99− removeDirectoryRecursive ("dist" </> "temp")
99+ removeDirectoryRecursive (tempDir lbi)
100100 postBuild simpleUserHooks as bfs pd lbi
101101
102102
103103compileLibraries lbi = do
104− let temp = tempDir lbi -- dist/temp
105− rts = rtsDir lbi -- dist/data
104+ let temp = tempDir lbi -- temp
105+ rts = rtsDir lbi -- data
106106 createDirectoryIfMissing True temp
107107 createDirectoryIfMissing True rts
108− out_c <- canonicalizePath temp -- dist/temp (root folder)
108+ out_c <- canonicalizePath temp -- temp (root folder)
109109 elm_c <- canonicalizePath (elm lbi) -- dist/build/elm/elm
110− rtd_c <- canonicalizePath rts -- dist/data (for docs.json)
110+ rtd_c <- canonicalizePath rts -- data
111111
112112 let make file = do
113113 -- replace 'system' call with 'runProcess' which handles args better