From b86c74bef761ec48ff17cf043a26b11b9bf3954b Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Wed, 8 Jul 2020 11:24:41 -0700 Subject: Fix bug with case in program source file name. --- src/Build.hs | 2 +- test/example_packages/hello_complex/apps/say_hello/say_Hello.f90 | 7 +++++++ test/example_packages/hello_complex/apps/say_hello/say_hello.f90 | 7 ------- test/example_packages/hello_complex/fpm.toml | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 test/example_packages/hello_complex/apps/say_hello/say_Hello.f90 delete mode 100644 test/example_packages/hello_complex/apps/say_hello/say_hello.f90 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 new file mode 100644 index 0000000..cf4a742 --- /dev/null +++ b/test/example_packages/hello_complex/apps/say_hello/say_Hello.f90 @@ -0,0 +1,7 @@ +program say_Hello + use greet_m, only: make_greeting + + implicit none + + print *, make_greeting("World") +end program say_Hello 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 deleted file mode 100644 index cc648f2..0000000 --- a/test/example_packages/hello_complex/apps/say_hello/say_hello.f90 +++ /dev/null @@ -1,7 +0,0 @@ -program say_hello - use greet_m, only: make_greeting - - implicit none - - print *, make_greeting("World") -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" -- cgit v1.2.3