[beast: 8/9] LAUNCHERS: beast: match exact version number of spawned beast executable



commit d436f90dc7a4ee0ce6c8486c0eef16b8db594e03
Author: Tim Janik <timj gnu org>
Date:   Wed Oct 28 13:39:22 2015 +0100

    LAUNCHERS: beast: match exact version number of spawned beast executable
    
    Signed-off-by: Tim Janik <timj gnu org>

 beast-gtk/Makefile.am  |    8 ++++----
 configure.ac           |    2 +-
 launchers/beaststart.c |    9 ++++-----
 3 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/beast-gtk/Makefile.am b/beast-gtk/Makefile.am
index 63ebf81..28f9110 100644
--- a/beast-gtk/Makefile.am
+++ b/beast-gtk/Makefile.am
@@ -133,10 +133,10 @@ generated: clean-generated $(GENERATED)
 #
 # build rules for programs
 #
-bin_PROGRAMS = beast- MAJOR@
-beast_ MAJOR@_SOURCES = $(bst_cc_sources) bstmain.cc
-beast_ MAJOR@_LDADD = $(progs_LDADD)
-beast_build_objects = $(beast_ MAJOR@_OBJECTS) # dependency for generated sources
+bin_PROGRAMS = beast- MAJOR@  MINOR@  MICRO@
+beast_ MAJOR@_ MINOR@_ MICRO@_SOURCES = $(bst_cc_sources) bstmain.cc
+beast_ MAJOR@_ MINOR@_ MICRO@_LDADD = $(progs_LDADD)
+beast_build_objects = $(beast_ MAJOR@_ MINOR@_ MICRO@_OBJECTS) # dependency for generated sources
 noinst_PROGRAMS = $(ALLTESTS)
 progs_LDADD     = $(BEAST_LIBS) ./gxk/libgxk.a $(GXK_LIBS) $(top_builddir)/bse/libbse- MAJOR@.la 
$(RAPICORN_LIBS) $(BSE_LIBS)
 
diff --git a/configure.ac b/configure.ac
index f0e4d62..ee6fa50 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,7 +38,7 @@ AC_DEFINE_UNQUOTED(BST_VERSION_HINT, "$BST_VERSION_HINT", [Version classificatio
 AC_DEFINE_UNQUOTED(BSE_MAJOR_VERSION, $MAJOR, [Beast/Bse Major Version])
 AC_DEFINE_UNQUOTED(BSE_MINOR_VERSION, $MINOR, [Beast/Bse Minor Version])
 AC_DEFINE_UNQUOTED(BSE_MICRO_VERSION, $MICRO, [Beast/Bse Micro Version])
-AC_DEFINE_UNQUOTED(BSE_MAJOR_VERSION_STR, "$MAJOR", [Beast/Bse Major Version as String])
+AC_DEFINE_UNQUOTED(BEAST_EXEC_POSTFIX, "-$MAJOR.$MINOR.$MICRO", [Beast executable postfix])
 # For automake, we need to easily provide MAJOR.MINOR.MICRO and MAJOR_MINOR_MICRO:
 AC_SUBST(MAJOR)
 AC_SUBST(MINOR)
diff --git a/launchers/beaststart.c b/launchers/beaststart.c
index 09093f9..43cebd6 100644
--- a/launchers/beaststart.c
+++ b/launchers/beaststart.c
@@ -1,6 +1,6 @@
 // CC0 Public Domain: http://creativecommons.org/publicdomain/zero/1.0/
 #include "suidmain.h"
-#include "../configure.h"       // BIN_VERSION
+#include "../configure.h" // BEAST_EXEC_POSTFIX
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -11,8 +11,8 @@ custom_find_executable (int    *argc_p,
 {
   const char *bindir = BINDIR;
   const char *name = "beast";
-  const char *version = BSE_MAJOR_VERSION_STR;
-  int l = 1 + strlen (bindir) + 1 + strlen (name) + 1 + strlen (version);
+  const char *postfix = BEAST_EXEC_POSTFIX;
+  int l = 1 + strlen (bindir) + 1 + strlen (name) + strlen (postfix);
   char *string = malloc (l);
   if (!string)
     {
@@ -23,8 +23,7 @@ custom_find_executable (int    *argc_p,
   strcat (string, bindir);
   strcat (string, "/");
   strcat (string, name);
-  strcat (string, "-");
-  strcat (string, version);
+  strcat (string, postfix);
   return string;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]