aboutsummaryrefslogtreecommitdiffstats
path: root/kerl
diff options
context:
space:
mode:
Diffstat (limited to 'kerl')
-rwxr-xr-xkerl31
1 files changed, 31 insertions, 0 deletions
diff --git a/kerl b/kerl
index 43e3545..59f191a 100755
--- a/kerl
+++ b/kerl
@@ -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