Index: trunk/ppStack/src/Makefile.am
===================================================================
--- trunk/ppStack/src/Makefile.am	(revision 23212)
+++ trunk/ppStack/src/Makefile.am	(revision 23229)
@@ -1,14 +1,14 @@
 bin_PROGRAMS = ppStack
 
-PPSTACK_VERSION=`if [ -e ../../VERSION ]; then cat ../../VERSION; else svnversion; fi`
-PPSTACK_BRANCH=`if [ -e ../../BRANCH ]; then cat ../../BRANCH; else svn info | sed -n -e '/URL:/ h' -e '/Repository Root:/ { x; H; x; s|Repository Root: \(.*\)\nURL: \1\(.*\)|\2| ; s|^/|| ; s|/[a-zA-Z]*/src.*|| ; p }'; fi`
-PPSTACK_SOURCE=`if [ -e ../../SOURCE ]; then cat ../../SOURCE; else svn info | sed -n -e 's/Repository UUID: // p'; fi`
+# PPSTACK_VERSION=`if [ -e ../../VERSION ]; then cat ../../VERSION; else svnversion; fi`
+# PPSTACK_BRANCH=`if [ -e ../../BRANCH ]; then cat ../../BRANCH; else svn info | sed -n -e '/URL:/ h' -e '/Repository Root:/ { x; H; x; s|Repository Root: \(.*\)\nURL: \1\(.*\)|\2| ; s|^/|| ; s|/[a-zA-Z]*/src.*|| ; p }'; fi`
+# PPSTACK_SOURCE=`if [ -e ../../SOURCE ]; then cat ../../SOURCE; else svn info | sed -n -e 's/Repository UUID: // p'; fi`
+# 
+# # Force recompilation of ppStackVersion.c, since it gets the version information
+# ppStackVersion.c: FORCE
+# 	touch ppStackVersion.c
+# FORCE: ;
 
-# Force recompilation of ppStackVersion.c, since it gets the version information
-ppStackVersion.c: FORCE
-	touch ppStackVersion.c
-FORCE: ;
-
-ppStack_CFLAGS 	= $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSPHOT_CFLAGS) $(PPSTATS_CFLAGS) $(PPSTACK_CFLAGS) -DPPSTACK_VERSION=\"$(PPSTACK_VERSION)\" -DPPSTACK_BRANCH=\"$(PPSTACK_BRANCH)\" -DPPSTACK_SOURCE=\"$(PPSTACK_SOURCE)\"
+ppStack_CFLAGS 	= $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSPHOT_CFLAGS) $(PPSTATS_CFLAGS) $(PPSTACK_CFLAGS) -DPPSTACK_VERSION=$(SVN_VERSION) -DPPSTACK_BRANCH=$(SVN_BRANCH) -DPPSTACK_SOURCE=$(SVN_SOURCE)
 ppStack_LDFLAGS = $(PSLIB_LIBS)   $(PSMODULE_LIBS)   $(PSPHOT_LIBS)   $(PPSTATS_LIBS)   $(PPSTACK_LIBS)
 
Index: trunk/ppStack/src/ppStackVersion.c
===================================================================
--- trunk/ppStack/src/ppStackVersion.c	(revision 23212)
+++ trunk/ppStack/src/ppStackVersion.c	(revision 23229)
@@ -11,6 +11,4 @@
 #include "ppStack.h"
 
-psString ppStackVersion(void)
-{
 #ifndef PPSTACK_VERSION
 #error "PPSTACK_VERSION is not set"
@@ -19,13 +17,21 @@
 #error "PPSTACK_BRANCH is not set"
 #endif
-    return psStringCopy(PPSTACK_BRANCH "@" PPSTACK_VERSION);
+#ifndef PPSTACK_SOURCE
+#error "PPSTACK_SOURCE is not set"
+#endif
+
+#define xstr(s) str(s)
+#define str(s) #s
+
+psString ppStackVersion(void)
+{
+    char *value = NULL;
+    psStringAppend(&value, "%s@%s", xstr(PPSTACK_BRANCH), xstr(PPSTACK_VERSION));
+    return value;
 }
 
 psString ppStackSource(void)
 {
-#ifndef PPSTACK_SOURCE
-#error "PPSTACK_SOURCE is not set"
-#endif
-    return psStringCopy(PPSTACK_SOURCE);
+    return psStringCopy(xstr(PPSTACK_SOURCE));
 }
 
