Commit 8d9f292f authored by Jurrien Stutterheim's avatar Jurrien Stutterheim

Add separate README for CPM

parent 8294983a
......@@ -4,42 +4,7 @@
* CPM is a tool for managing CleanIDE-compatible projects on the commandline
* and is targeted at OS X and Linux users who do not have access to the
* CleanIDE.
*
* Currently, only basic project management features are supported:
* - Build a project
* - Create a new project
* - Show project info
* - Manage project paths
* - Create new modules
*
* In the future, all aspects of a CleanIDE project file should be manageable
* via CPM.
*
* CPM is written to display help messages when an incomplete command is
* entered. Users are encouraged to explore CPM by themselves by reading these
* help messages.
*
* To use CPM on OS X (or Linux), you will need to specify a compatible
* environment in your project file in your IDEEnvs file. In the example below,
* we configure a project to build against an OS X-compatible environment.
* $CLEAN_HOME is the directory where you have installed your Clean compiler.
*
* - Make sure the `cpm` executable is in $CLEAN_HOME and $CLEAN_HOME is in
* your $PATH
*
* - In the project file, specify target OSXEnv by replacing the `Target`
* entry with `Target: OSXEnv`
*
* - In `$CLEAN_HOME/IDEEnvs`, add a new environment and call it `OSXEnv`.
* The easiest way is to duplicate the StdEnv and rename it.
*
* - Modify the `EnvironmentCompiler` and `EnvironmentCodeGen` entries in the
* new environment and change them to `lib/exe/cocl` and `lib/exe/cg`
* respectively.
*
* - Make sure `EnvironmentVersion` has value `920`
*/
module Cpm
/**
......
......@@ -99,7 +99,9 @@ doProjectAction cleanhome pwd pn (BuildProject force ideenvs) world
# iniGeneral = initGeneral True compilerOptions cleanhome proj_path proj envs console
# {ls, gst_world} = pinit force {ls=iniGeneral,gst_world=world,gst_continue_or_stop=False}
= gst_world
where proj_path = GetLongPathName pn
where proj_path = GetLongPathName pn
pinit force_rebuild gst = BringProjectUptoDate force_rebuild cleanup gst
cleanup exepath bool1 bool2 ps = abortLog False "" ps
doProjectAction cleanhome _ pn (ProjectPath pa) world
# projectfile = mkProjectFile pn
......@@ -324,8 +326,3 @@ showLines lines world
# (console, world) = stdio world
# console = seqSt (\s -> fwrites (s +++ "\n")) lines console
= snd $ fclose console world
// TODO: Use the version from BatchBuild
pinit :: !.Bool !*GeneralSt -> *GeneralSt
pinit force_rebuild gst = BringProjectUptoDate force_rebuild cleanup gst
where cleanup exepath bool1 bool2 ps = abortLog False "" ps
============================================
== CPM: Clean Project Manager -- README ==
============================================
CPM is a tool for managing CleanIDE-compatible projects on the commandline and
is initially targeted at OS X and Linux users who do not have access to the
CleanIDE. Windows is currently not supported, although CPM might work with
little or no modifications on Windows as well,
Currently, only basic project management features are supported:
- Build a project
- Create a new project
- Show project info
- Manage project paths
- Create new modules
In the future, all aspects of a CleanIDE project file should be manageable via
CPM.
CPM is designed to display help messages when an incomplete command is entered.
Users are encouraged to explore CPM by themselves by reading these help
messages.
== Prerequisites ==
This section lists the system requirements for CPM. It assumes that CPM will be
used on Mac OS X or Linux. Windows supported has not been tested yet.
Requirements:
- A recent installation of Clean (version 2.4 or higher)
- Clean Platform (hierarchical branch)
- A recent binary distribution of BatchBuild (or a binary distribution of CPM)
== Installation instructions ==
Before you can use CPM, you will need to compile it using BatchBuild (or a
previous version of CPM). Building the bundled project file requires an OSXEnv
environment to be present in your IDEEnvs file. A sensible default environment
for 64 bit OS X is the following:
Environment
EnvironmentName: OSXEnv
EnvironmentPaths
Path: {Application}/lib/StdEnv
Path: {Application}/clean-platform
EnvironmentCompiler: lib/exe/cocl
EnvironmentCodeGen: lib/exe/cg
EnvironmentLinker: Tools\Clean System\StaticLinker.exe
EnvironmentDynLink: Tools\Dynamics\DynamicLinker.exe
EnvironmentVersion: 920
EnvironmentRedirect: False
EnvironmentCompileMethod: Pers
EnvironmentProcessor: I386
Environment64BitProcessor: True
The environment assumes that clean-platform is in your Clean directory.
EnvironmentLinker and EnvironmentDynLink can be ignored, as they are not used
on Mac OS X and Linux.
Compiling CPM with BatchBuild is straight-forward:
batch_build Cpm.prj
The bundled project file compiles CPM for Mac OS X. Linux users will need to
modify the environment and include paths in Cpm.prj.
== Usage instructions for Mac OS X and Linux ==
To use CPM on OS X (or Linux), you will need to specify a compatible
environment in your project file. In the example below, we configure a project
to build against an OS X-compatible environment. $CLEAN_HOME is the directory
where you have installed your Clean compiler.
- Make sure the `cpm` executable is in $CLEAN_HOME and $CLEAN_HOME is in your
$PATH
- In the project file, specify target OSXEnv by replacing the `Target` entry
with `Target: OSXEnv`
- In `$CLEAN_HOME/IDEEnvs`, add a new environment and call it `OSXEnv`.
The easiest way is to duplicate the StdEnv and rename it.
- Modify the `EnvironmentCompiler` and `EnvironmentCodeGen` entries in the
new environment and change them to `lib/exe/cocl` and `lib/exe/cg`
respectively.
- Make sure `EnvironmentVersion` has value `920`
== Troubleshooting ==
Q: Compilation exits with `IO error`
A: Make sure that you have a recent version of cocl and that it is placed in
both $CLEAN_HOME/exe and $CLEAN_HOME/lib/exe
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