]> git.donarmstrong.com Git - lilypond.git/blobdiff - stepmake/stepmake/python-module-rules.make
Merge branch 'master' of carldsorensen@git.sv.gnu.org:/srv/git/lilypond
[lilypond.git] / stepmake / stepmake / python-module-rules.make
index da5575f7127b13cecf3dace13995c8c8f5a29c5f..f32732f5847cb9e9bc052036269d05177bebc14c 100644 (file)
@@ -3,8 +3,12 @@ $(outdir)/%$(SHARED_MODULE_SUFFIX): $(outdir)/%.lo
        $(LD) -o $@ $< $(SHARED_FLAGS) $(ALL_LDFLAGS)
 
 $(outdir)/%.pyc: $(outdir)/%.py
-       $(PYTHON) -c 'import py_compile; py_compile.compile ("$<")'
+       PYTHONOPTIMIZE= $(PYTHON) -c 'import py_compile; py_compile.compile ("$<")'
+
+$(outdir)/%.pyo: $(outdir)/%.py
+       $(PYTHON) -O -c 'import py_compile; py_compile.compile ("$<")'
 
 $(outdir)/%.py: %.py $(config_make)
-       cat $< | sed $(sed-atvariables) > $@
+       cat $< | sed $(sed-atfiles) | sed $(sed-atvariables) > $@
        chmod 755 $@
+