summaryrefslogtreecommitdiff
path: root/otp_build
diff options
context:
space:
mode:
authorJohn Högberg <john@erlang.org>2020-02-07 16:49:59 +0100
committerJohn Högberg <john@erlang.org>2020-02-12 11:53:50 +0100
commit3b2e2f9cc52dfff05c8203d331141a9ed377bc02 (patch)
treec8080706d54ebbc0e65b87c2c10c669498f34974 /otp_build
parentd6ad22c0089c132eeea76e3e0f661847599b9355 (diff)
downloaderlang-3b2e2f9cc52dfff05c8203d331141a9ed377bc02.tar.gz
otp/erl_lint: Generate deprecation and removal warnings from source
Diffstat (limited to 'otp_build')
-rwxr-xr-xotp_build35
1 files changed, 35 insertions, 0 deletions
diff --git a/otp_build b/otp_build
index 8f611240e7..52da262fcf 100755
--- a/otp_build
+++ b/otp_build
@@ -79,6 +79,7 @@ usage ()
git)
echo "update_primary [--no-commit] - build and maybe commit a new primary bootstrap"
echo "update_preloaded [--no-commit] - build and maybe commit the preloaded modules"
+ echo "update_deprecations [--no-commit] - build and maybe commit deprecations"
;;
esac
}
@@ -865,6 +866,35 @@ get_do_commit ()
fi
}
+do_deprecations_git ()
+{
+ get_do_commit $1
+ setup_make
+
+ $MAKE MAKE="$MAKE" BOOTSTRAP_ROOT=$BOOTSTRAP_ROOT TARGET=$TARGET \
+ deprecations || exit 1;
+
+ $MAKE MAKE="$MAKE" BOOTSTRAP_ROOT=$BOOTSTRAP_ROOT TARGET=$TARGET \
+ primary_bootstrap || exit 1;
+
+ if [ $do_commit = true ]; then
+ git add -A bootstrap/lib/stdlib/ebin/otp_internal.beam
+ git add -A lib/stdlib/src/otp_internal.erl
+ git commit --no-verify -m 'Update deprecations'
+ echo ""
+ echo "Deprecations updated and committed."
+ echo ""
+ else
+ echo ""
+ echo "Deprecations updated. Use the following commands to stage "
+ echo "changed files:"
+ echo ""
+ echo "$ git add bootstrap/lib/stdlib/ebin/otp_internal.beam"
+ echo "$ git add lib/stdlib/src/otp_internal.erl"
+ echo ""
+ fi
+}
+
do_primary_git ()
{
get_do_commit $1
@@ -1179,6 +1209,11 @@ case "$1" in
fi;
FLAVOR=$1
do_boot;;
+ update_deprecations)
+ case $version_controller in
+ git) do_deprecations_git "$2";;
+ none) git_required ;;
+ esac ;;
update_primary)
case $version_controller in
git) do_primary_git "$2";;