summaryrefslogtreecommitdiff
path: root/debian/patches/0120-fix-bibtex-call.patch
blob: 0bdbee8d58636f2627c63faab65a5db731ebe954 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Description: Create Bibtex bibliography always
Author: Alvaro G. M. <alvaro.gamez@hazent.com>
Bug: http://scons.tigris.org/issues/show_bug.cgi?id=2967
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749716
Forwarded: http://scons.tigris.org/issues/show_bug.cgi?id=2967
Last-Update: 2016-01-31
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: trunk/engine/SCons/Tool/tex.py
===================================================================
--- trunk.orig/engine/SCons/Tool/tex.py
+++ trunk/engine/SCons/Tool/tex.py
@@ -347,6 +347,13 @@ def InternalLaTeXAuxAction(XXXLaTeXActio
                         if result != 0:
                             check_file_error_message(env['BIBTEX'], 'blg')
                         must_rerun_latex = True
+                    if Verbose:
+                        print ("Need to run bibtex on " + auxfilename)
+                    bibfile = env.fs.File(SCons.Util.splitext(target_aux)[0])
+                    result = BibTeXAction(bibfile, bibfile, env)
+                    if result != 0:
+                        check_file_error_message(env['BIBTEX'], 'blg')
+                    must_rerun_latex = True
 
         # Now decide if biber will need to be run.
         # When the backend for biblatex is biber (by choice or default) the
@@ -370,6 +377,13 @@ def InternalLaTeXAuxAction(XXXLaTeXActio
                         if result != 0:
                             check_file_error_message(env['BIBER'], 'blg')
                         must_rerun_latex = True
+                    if Verbose:
+                        print ("Need to run biber on " + bcffilename)
+                    bibfile = env.fs.File(SCons.Util.splitext(target_bcf)[0])
+                    result = BiberAction(bibfile, bibfile, env)
+                    if result != 0:
+                        check_file_error_message(env['BIBER'], 'blg')
+                    must_rerun_latex = True
 
         # Now decide if latex will need to be run again due to index.
         if check_MD5(suffix_nodes['.idx'],'.idx') or (count == 1 and run_makeindex):