# Get it
cd
test -f installed/camlp5-6.15.tgz && mv -f installed/camlp5-6.15.tgz .
test ! -f camlp5-6.15.tgz &&
wget http://camlp5.gforge.inria.fr/distrib/src/camlp5-6.15.tgz
# Extract it
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "camlp5-*" -exec rm -r {} \;
tar xzvf ~/camlp5-6.15.tgz
cd camlp5-6.15
test $UID -eq 0 && chown -R root:root .
# If you want to build the documentation
cd doc/htmlp
# HTML - HTML files in ../html (run 'lynx ../html/index.html')
make
# LaTeX - camlp5.dvi
make tex
# Postscript - camlp5.ps
make ps
# PDF - camlp5.pdf
make pdf
# info - camlp5.info* (run 'info ./camlp5.info')
make info
cd ../..
# Become your non-root user again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/camlp5-*.tgz
mv camlp5-6.15.tgz installed/
# If you ever want to uninstall camlp5, this should do it:
cd
su
test -d src/camlp5-* && ( cd src/camlp5-* ; make uninstall )
( cd /usr/local/bin ; rm -f *camlp5* odyl ocpp )
( cd /usr/local/man/man1 ; rm -f *camlp5* odyl ocpp )
test -d /usr/local/lib/ocaml/camlp5 &&
rm -r /usr/local/lib/ocaml/camlp5
exit
find ~/src -maxdepth 1 -type d -name "camlp5-*" -exec rm -r {} \;
rm -f ~/installed/camlp5-*.tar.*