aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndřej Čertík <ondrej@certik.us>2020-07-13 14:06:34 -0600
committerGitHub <noreply@github.com>2020-07-13 14:06:34 -0600
commit4b2f8bca5b2289d18d5f0b6f7e17a0ccac428b47 (patch)
treef40be245aac56feab85b05d7f63df0bbba2b1afb
parent02b07f45052d5f5f69697aacf646ea8736880fb8 (diff)
parentb86c74bef761ec48ff17cf043a26b11b9bf3954b (diff)
downloadfpm-4b2f8bca5b2289d18d5f0b6f7e17a0ccac428b47.tar.gz
fpm-4b2f8bca5b2289d18d5f0b6f7e17a0ccac428b47.zip
Merge pull request #117 from everythingfunctional/FixExecutableSourceName
Fix bug with case in program source file name.
-rw-r--r--src/Build.hs2
-rw-r--r--test/example_packages/hello_complex/apps/say_hello/say_Hello.f90 (renamed from test/example_packages/hello_complex/apps/say_hello/say_hello.f90)4
-rw-r--r--test/example_packages/hello_complex/fpm.toml4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/Build.hs b/src/Build.hs
index 67ec2f9..ffbf264 100644
--- a/src/Build.hs
+++ b/src/Build.hs
@@ -120,7 +120,7 @@ buildProgram programDirectory libraryDirectories sourceExtensions buildDirectory
need allObjectFiles
need archives
cmd compiler allObjectFiles archives ["-o", executable] flags
- buildDirectory </> programSource -<.> "o" %> \objectFile -> do
+ buildDirectory </> (map toLower programSource) -<.> "o" %> \objectFile -> do
let realObjectFile = foldl (</>) "" $ splitDirectories objectFile
let sourceFile = programDirectory </> programSource
need [sourceFile]
diff --git a/test/example_packages/hello_complex/apps/say_hello/say_hello.f90 b/test/example_packages/hello_complex/apps/say_hello/say_Hello.f90
index cc648f2..cf4a742 100644
--- a/test/example_packages/hello_complex/apps/say_hello/say_hello.f90
+++ b/test/example_packages/hello_complex/apps/say_hello/say_Hello.f90
@@ -1,7 +1,7 @@
-program say_hello
+program say_Hello
use greet_m, only: make_greeting
implicit none
print *, make_greeting("World")
-end program say_hello
+end program say_Hello
diff --git a/test/example_packages/hello_complex/fpm.toml b/test/example_packages/hello_complex/fpm.toml
index d185745..30ed293 100644
--- a/test/example_packages/hello_complex/fpm.toml
+++ b/test/example_packages/hello_complex/fpm.toml
@@ -4,9 +4,9 @@ name = "hello_complex"
source-dir="source"
[[executable]]
-name="say_hello"
+name="say_Hello"
source-dir="apps/say_hello"
-main="say_hello.f90"
+main="say_Hello.f90"
[[executable]]
name="say_goodbye"