[gnome-logs] Substitute bindir in Makefile.am



commit 0395cd3cbdbd13098d4abfc7d250a2c408d73020
Author: David King <davidk gnome org>
Date:   Sat Nov 8 09:50:07 2014 +0000

    Substitute bindir in Makefile.am
    
    Rather than substituting the value of bindir during configure, which
    might include an unexpanded shell variable, expand and substitute it as
    a target in Makefile.am instead.

 Makefile.am  |    8 +++++++-
 configure.ac |    2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 51ede28..45d3c47 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -80,8 +80,12 @@ desktop_in_files = data/org.gnome.Logs.desktop.in
 $(desktop_in_files:.desktop.in=.desktop): data/.dstamp
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
+data/org.gnome.Logs.service: data/org.gnome.Logs.service.in
+       $(AM_V_GEN)$(SED) -e "s|[ ]bindir[@]|$(bindir)|" $< > $@
+
 servicedir = $(datadir)/dbus-1/services
-service_DATA = data/org.gnome.Logs.service
+service_in_files = data/org.gnome.Logs.service.in
+service_DATA = $(service_in_files:.service.in=.service)
 
 if ENABLE_MAN
 data/gnome-logs.1: data/gnome-logs.xml
@@ -190,6 +194,7 @@ dist_noinst_DATA = \
        $(noinst_resource_files) \
        $(appstream_in_files) \
        $(desktop_in_files) \
+       $(service_in_files) \
        data/org.gnome.Logs.gresource.xml \
        data/gnome-logs.xml \
        data/icons/gnome-logs.svg
@@ -216,6 +221,7 @@ CLEANFILES = \
        $(desktop_DATA) \
        $(enum_data) \
        $(nodist_man_MANS) \
+       $(service_DATA) \
        src/gl-resource.c \
        src/gl-resource.h \
        test-desktop-file-validate.sh
diff --git a/configure.ac b/configure.ac
index ad08237..aafb008 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,7 @@ AM_SILENT_RULES([yes])
 dnl Check for programs
 AC_PROG_CC
 AM_PROG_CC_C_O
+AC_PROG_SED
 
 GNOME_COMPILE_WARNINGS([maximum])
 
@@ -93,7 +94,6 @@ SYSTEMD_JOURNAL_REQUIRED="libsystemd-journal"
 PKG_CHECK_MODULES([LOGS], [$GIO_REQUIRED $GTK_REQUIRED $SYSTEMD_JOURNAL_REQUIRED])
 
 AC_CONFIG_FILES([
-data/org.gnome.Logs.service
 data/version.xml
 help/Makefile
 Makefile


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