[gimp] app, tools: install the debug tools in libexec when appropriate.



commit b318694bb2e0555edf7b3232183dec6a10f7e66f
Author: Jehan <jehan girinstud io>
Date:   Sun Jan 28 15:12:10 2018 +0100

    app, tools: install the debug tools in libexec when appropriate.
    
    AFAIK this means on all platforms but Win32 and macOS which would rather
    need relative path and therefore cannot make use of build-time
    LIBEXECDIR. Anyway on these platforms, leaving the binary in BINDIR is
    not likely to "pollute" too much as it would on Linux or BSD where
    people often use terminal.

 app/Makefile.am   |    1 +
 app/errors.c      |    4 +++-
 tools/Makefile.am |   10 +++++++---
 3 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/app/Makefile.am b/app/Makefile.am
index 6fa7c51..a6738ce 100644
--- a/app/Makefile.am
+++ b/app/Makefile.am
@@ -112,6 +112,7 @@ endif
 
 AM_CPPFLAGS = \
        -DGIMPDIR=\""$(gimpdir)"\"                              \
+       -DLIBEXECDIR=\""$(libexecdir)"\"                        \
        -DGIMP_USER_VERSION=\"$(GIMP_USER_VERSION)\"            \
        -DG_LOG_DOMAIN=\"Gimp\"         \
        -DGIMP_APP_GLUE_COMPILATION     \
diff --git a/app/errors.c b/app/errors.c
index f4c0549..d1b68de 100644
--- a/app/errors.c
+++ b/app/errors.c
@@ -289,8 +289,10 @@ gimp_eek (const gchar *reason,
            */
 #ifdef G_OS_WIN32
           const gchar *gimpdebug = "gimpdebug-2.0.exe";
-#else
+#elif defined (PLATFORM_OSX)
           const gchar *gimpdebug = "gimpdebug-2.0";
+#else
+          const gchar *gimpdebug = LIBEXECDIR "/gimpdebug-2.0";
 #endif
           gchar *args[7] = { (gchar *) gimpdebug, full_prog_name, NULL,
                              (gchar *) reason, (gchar *) message,
diff --git a/tools/Makefile.am b/tools/Makefile.am
index ca1a62c..9f14a05 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -15,9 +15,13 @@ gimp_debug_resume_SOURCES = gimp-debug-resume.c
 
 else
 
-bin_PROGRAMS = \
-              gimptool-2.0 \
-              gimpdebug-2.0
+bin_PROGRAMS = gimptool-2.0
+
+if PLATFORM_OSX
+bin_PROGRAMS += gimpdebug-2.0
+else
+libexec_PROGRAMS = gimpdebug-2.0
+endif
 
 endif
 


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