X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=stepmake%2Fstepmake%2Fpython-module-rules.make;h=f32732f5847cb9e9bc052036269d05177bebc14c;hb=45a78dfa12df96f7271de565c3d9ad8da7ccc065;hp=8f37c4153088cd969402ce489151f8fec8e70b2e;hpb=31de5573a9c7e3a69b5ab67e2b0734ba88285b64;p=lilypond.git diff --git a/stepmake/stepmake/python-module-rules.make b/stepmake/stepmake/python-module-rules.make index 8f37c41530..f32732f584 100644 --- a/stepmake/stepmake/python-module-rules.make +++ b/stepmake/stepmake/python-module-rules.make @@ -1,10 +1,14 @@ $(outdir)/%$(SHARED_MODULE_SUFFIX): $(outdir)/%.lo - $(LD) $(SHARED_FLAGS) -o $@ $< $(ALL_LDFLAGS) + $(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 $@ +