diff options
author | Brad Richardson <brichardson@structint.com> | 2020-02-28 07:48:45 -0800 |
---|---|---|
committer | Brad Richardson <brichardson@structint.com> | 2020-02-28 07:48:45 -0800 |
commit | 8d8b6ace5f0c2d208e5bfccecd70b6082832bc3e (patch) | |
tree | 7a18d600760607d7bde2d4cf2045e45e4bd0ff5e | |
parent | d4c0aea26050b32bf394eabe91c95ab56113ce1a (diff) | |
download | fpm-8d8b6ace5f0c2d208e5bfccecd70b6082832bc3e.tar.gz fpm-8d8b6ace5f0c2d208e5bfccecd70b6082832bc3e.zip |
Enable capitalization of source files
-rw-r--r-- | example_project/app/Hello_world.f90 | 7 | ||||
-rw-r--r-- | example_project/app/hello_world.f90 | 7 | ||||
-rw-r--r-- | example_project/src/Hello_m.f90 (renamed from example_project/src/hello_m.f90) | 4 | ||||
-rw-r--r-- | src/Build.hs | 9 |
4 files changed, 15 insertions, 12 deletions
diff --git a/example_project/app/Hello_world.f90 b/example_project/app/Hello_world.f90 new file mode 100644 index 0000000..956a6c2 --- /dev/null +++ b/example_project/app/Hello_world.f90 @@ -0,0 +1,7 @@ +program Hello_world + use Hello_m, only: sayHello + + implicit none + + call sayHello("World") +end program Hello_world diff --git a/example_project/app/hello_world.f90 b/example_project/app/hello_world.f90 deleted file mode 100644 index b95062d..0000000 --- a/example_project/app/hello_world.f90 +++ /dev/null @@ -1,7 +0,0 @@ -program hello_world - use hello_m, only: sayHello - - implicit none - - call sayHello("World") -end program hello_world diff --git a/example_project/src/hello_m.f90 b/example_project/src/Hello_m.f90 index a341602..60088a2 100644 --- a/example_project/src/hello_m.f90 +++ b/example_project/src/Hello_m.f90 @@ -1,4 +1,4 @@ -module hello_m +module Hello_m implicit none private @@ -9,4 +9,4 @@ contains print *, "Hello, " // name // "!" end subroutine sayHello -end module hello_m +end module Hello_m 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 |