[libcryptui] Better build of .service files



commit 6ba7510ab1d2390bb4f7d5bfca41394bfdbc5a2a
Author: Stef Walter <stefw gnome org>
Date:   Fri Mar 30 14:40:15 2012 +0200

    Better build of .service files

 Makefile.decl      |   29 +++++++++++++++++++++++++++++
 daemon/Makefile.am |    5 +----
 2 files changed, 30 insertions(+), 4 deletions(-)
---
diff --git a/Makefile.decl b/Makefile.decl
new file mode 100644
index 0000000..40ff52e
--- /dev/null
+++ b/Makefile.decl
@@ -0,0 +1,29 @@
+NULL =
+
+V_SED = $(V_SED_$(V))
+V_SED_ = $(V_SED_$(AM_DEFAULT_VERBOSITY))
+V_SED_0 = @echo "  SED  " $@;
+
+SED_SUBST = sed \
+	-e 's,[ ]datadir[@],$(datadir),g' \
+	-e 's,[ ]libexecdir[@],$(libexecdir),g' \
+	-e 's,[ ]libdir[@],$(libdir),g' \
+	-e 's,[ ]includedir[@],$(includedir),g' \
+	-e 's,[ ]datarootdir[@],$(datarootdir),g' \
+	-e 's,[ ]sysconfdir[@],$(sysconfdir),g' \
+	-e 's,[ ]bindir[@],$(bindir),g' \
+	-e 's,[ ]exec_prefix[@],$(exec_prefix),g' \
+	-e 's,[ ]prefix[@],$(prefix),g' \
+	-e 's,[ ]PACKAGE[@],$(PACKAGE),g' \
+	-e 's,[ ]VERSION[@],$(VERSION),g' \
+	$(NULL)
+
+.desktop.in.in.desktop.in:
+	$(V_SED) $(SED_SUBST) $< > $@
+
+ INTLTOOL_DESKTOP_RULE@
+
+.service.in.service:
+	$(V_SED) $(SED_SUBST) $< > $@
+
+SUFFIXES = .desktop.in .desktop.in.in .service .service.in
\ No newline at end of file
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 6198091..dd8b32e 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -1,3 +1,4 @@
+include $(top_srcdir)/Makefile.decl
 
 localedir = $(datadir)/locale
 pixmapsdir = $(datadir)/pixmaps/cryptui/
@@ -108,10 +109,6 @@ servicedir = $(datadir)/dbus-1/services/
 service_in_files = org.gnome.seahorse.service.in
 service_DATA = $(service_in_files:.service.in=.service)
 
-# Rule to make the service file with bindir expanded
-$(service_DATA): $(service_in_files) Makefile
-	@sed -e "s|\ bindir\@|$(bindir)|" $< > $@
-
 seahorse-marshal.h: seahorse-marshal.list $(GLIB_GENMARSHAL)
 	$(GLIB_GENMARSHAL) $< --header --prefix=seahorse_marshal > $@
 



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