From: Julien Rioux Date: Sat, 13 Oct 2012 17:33:40 +0000 (-0400) Subject: Add autogenerated markers (issue 847). X-Git-Tag: release/2.17.5-1~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f3b6285af7a9e414b12d2d61ada30aef695bd72f;p=lilypond.git Add autogenerated markers (issue 847). Add autogenerated markers to files produced from build scripts. Also fix some typos and help message from scripts. --- diff --git a/python/auxiliar/postprocess_html.py b/python/auxiliar/postprocess_html.py index fd254b5a08..538f79a798 100644 --- a/python/auxiliar/postprocess_html.py +++ b/python/auxiliar/postprocess_html.py @@ -6,6 +6,7 @@ add footer, tweak links, add language selection menu. """ import re import os +import sys import time import operator @@ -37,19 +38,21 @@ header = r""" footer = ''' -''' +''' % sys.argv[0] web_footer = ''' -''' +''' % sys.argv[0] footer_name_version = _doc ('This page is for %(package_name)s-%(package_version)s (%(branch_str)s).') # ugh, must not have "_doc" in strings because it is naively replaced with "_" in hacked gettext process @@ -71,11 +74,12 @@ browser_language_url = "http://www.lilypond.org/website/misc/browser-language" LANGUAGES_TEMPLATE = '''

- %(language_available)s + + %%(language_available)s
- %(browser_language)s + %%(browser_language)s

-''' +''' % sys.argv[0] html_re = re.compile ('(.*?)(?:[.]([^/.]*))?[.]html$') diff --git a/scripts/build/bib2texi.py b/scripts/build/bib2texi.py index c71976dec1..b76a171a09 100644 --- a/scripts/build/bib2texi.py +++ b/scripts/build/bib2texi.py @@ -6,7 +6,7 @@ import tempfile # usage: def usage (): - print 'usage: %s [-s style] [-o ] [-q] BIBFILES...' + print 'usage: bib2texi.py [-s style] [-o ] [-q] BIBFILES...' print '-q suppresses most output' (options, files) = getopt.getopt (sys.argv[1:], 's:o:hq', []) @@ -32,6 +32,11 @@ if not files: usage () sys.exit (2) +marker = """@c This file was autogenerated +@c from: %s +@c by: %s + +""" % (", ".join(files), sys.argv[0]) def strip_extension (f, ext): (p, e) = os.path.splitext (f) @@ -84,7 +89,10 @@ if bbl.strip () == '': sys.stderr.write ("Bibtex generated an empty file!") sys.exit (1) -open (output, 'w').write (bbl) +fout = open (output, 'w') +fout.write (marker) +fout.write (bbl) +fout.close () def cleanup (tmpfile): for a in ['aux','bbl', 'blg']: diff --git a/scripts/build/create-version-itexi.py b/scripts/build/create-version-itexi.py index e40ff6e79b..f4dc066fcc 100644 --- a/scripts/build/create-version-itexi.py +++ b/scripts/build/create-version-itexi.py @@ -66,9 +66,15 @@ def make_macro(name, string): print "@end macro" print "" +print "@c This file was autogenerated" +print "@c from: VERSION" +print "@c by: %s" % sys.argv[0] +print "" print "@c ************************ Version numbers ************" +print "" + make_macro("version", VERSION) make_macro("versionStable", VERSION_STABLE) make_macro("versionDevel", VERSION_DEVEL) - +print "@c *****************************************************" diff --git a/scripts/build/create-weblinks-itexi.py b/scripts/build/create-weblinks-itexi.py index 703b4c80e9..cb785b43a0 100644 --- a/scripts/build/create-weblinks-itexi.py +++ b/scripts/build/create-weblinks-itexi.py @@ -1,6 +1,6 @@ #!@PYTHON@ # -*- coding: utf-8 -*- -# create-version-itexi.py +# create-weblinks-itexi.py """ when being called on lilypond.org, pass it the location of the top source dir on the command-line. """ @@ -338,7 +338,9 @@ def make_download(name, osA, osB, version, revision, text): string += "}" make_macro(name, string) -def make_download_source(name, vstring, version, lang): +def make_download_source(name, version, lang): + assert "." in version + vstring = "v%s.%s" % tuple(version.split(".", 2)[0:2]) string = "@uref{http://download.linuxaudio.org/lilypond/sources/" string += vstring + "/" string += "lilypond-" + version + ".tar.gz" @@ -520,30 +522,40 @@ def make_doctarball_links(name, version, lang): make_ver_link(macroLang("doctarball"+name, lang), url, getTrans("Doc tarball for ", lang)+version) +print "@c This file was autogenerated" +print "@c from: VERSION" +print "@c by: %s" % sys.argv[0] +print "" print "@c ************************ Download binaries ************" +print "" + make_all_downloads("Stable", VERSION_STABLE) make_all_downloads("Devel", VERSION_DEVEL) print "@c ************************ Download source ************" -# FIXME: icky hard-coding! -gp +print "" + for lang in langs: - print "@c *********", lang, "***" - make_download_source("downloadStableSource","v2.16",VERSION_STABLE,lang) - make_download_source("downloadDevelSource","v2.17",VERSION_DEVEL,lang) + print "@c *********", lang or "en", "***" + make_download_source("downloadStableSource", VERSION_STABLE, lang) + make_download_source("downloadDevelSource", VERSION_DEVEL, lang) print "@c ************************ Manual links ************" +print "" + for lang in langs: - print "@c *********", lang, "***" - make_manual_links("Stable", VERSION_STABLE,lang) - make_manual_links("Devel", VERSION_DEVEL,lang) + print "@c *********", lang or "en", "***" + make_manual_links("Stable", VERSION_STABLE, lang) + make_manual_links("Devel", VERSION_DEVEL, lang) - make_doctarball_links("Stable", VERSION_STABLE,lang) - make_doctarball_links("Devel", VERSION_DEVEL,lang) + make_doctarball_links("Stable", VERSION_STABLE, lang) + make_doctarball_links("Devel", VERSION_DEVEL, lang) print "@c ************************ Regtest links ************" -for lang in langs: - print "@c *********", lang, "***" - make_regtest_links("Stable", VERSION_STABLE,lang) - make_regtest_links("Devel", VERSION_DEVEL,lang) - +print "" +for lang in langs: + print "@c *********", lang or "en", "***" + make_regtest_links("Stable", VERSION_STABLE, lang) + make_regtest_links("Devel", VERSION_DEVEL, lang) +print "@c ***************************************************" diff --git a/scripts/build/lys-to-tely.py b/scripts/build/lys-to-tely.py index 329b412a47..ad0f7a6aa9 100644 --- a/scripts/build/lys-to-tely.py +++ b/scripts/build/lys-to-tely.py @@ -53,6 +53,11 @@ author = "Han-Wen Nienhuys and Jan Nieuwenhuizen" input_filename = "" glob_input = "" template = '''\input texinfo + +@c This file was autogenerated +@c from: %s +@c by: %s + @setfilename %%(name)s.info @settitle %%(title)s @@ -83,7 +88,7 @@ template = '''\input texinfo %s @bye -''' % include_snippets +''' % (", ".join(files), sys.argv[0], include_snippets) for opt in options: o = opt[0] @@ -177,4 +182,4 @@ if files: else: # not Unix philosophy, but hey, at least we notice when # we don't distribute any .ly files. - sys.stderr.write ("No files specified. Doing nothing") + sys.stderr.write ("No files specified. Doing nothing. Use -h to display usage.") diff --git a/scripts/build/output-distance.py b/scripts/build/output-distance.py index 734b366f6b..569c892a8f 100755 --- a/scripts/build/output-distance.py +++ b/scripts/build/output-distance.py @@ -988,9 +988,12 @@ class ComparisonData: summary += '

%d unchanged

' % len (unchanged) + me = sys.argv[0] + html = ''' LilyPond regression test results +