diff options
author | Brad Richardson <everythingfunctional@protonmail.com> | 2020-10-20 14:56:00 -0500 |
---|---|---|
committer | Brad Richardson <everythingfunctional@protonmail.com> | 2020-10-20 14:56:00 -0500 |
commit | a42d68ad4386a7a797eaaa35bdf501c0344f60e9 (patch) | |
tree | d13b10a70e0450d12bd36b3dd1170f3768ae946e /bootstrap/src | |
parent | 0799961cdd047005021549c32d8f8d7731f40d27 (diff) | |
download | fpm-a42d68ad4386a7a797eaaa35bdf501c0344f60e9.tar.gz fpm-a42d68ad4386a7a797eaaa35bdf501c0344f60e9.zip |
Add tests for submodule's compile time info
Diffstat (limited to 'bootstrap/src')
-rw-r--r-- | bootstrap/src/BuildModel.hs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/bootstrap/src/BuildModel.hs b/bootstrap/src/BuildModel.hs index b8fc537..dfbab72 100644 --- a/bootstrap/src/BuildModel.hs +++ b/bootstrap/src/BuildModel.hs @@ -120,7 +120,23 @@ constructCompileTimeInfo m@(Module{}) availableModules buildDirectory = (\mName -> buildDirectory </> mName <.> "mod") (filter (`elem` availableModules) (moduleModulesUsed m)) } -constructCompileTimeInfo _ otherSources buildDirectory = undefined +constructCompileTimeInfo s@(Submodule{}) availableModules buildDirectory = + CompileTimeInfo + { compileTimeInfoSourceFileName = submoduleSourceFileName s + , compileTimeInfoObjectFileProduced = (submoduleObjectFileName s) + buildDirectory + , compileTimeInfoOtherFilesProduced = [ buildDirectory + </> submoduleParentName s + ++ "@" + ++ submoduleName s + <.> "smod" + ] + , compileTimeInfoDirectDependencies = + (buildDirectory </> submoduleParentName s <.> "smod") + : (map (\mName -> buildDirectory </> mName <.> "mod") + (filter (`elem` availableModules) (submoduleModulesUsed s)) + ) + } pathSeparatorsToUnderscores :: FilePath -> FilePath pathSeparatorsToUnderscores fileName = |