From fd91cee6a97ee61ec99404681cf7275621ab4dac Mon Sep 17 00:00:00 2001
From: g0dil <g0dil@wiback.org>
Date: Thu, 25 Jan 2007 11:06:35 +0000
Subject: [PATCH] Introduce automatic version stamping in the documentation

---
 Doxyfile                |  2 +-
 Packets/Doxyfile        |  1 -
 SConstruct              | 13 +++++++++++++
 Scheduler/Doxyfile      |  1 -
 Socket/Doxyfile         |  1 -
 Utils/Doxyfile          |  1 -
 doclib/doxy-footer.html |  2 +-
 7 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/Doxyfile b/Doxyfile
index 57cdd8de3..59fb6de13 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -1,5 +1,5 @@
 PROJECT_NAME           = Overview
-PROJECT_NUMBER         = 
+PROJECT_NUMBER         = "(Revision $(REVISION), generated $(TODAY))"
 
 OUTPUT_DIRECTORY       = doc
 INPUT                  = .
diff --git a/Packets/Doxyfile b/Packets/Doxyfile
index ccebd76ad..95d25b4ef 100644
--- a/Packets/Doxyfile
+++ b/Packets/Doxyfile
@@ -1,6 +1,5 @@
 @INCLUDE = ../doclib/Doxyfile.global
 
 PROJECT_NAME = libPackets
-PROJECT_NUMBER = "Version 0.0.1"
 TAGFILES = ../Utils/doc/Utils.tag
 GENERATE_TAGFILE = doc/Packets.tag
\ No newline at end of file
diff --git a/SConstruct b/SConstruct
index ca3fad0ac..2bd5c4533 100644
--- a/SConstruct
+++ b/SConstruct
@@ -16,6 +16,19 @@ env.Append(
    DOXY_XREF_TYPES = [ 'bug', 'fixme', 'todo', 'idea' ],
 )
 
+import datetime
+
+svninfo = dict(
+    [ tuple(map(lambda y:y.strip(),x.split(":",1)))
+      for x in os.popen("svn info").read().split("\n")
+      if ':' in x ] )
+svninfo['commited'] = not(os.popen("svn status").read())
+
+env.Append(
+    ENV = { 'TODAY' : datetime.date.today(),
+            'REVISION' : svninfo['Revision'] + (not(svninfo['commited']) and " + local changes" or "") }
+)
+
 Export('env')
 
 SConscript(glob.glob("*/SConscript"))
diff --git a/Scheduler/Doxyfile b/Scheduler/Doxyfile
index d746d23f5..157f80892 100644
--- a/Scheduler/Doxyfile
+++ b/Scheduler/Doxyfile
@@ -1,6 +1,5 @@
 @INCLUDE = ../doclib/Doxyfile.global
 
 PROJECT_NAME = libScheduler
-PROJECT_NUMBER = "Version 0.0.1"
 TAGFILES = ../Utils/doc/Utils.tag
 GENERATE_TAGFILE = doc/Scheduler.tag
diff --git a/Socket/Doxyfile b/Socket/Doxyfile
index 93f192ff5..1a5a548d4 100644
--- a/Socket/Doxyfile
+++ b/Socket/Doxyfile
@@ -1,7 +1,6 @@
 @INCLUDE = ../doclib/Doxyfile.global
 
 PROJECT_NAME = libSocket
-PROJECT_NUMBER = "Version 0.0.1"
 TAGFILES = ../Utils/doc/Utils.tag
 GENERATE_TAGFILE = doc/Socket.tag
 
diff --git a/Utils/Doxyfile b/Utils/Doxyfile
index 50ae9a932..414df50ba 100644
--- a/Utils/Doxyfile
+++ b/Utils/Doxyfile
@@ -1,5 +1,4 @@
 @INCLUDE = ../doclib/Doxyfile.global
 
 PROJECT_NAME = libUtils
-PROJECT_NUMBER = "Version 0.0.1"
 GENERATE_TAGFILE = doc/Utils.tag
diff --git a/doclib/doxy-footer.html b/doclib/doxy-footer.html
index 30cccfb8c..dd3d9bc55 100644
--- a/doclib/doxy-footer.html
+++ b/doclib/doxy-footer.html
@@ -4,7 +4,7 @@
 <div id="footer">
   <span>
     <a href="mailto:senf-dev@lists.berlios.de">Contact: senf-dev@lists.berlios.de</a> |
-    Copyright &copy; 2006 Fraunhofer Gesellschft, SatCom, Stefan Bund
+    Copyright &copy; 2006 Fraunhofer Gesellschaft, SatCom, Stefan Bund
   </span>
 </div>
 </body></html>
-- 
GitLab