Compiler contributions procedure

From Impredicative Wiki
Revision as of 08:18, 4 June 2015 by Griba2010 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Here follows the list of actions involved in testing a compiler new feature.

The compiler uses the mercurial control revision system.

# set up the mercurial initial file ".hgrc" with your id
cat <<EOD > ~/.hgrc
username = My name <>

mkdir -p ~/ur/mercurial-base-folder
mkdir ~/ur/testcompiler

cd ~/ur/mercurial-base-folder

# remove previous checkout if existant
rm -Rf urweb

# Clone the default branch
hg clone

cd urweb

# autoconf to generate the configure file

# configure, specifying a destination folder for the compiler
./configure --prefix=$HOME/ur/testcompiler

# edit the sources

# compile, link and install
make && make install

# add the test-compiler to the environment paths head

export PATH=$URW_HOME/bin:$PATH
export LIBRARY_PATH=$URW_HOME/lib/:/usr/local/lib:/usr/lib:/lib
export C_INCLUDE_PATH=$URW_HOME/include

# test the patched-compiler with a urweb test project
cd ~/my-urweb-project
urweb my-project
./my-project.exe -p 8082    # a free port_number

# test your project output in the web browser

^C               # stopping the server when done

# back to the compiler sources
cd ~/ur/mercurial-base-folder/urweb

# check the modified source files
hg status

# add, if necessary, any extra files to mercurial tracking
hg add somefile

# commit the patch
hg commit -m "my patch comment"

# list the patch,
hg log -l5          # list the last n commits -ln

# generate the diff for the change-set identifiers REV1 REV2 ...
hg export REV1 REV2 > ~/some-folder/my-patch.diff

# send the exported diff file
Personal tools