);
sub web_settings() {
- print STDERR "Initializing settings for web site: [$Texi2HTML::THISDOC{current_lang}]\n";
+ print STDERR "Processing web site: [$Texi2HTML::THISDOC{current_lang}]\n";
$Texi2HTML::Config::BODYTEXT = "";
@Texi2HTML::Config::CSS_REFS = (
{FILENAME => "lilypond-website.css", TITLE => "Default style"}
################################################################
##### SECURITY -- check these values for lilypond.org #########
################################################################
+
ifeq ($(WEBSITE_ONLY_BUILD),1)
### for lilypond.org
TOP_SRC_DIR=$(HOME)/lilypond/lilypond-git
PICTURES=Documentation/pictures/out-www
endif
+################################################################
+#The 4 lines below present an option to force make website to run
+# quietly only when it is run as make -s website. However, we've
+# decided not to use this switch, and run the scripts quietly all
+# the time
+################################################################
+#quiet-run = $(findstring s, $(MAKEFLAGS))
+#ifeq ($(quiet-run),s)
+# quiet-flag=-q
+#endif
+
+#Nothing clever here - just allows the use of a boolean to control
+# quiet running
+quiet-run = true
+ifeq ($(quiet-run),true)
+ quiet-flag=-q
+endif
+
+
################################################################
OUT=out-website
-I $(top-src-dir)/Documentation/"$$l" \
-I $(OUT) -o $(OUT) --split=node \
--known-missing-files=$(top-src-dir)/scripts/build/website-known-missing-files.txt \
+ $(quiet-flag) \
$(top-src-dir)/Documentation/"$$l"/web.texi ;\
for m in $(MANUALS); do \
n=`echo "$$m" | sed 's/Documentation/Documentation\/'$$l'/'` ; \
-I $(top-src-dir)/Documentation/"$$l" \
-I $(top-src-dir)/Documentation/"$$l"/"$$d" \
--known-missing-files=$(top-src-dir)/scripts/build/website-known-missing-files.txt \
+ $(quiet-flag) \
-I $(OUT) -o $(OUT) "$$n" ; \
fi ; \
done; \
$(WEB_BIBS) -s web \
-s $(top-src-dir)/Documentation/lily-bib \
-o $(OUT)/others-did.itexi \
+ $(quiet-flag) \
$(top-src-dir)/Documentation/web/others-did.bib
BSTINPUTS=$(top-src-dir)/Documentation/web \
$(WEB_BIBS) -s web \
-s $(top-src-dir)/Documentation/lily-bib \
-o $(OUT)/we-wrote.itexi \
+ $(quiet-flag) \
$(top-src-dir)/Documentation/web/we-wrote.bib
# usage:
def usage ():
- print 'usage: %s [-s style] [-o <outfile>] BIBFILES...'
+ print 'usage: %s [-s style] [-o <outfile>] [-q] BIBFILES...'
+ print '-q suppresses most output'
-(options, files) = getopt.getopt (sys.argv[1:], 's:o:', [])
+(options, files) = getopt.getopt (sys.argv[1:], 's:o:hq', [])
output = 'bib.itexi'
style = 'long'
+show_output = True
for (o,a) in options:
if o == '-h' or o == '--help':
style = a
elif o == '-o' or o == '--output':
output = a
+ elif o == '-q':
+ show_output = False
else:
raise Exception ('unknown option: %s' % o)
tmpdir = tempfile.gettempdir ()
+if (show_output):
+ quiet_flag = ''
+else:
+ quiet_flag = ' -terse '
+
#The command line to invoke bibtex
-cmd = "TEXMFOUTPUT=%s bibtex %s" % (tmpdir, tmpfile)
+cmd = "TEXMFOUTPUT=%s bibtex %s %s" % (tmpdir, quiet_flag, tmpfile)
-sys.stdout.write ("Invoking `%s'\n" % cmd)
+if (show_output):
+ sys.stdout.write ("Running bibtex on %s\n" % files)
#And invoke it
stat = os.system (cmd)
if stat <> 0:
import os
import getopt
-options_list, files = getopt.getopt (sys.argv[1:],'o:s:hI:m:',
+options_list, files = getopt.getopt (sys.argv[1:],'o:s:hI:m:k:q',
['output=', 'split=',
'help', 'include=',
'master-map-file=',
- 'known-missing-files='])
+ 'known-missing-files=',
+ 'quiet'])
help_text = r"""Usage: %(program_name)s [OPTIONS]... TEXIFILE...
Extract files names for texinfo (sub)sections from the texinfo files.
-o, --output=DIRECTORY write .xref-map files to DIRECTORY
-s, --split=MODE split manual according to MODE. Possible values
are section and custom (default)
- --known-missing-files a filename which has a list of files known
+ -k, --known-missing-files a filename which has a list of files known
to be missing for this make
+ -q, --quiet suppress most messages
"""
def help (text):
master_map_file = ''
known_missing_files = []
known_missing_files_file = ''
+suppress_output = False
initial_map = {}
for opt in options_list:
o = opt[0]
known_missing_files_file = a
else:
print 'Missing files list file not found: ', a
+ elif o == '-q' or o == '--quiet':
+ suppress_output = True
else:
raise Exception ('unknown option: ' + o)
sections = section_translation_re.findall (page)
basename = os.path.splitext (os.path.basename (filename))[0]
p = os.path.join (outdir, basename) + lang_suffix + '.xref-map'
- print 'writing:', p
+ if not suppress_output:
+ print 'writing:', p
f = open (p, 'w')
this_title = ''
initial_map[m.group (1)] = (m.group (1), m.group (2), m.group (3))
for filename in files:
- print "extract_texi_filenames.py: Processing %s" % filename
+ if not suppress_output:
+ print "extract_texi_filenames.py: Processing %s" % filename
(lang_suffix, sections) = extract_sections (filename)
process_sections (filename, lang_suffix, sections)
import glob
import getopt
-print "mass-link.py"
-
optlist, args = getopt.getopt (sys.argv[1:], '', ['prepend-suffix='])
link_type, source_dir, dest_dir = args[0:3]
files = args[3:]