wscript: pass version to doxygen
authorPaul Brossier <piem@piem.org>
Sun, 26 Mar 2017 12:30:32 +0000 (14:30 +0200)
committerPaul Brossier <piem@piem.org>
Sun, 26 Mar 2017 12:30:32 +0000 (14:30 +0200)
doc/web.cfg
wscript

index 0adeadd..1a6614f 100644 (file)
@@ -38,7 +38,7 @@ PROJECT_NAME           = aubio
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER         = "0.4.5~alpha"
+PROJECT_NUMBER         = "latest"
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a
diff --git a/wscript b/wscript
index c973457..a8529e1 100644 (file)
--- a/wscript
+++ b/wscript
@@ -441,7 +441,10 @@ def txt2man(bld):
 def doxygen(bld):
     # build documentation from source files using doxygen
     if bld.env['DOXYGEN']:
-        bld( name = 'doxygen', rule = 'doxygen ${SRC} > /dev/null',
+        bld.env.VERSION = VERSION
+        rule = '( cat ${SRC} && echo PROJECT_NUMBER=${VERSION}; )'
+        rule += ' | doxygen - > /dev/null'
+        bld( name = 'doxygen', rule = rule,
                 source = 'doc/web.cfg',
                 target = '../doc/web/html/index.html',
                 cwd = 'doc')