From 2fdbc9826f31ba7c890a7b9e4fcfebcb2a4bad8b Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Tue, 8 Nov 2016 15:58:58 +1100 Subject: waf: Use the good fonts if installed. --- common/waf.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'common/waf.py') diff --git a/common/waf.py b/common/waf.py index 0086be0..c1d3f81 100644 --- a/common/waf.py +++ b/common/waf.py @@ -89,21 +89,27 @@ def build_dir_setup(ctx, buildtype): return build_dir, output_node, output_dir, doctrees def pdf_resources(ctx, buildtype): + packages_base = ctx.path.parent.find_dir('common/latex') + if packages_base is None: + ctx.fatal('Latex package directory not found') + base = packages_base.path_from(ctx.path) + fnode = ctx.path.get_bld().make_node(buildtype) + fnode.mkdir() local_packages = latex.local_packages() if local_packages is not None: - packages_base = ctx.path.parent.find_dir('common/latex') - if packages_base is None: - ctx.fatal('Latex package directory not found') - base = packages_base.path_from(ctx.path) srcs = [os.path.join(base, p) for p in local_packages] - fnode = ctx.path.get_bld().make_node(buildtype) - fnode.mkdir() ctx( features = "subst", is_copy = True, source = srcs, target = [fnode.make_node(p) for p in local_packages] ) + ctx( + features = "subst", + is_copy = True, + source = os.path.join(base, ctx.env.RTEMSEXTRAFONTS), + target = fnode.make_node('rtemsextrafonts.sty') + ) def html_resources(ctx, buildtype): for dir_name in ["_static", "_templates"]: -- cgit v1.2.3