[sapwood] use a header file for the path definition



commit f827f348c640d280394b4309bf0954ad91ba7655
Author: Sven Herzberg <herzi gnome-de org>
Date:   Tue Jun 22 10:59:18 2010 +0200

    use a header file for the path definition
    
    * engine/.gitignore: ignore the generated file
    * engine/Makefile.am: update the build rules (this way we get everything
      properly rebuilt when someone re-runs configure)
    * engine/sapwood-client.c: include the new header file instead of
      relying on define from the command line

 engine/.gitignore       |    1 +
 engine/Makefile.am      |   13 +++++++++++--
 engine/sapwood-client.c |    5 ++---
 3 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/engine/.gitignore b/engine/.gitignore
new file mode 100644
index 0000000..50f748d
--- /dev/null
+++ b/engine/.gitignore
@@ -0,0 +1 @@
+sapwood-paths.h
diff --git a/engine/Makefile.am b/engine/Makefile.am
index 3243621..a95deee 100644
--- a/engine/Makefile.am
+++ b/engine/Makefile.am
@@ -1,7 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
 INCLUDES = $(GTK_CFLAGS) \
-	   -DSAPWOOD_SERVER=\"$(daemondir)/sapwood-server\" \
 	   -I$(top_srcdir)/protocol
 
 engine_LTLIBRARIES=libsapwood.la
@@ -19,6 +18,9 @@ libsapwood_la_SOURCES=\
 	sapwood-pixmap.h \
 	sapwood-pixmap-priv.h \
 	$(NULL)
+nodist_libsapwood_la_SOURCES=\
+	sapwood-paths.h \
+	$(NULL)
 
 libsapwood_client_la_SOURCES=\
 	sapwood-client.c \
@@ -35,8 +37,15 @@ libsapwood_client_la_LIBADD=\
 	$(top_builddir)/protocol/libprotocol.la \
 	$(NULL)
 
+sapwood-paths.h: Makefile
+	$(AM_V_GEN) echo "#define SAPWOOD_SERVER \"$(daemondir)/sapwood-server\"" > $@
+
+BUILT_SOURCES=\
+	$(nodist_libsapwood_la_SOURCES) \
+	$(NULL)
+
 MAINTAINERCLEANFILES = Makefile.in
-CLEANFILES = actual-abi actual-abi2 expected-abi expected-abi2 optional-abi
+CLEANFILES = actual-abi actual-abi2 expected-abi expected-abi2 optional-abi $(BUILT_SOURCES)
 
 EXTRA_DIST+=abicheck.sh
 
diff --git a/engine/sapwood-client.c b/engine/sapwood-client.c
index a9df1a9..16ce413 100644
--- a/engine/sapwood-client.c
+++ b/engine/sapwood-client.c
@@ -1,9 +1,7 @@
 /* This file is part of GTK+ Sapwood Engine
  *
- * AUTHORS
- *     Sven Herzberg
- *
  * Copyright (C) 2008  Nokia Corporation
+ * Copyright (C) 2010  Sven Herzberg
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License as
@@ -32,6 +30,7 @@
 #include <unistd.h>
 
 #include "sapwood-client.h"
+#include "sapwood-paths.h"
 
 GQuark
 sapwood_client_get_error_quark (void)



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