[gnome-session] build-goo: generate shell script wrapper in different way



commit bd446274e638754c947702d2ee06f704c4a075b3
Author: Ray Strode <rstrode redhat com>
Date:   Thu Oct 15 08:40:51 2015 -0400

    build-goo: generate shell script wrapper in different way
    
    Using configure to generate the wrapper doesn't work unless
    we switch to AS_AC_EXPAND or something since the libexecdir
    won't fully expand to an absolute path by default.
    
    This commit drops the idea of using configure to generate
    the wrapper and instead falls back to good old sed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756633

 configure.ac              |    1 -
 gnome-session/Makefile.am |    9 ++++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f33e7fb..c5d4103 100644
--- a/configure.ac
+++ b/configure.ac
@@ -380,7 +380,6 @@ data/icons/48x48/Makefile
 data/icons/scalable/Makefile
 data/icons/symbolic/Makefile
 gnome-session/Makefile
-gnome-session/gnome-session
 tools/Makefile
 po/Makefile.in
 ])
diff --git a/gnome-session/Makefile.am b/gnome-session/Makefile.am
index fb53631..e2f81cc 100644
--- a/gnome-session/Makefile.am
+++ b/gnome-session/Makefile.am
@@ -1,4 +1,4 @@
-EXTRA_DIST =
+EXTRA_DIST = gnome-session.in
 NULL =
 bin_SCRIPTS = gnome-session
 libexec_PROGRAMS = gnome-session-binary gnome-session-failed
@@ -16,6 +16,11 @@ AM_CPPFLAGS =                                        \
 
 AM_CFLAGS = $(WARN_CFLAGS)
 
+gnome-session: gnome-session.in Makefile
+       $(AM_V_GEN) sed \
+               -e "s|\ libexecdir\@|$(libexecdir)|" \
+                $< > $  tmp && mv $  tmp $@
+
 gnome_session_binary_SOURCES =                 \
        $(BUILT_SOURCES)                        \
        gsm-app.h                               \
@@ -211,6 +216,8 @@ EXTRA_DIST +=                                               \
        org.gnome.SessionManager.Presence.xml
 
 CLEANFILES =   \
+       gnome-session \
+       gnome-session.tmp \
        $(BUILT_SOURCES)
 
 -include $(top_srcdir)/git.mk


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