pdf: Set TEXINPUTS to the tex source path

This commit is contained in:
Chris Johns 2022-08-12 16:03:25 +10:00
parent 94af61860f
commit 10e8dcc0e6

View File

@ -340,12 +340,15 @@ def doc_pdf(ctx, source_dir, conf_dir, sources):
target = ctx.path.find_or_declare("%s/%s.tex" % (buildtype, target = ctx.path.find_or_declare("%s/%s.tex" % (buildtype,
ctx.path.name)) ctx.path.name))
) )
env_latex = ctx.env.derive()
env_latex.TEXINPUTS = output_dir + ':'
ctx( ctx(
features = 'tex', features = 'tex',
cwd = output_dir, cwd = output_dir,
type = ctx.env.LATEX_CMD, type = ctx.env.LATEX_CMD,
source = "%s/%s.tex" % (buildtype, ctx.path.name), source = "%s/%s.tex" % (buildtype, ctx.path.name),
prompt = 0 prompt = 0,
env = env_latex
) )
ctx.install_files('${PREFIX}', ctx.install_files('${PREFIX}',
'%s/%s.pdf' % (buildtype, ctx.path.name), '%s/%s.pdf' % (buildtype, ctx.path.name),