summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-03-20 12:18:53 +1100
committerChris Johns <chrisj@rtems.org>2017-03-20 12:18:53 +1100
commitf97be09dafecd715906b8feaa57b176c8e9606d9 (patch)
tree9d33e77448d840260e0ece7906b751b69ccd3027
parent1accbe31a5358b17731e5245294995a6e97b224f (diff)
downloadrtems-docs-f97be09dafecd715906b8feaa57b176c8e9606d9.tar.bz2
Use a single top level version number.
-rw-r--r--bsp-howto/conf.py9
-rw-r--r--c-user/conf.py9
-rw-r--r--common/conf.py6
-rw-r--r--common/waf.py43
-rw-r--r--cpu-supplement/conf.py11
-rw-r--r--develenv/conf.py9
-rw-r--r--eclipse/conf.py9
-rw-r--r--filesystem/conf.py9
-rw-r--r--networking/conf.py9
-rw-r--r--porting/conf.py10
-rw-r--r--posix-users/conf.py9
-rw-r--r--posix1003-1/conf.py9
-rw-r--r--rsb/conf.py9
-rw-r--r--rtemsconfig/conf.py10
-rw-r--r--shell/conf.py9
-rw-r--r--user/conf.py9
-rw-r--r--wscript5
17 files changed, 108 insertions, 76 deletions
diff --git a/bsp-howto/conf.py b/bsp-howto/conf.py
index 6367d64..721f63f 100644
--- a/bsp-howto/conf.py
+++ b/bsp-howto/conf.py
@@ -3,11 +3,12 @@ sys.path.append(os.path.abspath('../common/'))
from conf import *
-version = '4.11.99'
-release = '4.11.99'
-
project = "RTEMS BSP and Device Driver Development Guide"
latex_documents = [
- ('index', 'bsp-howto.tex', u'RTEMS BSP and Device Driver Development Guide', u'RTEMS Documentation Project', 'manual'),
+ ('index',
+ 'bsp-howto.tex',
+ u'RTEMS BSP and Device Driver Development Guide',
+ u'RTEMS Documentation Project',
+ 'manual'),
]
diff --git a/c-user/conf.py b/c-user/conf.py
index 90a7af7..e2c2791 100644
--- a/c-user/conf.py
+++ b/c-user/conf.py
@@ -3,11 +3,12 @@ sys.path.append(os.path.abspath('../common/'))
from conf import *
-version = '4.11.99'
-release = '4.11.99'
-
project = "RTEMS Classic API Guide"
latex_documents = [
- ('index', 'c-user.tex', u'RTEMS Classic API Guide', u'RTEMS Documentation Project', 'manual'),
+ ('index',
+ 'c-user.tex',
+ u'RTEMS Classic API Guide',
+ u'RTEMS Documentation Project',
+ 'manual'),
]
diff --git a/common/conf.py b/common/conf.py
index 03cfa44..0bb25a9 100644
--- a/common/conf.py
+++ b/common/conf.py
@@ -6,7 +6,7 @@ import datetime
def build_date():
now = datetime.date.today()
- m = now.strftime('%b')
+ m = now.strftime('%B')
y = now.strftime('%Y')
if now.day == 11:
s = 'th'
@@ -58,10 +58,10 @@ copyright = u'2016, RTEMS Project (built %s)' % (build_date())
# built documents.
#
# The short X.Y version.
-version = '@VERSION@'
+#version = '@VERSION@'
# The full version, including alpha/beta/rc tags.
-release = '@RELEASE@'
+#release = '@RELEASE@'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/common/waf.py b/common/waf.py
index a86737b..dbd70df 100644
--- a/common/waf.py
+++ b/common/waf.py
@@ -5,6 +5,22 @@ import latex
sphinx_min_version = (1, 3)
+def build_date():
+ import datetime
+ now = datetime.date.today()
+ m = now.strftime('%B')
+ y = now.strftime('%Y')
+ if now.day % 10 == 1:
+ s = 'st'
+ elif now.day % 10 == 2:
+ s = 'nd'
+ elif now.day == 3:
+ s = 'rd'
+ else:
+ s = 'th'
+ d = '%2d%s' % (now.day, s)
+ return '%s %s %s' % (d, m, y)
+
def cmd_spell(ctx):
from waflib import Options
from sys import argv
@@ -88,6 +104,9 @@ def build_dir_setup(ctx, buildtype):
doctrees = os.path.join(os.path.dirname(output_dir), 'doctrees', buildtype)
return build_dir, output_node, output_dir, doctrees
+def version_cmdline(ctx):
+ return "-Drelease='%s' -Dversion='%s'" % (ctx.env.VERSION, ctx.env.VERSION)
+
def pdf_resources(ctx, buildtype):
packages_base = ctx.path.parent.find_dir('common/latex')
if packages_base is None:
@@ -156,6 +175,8 @@ def check_sphinx_extension(ctx, extension):
def cmd_configure(ctx):
check_sphinx = not ctx.env.BIN_SPHINX_BUILD
if check_sphinx:
+ ctx.msg('Checking version', ctx.env.VERSION)
+
ctx.find_program("sphinx-build", var="BIN_SPHINX_BUILD", mandatory = True)
ctx.find_program("aspell", var = "BIN_ASPELL", mandatory = False)
@@ -211,8 +232,8 @@ def doc_pdf(ctx, source_dir, conf_dir):
buildtype = 'latex'
build_dir, output_node, output_dir, doctrees = build_dir_setup(ctx, buildtype)
pdf_resources(ctx, buildtype)
- rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s -d %s %s %s" % \
- (sphinx_verbose(ctx), buildtype, conf_dir,
+ rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s %s -d %s %s %s" % \
+ (sphinx_verbose(ctx), buildtype, conf_dir, version_cmdline(ctx),
doctrees, source_dir, output_dir)
ctx(
rule = rule,
@@ -263,8 +284,8 @@ def doc_singlehtml(ctx, source_dir, conf_dir):
buildtype = 'singlehtml'
build_dir, output_node, output_dir, doctrees = build_dir_setup(ctx, buildtype)
html_resources(ctx, buildtype)
- rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s -d %s %s %s" % \
- (sphinx_verbose(ctx), buildtype, conf_dir,
+ rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s %s -d %s %s %s" % \
+ (sphinx_verbose(ctx), buildtype, conf_dir, version_cmdline(ctx),
doctrees, source_dir, output_dir)
ctx(
rule = rule,
@@ -285,8 +306,8 @@ def doc_html(ctx, conf_dir, source_dir):
buildtype = 'html'
build_dir, output_node, output_dir, doctrees = build_dir_setup(ctx, buildtype)
html_resources(ctx, buildtype)
- rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s -d %s %s %s" % \
- (sphinx_verbose(ctx), buildtype, conf_dir,
+ rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s %s -d %s %s %s" % \
+ (sphinx_verbose(ctx), buildtype, conf_dir, version_cmdline(ctx),
doctrees, source_dir, output_dir)
ctx(
rule = rule,
@@ -344,7 +365,7 @@ def cmd_configure_path(ctx):
cmd_configure(ctx)
-def xml_catalogue(ctx, building, title):
+def xml_catalogue(ctx, building):
#
# The following is a hack to find the top_dir because the task does
# provided a reference to top_dir like a build context.
@@ -369,8 +390,8 @@ def xml_catalogue(ctx, building, title):
sys.path = sp[:]
catalogue[doc] = {
'title': bconf.project,
- 'version': bconf.version,
- 'release': bconf.release,
+ 'version': str(ctx.env.VERSION),
+ 'release': str(ctx.env.VERSION),
'pdf': bconf.latex_documents[0][1].replace('.tex', '.pdf'),
'html': '%s/index.html' % (doc),
'singlehtml': '%s.html' % (doc)
@@ -381,11 +402,11 @@ def xml_catalogue(ctx, building, title):
cat = xml.Document()
root = cat.createElement('rtems-docs')
- root.setAttribute('date', 'today')
+ root.setAttribute('date', build_date())
cat.appendChild(root)
heading = cat.createElement('catalogue')
- text = cat.createTextNode(title)
+ text = cat.createTextNode(str(ctx.env.VERSION))
heading.appendChild(text)
root.appendChild(heading)
diff --git a/cpu-supplement/conf.py b/cpu-supplement/conf.py
index 8d31fa4..919d84c 100644
--- a/cpu-supplement/conf.py
+++ b/cpu-supplement/conf.py
@@ -3,13 +3,12 @@ sys.path.append(os.path.abspath('../common/'))
from conf import *
-extensions = ['sphinxcontrib.bibtex']
-
-version = '1.0'
-release = '4.11.99'
-
project = "RTEMS CPU Architecture Supplement"
latex_documents = [
- ('index', 'cpu-supplement.tex', u'RTEMS CPU Architecture Supplement', u'RTEMS Documentation Project', 'manual'),
+ ('index',
+ 'cpu-supplement.tex',
+ u'RTEMS CPU Architecture Supplement',
+ u'RTEMS Documentation Project',
+ 'manual'),
]
diff --git a/develenv/conf.py b/develenv/conf.py
index 2a7eb85..8a12a42 100644
--- a/develenv/conf.py
+++ b/develenv/conf.py
@@ -3,9 +3,10 @@ sys.path.append(os.path.abspath('../common/'))
from conf import *
-version = '4.11.99'
-release = '4.11.99'
-
latex_documents = [
- ('index', 'develenv.tex', u'RTEMS Development Environment Guide', u'RTEMS Documentation Project', 'manual'),
+ ('index',
+ 'develenv.tex',
+ u'RTEMS Development Environment Guide',
+ u'RTEMS Documentation Project',
+ 'manual'),
]
diff --git a/eclipse/conf.py b/eclipse/conf.py
index eca832a..63c327f 100644
--- a/eclipse/conf.py
+++ b/eclipse/conf.py
@@ -3,11 +3,12 @@ sys.path.append(os.path.abspath('../common/'))
from conf import *
-version = '4.11.99'
-release = '4.11.99'
-
project = "RTEMS Eclipse Manual"
latex_documents = [
- ('index', 'eclipse.tex', u'RTEMS Eclipse Manual', u'RTEMS Documentation Project', 'manual'),
+ ('index',
+ 'eclipse.tex',
+ u'RTEMS Eclipse Manual',
+ u'RTEMS Documentation Project',
+ 'manual'),
]
diff --git a/filesystem/conf.py b/filesystem/conf.py
index a1db15f..11ff284 100644
--- a/filesystem/conf.py
+++ b/filesystem/conf.py
@@ -3,11 +3,12 @@ sys.path.append(os.path.abspath('../common/'))
from conf import *
-version = '4.11.99'
-release = '4.11.99'
-
project = "RTEMS Filesystem Design Guide"
latex_documents = [
- ('index', 'filesystem.tex', u'RTEMS Filesystem Design Guide', u'RTEMS Filesystem Design Guide', 'manual'),
+ ('index',
+ 'filesystem.tex',
+ u'RTEMS Filesystem Design Guide',
+ u'RTEMS Filesystem Design Guide',
+ 'manual'),
]
diff --git a/networking/conf.py b/networking/conf.py
index 30e78d5..2f1b64e 100644
--- a/networking/conf.py
+++ b/networking/conf.py
@@ -3,11 +3,12 @@ sys.path.append(os.path.abspath('../common/'))
from conf import *
-version = '4.11.99'
-release = '4.11.99'
-
project = "RTEMS Networking User Manual"
latex_documents = [
- ('index', 'networking.tex', u'RTEMS Networking User Manual', u'RTEMS Documentation Project', 'manual'),
+ ('index',
+ 'networking.tex',
+ u'RTEMS Networking User Manual',
+ u'RTEMS Documentation Project',
+ 'manual'),
]
diff --git a/porting/conf.py b/porting/conf.py
index cc4b09c..7d8c421 100644
--- a/porting/conf.py
+++ b/porting/conf.py
@@ -3,10 +3,10 @@ sys.path.append(os.path.abspath('../common/'))
from conf import *
-version = '1.0'
-release = '5.0'
-
latex_documents = [
- ('index', 'porting.tex', u'RTEMS Porting Guide', u'RTEMS Documentation Project', 'manual'),
+ ('index',
+ 'porting.tex',
+ u'RTEMS Porting Guide',
+ u'RTEMS Documentation Project',
+ 'manual'),
]
-
diff --git a/posix-users/conf.py b/posix-users/conf.py
index d4792c0..2086ae9 100644
--- a/posix-users/conf.py
+++ b/posix-users/conf.py
@@ -3,11 +3,12 @@ sys.path.append(os.path.abspath('../common/'))
from conf import *
-version = '4.11.99'
-release = '4.11.99'
-
project = "RTEMS POSIX API Guide"
latex_documents = [
- ('index', 'posix-users.tex', u'RTEMS POSIX API Guide', u'RTEMS Documentation Project', 'manual'),
+ ('index',
+ 'posix-users.tex',
+ u'RTEMS POSIX API Guide',
+ u'RTEMS Documentation Project',
+ 'manual'),
]
diff --git a/posix1003-1/conf.py b/posix1003-1/conf.py
index d8728b6..7773f93 100644
--- a/posix1003-1/conf.py
+++ b/posix1003-1/conf.py
@@ -3,9 +3,10 @@ sys.path.append(os.path.abspath('../common/'))
from conf import *
-version = '1.0'
-release = '5.0'
-
latex_documents = [
- ('index', 'posix1003-1.tex', u'RTEMS POSIX 1003.1 Compliance Guide', u'RTEMS Documentation Project', 'manual'),
+ ('index',
+ 'posix1003-1.tex',
+ u'RTEMS POSIX 1003.1 Compliance Guide',
+ u'RTEMS Documentation Project',
+ 'manual'),
]
diff --git a/rsb/conf.py b/rsb/conf.py
index 4c48bd2..2f3258a 100644
--- a/rsb/conf.py
+++ b/rsb/conf.py
@@ -3,11 +3,12 @@ sys.path.append(os.path.abspath('../common/'))
from conf import *
-version = '4.11.99'
-release = '4.11.99'
-
project = "RTEMS Source Builder"
latex_documents = [
- ('index', 'rsb.tex', u'RTEMS Source Builder', u'RTEMS Documentation Project', 'manual'),
+ ('index',
+ 'rsb.tex',
+ u'RTEMS Source Builder',
+ u'RTEMS Documentation Project',
+ 'manual'),
]
diff --git a/rtemsconfig/conf.py b/rtemsconfig/conf.py
index d9e87bb..bde195e 100644
--- a/rtemsconfig/conf.py
+++ b/rtemsconfig/conf.py
@@ -3,10 +3,10 @@ sys.path.append(os.path.abspath('../common/'))
from conf import *
-version = '1.0'
-release = '5.0'
-
latex_documents = [
- ('index', 'rtemsconfig.tex', u'RTEMS RTEMS Config Documentation', u'RTEMS Documentation Project', 'manual'),
+ ('index',
+ 'rtemsconfig.tex',
+ u'RTEMS RTEMS Config Documentation',
+ u'RTEMS Documentation Project',
+ 'manual'),
]
-
diff --git a/shell/conf.py b/shell/conf.py
index 2b58581..00029bc 100644
--- a/shell/conf.py
+++ b/shell/conf.py
@@ -3,11 +3,12 @@ sys.path.append(os.path.abspath('../common/'))
from conf import *
-version = '4.11.99'
-release = '4.11.99'
-
project = "RTEMS Shell Guide"
latex_documents = [
- ('index', 'shell.tex', u'RTEMS Shell Guide', u'RTEMS Documentation Project', 'manual'),
+ ('index',
+ 'shell.tex',
+ u'RTEMS Shell Guide',
+ u'RTEMS Documentation Project',
+ 'manual'),
]
diff --git a/user/conf.py b/user/conf.py
index 4b34105..a97b81a 100644
--- a/user/conf.py
+++ b/user/conf.py
@@ -3,9 +3,6 @@ sys.path.append(os.path.abspath('../common/'))
from conf import *
-version = '4.11.99'
-release = '4.11.99'
-
project = "RTEMS User Manual"
exclude_patterns = ['config/build.rst',
@@ -40,5 +37,9 @@ exclude_patterns = ['config/build.rst',
'waf/index.rst']
latex_documents = [
- ('index', 'user.tex', u'RTEMS User Manual', u'RTEMS Documentation Project', 'manual'),
+ ('index',
+ 'user.tex',
+ u'RTEMS User Manual',
+ u'RTEMS Documentation Project',
+ 'manual'),
]
diff --git a/wscript b/wscript
index 0373a90..28ebec5 100644
--- a/wscript
+++ b/wscript
@@ -9,7 +9,7 @@ path.append(abspath('common'))
import waflib
import waf as docs_waf
-version = 'Master (4.11.99.1)'
+version = '4.11.99 (master)'
build_all = ['user',
'rsb',
@@ -29,12 +29,13 @@ def options(opt):
docs_waf.cmd_options(opt)
def configure(conf):
+ conf.env.VERSION = version
for b in building:
conf.recurse(b)
conf.env['BUILD_FROM_TOP'] = 'yes'
def catalogue(ctx):
- docs_waf.xml_catalogue(ctx, building, version)
+ docs_waf.xml_catalogue(ctx, building)
def coverpage_js(ctx):
js = None