diff options
author | Matias Elo <matias.elo@nokia.com> | 2020-05-15 12:01:51 +0300 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2020-05-20 12:32:08 +0300 |
commit | 3d01102efad32a54bdd0ea8e2c69da09ebf08766 (patch) | |
tree | 7c3f2af676449019d74e3bd9b8e7d7bdd5224c02 /m4 | |
parent | e55e03b6595bb516c122b3d0865d4b2162d835fa (diff) |
linux-gen: verify default configuration file version
Compare configuration file version to the version defined in m4 file.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/odp_libconfig.m4 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/m4/odp_libconfig.m4 b/m4/odp_libconfig.m4 index d25a41422..29cc8c85b 100644 --- a/m4/odp_libconfig.m4 +++ b/m4/odp_libconfig.m4 @@ -20,6 +20,12 @@ AS_IF([test -z "$OD"], [AC_MSG_ERROR([Could not find 'od'])]) AS_IF([test -z "$2"] || [test ! -f $2], [AC_MSG_ERROR([Default configuration file not found])], []) +conf_ver=$_ODP_CONFIG_VERSION_GENERATION.$_ODP_CONFIG_VERSION_MAJOR.$_ODP_CONFIG_VERSION_MINOR +file_ver=`$SED 's/ //g' $2 | $GREP -oP '(?<=config_file_version=").*?(?=")'` + +AS_IF([test "x$conf_ver" = "x$file_ver"], [], + [AC_MSG_ERROR([Configuration file version mismatch (_ODP_CONFIG_VERSION=$conf_ver config_file_version=$file_ver)])]) + odp_use_config=true ########################################################################## # Create a header file odp_libconfig_config.h which containins null |