From d2b52eec86e2c6c601f7a723f24dc554c0ca35c5 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 16 Jul 2004 12:30:13 +0000 Subject: [PATCH] * Documentation/bibliography/SConscript (bibs): failed try to get bib2html find html-long.bst. * buildscripts/bib2html.py (stat): fail if bibtex fails. --- ChangeLog | 9 +++++++++ Documentation/bibliography/SConscript | 4 ++++ buildscripts/bib2html.py | 8 +++++--- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6ccb989ebe..193f0e0fe1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-07-16 Han-Wen Nienhuys + + * Documentation/bibliography/SConscript (bibs): failed try to get + bib2html find html-long.bst. + + * buildscripts/bib2html.py (stat): fail if bibtex fails. + + * make/stepmake.make: use usescons for using scons. + 2004-07-16 Jan Nieuwenhuizen * scripts/lilypond-book.py (Lilypond_snippet.is_outdated): Check diff --git a/Documentation/bibliography/SConscript b/Documentation/bibliography/SConscript index c115efc026..fb06d5ba4e 100644 --- a/Documentation/bibliography/SConscript +++ b/Documentation/bibliography/SConscript @@ -1,9 +1,13 @@ # -*-python-*- +import os Import ('env') bibs = env['src_glob'] (env, '*.bib') env.AT_COPY ('index.html.in') +# todo: must make html-long.bst as source too. +env['ENV']['BSTINPUTS'] = ":"+os.getcwd() +print env.BIB2HTML map (env.BIB2HTML, bibs) env.Alias ('doc', bibs) diff --git a/buildscripts/bib2html.py b/buildscripts/bib2html.py index 37bc4694fd..b2312517a9 100644 --- a/buildscripts/bib2html.py +++ b/buildscripts/bib2html.py @@ -9,7 +9,7 @@ import string def usage (): print 'usage: %s [-s style] [-o ] BIBFILES...'; - +print os.environ['BSTINPUTS'] (options, files) = getopt.getopt(sys.argv[1:], 's:o:', []) @@ -58,12 +58,14 @@ open(tempfile + '.aux', 'w').write (r''' cmd = "bibtex %s" % tempfile; sys.stdout.write ("Invoking `%s'\n" % cmd) -os.system (cmd) +stat = os.system (cmd) +if stat <> 0: + sys.exit(1) #TODO: do tex -> html on output -bbl =open (tempfile + '.bbl').read () +bbl = open (tempfile + '.bbl').read () open (output, 'w').write (bbl) -- 2.39.2