aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/src
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/src')
-rw-r--r--bootstrap/src/BuildModel.hs21
1 files changed, 17 insertions, 4 deletions
diff --git a/bootstrap/src/BuildModel.hs b/bootstrap/src/BuildModel.hs
index f4c809f..c6e422b 100644
--- a/bootstrap/src/BuildModel.hs
+++ b/bootstrap/src/BuildModel.hs
@@ -94,15 +94,28 @@ processRawSource rawSource =
else undefined
constructCompileTimeInfo :: Source -> [String] -> FilePath -> CompileTimeInfo
-constructCompileTimeInfo program@(Program{}) availableModules buildDirectory =
+constructCompileTimeInfo p@(Program{}) availableModules buildDirectory =
CompileTimeInfo
- { compileTimeInfoSourceFileName = programSourceFileName program
- , compileTimeInfoObjectFileProduced = (programObjectFileName program)
+ { compileTimeInfoSourceFileName = programSourceFileName p
+ , compileTimeInfoObjectFileProduced = (programObjectFileName p)
buildDirectory
, compileTimeInfoOtherFilesProduced = []
, compileTimeInfoDirectDependencies = map
(\mName -> buildDirectory </> mName <.> "mod")
- (filter (`elem` availableModules) (programModulesUsed program))
+ (filter (`elem` availableModules) (programModulesUsed p))
+ }
+constructCompileTimeInfo m@(Module{}) availableModules buildDirectory =
+ CompileTimeInfo
+ { compileTimeInfoSourceFileName = moduleSourceFileName m
+ , compileTimeInfoObjectFileProduced = (moduleObjectFileName m)
+ buildDirectory
+ , compileTimeInfoOtherFilesProduced =
+ (buildDirectory </> moduleName m <.> "mod") : if moduleProducesSmod m
+ then [buildDirectory </> moduleName m <.> "smod"]
+ else []
+ , compileTimeInfoDirectDependencies = map
+ (\mName -> buildDirectory </> mName <.> "mod")
+ (filter (`elem` availableModules) (moduleModulesUsed m))
}
constructCompileTimeInfo _ otherSources buildDirectory = undefined