aboutsummaryrefslogtreecommitdiff
path: root/src/Build.hs
diff options
context:
space:
mode:
authorBrad Richardson <brichardson@structint.com>2020-02-28 07:48:45 -0800
committerBrad Richardson <brichardson@structint.com>2020-02-28 07:48:45 -0800
commit8d8b6ace5f0c2d208e5bfccecd70b6082832bc3e (patch)
tree7a18d600760607d7bde2d4cf2045e45e4bd0ff5e /src/Build.hs
parentd4c0aea26050b32bf394eabe91c95ab56113ce1a (diff)
downloadfpm-8d8b6ace5f0c2d208e5bfccecd70b6082832bc3e.tar.gz
fpm-8d8b6ace5f0c2d208e5bfccecd70b6082832bc3e.zip
Enable capitalization of source files
Diffstat (limited to 'src/Build.hs')
-rw-r--r--src/Build.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Build.hs b/src/Build.hs
index fa0fa96..813c10e 100644
--- a/src/Build.hs
+++ b/src/Build.hs
@@ -105,7 +105,7 @@ buildPrograms programDirectory libraryDirectories sourceExtensions buildDirector
flags
["-o", objectFile, sourceFile]
(`elem` executables) ?> \exe -> do
- let objectFile = exe -<.> "o"
+ let objectFile = map toLower exe -<.> "o"
need [objectFile]
need archives
cmd compiler objectFile archives ["-o", exe] flags
@@ -216,8 +216,11 @@ createSourceToObjectMap buildDirectory libraryDirectory sourceFile =
sourceFileToObjectFile :: FilePath -> FilePath -> FilePath -> FilePath
sourceFileToObjectFile buildDirectory libraryDirectory sourceFile =
buildDirectory
- </> pathSeparatorsToUnderscores
- (makeRelative libraryDirectory sourceFile)
+ </> map
+ toLower
+ (pathSeparatorsToUnderscores
+ (makeRelative libraryDirectory sourceFile)
+ )
-<.> "o"
sourceFileToExecutable :: FilePath -> FilePath -> FilePath -> FilePath