diff options
author | Thomas Pansiot <thomas.pansiot@nokia.com> | 2020-06-04 12:15:09 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2020-06-10 08:12:38 +0300 |
commit | 065e4d728ffb4f11d2510ade23559da6abc746dd (patch) | |
tree | 18e2ddec6bed23897bbdec10019a257731fe019a /platform/linux-generic/m4 | |
parent | 7c984fc96d20b76c2734a540e79d827665076fa1 (diff) |
linux-gen: use provided conf file for install and rebuild
When providing a conf file with "--with-config-file",
- In case of change in this file, rebuild was not doing anything
- In case of change in generic conf file, rebuild was using
generic conf file instead of provided one to regenerate / rebuild
- Generic conf file was installed
Signed-off-by: Thomas Pansiot <thomas.pansiot@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'platform/linux-generic/m4')
-rw-r--r-- | platform/linux-generic/m4/odp_libconfig.m4 | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/platform/linux-generic/m4/odp_libconfig.m4 b/platform/linux-generic/m4/odp_libconfig.m4 index f042d65d7..d13fcf274 100644 --- a/platform/linux-generic/m4/odp_libconfig.m4 +++ b/platform/linux-generic/m4/odp_libconfig.m4 @@ -20,9 +20,16 @@ AC_SUBST(_ODP_CONFIG_VERSION_MINOR) ########################################################################## default_config_path="${srcdir}/config/odp-$with_platform.conf" +AC_CHECK_PROGS([REALPATH], [realpath]) +AS_IF([test -z "$REALPATH"], [AC_MSG_ERROR([Could not find 'realpath'])]) + AC_ARG_WITH([config-file], AS_HELP_STRING([--with-config-file=FILE path to the default configuration file], [(this file must include all configuration options).]), [default_config_path=$withval], []) -ODP_LIBCONFIG([$with_platform], [$default_config_path]) +rel_default_config_path=`realpath --relative-to=$(pwd) ${default_config_path}` +AC_SUBST(default_config_path) +AC_SUBST(rel_default_config_path) + +ODP_LIBCONFIG([$with_platform], [$rel_default_config_path]) |