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

add --force

parent 0cc840fe
......@@ -10,30 +10,33 @@ import PmEnvironment, logfile, set_return_code
from Platform import application_path
Start world
# commandline = getCommandLine
args = [arg \\ arg <-: commandline]
(path_ok,force_rebuild,proj_path)
= case args of
[_,prj]
-> (True,False,GetLongPathName prj)
[_,"--force",prj]
-> (True,True,GetLongPathName prj)
_
-> (False,False,"")
# (startup,world) = accFiles GetFullApplicationPath world
# envspath = application_path EnvsFileName
# (envs,world) = openEnvironments startup envspath world
// | not ok = wAbort ("Unable to read environments\n") world
| not path_ok = wAbort ("BatchBuild\nUse as: 'BatchBuild projectname.prj'\n") world
| not path_ok = wAbort ("BatchBuild\nUse as: 'BatchBuild [--force] projectname.prj'\n") world
# ((proj,ok,err),world) = accFiles (ReadProjectFile proj_path startup) world
| not ok || err <> "" = wAbort ("BatchBuild failed while opening project: "+++.err+++."\n") world
# (ok,logfile,world) = openLogfile proj_path world
| not ok = wAbort ("BatchBuild failed while opening logfile.\n") world
# default_compiler_options = DefaultCompilerOptions
# iniGeneral = initGeneral True default_compiler_options startup proj_path proj envs logfile
# ps = {ls=iniGeneral,gst_world=world,gst_continue_or_stop=False}
# {ls,gst_world} = pinit ps
# {ls,gst_world} = pinit force_rebuild ps
= finish gst_world
where
commandline = getCommandLine
args = [arg \\ arg <-: commandline]
default_compiler_options = DefaultCompilerOptions
(path_ok,proj_path) = case args of
[_,prj] -> (True,GetLongPathName prj)
_ -> (False, "")
pinit ps
#! ps = BringProjectUptoDate False cleanup ps
= ps
pinit force_rebuild ps
= BringProjectUptoDate force_rebuild cleanup ps
where
cleanup exepath bool1 bool2 ps
= abortLog False "" 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