summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--book/conf.py4
-rw-r--r--bsp_howto/conf.py4
-rw-r--r--bsp_howto/wscript7
-rw-r--r--c_user/conf.py12
-rw-r--r--c_user/wscript7
-rw-r--r--common/conf.py2
-rw-r--r--common/rtemsstyle.sty (renamed from common/rtems.sty)0
-rw-r--r--common/waf.py63
-rw-r--r--cpu_supplement/conf.py4
-rw-r--r--cpu_supplement/wscript7
-rw-r--r--develenv/conf.py4
-rw-r--r--develenv/wscript7
-rw-r--r--filesystem/conf.py4
-rw-r--r--filesystem/wscript7
-rw-r--r--networking/conf.py4
-rw-r--r--networking/wscript7
-rw-r--r--porting/conf.py4
-rw-r--r--porting/wscript7
-rw-r--r--posix1003_1/conf.py4
-rw-r--r--posix1003_1/wscript7
-rw-r--r--posix_users/conf.py4
-rw-r--r--posix_users/wscript7
-rw-r--r--rtemsconfig/conf.py4
-rw-r--r--shell/conf.py4
-rw-r--r--shell/wscript7
-rw-r--r--user/conf.py4
-rw-r--r--user/wscript7
27 files changed, 119 insertions, 83 deletions
diff --git a/book/conf.py b/book/conf.py
index 5e042a7..4726f1e 100644
--- a/book/conf.py
+++ b/book/conf.py
@@ -6,3 +6,7 @@ from conf import *
version = '1.0'
release = '5.0'
+latex_documents = [
+ ('index', 'book.tex', u'RTEMS Book', u'RTEMS Documentation Project', 'manual'),
+]
+
diff --git a/bsp_howto/conf.py b/bsp_howto/conf.py
index 5e042a7..722d2f5 100644
--- a/bsp_howto/conf.py
+++ b/bsp_howto/conf.py
@@ -6,3 +6,7 @@ from conf import *
version = '1.0'
release = '5.0'
+latex_documents = [
+ ('index', 'bsp_howto.tex', u'RTEMS BSP Howto Documentation', u'RTEMS Documentation Project', 'manual'),
+]
+
diff --git a/bsp_howto/wscript b/bsp_howto/wscript
index 0565c4b..8d66b28 100644
--- a/bsp_howto/wscript
+++ b/bsp_howto/wscript
@@ -2,10 +2,5 @@ from sys import path
from os.path import abspath
path.append(abspath('../common/'))
-from waf import cmd_configure, cmd_build, spell, cmd_spell
+from waf import cmd_configure as configure, cmd_build as build, spell, cmd_spell, cmd_options as options
-def configure(ctx):
- cmd_configure(ctx)
-
-def build(ctx):
- cmd_build(ctx)
diff --git a/c_user/conf.py b/c_user/conf.py
new file mode 100644
index 0000000..7956468
--- /dev/null
+++ b/c_user/conf.py
@@ -0,0 +1,12 @@
+import sys, os
+sys.path.append(os.path.abspath('../common/'))
+
+from conf import *
+
+version = '1.0'
+release = '5.0'
+
+latex_documents = [
+ ('index', 'c_user.tex', u'RTEMS C User Documentation', u'RTEMS Documentation Project', 'manual'),
+]
+
diff --git a/c_user/wscript b/c_user/wscript
index 0565c4b..8d66b28 100644
--- a/c_user/wscript
+++ b/c_user/wscript
@@ -2,10 +2,5 @@ from sys import path
from os.path import abspath
path.append(abspath('../common/'))
-from waf import cmd_configure, cmd_build, spell, cmd_spell
+from waf import cmd_configure as configure, cmd_build as build, spell, cmd_spell, cmd_options as options
-def configure(ctx):
- cmd_configure(ctx)
-
-def build(ctx):
- cmd_build(ctx)
diff --git a/common/conf.py b/common/conf.py
index f50c259..ded57d1 100644
--- a/common/conf.py
+++ b/common/conf.py
@@ -188,7 +188,7 @@ latex_elements = {
latex_use_parts = True
-latex_additional_files = ['rtems.sty', 'logo.pdf']
+latex_additional_files = ['../common/rtemsstyle.sty', '../common/logo.pdf']
latex_use_modindex = False
diff --git a/common/rtems.sty b/common/rtemsstyle.sty
index 5f5e539..5f5e539 100644
--- a/common/rtems.sty
+++ b/common/rtemsstyle.sty
diff --git a/common/waf.py b/common/waf.py
index 88c5690..55c7517 100644
--- a/common/waf.py
+++ b/common/waf.py
@@ -33,33 +33,64 @@ class spell(BuildContext):
def cmd_configure(ctx):
- ctx.find_program("sphinx-build", var="BIN_SPHINX_BUILD")
+ ctx.load('tex')
+
+ if not ctx.env.PDFLATEX:
+ conf.fatal('The program LaTex is required')
+
+ ctx.find_program("sphinx-build", var="BIN_SPHINX_BUILD", mandatory=True)
+# ctx.find_program("pdflatex", var="BIN_PDFLATEX", mandatory=True)
ctx.find_program("aspell", var="BIN_ASPELL", mandatory=False)
+
def cmd_build(ctx, conf_dir=".", source_dir="."):
srcnode = ctx.srcnode.abspath()
- # Copy resources.
- for dir in ["_static", "_templates"]:
- files = ctx.path.parent.find_node("common").ant_glob("%s/*" % dir)
- ctx.path.get_bld().make_node(dir).mkdir() # dirs
+ if ctx.options.pdf:
ctx(
- features = "subst",
- is_copy = True,
- source = files,
- target = [ctx.bldnode.find_node(dir).get_bld().make_node(x.name) for x in files]
+ rule = "${BIN_SPHINX_BUILD} -b latex -c %s -j %d -d build/doctrees %s build/latex" % (conf_dir, ctx.options.jobs, source_dir),
+ cwd = ctx.path.abspath(),
+ source = ctx.path.ant_glob('**/*.rst'),
+ target = "latex/%s.tex" % ctx.path.name
)
- ctx(
- rule = "${BIN_SPHINX_BUILD} -b html -c %s -j %d -d build/doctrees %s build/html" % (conf_dir, ctx.options.jobs, source_dir),
- cwd = ctx.path.abspath(),
- source = ctx.path.ant_glob('**/*.rst'),# + ctx.path.ant_glob('conf.py'),
- target = ctx.path.find_or_declare('html/index.html')
- )
+ ctx.add_group()
+
+ ctx(
+ features = 'tex',
+ cwd = "%s/latex/" % ctx.path.get_bld().abspath(),
+ type = 'pdflatex',
+ source = ctx.bldnode.find_or_declare("latex/%s.tex" % ctx.path.name),
+ prompt = 0
+ )
+
+ else:
+ # Copy HTML resources.
+ for dir in ["_static", "_templates"]:
+ files = ctx.path.parent.find_node("common").ant_glob("%s/*" % dir)
+ ctx.path.get_bld().make_node(dir).mkdir() # dirs
+
+ ctx(
+ features = "subst",
+ is_copy = True,
+ source = files,
+ target = [ctx.bldnode.find_node(dir).get_bld().make_node(x.name) for x in files]
+ )
+
+ ctx(
+ rule = "${BIN_SPHINX_BUILD} -b html -c %s -j %d -d build/doctrees %s build/html" % (conf_dir, ctx.options.jobs, source_dir),
+ cwd = ctx.path.abspath(),
+ source = ctx.path.ant_glob('**/*.rst'),# + ctx.path.ant_glob('conf.py'),
+ target = ctx.path.find_or_declare('html/index.html')
+ )
+
+def cmd_options(ctx):
+ ctx.add_option('--pdf', action='store_true', default=False, help="Build PDF.")
def cmd_options_path(ctx):
- ctx.add_option('--rtems-path-py', type='string', help="Path to py/ in RTEMS.")
+ cmd_options(ctx)
+ ctx.add_option('--rtems-path-py', type='string', help="Full path to py/ in RTEMS source repository.")
def cmd_configure_path(ctx):
diff --git a/cpu_supplement/conf.py b/cpu_supplement/conf.py
index 5e042a7..3c9c2f7 100644
--- a/cpu_supplement/conf.py
+++ b/cpu_supplement/conf.py
@@ -6,3 +6,7 @@ from conf import *
version = '1.0'
release = '5.0'
+latex_documents = [
+ ('index', 'cpu_supplement.tex', u'RTEMS CPU Supplement Documentation', u'RTEMS Documentation Project', 'manual'),
+]
+
diff --git a/cpu_supplement/wscript b/cpu_supplement/wscript
index 0565c4b..8d66b28 100644
--- a/cpu_supplement/wscript
+++ b/cpu_supplement/wscript
@@ -2,10 +2,5 @@ from sys import path
from os.path import abspath
path.append(abspath('../common/'))
-from waf import cmd_configure, cmd_build, spell, cmd_spell
+from waf import cmd_configure as configure, cmd_build as build, spell, cmd_spell, cmd_options as options
-def configure(ctx):
- cmd_configure(ctx)
-
-def build(ctx):
- cmd_build(ctx)
diff --git a/develenv/conf.py b/develenv/conf.py
index 5e042a7..d6bc2bd 100644
--- a/develenv/conf.py
+++ b/develenv/conf.py
@@ -6,3 +6,7 @@ from conf import *
version = '1.0'
release = '5.0'
+latex_documents = [
+ ('index', 'develenv.tex', u'RTEMS Development Environment Documentation', u'RTEMS Documentation Project', 'manual'),
+]
+
diff --git a/develenv/wscript b/develenv/wscript
index 0565c4b..8d66b28 100644
--- a/develenv/wscript
+++ b/develenv/wscript
@@ -2,10 +2,5 @@ from sys import path
from os.path import abspath
path.append(abspath('../common/'))
-from waf import cmd_configure, cmd_build, spell, cmd_spell
+from waf import cmd_configure as configure, cmd_build as build, spell, cmd_spell, cmd_options as options
-def configure(ctx):
- cmd_configure(ctx)
-
-def build(ctx):
- cmd_build(ctx)
diff --git a/filesystem/conf.py b/filesystem/conf.py
index 5e042a7..2018730 100644
--- a/filesystem/conf.py
+++ b/filesystem/conf.py
@@ -6,3 +6,7 @@ from conf import *
version = '1.0'
release = '5.0'
+latex_documents = [
+ ('index', 'filesystem.tex', u'RTEMS Filesystem Documentation', u'RTEMS Documentation Project', 'manual'),
+]
+
diff --git a/filesystem/wscript b/filesystem/wscript
index 0565c4b..8d66b28 100644
--- a/filesystem/wscript
+++ b/filesystem/wscript
@@ -2,10 +2,5 @@ from sys import path
from os.path import abspath
path.append(abspath('../common/'))
-from waf import cmd_configure, cmd_build, spell, cmd_spell
+from waf import cmd_configure as configure, cmd_build as build, spell, cmd_spell, cmd_options as options
-def configure(ctx):
- cmd_configure(ctx)
-
-def build(ctx):
- cmd_build(ctx)
diff --git a/networking/conf.py b/networking/conf.py
index 5e042a7..cc244c2 100644
--- a/networking/conf.py
+++ b/networking/conf.py
@@ -6,3 +6,7 @@ from conf import *
version = '1.0'
release = '5.0'
+latex_documents = [
+ ('index', 'networking.tex', u'RTEMS Networking Documentation', u'RTEMS Documentation Project', 'manual'),
+]
+
diff --git a/networking/wscript b/networking/wscript
index 0565c4b..8d66b28 100644
--- a/networking/wscript
+++ b/networking/wscript
@@ -2,10 +2,5 @@ from sys import path
from os.path import abspath
path.append(abspath('../common/'))
-from waf import cmd_configure, cmd_build, spell, cmd_spell
+from waf import cmd_configure as configure, cmd_build as build, spell, cmd_spell, cmd_options as options
-def configure(ctx):
- cmd_configure(ctx)
-
-def build(ctx):
- cmd_build(ctx)
diff --git a/porting/conf.py b/porting/conf.py
index 5e042a7..8ccb18f 100644
--- a/porting/conf.py
+++ b/porting/conf.py
@@ -6,3 +6,7 @@ from conf import *
version = '1.0'
release = '5.0'
+latex_documents = [
+ ('index', 'porting.tex', u'RTEMS Porting Documentation', u'RTEMS Documentation Project', 'manual'),
+]
+
diff --git a/porting/wscript b/porting/wscript
index 0565c4b..8d66b28 100644
--- a/porting/wscript
+++ b/porting/wscript
@@ -2,10 +2,5 @@ from sys import path
from os.path import abspath
path.append(abspath('../common/'))
-from waf import cmd_configure, cmd_build, spell, cmd_spell
+from waf import cmd_configure as configure, cmd_build as build, spell, cmd_spell, cmd_options as options
-def configure(ctx):
- cmd_configure(ctx)
-
-def build(ctx):
- cmd_build(ctx)
diff --git a/posix1003_1/conf.py b/posix1003_1/conf.py
index 5e042a7..7e33ef5 100644
--- a/posix1003_1/conf.py
+++ b/posix1003_1/conf.py
@@ -6,3 +6,7 @@ from conf import *
version = '1.0'
release = '5.0'
+latex_documents = [
+ ('index', 'posix1003_1.tex', u'RTEMS POSIX 1003_1 Documentation', u'RTEMS Documentation Project', 'manual'),
+]
+
diff --git a/posix1003_1/wscript b/posix1003_1/wscript
index 0565c4b..8d66b28 100644
--- a/posix1003_1/wscript
+++ b/posix1003_1/wscript
@@ -2,10 +2,5 @@ from sys import path
from os.path import abspath
path.append(abspath('../common/'))
-from waf import cmd_configure, cmd_build, spell, cmd_spell
+from waf import cmd_configure as configure, cmd_build as build, spell, cmd_spell, cmd_options as options
-def configure(ctx):
- cmd_configure(ctx)
-
-def build(ctx):
- cmd_build(ctx)
diff --git a/posix_users/conf.py b/posix_users/conf.py
index 5e042a7..fcbb017 100644
--- a/posix_users/conf.py
+++ b/posix_users/conf.py
@@ -6,3 +6,7 @@ from conf import *
version = '1.0'
release = '5.0'
+latex_documents = [
+ ('index', 'posix_users.tex', u'RTEMS POSIX Users Documentation', u'RTEMS Documentation Project', 'manual'),
+]
+
diff --git a/posix_users/wscript b/posix_users/wscript
index 0565c4b..8d66b28 100644
--- a/posix_users/wscript
+++ b/posix_users/wscript
@@ -2,10 +2,5 @@ from sys import path
from os.path import abspath
path.append(abspath('../common/'))
-from waf import cmd_configure, cmd_build, spell, cmd_spell
+from waf import cmd_configure as configure, cmd_build as build, spell, cmd_spell, cmd_options as options
-def configure(ctx):
- cmd_configure(ctx)
-
-def build(ctx):
- cmd_build(ctx)
diff --git a/rtemsconfig/conf.py b/rtemsconfig/conf.py
index 5e042a7..d9e87bb 100644
--- a/rtemsconfig/conf.py
+++ b/rtemsconfig/conf.py
@@ -6,3 +6,7 @@ from conf import *
version = '1.0'
release = '5.0'
+latex_documents = [
+ ('index', 'rtemsconfig.tex', u'RTEMS RTEMS Config Documentation', u'RTEMS Documentation Project', 'manual'),
+]
+
diff --git a/shell/conf.py b/shell/conf.py
index 5e042a7..7ee08cf 100644
--- a/shell/conf.py
+++ b/shell/conf.py
@@ -6,3 +6,7 @@ from conf import *
version = '1.0'
release = '5.0'
+latex_documents = [
+ ('index', 'shell.tex', u'RTEMS Shell Documentation', u'RTEMS Documentation Project', 'manual'),
+]
+
diff --git a/shell/wscript b/shell/wscript
index 0565c4b..8d66b28 100644
--- a/shell/wscript
+++ b/shell/wscript
@@ -2,10 +2,5 @@ from sys import path
from os.path import abspath
path.append(abspath('../common/'))
-from waf import cmd_configure, cmd_build, spell, cmd_spell
+from waf import cmd_configure as configure, cmd_build as build, spell, cmd_spell, cmd_options as options
-def configure(ctx):
- cmd_configure(ctx)
-
-def build(ctx):
- cmd_build(ctx)
diff --git a/user/conf.py b/user/conf.py
index 5e042a7..bf58783 100644
--- a/user/conf.py
+++ b/user/conf.py
@@ -6,3 +6,7 @@ from conf import *
version = '1.0'
release = '5.0'
+latex_documents = [
+ ('index', 'user.tex', u'RTEMS User Documentation', u'RTEMS Documentation Project', 'manual'),
+]
+
diff --git a/user/wscript b/user/wscript
index 0565c4b..8d66b28 100644
--- a/user/wscript
+++ b/user/wscript
@@ -2,10 +2,5 @@ from sys import path
from os.path import abspath
path.append(abspath('../common/'))
-from waf import cmd_configure, cmd_build, spell, cmd_spell
+from waf import cmd_configure as configure, cmd_build as build, spell, cmd_spell, cmd_options as options
-def configure(ctx):
- cmd_configure(ctx)
-
-def build(ctx):
- cmd_build(ctx)