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 | |
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')
-rw-r--r-- | platform/linux-generic/Makefile.am | 4 | ||||
-rw-r--r-- | platform/linux-generic/m4/odp_libconfig.m4 | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 2986e08e8..35233eabe 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -17,7 +17,7 @@ AM_CFLAGS += $(DPDK_CFLAGS) AM_CFLAGS += $(LIBCONFIG_CFLAGS) DISTCLEANFILES = include/odp_libconfig_config.h -include/odp_libconfig_config.h: $(top_srcdir)/config/odp-$(with_platform).conf $(top_builddir)/config.status +include/odp_libconfig_config.h: $(top_builddir)/$(rel_default_config_path) $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ odpapiabiarchincludedir = $(archincludedir)/odp/api/abi @@ -148,7 +148,7 @@ noinst_HEADERS = \ include/protocols/tcp.h \ include/protocols/thash.h \ include/protocols/udp.h -nodist_noinst_HEADERS = \ +BUILT_SOURCES = \ include/odp_libconfig_config.h __LIB__libodp_linux_la_SOURCES = \ 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]) |