Commit f724d29f authored by Diederik van Arkel's avatar Diederik van Arkel

ensure main module linked first

parent 629e4155
......@@ -764,6 +764,12 @@ step intr (DLink ds=:{ok, newpaths, fileinfo, libsinfo, modpaths, abccache, proj
// clean modules
# (clmodpaths,fileinfo) = FI_GetCleanModules system_obj_path libsinfo fileinfo
// why couldn't we use ds.modpaths above??? No we need to do trickery to ensure main module is first!
# (rootpath,project) = PR_GetRootPathName project
# rootpath = MakeObjSystemPathname tp rootpath
# clmodpaths = RemoveStringFromList rootpath clmodpaths
# ofiles = rootpath :! ofiles
# ofiles = Reverse2 clmodpaths ofiles
// module imported objects and dynamic libs
......@@ -1147,7 +1153,7 @@ CompileTheProjectModuleStart :: !CompileOrCheckSyntax !Pathname !Int !FileInfoCa
CompileTheProjectModuleStart compileOrCheckSyntax path slot fileinfo dircache abccache project ps
# mn = GetModuleName path
# (ok,ccstring,write_module_times,errwin,_,srcpaths,mp,tp,eod,co,startupdir,fileinfo,abccache,ps)
= CTPMcommon compileOrCheckSyntax path mn fileinfo abccache project ps
= CTPMcommon /*compileOrCheckSyntax*/ path mn fileinfo abccache project ps
| not ok
= (False, fileinfo, dircache, abccache, ps)
# (compileStarted,ps) = CompileStartCommand ccstring write_module_times errwin compileOrCheckSyntax path srcpaths slot mp tp eod co startupdir ps
......@@ -1175,11 +1181,11 @@ ShowInfoAndCompile compileOrCheckSyntax path fileinfo abccache project ps
# mn = GetModuleName path
# line = Level2 ((if (compileOrCheckSyntax == Compilation) "Compiling '" "Checking '") +++ mn +++ "'.")
# ps = showInfo line ps
= CTPMcommon compileOrCheckSyntax path mn fileinfo abccache project ps
= CTPMcommon /*compileOrCheckSyntax*/ path mn fileinfo abccache project ps
//CTPMcommon :: !CompileOrCheckSyntax !Pathname !Modulename !FileInfoCache !*ABCCache !Project !*(PSt *General)
// -> *(Bool, String, Bool, (!([String]) !*(PSt *General) -> *PSt *General), _, _, _, _, _, _, _, FileInfoCache, *ABCCache, PSt *General)
CTPMcommon compileOrCheckSyntax path mn fileinfo abccache project ps0
CTPMcommon /*compileOrCheckSyntax*/ path mn fileinfo abccache project ps0
//XXX # ps = showInfo line ps
# (startupdir,ps) = getStup ps
# ({compopts},ps) = getPrefs ps
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment