X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=stepmake%2Fstepmake%2Fpython-module-rules.make;h=bf99f8feaa569204a5a343601ff98895705452eb;hb=5b1f3adfe5e3561eaa0f9440e0697054084b7107;hp=da5575f7127b13cecf3dace13995c8c8f5a29c5f;hpb=616d50b39de201c3801049808165b599742c5559;p=lilypond.git diff --git a/stepmake/stepmake/python-module-rules.make b/stepmake/stepmake/python-module-rules.make index da5575f712..bf99f8feaa 100644 --- a/stepmake/stepmake/python-module-rules.make +++ b/stepmake/stepmake/python-module-rules.make @@ -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)/%.py: %.py $(config_make) - cat $< | sed $(sed-atvariables) > $@ +$(outdir)/%.pyo: $(outdir)/%.py + $(PYTHON) -O -c 'import py_compile; py_compile.compile ("$<")' + +$(outdir)/%.py: %.py $(config_make) $(depth)/VERSION + cat $< | sed $(sed-atfiles) | sed $(sed-atvariables) > $@ chmod 755 $@ +