When executing para_client or para_audioc from para_mixer or para_gui
we currently pass an absolute path whose directory part is BINDIR
to execvp(2). This is unnecessary because execvp(2) honors $PATH.
This commit modifies gui.c and mixer.c to pass only the basename of
the executable instead, allowing us to remove the BINDIR preprocessor
define. We still need the bindir make variable, though, because it
is referenced in the recipe of the two install targets.
$(yy_build_dir):
@$(MKDIR_P) $@
-CPPFLAGS += -DBINDIR='"$(bindir)"'
CPPFLAGS += -DCOPYRIGHT_YEAR='"$(COPYRIGHT_YEAR)"'
CPPFLAGS += -DBUILD_DATE='"$(build_date)"'
CPPFLAGS += -DLOGLEVELS='$(LOGLEVELS)'
static void exec_para(const char *args)
{
- char *file_and_args;
-
- file_and_args = make_message(BINDIR "/para_client -- %s", args);
+ char *file_and_args = make_message("para_client -- %s", args);
exec_and_display(file_and_args);
free(file_and_args);
}
static void client_cmd(const char *cmd)
{
- run(BINDIR "/para_client", cmd);
+ run("para_client", cmd);
}
static void audioc_cmd(const char *cmd)
{
- run(BINDIR "/para_audioc", cmd);
+ run("para_audioc", cmd);
}
static void change_afs_mode(const char *afs_mode)