Compiler contributions procedure
From Impredicative Wiki
(Difference between revisions)
m (better verb)
|(4 intermediate revisions by one user not shown)|
Latest revision as of 09:23, 4 June 2015
Here follows the list of actions involved in testing a compiler new feature.
The compiler uses the mercurial control revision system. See guide.
# in a debian-based linux distribution sudo apt-get install mercurial mercurial-common
- set up the mercurial initial file ".hgrc" with your id
cat <<EOD > ~/.hgrc [ui] username = My name <firstname.lastname@example.org> EOD
# set up folders 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 http://hg.impredicative.com/urweb cd urweb # autoconf to generate the configure file ./autogen.sh # configure, specifying a destination folder for the compiler ./configure --prefix=$HOME/ur/testcompiler # edit the sources # compile, link and install make && make install
- test the patched-compiler with a urweb test project
# add the test-compiler to the environment paths head URW_HOME=$HOME/ur/testcompiler export PATH=$URW_HOME/bin:$PATH export LD_LIBRARY_PATH=$URW_HOME/lib/:$LD_LIBRARY_PATH export LIBRARY_PATH=$URW_HOME/lib/:/usr/local/lib:/usr/lib:/lib export C_INCLUDE_PATH=$URW_HOME/include cd ~/my-urweb-project # This urp directive sets the root url to the main function # rewrite url My_project/main 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 file with the change-set identifiers of your patch, listed by "hg log" hg export REV1 REV2 > ~/some-folder/my-patch.diff # attach the exported diff file to a mail-list msg.