From 72e7248d44ddbc06ab10241579dc74bcf1494e8f Mon Sep 17 00:00:00 2001 From: Jens Geiregat Date: Wed, 16 May 2012 17:13:19 +0200 Subject: [PATCH] Expand COMPILING and setup_env.py to be even more userfriendly --- COMPILING | 9 ++++++++- tools/setup_env.py | 13 ++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/COMPILING b/COMPILING index ba697c40..c33a088f 100644 --- a/COMPILING +++ b/COMPILING @@ -8,9 +8,16 @@ react 0.9.2 camlbz2 0.6.0 -we provide a script that sets up the development the prerequisites: +we provide a script that sets up the development prerequisites: python tools/setup_env.py +You can tweak the features/dependencies of the development prerequisites with +command line arguments to the tools/setup_env.py script. Check out: + python tools/setup_env.py --help + +Note that when the tools/setup_env.py script has finished, it outputs some +commands for you to run in your shell! + COMPILING: we use ocamlbuild combined with ocamlfind as main driver for our builds. diff --git a/tools/setup_env.py b/tools/setup_env.py index 13339493..d61bdddf 100644 --- a/tools/setup_env.py +++ b/tools/setup_env.py @@ -284,6 +284,16 @@ def install_libbz2(): lib.sh(['make', '-f', 'Makefile-libbz2_so']) lib.sh(['cp', 'libbz2.so.1.0.6', '%s/lib' % PREFIX]) +def print_env_setup_help(): + print + print + print 'Now execute these statements in your shell to enable your ' \ + 'build env:' + print 'export OCAML_HOME=%s' % PREFIX + print 'export LIBRARY_PATH=${LIBRARY_PATH}:${OCAML_HOME}/lib' + print 'export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${OCAML_HOME}/lib' + print 'export PATH=${PATH}:${OCAML_HOME}/bin' + def do_it(): fine = maybe_clean() if not fine: @@ -305,9 +315,10 @@ def do_it(): if options.bisect: install_bisect() #sudo cp lablgtk-2.14.2/examples/test.xpm /usr/share/pixmaps/ocaml.xpm - print '\n\nnow prepend %s/bin to your PATH' % PREFIX + print_env_setup_help() else: print "setup_env.py: quick-check tells me we're fine (%s)" % PREFIX + print_env_setup_help() if __name__ == '__main__':