Commit c71f3249 authored by John van Groningen's avatar John van Groningen

in openEnvironments use stup (this is (not) stupid, but startup_directory) argument for

saveEnvironments (now saveEnvironmentsStupArg),
to reduce the number of GetFullApplicationPath calls in BatchBuild
  
parent a78bc716
implementation module PmEnvironment
import StdArray, StdFunc, StdList
import StdArray, StdBool, StdFunc, StdList
import Directory
import UtilIO
import UtilOptions
import UtilStrictLists
......@@ -39,8 +40,7 @@ t_StdEnv
= CompileSync
| CompileAsync !Int
| CompilePers
import Directory, StdBool
//import dodebug
getEnvironments :: !String !String !*env -> *([Target],*env) | FileSystem, FileEnv env
getEnvironments stup envpath env
# ((ok,path),env) = pd_StringToPath envpath env
......@@ -66,11 +66,10 @@ where
openEnvironments :: !String !String !*env -> *([Target],*env) | FileEnv env
openEnvironments stup envpath env
// # (stup,env) = accFiles GetFullApplicationPath env
# ((targets,ok,_),env) = accFiles (openEnvironment envpath) env
| not ok
# targets = emptyTargets
# (_,env) = saveEnvironments envpath targets env
# (_,env) = saveEnvironmentsStupArg stup envpath targets env
# targets = map (fixAppPaths stup) targets
= (targets,env)
# targets = map (fixAppPaths stup) targets
......@@ -94,7 +93,11 @@ openEnvironment envpath env
saveEnvironments :: !String ![Target] !*env -> *(Bool,*env) | FileEnv env
saveEnvironments envpath targets env
# (stup,env) = accFiles GetFullApplicationPath env
# (stup,env) = accFiles GetFullApplicationPath env
= saveEnvironmentsStupArg stup envpath targets env
saveEnvironmentsStupArg :: !String !String ![Target] !*env -> *(Bool,*env) | FileEnv env
saveEnvironmentsStupArg stup envpath targets env
# targets = map (unfixAppPaths stup) targets
# (err,env) = accFiles (saveEnvironments envpath targets) env
# ok = isNothing err
......
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