Commit 5c03b98e authored by John van Groningen's avatar John van Groningen

fix cpm <project> project root command,

(written by Mart Lubbers)
parent d821782c
......@@ -20,7 +20,7 @@ import System.Directory, System.File, System.FilePath
/**
* Clean libraries imports
*/
import StdBool, StdEnum, StdMisc, StdTuple, StdArray
import StdBool, StdEnum, StdMisc, StdTuple, StdArray, StdFunc
/**
* Execute a general CPM action
......@@ -129,8 +129,8 @@ doProjectAction cleanhome pwd pn (ProjectPath pa) world
= world
= doProjectPathAction cleanhome pwd pn project pa world
doProjectAction cleanhome pwd pn (SetRelativeRoot target) world
= withProject pwd pn cleanhome (PR_SetRelativeRootDir target) world
doProjectAction cleanhome pwd pn (SetRelativeRoot relroot) world
= withProject pwd pn cleanhome (uncurry (change_root_directory_of_project relroot) o PR_GetRootPathName) world
doProjectAction cleanhome pwd pn (SetTarget target) world
= withProject pwd pn cleanhome (PR_SetTarget target) world
......@@ -178,7 +178,8 @@ doProjectAction _ _ _ _ world =
, " build [--force] [--envs=filename] : build the project. Optionally force build (default: 'false')"
, " Optionally specify the environments file (default: 'IDEEnvs')"
, " path : manage project paths"
, " root : set the project root"
, " root .[.] : set the project root relative to the project file."
, " : . 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:"
......
......@@ -23,7 +23,9 @@ 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 ["path":project_path_args] project_name = parse_Project_path_args project_path_args project_name;
parse_Project ["root",s] project_name = Project project_name (SetRelativeRoot s);
parse_Project ["root",s] project_name
| size s > 0 && and [c == '.'\\ c<-:s]
= Project project_name (SetRelativeRoot s);
parse_Project ["target",s] project_name = Project project_name (SetTarget s);
parse_Project ["exec",s] project_name = Project project_name (SetExec s);
parse_Project ["set":project_option_args] project_name
......
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