aboutsummaryrefslogtreecommitdiff
path: root/src/Fpm.hs
diff options
context:
space:
mode:
authorBrad Richardson <brichardson@structint.com>2020-04-13 21:15:45 -0500
committerBrad Richardson <brichardson@structint.com>2020-04-29 19:08:05 -0700
commit7be7dc7216accf2dc76c2725266f58461bfbf656 (patch)
treeec63f21e4e440f58edcfe2fcd51428988f1b7b1a /src/Fpm.hs
parent196d9bf3b07a50d4ded4ce8fcc50c79687c4964f (diff)
downloadfpm-7be7dc7216accf2dc76c2725266f58461bfbf656.tar.gz
fpm-7be7dc7216accf2dc76c2725266f58461bfbf656.zip
Make running the executables work on Windows too
Diffstat (limited to 'src/Fpm.hs')
-rw-r--r--src/Fpm.hs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Fpm.hs b/src/Fpm.hs
index c3c3794..070f9e5 100644
--- a/src/Fpm.hs
+++ b/src/Fpm.hs
@@ -16,7 +16,10 @@ import Development.Shake ( FilePattern
, (<//>)
, getDirectoryFilesIO
)
-import Development.Shake.FilePath ( (</>) )
+import Development.Shake.FilePath ( (</>)
+ , (<.>)
+ , exe
+ )
import Options.Applicative ( Parser
, (<**>)
, command
@@ -92,7 +95,8 @@ app args settings = case command' args of
sourceDir </> name
)
(appSettingsExecutables settings)
- let executables = map (buildPrefix </>) executableNames
+ let executables =
+ map (buildPrefix </>) $ map (flip (<.>) exe) executableNames
mapM_ runCommand executables
Test -> do
build settings
@@ -103,7 +107,8 @@ app args settings = case command' args of
sourceDir </> name
)
(appSettingsTests settings)
- let executables = map (buildPrefix </>) executableNames
+ let executables =
+ map (buildPrefix </>) $ map (flip (<.>) exe) executableNames
mapM_ runCommand executables
build :: AppSettings -> IO ()