From 543171165412bc915d8ea1f308d070c74924b2f1 Mon Sep 17 00:00:00 2001 From: John Mandereau Date: Mon, 5 Jan 2009 03:22:01 +0100 Subject: [PATCH] Clean up buildscripts - move scripts from buildscripts/ according to the new ROADMAP, create three directories for this purpose: scripts/aux/, scripts/build/ and python/aux; - make permissions and interpreter specs clearer: all scripts in scripts/build are non-executable and use an interpreter determined in config.make, all scripts in scripts/aux use hard-coded interpreters; - always use built avatars of scripts in scripts/build, as a consequence remove interpreter invocations which are no longer needed; - keep old scripts in buildscripts/ which are junked in the very next commits. --- Documentation/GNUmakefile | 25 +++++++------ Documentation/TRANSLATION | 37 +++++++++++++------ Documentation/bibliography/GNUmakefile | 2 +- Documentation/pictures/GNUmakefile | 2 +- Documentation/user/install.itely | 6 +-- GNUmakefile.in | 13 ++++--- ROADMAP | 6 ++- configure.in | 2 +- elisp/GNUmakefile | 7 +++- input/lsr/GNUmakefile | 2 +- input/lsr/README | 2 +- make/doc-i18n-root-targets.make | 2 +- make/doc-i18n-user-rules.make | 4 +- make/doc-i18n-user-targets.make | 6 +-- make/generic-vars.make | 6 ++- make/lilypond-vars.make | 4 +- make/lysdoc-rules.make | 2 +- mf/GNUmakefile | 20 +++++----- po/TODO | 3 +- python/GNUmakefile | 2 + python/aux/GNUmakefile | 10 +++++ {buildscripts => python/aux}/buildlib.py | 0 .../aux}/manuals_definitions.py | 0 {buildscripts => python/aux}/mirrortree.py | 0 .../aux}/postprocess_html.py | 0 scripts/GNUmakefile | 2 + scripts/aux/GNUmakefile | 8 ++++ .../aux}/build-coverage.sh | 8 ++-- .../aux}/build-profile.sh | 0 .../aux}/check_texi_refs.py | 0 .../aux}/check_translation.py | 0 {buildscripts => scripts/aux}/coverage.py | 2 +- .../aux}/find-superfluous-includes.py | 2 +- {buildscripts => scripts/aux}/fixcc.py | 2 +- {buildscripts => scripts/aux}/makelsr.py | 0 .../aux}/musicxml_generate_intervals.py | 0 .../aux}/musicxml_generate_keys.py | 0 .../aux}/musicxml_generate_timesignatures.py | 0 .../aux}/pfx2ttf.fontforge | 2 - {buildscripts => scripts/aux}/readlink.py | 0 {buildscripts => scripts/aux}/tely-gettext.py | 9 ++--- .../aux}/texi-langutils.py | 2 +- .../aux}/texi-skeleton-update.py | 2 +- .../aux}/translations-status.py | 0 .../aux}/update-snippets.py | 2 +- {buildscripts => scripts/build}/GNUmakefile | 3 +- {buildscripts => scripts/build}/bib2html.py | 0 {buildscripts => scripts/build}/catmidi.py | 0 .../build}/extract_texi_filenames.py | 0 .../build}/gen-emmentaler-scripts.py | 0 {buildscripts => scripts/build}/genicon.py | 0 .../build}/grand-replace.sh | 2 +- {buildscripts => scripts/build}/help2man.pl | 0 .../build}/html-gettext.py | 0 .../build}/install-info-html.sh | 0 .../build}/lilypond-words.py | 0 .../build}/lys-to-tely.py | 0 {buildscripts => scripts/build}/mass-link.py | 0 .../build}/mf-to-table.py | 0 {buildscripts => scripts/build}/mf2pt1.pl | 2 +- .../build}/mutopia-index.py | 2 +- .../build}/output-distance.py | 6 +-- {buildscripts => scripts/build}/pytt.py | 2 +- .../build}/texi-gettext.py | 0 {buildscripts => scripts/build}/texi2omf.py | 0 {buildscripts => scripts/build}/www_post.py | 2 +- stepmake/stepmake/help2man-rules.make | 9 +++-- stepmake/stepmake/metafont-rules.make | 2 +- stepmake/stepmake/texinfo-rules.make | 8 ++-- stepmake/stepmake/texinfo-vars.make | 2 +- vim/GNUmakefile | 7 +++- 71 files changed, 150 insertions(+), 101 deletions(-) create mode 100644 python/aux/GNUmakefile rename {buildscripts => python/aux}/buildlib.py (100%) rename {buildscripts => python/aux}/manuals_definitions.py (100%) rename {buildscripts => python/aux}/mirrortree.py (100%) rename {buildscripts => python/aux}/postprocess_html.py (100%) create mode 100644 scripts/aux/GNUmakefile rename {buildscripts => scripts/aux}/build-coverage.sh (82%) mode change 100644 => 100755 rename {buildscripts => scripts/aux}/build-profile.sh (100%) mode change 100644 => 100755 rename {buildscripts => scripts/aux}/check_texi_refs.py (100%) mode change 100644 => 100755 rename {buildscripts => scripts/aux}/check_translation.py (100%) mode change 100644 => 100755 rename {buildscripts => scripts/aux}/coverage.py (99%) mode change 100644 => 100755 rename {buildscripts => scripts/aux}/find-superfluous-includes.py (97%) mode change 100644 => 100755 rename {buildscripts => scripts/aux}/fixcc.py (99%) mode change 100644 => 100755 rename {buildscripts => scripts/aux}/makelsr.py (100%) mode change 100644 => 100755 rename {buildscripts => scripts/aux}/musicxml_generate_intervals.py (100%) mode change 100644 => 100755 rename {buildscripts => scripts/aux}/musicxml_generate_keys.py (100%) mode change 100644 => 100755 rename {buildscripts => scripts/aux}/musicxml_generate_timesignatures.py (100%) mode change 100644 => 100755 rename {buildscripts => scripts/aux}/pfx2ttf.fontforge (97%) rename {buildscripts => scripts/aux}/readlink.py (100%) mode change 100644 => 100755 rename {buildscripts => scripts/aux}/tely-gettext.py (87%) mode change 100644 => 100755 rename {buildscripts => scripts/aux}/texi-langutils.py (99%) mode change 100644 => 100755 rename {buildscripts => scripts/aux}/texi-skeleton-update.py (97%) mode change 100644 => 100755 rename {buildscripts => scripts/aux}/translations-status.py (100%) mode change 100644 => 100755 rename {buildscripts => scripts/aux}/update-snippets.py (99%) mode change 100644 => 100755 rename {buildscripts => scripts/build}/GNUmakefile (88%) rename {buildscripts => scripts/build}/bib2html.py (100%) rename {buildscripts => scripts/build}/catmidi.py (100%) rename {buildscripts => scripts/build}/extract_texi_filenames.py (100%) rename {buildscripts => scripts/build}/gen-emmentaler-scripts.py (100%) rename {buildscripts => scripts/build}/genicon.py (100%) rename {buildscripts => scripts/build}/grand-replace.sh (97%) rename {buildscripts => scripts/build}/help2man.pl (100%) rename {buildscripts => scripts/build}/html-gettext.py (100%) rename {buildscripts => scripts/build}/install-info-html.sh (100%) rename {buildscripts => scripts/build}/lilypond-words.py (100%) rename {buildscripts => scripts/build}/lys-to-tely.py (100%) rename {buildscripts => scripts/build}/mass-link.py (100%) rename {buildscripts => scripts/build}/mf-to-table.py (100%) rename {buildscripts => scripts/build}/mf2pt1.pl (99%) rename {buildscripts => scripts/build}/mutopia-index.py (99%) rename {buildscripts => scripts/build}/output-distance.py (99%) rename {buildscripts => scripts/build}/pytt.py (97%) rename {buildscripts => scripts/build}/texi-gettext.py (100%) rename {buildscripts => scripts/build}/texi2omf.py (100%) rename {buildscripts => scripts/build}/www_post.py (99%) diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile index 0e5fc0a5e2..790b046047 100644 --- a/Documentation/GNUmakefile +++ b/Documentation/GNUmakefile @@ -36,6 +36,9 @@ $(OUT_HTML_FILES): $(OUT_CSS_FILES) $(outdir)/%.css: %.css ln -f $< $@ + +### Translations maintenance targets + po-update: make -C po po-update @@ -56,7 +59,7 @@ new-lang: cp fr/GNUmakefile $(ISOLANG) cp fr/user/GNUmakefile $(ISOLANG)/user sed -i -e 's/ISOLANG *= *fr/ISOLANG = $(ISOLANG)/' $(ISOLANG)/GNUmakefile $(ISOLANG)/user/GNUmakefile - $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) -o doc.pot --skeleton --gettext ../user/lilypond-learning.tely + $(auxscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) -o doc.pot --skeleton --gettext ../user/lilypond-learning.tely mv $(outdir)/*.*tely $(ISOLANG)/user msgmerge -U po/lilypond-doc.pot $(outdir)/doc.pot cp po/lilypond-doc.pot po/$(ISOLANG).po @@ -66,11 +69,11 @@ CHECKED_FILES = $(ISOLANG)/index.html.in $(shell find $(ISOLANG)/user/ -maxdepth TELY_FILES = $(call src-wildcard,$(ISOLANG)/user/*.tely) skeleton-update: - $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) --skeleton $(TELY_FILES:$(ISOLANG)/user/%.tely=../user/%.tely) - $(PYTHON) $(buildscript-dir)/texi-skeleton-update.py $(ISOLANG)/user $(outdir) + $(auxscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) --skeleton $(TELY_FILES:$(ISOLANG)/user/%.tely=../user/%.tely) + $(auxscript-dir)/texi-skeleton-update.py $(ISOLANG)/user $(outdir) snippet-update: - $(PYTHON) $(buildscript-dir)/update-snippets.py user $(ISOLANG)/user '*.itely' + $(auxscript-dir)/update-snippets.py user $(ISOLANG)/user '*.itely' DOCUMENTS_INCLUDES:=-I $(ISOLANG)/user \ -I $(top-build-dir)/Documentation/$(ISOLANG)/user/out-www \ @@ -88,22 +91,22 @@ DOCUMENTS_INCLUDES:=-I user \ endif # ISOLANG check-xrefs: - $(PYTHON) $(buildscript-dir)/check_texi_refs.py --batch \ - $(DOCUMENTS_INCLUDES) $(buildscript-dir)/manuals_definitions.py + $(auxscript-dir)/check_texi_refs.py --batch \ + $(DOCUMENTS_INCLUDES) $(auxpython-dir)/manuals_definitions.py fix-xrefs: - $(PYTHON) $(buildscript-dir)/check_texi_refs.py --auto-fix \ - $(DOCUMENTS_INCLUDES) $(buildscript-dir)/manuals_definitions.py + $(auxscript-dir)/check_texi_refs.py --auto-fix \ + $(DOCUMENTS_INCLUDES) $(auxpython-dir)/manuals_definitions.py check-translation: - $(PYTHON) $(buildscript-dir)/check_translation.py $(CHECK_TRANSLATION_FLAGS) $(CHECKED_FILES) + $(auxscript-dir)/check_translation.py $(CHECK_TRANSLATION_FLAGS) $(CHECKED_FILES) update-translation: - $(PYTHON) $(buildscript-dir)/check_translation.py --update $(CHECK_TRANSLATION_FLAGS) $(CHECKED_FILES) + $(auxscript-dir)/check_translation.py --update $(CHECK_TRANSLATION_FLAGS) $(CHECKED_FILES) translation-status: make -C po out=www messages - $(PYTHON) $(buildscript-dir)/translations-status.py + $(auxscript-dir)/translations-status.py local-help: extra-local-help diff --git a/Documentation/TRANSLATION b/Documentation/TRANSLATION index 4651e05d6d..ada4bd7b15 100644 --- a/Documentation/TRANSLATION +++ b/Documentation/TRANSLATION @@ -93,7 +93,7 @@ Cd into Documentation and run: where is the ISO 639 language code. Add a language definition for your language in -buildscripts/langdefs.py. +python/langdefs.py. See next section about what files to translate and the following detailed instructions after the next section. @@ -670,25 +670,38 @@ which works regardless of the branch checked out. TECHNICAL BACKGROUND A number of Python scripts handle a part of the documentation -translation process. All are located in buildscripts/, except -langdefs.py which is in python/ +translation process. +All scripts used to maintain the translations +are located in scripts/aux/: -* buildlib.py -- module containing common functions (read piped output -of a shell command, use Git) -* langdefs.py -- language definitions module * check_translation.py -- show diff to update a translation * texi-langutils.py -- quickly and dirtily parse Texinfo files to make message catalogs and Texinfo skeleton files * texi-skeleton-update.py -- update Texinfo skeleton files +* update-snippets.py -- synchronize ly snippets with those from +English docs +* translations-status.py -- update translations status pages and word +counts in the file you are reading. +* tely-gettext.py -- gettext node names, section titles and references +in the sources; WARNING only use this script when support for +"makeinfo --html" has been dropped. + +Other scripts are used in the build process, in scripts/build/: * html-gettext.py -- translate node names, section titles and cross references in HTML files generated by makeinfo -* add_html_footer.py (module imported by www_post.py) -- add footer and -tweak links in HTML pages * texi-gettext.py -- gettext node names, section titles and references before calling texi2pdf * mass-link.py -- link or symlink files between English documentation and documentation in other languages -* update-snippets.py -- synchronize ly snippets with those from -English docs -* translations-status.py -- update translations status pages and word -counts in the file you are reading. + +Python modules used by scripts in scripts/aux/ or scripts/build/ (but +not by installed Python scripts) are located in python/aux/: +* manuals_definitions.py -- define manual names and name of +cross-reference Texinfo macros +* buildlib.py -- common functions (read piped output +of a shell command, use Git) +* postprocess_html.py (module imported by www_post.py) -- add footer and +tweak links in HTML pages + +And finally +* python/langdefs.py -- language definitions module diff --git a/Documentation/bibliography/GNUmakefile b/Documentation/bibliography/GNUmakefile index 89eb2d0bcb..798dad58a6 100644 --- a/Documentation/bibliography/GNUmakefile +++ b/Documentation/bibliography/GNUmakefile @@ -27,7 +27,7 @@ $(outdir)/%.bib: %.bib ln -f $< $@ $(outdir)/%.html: %.bib - BSTINPUTS=$(src-dir) $(PYTHON) $(buildscript-dir)/bib2html.py -o $@ $< + BSTINPUTS=$(src-dir) $(buildscript-dir)/bib2html -o $@ $< local-clean: rm -f fonts.aux fonts.log feta*.tfm feta*.*pk diff --git a/Documentation/pictures/GNUmakefile b/Documentation/pictures/GNUmakefile index 438389f944..35ef738ae4 100644 --- a/Documentation/pictures/GNUmakefile +++ b/Documentation/pictures/GNUmakefile @@ -12,7 +12,7 @@ include $(depth)/make/stepmake.make ifeq ($(PLATFORM_WINDOWS),yes) $(outdir)/%.ico: %.xpm - $(PYTHON) $(buildscript-dir)/genicon.py $< $@ + $(buildscript-dir)/genicon $< $@ default: $(lilypond-icon) $(ly-icon) diff --git a/Documentation/user/install.itely b/Documentation/user/install.itely index 1b2f4df6ef..597aeb6900 100644 --- a/Documentation/user/install.itely +++ b/Documentation/user/install.itely @@ -479,11 +479,11 @@ CVS; especially the following patch: For checking the coverage of the test suite, do the following @example -./buildscripts/build-coverage.sh +./scripts/aux/build-coverage.sh @emph{# uncovered files, least covered first} -python ./buildscripts/coverage.py --summary out-cov/*.cc +./scripts/aux/coverage.py --summary out-cov/*.cc @emph{# consecutive uncovered lines, longest first} -python ./buildscripts/coverage.py --uncovered out-cov/*.cc +./scripts/aux/coverage.py --uncovered out-cov/*.cc @end example diff --git a/GNUmakefile.in b/GNUmakefile.in index ac2329cf4f..f6389fbe3f 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -2,7 +2,7 @@ depth = . -SUBDIRS = buildscripts python scripts \ +SUBDIRS = python scripts \ flower lily \ mf ly \ tex ps scm \ @@ -87,11 +87,11 @@ final-install: WEB_TARGETS = offline WWW-post: -# need UTF8 setting in case this is hosted on a website. +# need UTF8 setting in case this is hosted on a website. echo -e 'AddDefaultCharset utf-8\nAddCharset utf-8 .html\nAddCharset utf-8 .en\nAddCharset utf-8 .nl\nAddCharset utf-8 .txt\n' > $(top-build-dir)/.htaccess - $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(outdir)/examples.html input/ + $(buildscript-dir)/mutopia-index -o $(outdir)/examples.html input/ find $(outdir) -name '*-root' | xargs rm -rf - $(PYTHON) $(buildscript-dir)/www_post.py $(PACKAGE_NAME) $(TOPLEVEL_VERSION) $(outdir) "$(WEB_TARGETS)" + $(buildscript-dir)/www_post $(PACKAGE_NAME) $(TOPLEVEL_VERSION) $(outdir) "$(WEB_TARGETS)" find $(outdir)/offline-root -type l -delete @@ -200,7 +200,8 @@ $(config_h): config.hh.in @false grand-replace: - PATH=$(buildscript-dir)/$(outbase):$(PATH) $(BASH) $(buildscript-dir)/grand-replace.sh + $(MAKE) -C scripts/build + PATH=$(buildscript-dir):$(PATH) $(buildscript-dir)/grand-replace ################################################################ # testing @@ -229,7 +230,7 @@ test-baseline: local-check: test rm -rf $(RESULT_DIR) mkdir -p $(RESULT_DIR) - $(PYTHON) $(buildscript-dir)/output-distance.py --create-images --output-dir $(RESULT_DIR) input/regression/out-test-baseline input/regression/out-test/ + $(buildscript-dir)/output-distance --create-images --output-dir $(RESULT_DIR) input/regression/out-test-baseline input/regression/out-test/ @find input ly -name '*.ly' -print |grep -v 'out.*/' | xargs grep '\\version' -L | grep -v "standard input" |sed 's/^/**** Missing version: /g' diff --git a/ROADMAP b/ROADMAP index 4ec2eec4bd..d5be4a0077 100644 --- a/ROADMAP +++ b/ROADMAP @@ -20,7 +20,6 @@ source files. user/ User manuals po/ Translated manual node names fr/ es/ de/ Docs translated to French, Spanish, German, resp. - buildscripts/ Scripts for the build process elisp/ Emacs LilyPond mode and syntax coloring flower/ A simple C++ library input/ Music input examples @@ -41,8 +40,13 @@ source files. po/ Translations for binaries and end-user scripts ps/ PostScript library files python/ Python modules, MIDI module + aux/ Python modules used by maintenance scripts + or in the build process scm/ Scheme sources for LilyPond and subroutine files scripts/ End-user scripts + aux/ Scripts for maintaining the sources and scripts + for the build process that need not be built + build/ Scripts for the build process that must be built stepmake/ Generic make subroutine files tex/ TeX and texinfo library files vim/ Vi(M) LilyPond mode and syntax coloring diff --git a/configure.in b/configure.in index f9f5c622ea..3651171c46 100644 --- a/configure.in +++ b/configure.in @@ -76,7 +76,7 @@ else NCSB_FILE=`$FCMATCH --verbose "Century Schoolbook L:style=$style" | grep 'file:' | grep -v "\.ttf"` NCSB_FILE=`echo $NCSB_FILE | sed 's/^.*"\(.*\)".*$/\1/g'` - NCSB_FILE=`$PYTHON "$srcdir/buildscripts/readlink.py" $NCSB_FILE` + NCSB_FILE=`$PYTHON "$srcdir/scripts/aux/readlink.py" $NCSB_FILE` NCSB_SOURCE_FILES="$NCSB_FILE $NCSB_SOURCE_FILES" done else diff --git a/elisp/GNUmakefile b/elisp/GNUmakefile index 0eab184cd0..9dcdf1ce6e 100644 --- a/elisp/GNUmakefile +++ b/elisp/GNUmakefile @@ -16,11 +16,14 @@ include $(depth)/make/stepmake.make LILYPOND_WORDS = $(outdir)/lilypond-words.el LILYPOND_WORDS_DEPENDS =\ $(top-src-dir)/lily/lily-lexer.cc \ - $(buildscript-dir)/lilypond-words.py \ + $(buildscript-dir)/lilypond-words \ $(top-src-dir)/scm/markup.scm \ $(top-src-dir)/ly/engraver-init.ly +$(buildscript-dir)/lilypond-words: + make -C $(depth)/scripts/build + $(LILYPOND_WORDS): - cd $(top-src-dir) && $(PYTHON) buildscripts/lilypond-words.py --el --dir=$(top-build-dir)/elisp/$(outconfbase) + cd $(top-src-dir) && $(buildscript-dir)/lilypond-words --el --dir=$(top-build-dir)/elisp/$(outconfbase) all: $(LILYPOND_WORDS) diff --git a/input/lsr/GNUmakefile b/input/lsr/GNUmakefile index f91dacd38d..e479c09c0e 100644 --- a/input/lsr/GNUmakefile +++ b/input/lsr/GNUmakefile @@ -22,7 +22,7 @@ IN_ITELY_FILES = $(call src-wildcard,*-intro.itely) GENERATED_ITELY_FILES = $(IN_ITELY_FILES:%-intro.itely=$(outdir)/%.itely) $(outdir)/%.itely: %-intro.itely %.snippet-list - xargs $(PYTHON) $(buildscript-dir)/lys-to-tely.py -f doctitle,texidoc,verbatim --name=$@ --template=$< < $(filter %.snippet-list, $^) + xargs $(LYS_TO_TELY) -f doctitle,texidoc,verbatim --name=$@ --template=$< < $(filter %.snippet-list, $^) $(outdir)/lilypond-snippets.texi: $(GENERATED_ITELY_FILES) $(LY_FILES) diff --git a/input/lsr/README b/input/lsr/README index 1906148776..21bb3d6c2f 100644 --- a/input/lsr/README +++ b/input/lsr/README @@ -3,7 +3,7 @@ http://lsr.dsi.unimi.it/ To update this directory, do at top of the source tree -buildscripts/makelsr.py DIR +scripts/aux/makelsr.py DIR where DIR is the directory unpacked from lsr-snippets-doc-DATE tarball available on http://lsr.dsi.unimi.it/download. diff --git a/make/doc-i18n-root-targets.make b/make/doc-i18n-root-targets.make index 8afe50af84..3b97883dfd 100644 --- a/make/doc-i18n-root-targets.make +++ b/make/doc-i18n-root-targets.make @@ -1,4 +1,4 @@ default: local-WWW-2: $(OUT_HTML_FILES) - $(PYTHON) $(buildscript-dir)/mass-link.py --prepend-suffix .$(ISOLANG) hard $(outdir) $(top-build-dir)/Documentation/$(outdir) $(HTML_FILES) + $(buildscript-dir)/mass-link --prepend-suffix .$(ISOLANG) hard $(outdir) $(top-build-dir)/Documentation/$(outdir) $(HTML_FILES) diff --git a/make/doc-i18n-user-rules.make b/make/doc-i18n-user-rules.make index 66a97cc228..59bfe8b6f1 100644 --- a/make/doc-i18n-user-rules.make +++ b/make/doc-i18n-user-rules.make @@ -17,7 +17,7 @@ $(outdir)/%-big-page.html: $(outdir)/%.texi endif $(outdir)/%.pdftexi: $(outdir)/%.texi - $(PYTHON) $(buildscript-dir)/texi-gettext.py $(ISOLANG) $< + $(buildscript-dir)/texi-gettext $(ISOLANG) $< $(outdir)/%.pdf: $(outdir)/%.pdftexi cd $(outdir); texi2pdf $(TEXI2PDF_FLAGS) $(TEXINFO_PAPERSIZE_OPTION) $(notdir $*).pdftexi @@ -31,7 +31,7 @@ $(outdir)/%.png: $(top-build-dir)/Documentation/user/$(outdir)/%.png ln -f $< $@ $(XREF_MAPS_DIR)/%.$(ISOLANG).xref-map: $(outdir)/%.texi - $(PYTHON) $(buildscript-dir)/extract_texi_filenames.py -o $(XREF_MAPS_DIR) $< + $(buildscript-dir)/extract_texi_filenames -o $(XREF_MAPS_DIR) $< $(MASTER_TEXI_FILES): $(ITELY_FILES) $(ITEXI_FILES) diff --git a/make/doc-i18n-user-targets.make b/make/doc-i18n-user-targets.make index 44c9a1a3d6..4bb7c5b9c9 100644 --- a/make/doc-i18n-user-targets.make +++ b/make/doc-i18n-user-targets.make @@ -3,9 +3,9 @@ default: local-WWW-1: $(MASTER_TEXI_FILES) $(PDF_FILES) $(XREF_MAPS_FILES) local-WWW-2: $(DEEP_HTML_FILES) $(BIG_PAGE_HTML_FILES) $(DOCUMENTATION_LOCALE_TARGET) - find $(outdir) -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | xargs $(PYTHON) $(buildscript-dir)/html-gettext.py $(ISOLANG) - find $(outdir) -name '*.html' | xargs grep -L --label="" 'UNTRANSLATED NODE: IGNORE ME' | sed 's!$(outdir)/!!g' | xargs $(PYTHON) $(buildscript-dir)/mass-link.py --prepend-suffix .$(ISOLANG) hard $(outdir) $(top-build-dir)/Documentation/user/$(outdir) $(TELY_FILES:%.tely=%.pdf) - find $(outdir) \( -name 'lily-*.png' -o -name 'lily-*.ly' \) | sed 's!$(outdir)/!!g' | xargs $(PYTHON) $(buildscript-dir)/mass-link.py hard $(outdir) $(top-build-dir)/Documentation/user/$(outdir) + find $(outdir) -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | xargs $(buildscript-dir)/html-gettext $(ISOLANG) + find $(outdir) -name '*.html' | xargs grep -L --label="" 'UNTRANSLATED NODE: IGNORE ME' | sed 's!$(outdir)/!!g' | xargs $(buildscript-dir)/mass-link --prepend-suffix .$(ISOLANG) hard $(outdir) $(top-build-dir)/Documentation/user/$(outdir) $(TELY_FILES:%.tely=%.pdf) + find $(outdir) \( -name 'lily-*.png' -o -name 'lily-*.ly' \) | sed 's!$(outdir)/!!g' | xargs $(buildscript-dir)/mass-link hard $(outdir) $(top-build-dir)/Documentation/user/$(outdir) $(DOCUMENTATION_LOCALE_TARGET): $(MAKE) -C $(depth)/Documentation/po out=www messages diff --git a/make/generic-vars.make b/make/generic-vars.make index 428e5b900a..ffe17a38fc 100644 --- a/make/generic-vars.make +++ b/make/generic-vars.make @@ -8,7 +8,9 @@ # you do make dist # -buildscript-dir = $(src-depth)/buildscripts +buildscript-dir = $(top-build-dir)/scripts/build/$(outconfbase) +auxpython-dir = $(src-depth)/python/aux +auxscript-dir = $(src-depth)/scripts/aux script-dir = $(src-depth)/scripts input-dir = $(src-depth)/input @@ -18,7 +20,7 @@ mi2mu-dir = $(src-depth)/mi2mu make-dir = $(src-depth)/make include-flower = $(src-depth)/flower/include -export PYTHONPATH:=$(buildscript-dir):$(PYTHONPATH) +export PYTHONPATH:=$(auxpython-dir):$(PYTHONPATH) LILYPOND_INCLUDES = $(include-flower) $(depth)/flower/$(outdir) diff --git a/make/lilypond-vars.make b/make/lilypond-vars.make index 10b82d8d9f..4faeb8fcd5 100644 --- a/make/lilypond-vars.make +++ b/make/lilypond-vars.make @@ -3,7 +3,7 @@ ifeq ($(LILYPOND_EXTERNAL_BINARY),) # environment settings. -export PATH:=$(top-build-dir)/lily/$(outconfbase):$(top-build-dir)/buildscripts/$(outconfbase):$(top-build-dir)/scripts/$(outconfbase):$(PATH): +export PATH:=$(top-build-dir)/lily/$(outconfbase):$(buildscript-dir):$(top-build-dir)/scripts/$(outconfbase):$(PATH): export LILYPOND_BINARY=$(top-build-dir)/$(outconfbase)/bin/lilypond else @@ -77,5 +77,5 @@ export LYDOC_LOCALEDIR:= $(top-build-dir)/Documentation/po/out-www #texi-html for www only: LILYPOND_BOOK_FORMAT=$(if $(subst out-www,,$(notdir $(outdir))),texi,texi-html) LY2DVI = $(LILYPOND_BINARY) -LYS_TO_TELY = $(buildscript-dir)/lys-to-tely.py +LYS_TO_TELY = $(buildscript-dir)/lys-to-tely diff --git a/make/lysdoc-rules.make b/make/lysdoc-rules.make index 6dfa8e6f0b..6745887514 100644 --- a/make/lysdoc-rules.make +++ b/make/lysdoc-rules.make @@ -1,3 +1,3 @@ $(outdir)/collated-files.tely: $(COLLATED_FILES) - $(PYTHON) $(LYS_TO_TELY) --name=$(outdir)/collated-files.tely --title="$(TITLE)" $^ + $(LYS_TO_TELY) --name=$(outdir)/collated-files.tely --title="$(TITLE)" $^ diff --git a/mf/GNUmakefile b/mf/GNUmakefile index 898a4c245b..389f7b9baf 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -120,8 +120,8 @@ $(outdir)/aybabtu.fontname: $(outdir)/aybabtu.subfonts: echo $(subst .mf,,$(call src-wildcard,feta-braces-[a-z].mf)) > $@ -$(PE_SCRIPTS): $(top-build-dir)/buildscripts/$(outdir)/gen-emmentaler-scripts - $(PYTHON) $< --dir=$(outdir) +$(PE_SCRIPTS): $(buildscript-dir)/gen-emmentaler-scripts + $< --dir=$(outdir) ALL_FONTS = $(FETA_FONTS) PFB_FILES = $(ALL_FONTS:%=$(outdir)/%.pfb) @@ -174,12 +174,12 @@ $(outdir)/%.lisp \ $(outdir)/%.otf-gtable \ $(outdir)/%.enc \ $(outdir)/%.pe: $(outdir)/%.log - $(PYTHON) $(buildscript-dir)/mf-to-table.py \ - --global-lisp=$(outdir)/$('$(shell cd $(outdir); pwd)'' > $@ $(NCSB_OTFS): $(NCSB_SOURCE_FILES) \ - $(buildscript-dir)/pfx2ttf.fontforge + $(auxscript-dir)/pfx2ttf.fontforge $(foreach i, $(basename $(NCSB_SOURCE_FILES)), \ - $(FONTFORGE) -script $(buildscript-dir)/pfx2ttf.fontforge \ + $(FONTFORGE) -script $(auxscript-dir)/pfx2ttf.fontforge \ $(i).pfb $(i).afm $(outdir)/ && ) true # eof diff --git a/po/TODO b/po/TODO index bf0e29e069..fd7f1c31e7 100644 --- a/po/TODO +++ b/po/TODO @@ -27,8 +27,7 @@ FIX OR STANDARDISE TARGETS the file may accumulate the list of obsolete translations, which may help to translate some changed entries and may be safely dropped out. -* because I never install LilyPond, I (check-out buildscripts/set-lily.sh) - made these links: +* because I never install LilyPond, I made these links: ln -s $LILYPOND_SOURCEDIR/po/out/nl.mo $PREFIX/usr/share/locale/nl/LC_MESSAGES/lilypond.mo diff --git a/python/GNUmakefile b/python/GNUmakefile index a520a5efd6..5e706b1c50 100644 --- a/python/GNUmakefile +++ b/python/GNUmakefile @@ -1,5 +1,7 @@ depth = .. +SUBDIRS=aux + STEPMAKE_TEMPLATES=c python-module install-out po include $(depth)/make/stepmake.make diff --git a/python/aux/GNUmakefile b/python/aux/GNUmakefile new file mode 100644 index 0000000000..665812d00f --- /dev/null +++ b/python/aux/GNUmakefile @@ -0,0 +1,10 @@ +depth=../.. + +EXTRA_DIST_FILES = $(call src-wildcard,*.py) + +include $(depth)/make/stepmake.make + +default: + +local-clean: + rm -f *.pyc diff --git a/buildscripts/buildlib.py b/python/aux/buildlib.py similarity index 100% rename from buildscripts/buildlib.py rename to python/aux/buildlib.py diff --git a/buildscripts/manuals_definitions.py b/python/aux/manuals_definitions.py similarity index 100% rename from buildscripts/manuals_definitions.py rename to python/aux/manuals_definitions.py diff --git a/buildscripts/mirrortree.py b/python/aux/mirrortree.py similarity index 100% rename from buildscripts/mirrortree.py rename to python/aux/mirrortree.py diff --git a/buildscripts/postprocess_html.py b/python/aux/postprocess_html.py similarity index 100% rename from buildscripts/postprocess_html.py rename to python/aux/postprocess_html.py diff --git a/scripts/GNUmakefile b/scripts/GNUmakefile index bae147532a..1813590ff1 100644 --- a/scripts/GNUmakefile +++ b/scripts/GNUmakefile @@ -1,5 +1,7 @@ depth = .. +SUBDIRS=aux build + SEXECUTABLES=convert-ly lilypond-book abc2ly etf2ly midi2ly lilypond-invoke-editor musicxml2ly lilysong lilymidi STEPMAKE_TEMPLATES=script help2man po diff --git a/scripts/aux/GNUmakefile b/scripts/aux/GNUmakefile new file mode 100644 index 0000000000..a80126d541 --- /dev/null +++ b/scripts/aux/GNUmakefile @@ -0,0 +1,8 @@ +depth=../.. + +EXTRA_DIST_FILES = $(call src-wildcard,*.sh) $(call src-wildcard,*.py) +EXTRA_DIST_FILES += pfx2ttf.fontforge + +include $(depth)/make/stepmake.make + +default: diff --git a/buildscripts/build-coverage.sh b/scripts/aux/build-coverage.sh old mode 100644 new mode 100755 similarity index 82% rename from buildscripts/build-coverage.sh rename to scripts/aux/build-coverage.sh index b86ebaaf52..369b526e84 --- a/buildscripts/build-coverage.sh +++ b/scripts/aux/build-coverage.sh @@ -49,10 +49,10 @@ do gcov -o $depth/lily/out-cov/ -p $a > $a.gcov-summary done -python $depth/buildscripts/coverage.py --uncovered *.cc > uncovered.txt -python $depth/buildscripts/coverage.py --hotspots *.cc > hotspots.txt -python $depth/buildscripts/coverage.py --summary *.cc > summary.txt -python $depth/buildscripts/coverage.py --uncovered *.scm > uncovered-scheme.txt +$depth/scripts/aux/coverage.py --uncovered *.cc > uncovered.txt +$depth/scripts/aux/coverage.py --hotspots *.cc > hotspots.txt +$depth/scripts/aux/coverage.py --summary *.cc > summary.txt +$depth/scripts/aux/coverage.py --uncovered *.scm > uncovered-scheme.txt head -20 summary.txt diff --git a/buildscripts/build-profile.sh b/scripts/aux/build-profile.sh old mode 100644 new mode 100755 similarity index 100% rename from buildscripts/build-profile.sh rename to scripts/aux/build-profile.sh diff --git a/buildscripts/check_texi_refs.py b/scripts/aux/check_texi_refs.py old mode 100644 new mode 100755 similarity index 100% rename from buildscripts/check_texi_refs.py rename to scripts/aux/check_texi_refs.py diff --git a/buildscripts/check_translation.py b/scripts/aux/check_translation.py old mode 100644 new mode 100755 similarity index 100% rename from buildscripts/check_translation.py rename to scripts/aux/check_translation.py diff --git a/buildscripts/coverage.py b/scripts/aux/coverage.py old mode 100644 new mode 100755 similarity index 99% rename from buildscripts/coverage.py rename to scripts/aux/coverage.py index d44f81fdee..9ff86b0ef1 --- a/buildscripts/coverage.py +++ b/scripts/aux/coverage.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import os import glob diff --git a/buildscripts/find-superfluous-includes.py b/scripts/aux/find-superfluous-includes.py old mode 100644 new mode 100755 similarity index 97% rename from buildscripts/find-superfluous-includes.py rename to scripts/aux/find-superfluous-includes.py index ded1087da7..de40df088a --- a/buildscripts/find-superfluous-includes.py +++ b/scripts/aux/find-superfluous-includes.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import sys import re import os diff --git a/buildscripts/fixcc.py b/scripts/aux/fixcc.py old mode 100644 new mode 100755 similarity index 99% rename from buildscripts/fixcc.py rename to scripts/aux/fixcc.py index 3cc162b8a2..167994cdab --- a/buildscripts/fixcc.py +++ b/scripts/aux/fixcc.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # fixcc -- nitpick lily's c++ code diff --git a/buildscripts/makelsr.py b/scripts/aux/makelsr.py old mode 100644 new mode 100755 similarity index 100% rename from buildscripts/makelsr.py rename to scripts/aux/makelsr.py diff --git a/buildscripts/musicxml_generate_intervals.py b/scripts/aux/musicxml_generate_intervals.py old mode 100644 new mode 100755 similarity index 100% rename from buildscripts/musicxml_generate_intervals.py rename to scripts/aux/musicxml_generate_intervals.py diff --git a/buildscripts/musicxml_generate_keys.py b/scripts/aux/musicxml_generate_keys.py old mode 100644 new mode 100755 similarity index 100% rename from buildscripts/musicxml_generate_keys.py rename to scripts/aux/musicxml_generate_keys.py diff --git a/buildscripts/musicxml_generate_timesignatures.py b/scripts/aux/musicxml_generate_timesignatures.py old mode 100644 new mode 100755 similarity index 100% rename from buildscripts/musicxml_generate_timesignatures.py rename to scripts/aux/musicxml_generate_timesignatures.py diff --git a/buildscripts/pfx2ttf.fontforge b/scripts/aux/pfx2ttf.fontforge similarity index 97% rename from buildscripts/pfx2ttf.fontforge rename to scripts/aux/pfx2ttf.fontforge index 6428c7cf86..7d87fae17a 100644 --- a/buildscripts/pfx2ttf.fontforge +++ b/scripts/aux/pfx2ttf.fontforge @@ -1,5 +1,3 @@ -#!@FONTFORGE@ - Open($1); MergeKern($2) diff --git a/buildscripts/readlink.py b/scripts/aux/readlink.py old mode 100644 new mode 100755 similarity index 100% rename from buildscripts/readlink.py rename to scripts/aux/readlink.py diff --git a/buildscripts/tely-gettext.py b/scripts/aux/tely-gettext.py old mode 100644 new mode 100755 similarity index 87% rename from buildscripts/tely-gettext.py rename to scripts/aux/tely-gettext.py index b4e566044f..12f80aa8dc --- a/buildscripts/tely-gettext.py +++ b/scripts/aux/tely-gettext.py @@ -1,13 +1,12 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# tely-gettext.py # Temporary script that helps translated docs sources conversion # for texi2html processing -# USAGE: tely-gettext.py BUILDSCRIPT-DIR LOCALEDIR LANG FILES +# USAGE: tely-gettext.py PYTHON-DIR LOCALEDIR LANG FILES -print "tely_gettext.py" +print "tely-gettext.py" import sys import re @@ -17,8 +16,8 @@ import gettext if len (sys.argv) > 3: buildscript_dir, localedir, lang = sys.argv[1:4] else: - print """USAGE: tely-gettext.py BUILDSCRIPT-DIR LOCALEDIR LANG FILES - For example buildscripts/tely-gettext.py buildscripts Documentation/po/out-www de Documentation/de/user/*.tely""" + print """USAGE: tely-gettext.py PYTHON-DIR LOCALEDIR LANG FILES + For example scripts/aux/tely-gettext.py python/out Documentation/po/out-www de Documentation/de/user/*.tely""" sys.exit (1) sys.path.append (buildscript_dir) diff --git a/buildscripts/texi-langutils.py b/scripts/aux/texi-langutils.py old mode 100644 new mode 100755 similarity index 99% rename from buildscripts/texi-langutils.py rename to scripts/aux/texi-langutils.py index 720b520a2e..7c34ce4adb --- a/buildscripts/texi-langutils.py +++ b/scripts/aux/texi-langutils.py @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!/usr/bin/env python # texi-langutils.py # WARNING: this script can't find files included in a different directory diff --git a/buildscripts/texi-skeleton-update.py b/scripts/aux/texi-skeleton-update.py old mode 100644 new mode 100755 similarity index 97% rename from buildscripts/texi-skeleton-update.py rename to scripts/aux/texi-skeleton-update.py index f761408274..250b52e836 --- a/buildscripts/texi-skeleton-update.py +++ b/scripts/aux/texi-skeleton-update.py @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!/usr/bin/env python # texi-skeleton-update.py import sys diff --git a/buildscripts/translations-status.py b/scripts/aux/translations-status.py old mode 100644 new mode 100755 similarity index 100% rename from buildscripts/translations-status.py rename to scripts/aux/translations-status.py diff --git a/buildscripts/update-snippets.py b/scripts/aux/update-snippets.py old mode 100644 new mode 100755 similarity index 99% rename from buildscripts/update-snippets.py rename to scripts/aux/update-snippets.py index 6b70c79467..6ccdbc1ecd --- a/buildscripts/update-snippets.py +++ b/scripts/aux/update-snippets.py @@ -1,4 +1,4 @@ -#!@PYTHON@ +#!/usr/bin/env python # update-snippets.py # USAGE: update-snippets.py REFERENCE-DIR TARGET-DIR FILES diff --git a/buildscripts/GNUmakefile b/scripts/build/GNUmakefile similarity index 88% rename from buildscripts/GNUmakefile rename to scripts/build/GNUmakefile index 3a40aa0fad..5a62a47a98 100644 --- a/buildscripts/GNUmakefile +++ b/scripts/build/GNUmakefile @@ -1,7 +1,6 @@ -depth = .. +depth = ../.. STEPMAKE_TEMPLATES=script install po -EXTRA_DIST_FILES=pfx2ttf.fontforge include $(depth)/make/stepmake.make diff --git a/buildscripts/bib2html.py b/scripts/build/bib2html.py similarity index 100% rename from buildscripts/bib2html.py rename to scripts/build/bib2html.py diff --git a/buildscripts/catmidi.py b/scripts/build/catmidi.py similarity index 100% rename from buildscripts/catmidi.py rename to scripts/build/catmidi.py diff --git a/buildscripts/extract_texi_filenames.py b/scripts/build/extract_texi_filenames.py similarity index 100% rename from buildscripts/extract_texi_filenames.py rename to scripts/build/extract_texi_filenames.py diff --git a/buildscripts/gen-emmentaler-scripts.py b/scripts/build/gen-emmentaler-scripts.py similarity index 100% rename from buildscripts/gen-emmentaler-scripts.py rename to scripts/build/gen-emmentaler-scripts.py diff --git a/buildscripts/genicon.py b/scripts/build/genicon.py similarity index 100% rename from buildscripts/genicon.py rename to scripts/build/genicon.py diff --git a/buildscripts/grand-replace.sh b/scripts/build/grand-replace.sh similarity index 97% rename from buildscripts/grand-replace.sh rename to scripts/build/grand-replace.sh index 645eae6ea8..86d2608b80 100644 --- a/buildscripts/grand-replace.sh +++ b/scripts/build/grand-replace.sh @@ -1,4 +1,4 @@ -#! @BASH@ +#!@BASH@ # note: dash does not work pytt '(Copyright|\(c\)|\(C\)|@copyright\{\})\s*2007' '\1 2007--2008' $(find . -mindepth 2 -type f | grep -Ev 'out/|out-scons|out-www/|.git/|.scon|#|~' | grep -iv 'change') diff --git a/buildscripts/help2man.pl b/scripts/build/help2man.pl similarity index 100% rename from buildscripts/help2man.pl rename to scripts/build/help2man.pl diff --git a/buildscripts/html-gettext.py b/scripts/build/html-gettext.py similarity index 100% rename from buildscripts/html-gettext.py rename to scripts/build/html-gettext.py diff --git a/buildscripts/install-info-html.sh b/scripts/build/install-info-html.sh similarity index 100% rename from buildscripts/install-info-html.sh rename to scripts/build/install-info-html.sh diff --git a/buildscripts/lilypond-words.py b/scripts/build/lilypond-words.py similarity index 100% rename from buildscripts/lilypond-words.py rename to scripts/build/lilypond-words.py diff --git a/buildscripts/lys-to-tely.py b/scripts/build/lys-to-tely.py similarity index 100% rename from buildscripts/lys-to-tely.py rename to scripts/build/lys-to-tely.py diff --git a/buildscripts/mass-link.py b/scripts/build/mass-link.py similarity index 100% rename from buildscripts/mass-link.py rename to scripts/build/mass-link.py diff --git a/buildscripts/mf-to-table.py b/scripts/build/mf-to-table.py similarity index 100% rename from buildscripts/mf-to-table.py rename to scripts/build/mf-to-table.py diff --git a/buildscripts/mf2pt1.pl b/scripts/build/mf2pt1.pl similarity index 99% rename from buildscripts/mf2pt1.pl rename to scripts/build/mf2pt1.pl index 804fc1f999..95df0f8206 100644 --- a/buildscripts/mf2pt1.pl +++ b/scripts/build/mf2pt1.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!@PERL@ ################################################## # Convert stylized Metafont to PostScript Type 1 # diff --git a/buildscripts/mutopia-index.py b/scripts/build/mutopia-index.py similarity index 99% rename from buildscripts/mutopia-index.py rename to scripts/build/mutopia-index.py index 50e4ebbf29..31fa6ac492 100644 --- a/buildscripts/mutopia-index.py +++ b/scripts/build/mutopia-index.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!@PYTHON@ # mutopia-index.py import fnmatch diff --git a/buildscripts/output-distance.py b/scripts/build/output-distance.py similarity index 99% rename from buildscripts/output-distance.py rename to scripts/build/output-distance.py index 8586d2481a..afc4cf908f 100644 --- a/buildscripts/output-distance.py +++ b/scripts/build/output-distance.py @@ -1,10 +1,10 @@ -#!@TARGET_PYTHON@ +#!@PYTHON@ import sys import optparse import os import math -## so we can call directly as buildscripts/output-distance.py +## so we can call directly as scripts/build/output-distance.py me_path = os.path.abspath (os.path.split (sys.argv[0])[0]) sys.path.insert (0, me_path + '/../python/') sys.path.insert (0, me_path + '/../python/out/') @@ -1011,7 +1011,7 @@ def system (x): def test_paired_files (): print paired_files (os.environ["HOME"] + "/src/lilypond/scripts/", - os.environ["HOME"] + "/src/lilypond-stable/buildscripts/", '*.py') + os.environ["HOME"] + "/src/lilypond-stable/scripts/build/", '*.py') def test_compare_trees (): diff --git a/buildscripts/pytt.py b/scripts/build/pytt.py similarity index 97% rename from buildscripts/pytt.py rename to scripts/build/pytt.py index 1026c02bf7..09f5c7b1f6 100644 --- a/buildscripts/pytt.py +++ b/scripts/build/pytt.py @@ -1,4 +1,4 @@ -#! @PYTHON@ +#!@PYTHON@ import os import re diff --git a/buildscripts/texi-gettext.py b/scripts/build/texi-gettext.py similarity index 100% rename from buildscripts/texi-gettext.py rename to scripts/build/texi-gettext.py diff --git a/buildscripts/texi2omf.py b/scripts/build/texi2omf.py similarity index 100% rename from buildscripts/texi2omf.py rename to scripts/build/texi2omf.py diff --git a/buildscripts/www_post.py b/scripts/build/www_post.py similarity index 99% rename from buildscripts/www_post.py rename to scripts/build/www_post.py index 1af5c922ec..29f80cf09f 100644 --- a/buildscripts/www_post.py +++ b/scripts/build/www_post.py @@ -47,7 +47,7 @@ dirs, symlinks, files = mirrortree.walk_tree ( tree_roots = doc_dirs, process_dirs = outdir, exclude_dirs = '(^|/)(' + r'|po|out|out-test|.*?[.]t2d|\w*?-root)(/|$)|Documentation/(' + '|'.join ([l.code for l in langdefs.LANGUAGES]) + ')', - find_files = r'.*?\.(?:midi|html|pdf|png|txt|i?ly|signature|css|zip|xml|mxl)$|VERSION', + find_files = r'.*?\.(?:midi|html|pdf|png|txt|i?ly|signature|css)$|VERSION', exclude_files = r'lily-[0-9a-f]+.*\.(pdf|txt)') # actual mirrorring stuff diff --git a/stepmake/stepmake/help2man-rules.make b/stepmake/stepmake/help2man-rules.make index 51073c20b1..e0498b0148 100644 --- a/stepmake/stepmake/help2man-rules.make +++ b/stepmake/stepmake/help2man-rules.make @@ -1,5 +1,5 @@ # We must invoke the generated $(outdir)/help2man script instead of -# the help2man.pl source, which means that the buildscripts directory +# the help2man.pl source, which means that the scripts/build directory # must be built first. # # From the perlrun man-page: @@ -15,10 +15,10 @@ # cases. Four more explaining what a line comment is, and that it may # be parsed, same here. -HELP2MAN_COMMAND = $(PERL) $(top-build-dir)/buildscripts/$(outbase)/help2man $< > $@ +HELP2MAN_COMMAND = $(buildscript-dir)/help2man $< > $@ ifeq ($(strip $(CROSS)),no) -$(outdir)/%.1: $(outdir)/% +$(outdir)/%.1: $(outdir)/% $(buildscript-dir)/help2man $(HELP2MAN_COMMAND) else # When cross building, some manpages will not build because the @@ -33,3 +33,6 @@ ifneq ($(outdir),./out) $(outdir)/%.1: out/%.1 cp $< $@ endif + +$(buildscript-dir)/help2man: + $(MAKE) -C $(depth)/scripts/build diff --git a/stepmake/stepmake/metafont-rules.make b/stepmake/stepmake/metafont-rules.make index 592a47b351..ab28ced9a5 100644 --- a/stepmake/stepmake/metafont-rules.make +++ b/stepmake/stepmake/metafont-rules.make @@ -19,7 +19,7 @@ $(outdir)/%.pfb: %.mf $(outdir)/mf2pt1.mem TMP=`mktemp -d $(outdir)/pfbtemp.XXXXXXXXX` \ && ( cd $$TMP \ && ln -s ../mf2pt1.mem . \ - && MFINPUTS=$(top-src-dir)/mf:..:: $(PERL) $(top-src-dir)/buildscripts/mf2pt1.pl $(MF2PT1_OPTIONS) $< $(METAFONT_QUIET)) \ + && MFINPUTS=$(top-src-dir)/mf:..:: $(buildscript-dir)/mf2pt1 $(MF2PT1_OPTIONS) $< $(METAFONT_QUIET)) \ && mv $$TMP/*pfb $(outdir); \ rm -rf $$TMP diff --git a/stepmake/stepmake/texinfo-rules.make b/stepmake/stepmake/texinfo-rules.make index ae2c4acc8f..27924f71e1 100644 --- a/stepmake/stepmake/texinfo-rules.make +++ b/stepmake/stepmake/texinfo-rules.make @@ -6,12 +6,12 @@ # $(outdir)/$(INFO_IMAGES_DIR)/*.png symlinks are only needed to view # out-www/*.info with Emacs -- HTML docs no longer need these # symlinks, see replace_symlinks_urls in -# buildscripts/add_html_footer.py. +# python/aux/postprocess_html.py. # make dereferences symlinks, and $(INFO_IMAGES_DIR) is a symlink # to $(outdir), so we can't use directly $(INFO_IMAGES_DIR) as a # prerequisite, otherwise %.info are always outdated (because older -# than $(outdir), hence this .dep file +# than $(outdir)), hence this .dep file $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep: $(INFO_DOCS:%=$(outdir)/%.texi) ifneq ($(INFO_IMAGES_DIR),) @@ -19,7 +19,7 @@ ifneq ($(INFO_IMAGES_DIR),) ln -s $(outdir) $(INFO_IMAGES_DIR) mkdir -p $(outdir)/$(INFO_IMAGES_DIR) rm -f $(outdir)/$(INFO_IMAGES_DIR)/[a-f0-9][a-f0-9] - cd $(outdir)/$(INFO_IMAGES_DIR) && $(PYTHON) $(top-src-dir)/buildscripts/mass-link.py symbolic .. . [a-f0-9][a-f0-9] + cd $(outdir)/$(INFO_IMAGES_DIR) && $(buildscript-dir)/mass-link symbolic .. . [a-f0-9][a-f0-9] endif touch $@ @@ -72,7 +72,7 @@ $(outdir)/%.texi: %.texi cp $< $@ $(XREF_MAPS_DIR)/%.xref-map: $(outdir)/%.texi - $(PYTHON) $(buildscript-dir)/extract_texi_filenames.py -o $(XREF_MAPS_DIR) $< + $(buildscript-dir)/extract_texi_filenames -o $(XREF_MAPS_DIR) $< $(outdir)/version.%: $(top-src-dir)/VERSION diff --git a/stepmake/stepmake/texinfo-vars.make b/stepmake/stepmake/texinfo-vars.make index 0fbf0f5919..ca567b6868 100644 --- a/stepmake/stepmake/texinfo-vars.make +++ b/stepmake/stepmake/texinfo-vars.make @@ -6,7 +6,7 @@ TEXINFO_SOURCES = $(TEXI_FILES) OUTTXT_FILES += $(addprefix $(outdir)/,$(TEXI_FILES:.texi=.txt)) -GENERATE_OMF = $(PYTHON) $(buildscript-dir)/texi2omf.py --format $(1) --location $(webdir)/$(tree-dir)/out-www/$(notdir $(basename $@)) --version $(TOPLEVEL_VERSION) $< > $@ +GENERATE_OMF = $(buildscript-dir)/texi2omf --format $(1) --location $(webdir)/$(tree-dir)/out-www/$(notdir $(basename $@)) --version $(TOPLEVEL_VERSION) $< > $@ TEXINFO_PAPERSIZE_OPTION= $(if $(findstring $(PAPERSIZE),a4),,-t @afourpaper) diff --git a/vim/GNUmakefile b/vim/GNUmakefile index fd82e40164..ad032e42fe 100644 --- a/vim/GNUmakefile +++ b/vim/GNUmakefile @@ -9,7 +9,7 @@ EXTRA_DIST_FILES=$(call src-wildcard,*.vim) vimrc LILYPOND_WORDS = $(outdir)/lilypond-words $(outdir)/lilypond-words.vim LILYPOND_WORDS_DEPENDS =\ $(top-src-dir)/lily/lily-lexer.cc \ - $(buildscript-dir)/lilypond-words.py \ + $(buildscript-dir)/lilypond-words \ $(top-src-dir)/scm/markup.scm \ $(top-src-dir)/ly/engraver-init.ly @@ -31,8 +31,11 @@ local-uninstall: done -rmdir -p $(DESTDIR)$(vimdir) +$(buildscript-dir)/lilypond-words: + make -C $(depth)/scripts/build + $(LILYPOND_WORDS): - cd $(top-src-dir) && $(PYTHON) buildscripts/lilypond-words.py --words --vim --dir=$(top-build-dir)/vim/$(outconfbase) + cd $(top-src-dir) && $(buildscript-dir)/lilypond-words --words --vim --dir=$(top-build-dir)/vim/$(outconfbase) all: $(LILYPOND_WORDS) -- 2.39.2