]> git.donarmstrong.com Git - lilypond.git/commitdiff
Always use $(PYTHON) scriptname.py.
authorMatthias Kilian <kili@outback.escape.de>
Sun, 27 Dec 2009 15:53:20 +0000 (16:53 +0100)
committerJohn Mandereau <john.mandereau@gmail.com>
Sun, 27 Dec 2009 16:23:01 +0000 (17:23 +0100)
The often-used idiom #!/usr/bin/env python not only is potentially
dangerous, but it also fails if there are several versions of python
installed, with the python binaries named python2.4, python2.5,
python2.6, ...

This patch hopefully catches all remaining cases of a missing $(PYTHON).

Documentation/GNUmakefile
Documentation/po/GNUmakefile

index 24bd9663cb7d75b4dad47f76356e5d6307e099e9..30187d70a8f7f017b1cb013b998a0880fc0d0411 100644 (file)
@@ -219,7 +219,7 @@ $(outdir)/notation.texi: $(outdir)/ly-grammar.txt
 ## Rules for the automatically generated documentation
 $(outdir)/ly-grammar.txt: $(top-src-dir)/lily/parser.yy
        cd $(outdir) && $(BISON) -v $<
-       $(auxscript-dir)/yyout2grammar.py $(outdir)/parser.output $@
+       $(PYTHON) $(auxscript-dir)/yyout2grammar.py $(outdir)/parser.output $@
 
 # There used to be a dependency on a dummy target, to force a rebuild
 # of internals every time.  however, this triggers
@@ -249,7 +249,7 @@ new-lang-dir:
        cp fr/$(DIR)/GNUmakefile $(ISOLANG)/$(DIR)
        sed -i -e 's/ISOLANG *= *fr/ISOLANG = $(ISOLANG)/' $(ISOLANG)/GNUmakefile $(ISOLANG)/$(DIR)/GNUmakefile
        rm -f $(outdir)/*.*tely $(outdir)/*.*texi
-       $(auxscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) -o doc.pot --skeleton --gettext $$(cd $(ISOLANG) && ls -1 ../$(DIR).tely ../$(DIR).texi)
+       $(PYTHON) $(auxscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) -o doc.pot --skeleton --gettext $$(cd $(ISOLANG) && ls -1 ../$(DIR).tely ../$(DIR).texi)
        for i in $$(cd $(outdir) && ls -1 $(DIR).tely $(DIR).texi); do\
            test -e $(ISOLANG)/$$i || mv $(outdir)/$$i $(ISOLANG)/$$i;\
        done
@@ -274,11 +274,11 @@ TRANSLATION_FILES = $(shell git ls-files $(ISOLANG) | grep -v GNUmakefile)
 TELY_FILES = $(call src-wildcard,$(ISOLANG)/*.tely)
 skeleton-update:
        mkdir -p $(ISOLANG)
-       $(auxscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) --skeleton $(TELY_FILES:$(ISOLANG)/%.tely=../%.tely)
-       $(auxscript-dir)/texi-skeleton-update.py $(ISOLANG) $(outdir)
+       $(PYTHON) $(auxscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) --skeleton $(TELY_FILES:$(ISOLANG)/%.tely=../%.tely)
+       $(PYTHON) $(auxscript-dir)/texi-skeleton-update.py $(ISOLANG) $(outdir)
 
 snippet-update:
-       $(auxscript-dir)/update-snippets.py user $(ISOLANG) '*.itely'
+       $(PYTHON) $(auxscript-dir)/update-snippets.py user $(ISOLANG) '*.itely'
 
 DOCUMENTS_INCLUDES:=-I $(ISOLANG) \
 -I $(top-build-dir)/Documentation/$(ISOLANG)/out-www \
@@ -297,21 +297,21 @@ DOCUMENTS_INCLUDES:=-I . \
 endif # ISOLANG
 
 check-xrefs:
-       $(auxscript-dir)/check_texi_refs.py --batch \
+       $(PYTHON) $(auxscript-dir)/check_texi_refs.py --batch \
        $(DOCUMENTS_INCLUDES) $(auxpython-dir)/manuals_definitions.py
 
 fix-xrefs:
-       $(auxscript-dir)/check_texi_refs.py --auto-fix \
+       $(PYTHON) $(auxscript-dir)/check_texi_refs.py --auto-fix \
        $(DOCUMENTS_INCLUDES) $(auxpython-dir)/manuals_definitions.py
 
 check-translation:
-       ISOLANG=$(ISOLANG) $(auxscript-dir)/check_translation.py $(CHECK_TRANSLATION_FLAGS) $(TRANSLATION_FILES)
+       ISOLANG=$(ISOLANG) $(PYTHON) $(auxscript-dir)/check_translation.py $(CHECK_TRANSLATION_FLAGS) $(TRANSLATION_FILES)
 
 update-translation:
-       ISOLANG=$(ISOLANG) $(auxscript-dir)/check_translation.py --update $(CHECK_TRANSLATION_FLAGS) $(TRANSLATION_FILES)
+       ISOLANG=$(ISOLANG) $(PYTHON) $(auxscript-dir)/check_translation.py --update $(CHECK_TRANSLATION_FLAGS) $(TRANSLATION_FILES)
 
 translation-status:
        make -C po out=www messages
-       $(auxscript-dir)/translations-status.py
+       $(PYTHON) $(auxscript-dir)/translations-status.py
 
 .SECONDARY:
index 9224f2c1dc917a2bd39803bf499e508cfd0474b6..65d7e3a1bc6145b01868539afb2613dce9ca9d1b 100644 (file)
@@ -25,7 +25,7 @@ $(outdir)/messages: $(MO_FILES)
        touch $@
 
 po-update:
-       $(auxscript-dir)/texi-langutils.py -d $(outdir) -o texi.pot --gettext $(TELY_FILES:%.tely=../%.tely)
+       $(PYTHON) $(auxscript-dir)/texi-langutils.py -d $(outdir) -o texi.pot --gettext $(TELY_FILES:%.tely=../%.tely)
        $(foreach i, $(DOC_PO_SOURCES), cp $(top-src-dir)/$(i) $(outdir) &&) true
        cd $(outdir) && sed -i -e s/_doc/_/g $(foreach i, $(DOC_PO_SOURCES), $(notdir $(i)))
        cd $(outdir) && xgettext -cjn -L Python -o buildscripts.pot $(foreach i, $(DOC_PO_SOURCES), $(notdir $(i)))