X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=stepmake%2Fstepmake%2Fpython-module-rules.make;h=bf99f8feaa569204a5a343601ff98895705452eb;hb=b872748c6aa8bb721ced458691b38ac2fac5dfc8;hp=d05fa733c238fd29385ce3c7c60f574e7fae88ca;hpb=fceacfbaa44cdf0eafcfbcce0ea97ebf5d823c4e;p=lilypond.git diff --git a/stepmake/stepmake/python-module-rules.make b/stepmake/stepmake/python-module-rules.make index d05fa733c2..bf99f8feaa 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)/%.py: %.py - 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 $@ +