Difference between revisions of "*NIX Instructions"

From Clean
Jump to navigationJump to search
(Add explanation from Download Clean page)
m (Remove initial whitespace; copy editing)
Line 4: Line 4:
 
=== clm ===
 
=== clm ===
 
To compile and run a program:
 
To compile and run a program:
    clm MAINMODULE -o BINARY
+
clm MAINMODULE -o BINARY
    ./BINARY
+
./BINARY
e.g.
 
    clm sieve -o sieve
 
  ./sieve
 
  
run
+
For example:
    clm
+
clm sieve -o sieve
to see all options
+
./sieve
 +
 
 +
Run
 +
clm
 +
to see all options.
  
 
=== cpm ===
 
=== cpm ===
To compile and run a program
+
To compile and run a program:
    cpm project MAINMODULE create
+
cpm project MAINMODULE create
    cpm project MAINMODULE.prj build
+
cpm project MAINMODULE.prj build
e.g.:
 
    cpm project sieve create
 
    cpm project sieve.prj build
 
    ./sieve
 
  
run
+
For example:
    cpm
+
cpm project sieve create
to see all options
+
cpm project sieve.prj build
 +
./sieve
  
run
+
Run
    cpm project MAINMODULE.prj
+
cpm
to see all project specific options
+
to see all options.
 +
 
 +
Run
 +
cpm project MAINMODULE.prj
 +
to see all project-specific options.
  
 
== Gentle installation instructions ==
 
== Gentle installation instructions ==
Line 36: Line 38:
 
=== Clean 3.0 ===
 
=== Clean 3.0 ===
  
open a terminal and navigate to the place where you would like to store the distribution
+
Open a terminal and navigate to the place where you would like to store the distribution:
    cd /path/to/clean
+
cd /path/to/clean
download the latest zip
+
 
    curl -o clean.zip https://ftp.cs.ru.nl/Clean/Clean30/macosx/clean3.0.zip
+
Download the latest zip:
unzip the zip file
+
curl -o clean.zip https://ftp.cs.ru.nl/Clean/Clean30/macosx/clean3.0.zip
    unzip clean.zip
+
 
navigate to the directory
+
Unzip the zip file:
    cd clean
+
unzip clean.zip
run make
+
 
    make
+
Navigate to the directory:
add the directory to PATH (e.g. in bash:)
+
cd clean
    echo "export PATH=\"$PWD/bin:\$PATH\"" >> .bash_profile
+
 
 +
Run make:
 +
make
 +
 
 +
Add the directory to PATH; e.g. in bash:
 +
echo "export PATH=\"$PWD/bin:\$PATH\"" >> .bash_profile
  
 
=== iTasks ===
 
=== iTasks ===
  
open a terminal and navigate to the place where you would like to store the distribution
+
Open a terminal and navigate to the place where you would like to store the distribution:
    cd /path/to/clean
+
cd /path/to/clean
download the latest zip
+
 
    curl -o clean.zip https://ftp.cs.ru.nl/Clean/builds/macos-x64/clean-bundle-complete-macos-x64-latest.tgz
+
Download the latest zip:
unzip the zip file
+
curl -o clean.zip https://ftp.cs.ru.nl/Clean/builds/macos-x64/clean-bundle-complete-macos-x64-latest.tgz
    tar -xf clean-bundle-complete-macos-x64-latest.tgz
+
 
navigate to the directory
+
Unzip the zip file:
    cd clean-bundle-complete
+
tar -xf clean-bundle-complete-macos-x64-latest.tgz
add the directory to PATH (e.g. in bash:)
+
 
    echo "export PATH=\"$PWD/bin:\$PATH\"" >> .bash_profile
+
Navigate to the directory:
add the directory to CLEAN_HOME (e.g. in bash:)
+
cd clean-bundle-complete
    echo "export CLEAN_HOME=\"$PWD\"" >> .bash_profile
+
 
 +
Add the directory to PATH; e.g. in bash:
 +
echo "export PATH=\"$PWD/bin:\$PATH\"" >> .bash_profile
 +
 
 +
Set CLEAN_HOME appropriately; e.g. in bash:
 +
echo "export CLEAN_HOME=\"$PWD\"" >> .bash_profile

Revision as of 09:10, 10 September 2019

Using Clean on Linux or MacOS systems is not the same as on windows. There is no IDE available, which means that you have to manage your projects using command-line tools clm and cpm.

Compiling a program

clm

To compile and run a program:

clm MAINMODULE -o BINARY
./BINARY

For example:

clm sieve -o sieve
./sieve

Run

clm

to see all options.

cpm

To compile and run a program:

cpm project MAINMODULE create
cpm project MAINMODULE.prj build

For example:

cpm project sieve create
cpm project sieve.prj build
./sieve

Run

cpm

to see all options.

Run

cpm project MAINMODULE.prj

to see all project-specific options.

Gentle installation instructions

Make sure to have XCode installed on macs.

Clean 3.0

Open a terminal and navigate to the place where you would like to store the distribution:

cd /path/to/clean

Download the latest zip:

curl -o clean.zip https://ftp.cs.ru.nl/Clean/Clean30/macosx/clean3.0.zip

Unzip the zip file:

unzip clean.zip

Navigate to the directory:

cd clean

Run make:

make

Add the directory to PATH; e.g. in bash:

echo "export PATH=\"$PWD/bin:\$PATH\"" >> .bash_profile

iTasks

Open a terminal and navigate to the place where you would like to store the distribution:

cd /path/to/clean

Download the latest zip:

curl -o clean.zip https://ftp.cs.ru.nl/Clean/builds/macos-x64/clean-bundle-complete-macos-x64-latest.tgz

Unzip the zip file:

tar -xf clean-bundle-complete-macos-x64-latest.tgz

Navigate to the directory:

cd clean-bundle-complete

Add the directory to PATH; e.g. in bash:

echo "export PATH=\"$PWD/bin:\$PATH\"" >> .bash_profile

Set CLEAN_HOME appropriately; e.g. in bash:

echo "export CLEAN_HOME=\"$PWD\"" >> .bash_profile