From: Andre Noll Date: Wed, 1 Jan 2025 20:39:34 +0000 (+0100) Subject: Kill BINDIR. X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=f4aa774c4b15e237b2832e2fe196cbb311b9843e;p=paraslash.git Kill BINDIR. 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. --- diff --git a/Makefile.real b/Makefile.real index 19f4c232..a5492d66 100644 --- a/Makefile.real +++ b/Makefile.real @@ -357,7 +357,6 @@ $(object_dir) $(man_dir) $(dep_dir) $(m4depdir) $(lls_suite_dir) \ $(yy_build_dir): @$(MKDIR_P) $@ -CPPFLAGS += -DBINDIR='"$(bindir)"' CPPFLAGS += -DCOPYRIGHT_YEAR='"$(COPYRIGHT_YEAR)"' CPPFLAGS += -DBUILD_DATE='"$(build_date)"' CPPFLAGS += -DLOGLEVELS='$(LOGLEVELS)' diff --git a/gui.c b/gui.c index 2ad8ae46..feb65c0f 100644 --- a/gui.c +++ b/gui.c @@ -1027,9 +1027,7 @@ fail: 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); } diff --git a/mixer.c b/mixer.c index dda7fc1d..787a7257 100644 --- a/mixer.c +++ b/mixer.c @@ -217,12 +217,12 @@ fail: 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)