diff options
author | Radek Szymczyszyn <[email protected]> | 2015-07-02 16:54:27 +0200 |
---|---|---|
committer | Radek Szymczyszyn <[email protected]> | 2015-07-03 13:25:56 +0200 |
commit | 7b51ebafd0039709db74bdb23e080b81b72abf18 (patch) | |
tree | 9bdb3088c35c4fc02bae3bb3de68b6cb1aa248fd | |
parent | 87cd3bb022ff3cb829a07fe4e442c0284360c3e2 (diff) | |
download | kerl-7b51ebafd0039709db74bdb23e080b81b72abf18.tar.gz kerl-7b51ebafd0039709db74bdb23e080b81b72abf18.tar.bz2 kerl-7b51ebafd0039709db74bdb23e080b81b72abf18.zip |
Build a Dialyzer PLT when installing a build
-rwxr-xr-x | kerl | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -49,11 +49,15 @@ fi if [ -n "$KERL_INSTALL_MANPAGES" ]; then _KIM="$KERL_INSTALL_MANPAGES" fi +if [ -n "$KERL_BUILD_PLT" ]; then + _KBPLT="$KERL_BUILD_PLT" +fi KERL_CONFIGURE_OPTIONS= KERL_CONFIGURE_APPLICATIONS= KERL_CONFIGURE_DISABLE_APPLICATIONS= KERL_SASL_STARTUP= KERL_INSTALL_MANPAGES= +KERL_BUILD_PLT= # ensure the base dir exsists mkdir -p "$KERL_BASE_DIR" @@ -82,6 +86,9 @@ fi if [ -n "$_KIM" ]; then KERL_INSTALL_MANPAGES="$_KIM" fi +if [ -n "$_KBPLT" ]; then + KERL_BUILD_PLT="$_KBPLT" +fi if [ -z "$KERL_SASL_STARTUP" ]; then INSTALL_OPT=-minimal @@ -522,6 +529,11 @@ ACTIVATE fi fi + if [ -n "$KERL_BUILD_PLT" ]; then + echo "Building Dialyzer PLT..." + build_plt "$absdir" + fi + echo "You can activate this installation running the following command:" echo ". $absdir/activate" echo "Later on, you can leave the installation typing:" @@ -545,6 +557,25 @@ do_install_htmldocs() tar -C "$absdir/html" -xzf "$KERL_DOWNLOAD_DIR/$FILENAME") } +build_plt() +{ + dialyzerd=$1/dialyzer + mkdir -p $dialyzerd + plt=$dialyzerd/plt + build_log=$dialyzerd/build.log + dialyzer=$1/bin/dialyzer + apps=`ls -1 $1/lib | cut -d- -f1 | grep -Ev 'erl_interface|jinterface' | xargs echo` + $dialyzer --output_plt $plt --build_plt --apps $apps > $build_log 2>&1 + status=$? + if [ $status -eq 0 -o $status -eq 2 ]; then + echo "Done building $plt" + return 0 + else + echo "Error building PLT, see $build_log for details" + return 1 + fi +} + do_deploy() { if [ -z "$1" ]; then |