summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatoly Burakov <anatoly.burakov@intel.com>2019-11-20 17:23:32 +0000
committerDavid Marchand <david.marchand@redhat.com>2019-11-20 23:05:39 +0100
commit09096df509db3f026e9f112d5f63422db6f52968 (patch)
tree614ed636eca35bf7e6f02631a4ab0ea8bea90313
parent4232bf5385df2141a6b9643b07b6a2b367b48719 (diff)
downloaddpdk-next-net-intel-09096df509db3f026e9f112d5f63422db6f52968.zip
dpdk-next-net-intel-09096df509db3f026e9f112d5f63422db6f52968.tar.gz
dpdk-next-net-intel-09096df509db3f026e9f112d5f63422db6f52968.tar.xz
buildtools: add ABI version update script
In order to facilitate mass updating of version files, add a shell script that recurses into lib/ and drivers/ directories and calls the ABI version update script. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
-rw-r--r--MAINTAINERS1
-rwxr-xr-xbuildtools/update-abi.sh46
2 files changed, 47 insertions, 0 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 799bac7..88b5a12 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -147,6 +147,7 @@ F: devtools/validate-abi.sh
F: devtools/check-symbol-change.sh
F: buildtools/check-experimental-syms.sh
F: buildtools/map-list-symbol.sh
+F: buildtools/update-abi.sh
F: buildtools/update_version_map_abi.py
Driver information
diff --git a/buildtools/update-abi.sh b/buildtools/update-abi.sh
new file mode 100755
index 0000000..15bc6fe
--- /dev/null
+++ b/buildtools/update-abi.sh
@@ -0,0 +1,46 @@
+#!/bin/sh -e
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2019 Intel Corporation
+
+abi_version=$1
+abi_version_file="./ABI_VERSION"
+update_path="lib drivers"
+
+# check ABI version format string
+check_abi_version() {
+ echo $1 | grep -q -e "^[[:digit:]]\{1,2\}\.[[:digit:]]\{1,2\}$"
+}
+
+if [ -z "$1" ]; then
+ # output to stderr
+ >&2 echo "Please provide ABI version"
+ exit 1
+fi
+
+# check version string format
+if ! check_abi_version $abi_version ; then
+ # output to stderr
+ >&2 echo "ABI version must be formatted as MAJOR.MINOR version"
+ exit 1
+fi
+
+if [ -n "$2" ]; then
+ abi_version_file=$2
+fi
+
+if [ -n "$3" ]; then
+ # drop $1 and $2
+ shift 2
+ # assign all other arguments as update paths
+ update_path=$@
+fi
+
+echo "New ABI version:" $abi_version
+echo "ABI_VERSION path:" $abi_version_file
+echo "Path to update:" $update_path
+
+echo $abi_version > $abi_version_file
+
+find $update_path -name \*version.map -exec \
+ ./buildtools/update_version_map_abi.py {} \
+ $abi_version \; -print