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

Merge branch 'fix-cpm-path-help' into 'master'

cpm: Various minor fixes

See merge request !8
parents fae734ea d7dc7b05
Pipeline #17741 passed with stage
in 46 seconds
......@@ -17,7 +17,7 @@ from PmTypes import ::Pathname,::Output
= CreateProject
| ShowProject
| BuildProject Bool FilePath
| Compile !String
| Compile [String]
| ProjectPath PathAction
| SetRelativeRoot String
| SetTarget String
......
......@@ -127,15 +127,15 @@ doProjectAction cleanhome pwd pn (BuildProject force ideenvs) world
pinit force_rebuild gst = BringProjectUptoDate force_rebuild cleanup gst
cleanup exepath bool1 bool2 ps = abortLog (not bool2) "" ps
doProjectAction cleanhome pwd pn (Compile module_name) world
doProjectAction cleanhome pwd pn (Compile module_names) world
# (envs, world) = readIDEEnvs cleanhome EnvsFileName world
(project_path, project, ok, world) = openProject pwd pn cleanhome world
| not ok
= world
= world
# (console, world) = stdio world
iniGeneral = initGeneral False compilerOptions cleanhome project_path project envs console
gst = {ls=iniGeneral,gst_world=world,gst_continue_or_stop=False}
gst = CompileProjectModule Compilation module_name project (\ _ _ _ gst -> gst) gst
gst = {ls=iniGeneral,gst_world=world,gst_continue_or_stop=False}
gst = foldl (\gst module_name->CompileProjectModule Compilation module_name project (\_ _ _ gst->gst) gst) gst module_names
= gst.gst_world
doProjectAction cleanhome pwd pn (ProjectPath pa) world
......@@ -205,6 +205,7 @@ doProjectAction _ _ _ _ world =
help "cpm project <projectfile> <action>"
[ "Where <action> is one of the following"
, " create : create a new project"
, " compile <modulename> [..] : compile the given modules"
, " show : show project information"
, " build [--force] [--envs=filename] : build the project. Optionally force build (default: 'false')"
, " Optionally specify the environments file (default: 'IDEEnvs')"
......@@ -213,7 +214,11 @@ doProjectAction _ _ _ _ world =
, " : . is the same dir, .. the parent, ... the grandparent, etc."
, " target <env> : set target environment to <env>"
, " exec <execname> : set executable name to <execname>"
, " set option [option] : Set one or more of the following options:"
, " set <option> [<option>] : Set one or more of the following options:"
, " : -h SIZE"
, " : Change the heapsize (e.g. 2M)"
, " : -s SIZE"
, " : Change the stacksize (e.g. 200K)"
, " : -generic_fusion,-ngeneric_fusion"
, " : Enable or disable generic fusion"
, " : -strip,-nstrip"
......
......@@ -22,7 +22,8 @@ parse_Project ["create"] project_name = Project project_name CreateProject;
parse_Project ["show"] project_name = Project project_name ShowProject;
parse_Project ["build":project_build_args] project_name
= parse_Project_build_args project_build_args False EnvsFileName project_name (Project "" ProjectHelp);
parse_Project ["compile",s] project_name = Project project_name (Compile s);
parse_Project ["compile":s] project_name
| length s <> 0 = Project project_name (Compile s);
parse_Project ["path":project_path_args] project_name = parse_Project_path_args project_path_args project_name;
parse_Project ["root",s] project_name
| size s > 0 && and [c == '.'\\ c<-:s]
......@@ -60,8 +61,8 @@ parse_Project_path_args ["move",i,direction_name] project_name
# (is_direction,direction) = parse_PathDirection direction_name;
| size i>0 && only_digits_in_string 0 i && is_direction
= Project project_name (ProjectPath (MovePathAction (toInt i) direction));
parse_Project_path_args _ _
= Project "" (ProjectPath PathHelp);
parse_Project_path_args _ project_name
= Project project_name (ProjectPath PathHelp);
parse_PathDirection :: !String -> (!Bool,PathDirection);
parse_PathDirection "up" = (True,MovePathUp);
......
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