From d00bfe9410cfcaeb247ba68a88144defb5184ac9 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Tue, 30 Apr 2019 22:18:08 +0200 Subject: Allow to tune installation directories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The location of intrinsic bindings and samples could not be tuned but was fixed to be ${CMAKE_INSTALL_FULL_LIBDIR}/afb and ${CMAKE_INSTALL_FULL_DATADIR}/af-binder These default locations are not bad but it is important to be able to tune that location. Bug-AGL: SPEC-2367 Change-Id: I4d4f9e9490d61e3278ef35ac42f2143a752a7c37 Signed-off-by: José Bollo --- src/afb-args.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/afb-args.c') diff --git a/src/afb-args.c b/src/afb-args.c index af3cfcab..ed14a731 100644 --- a/src/afb-args.c +++ b/src/afb-args.c @@ -38,9 +38,6 @@ #define _d2s_(x) #x #define d2s(x) _d2s_(x) -#if !defined(BINDING_INSTALL_DIR) -#error "you should define BINDING_INSTALL_DIR" -#endif #if !defined(AFB_VERSION) #error "you should define AFB_VERSION" #endif @@ -176,7 +173,12 @@ static struct option_desc optdefs[] = { {SET_ROOT_DIR, 1, "rootdir", "Root Directory of the application [default: workdir] relative to workdir"}, #if WITH_DYNAMIC_BINDING - {ADD_LDPATH, 1, "ldpaths", "Load bindings from dir1:dir2:... [default = " BINDING_INSTALL_DIR "]"}, + + {ADD_LDPATH, 1, "ldpaths", "Load bindings from dir1:dir2:..." +#if defined(INTRINSIC_BINDING_DIR) + "[default = " INTRINSIC_BINDING_DIR "]" +#endif + }, {ADD_BINDING, 1, "binding", "Load the binding of path"}, {ADD_WEAK_LDPATH, 1, "weak-ldpaths","Same as --ldpaths but ignore errors"}, {SET_NO_LDPATH, 0, "no-ldpaths", "Discard default ldpaths loading"}, @@ -232,7 +234,7 @@ static struct option_desc optdefs[] = { }; #if defined(WITH_MONITORING_OPTION) -static const char MONITORING_ALIAS[] = "/monitoring:"BINDING_INSTALL_DIR"/monitoring"; +static const char MONITORING_ALIAS[] = "/monitoring:"INTRINSIC_BINDING_DIR"/monitoring"; #endif static const struct { @@ -995,9 +997,9 @@ static void fulfill_config(struct json_object *config) if (config_has_bool(config, SET_RANDOM_TOKEN)) config_del(config, SET_TOKEN); -#if WITH_DYNAMIC_BINDING +#if WITH_DYNAMIC_BINDING && defined(INTRINSIC_BINDING_DIR) if (!config_has(config, ADD_LDPATH) && !config_has(config, ADD_WEAK_LDPATH) && !config_has_bool(config, SET_NO_LDPATH)) - config_add_str(config, ADD_LDPATH, BINDING_INSTALL_DIR); + config_add_str(config, ADD_LDPATH, INTRINSIC_BINDING_DIR); #endif #if defined(WITH_MONITORING_OPTION) -- cgit 1.2.3-korg