]> granicus.if.org Git - python/commitdiff
Added a pycremoval rule. Called by clean, it removes all .pyc and .pyo files.
authorBrett Cannon <bcannon@gmail.com>
Tue, 18 Apr 2006 23:58:52 +0000 (23:58 +0000)
committerBrett Cannon <bcannon@gmail.com>
Tue, 18 Apr 2006 23:58:52 +0000 (23:58 +0000)
Handy to have as a separate rule from clean when mucking around with bytecode
generation.

Makefile.pre.in

index d3539c27812195ea9257d104f40cb60cc50584cc..f8a7481f1623dcbf0193baf4650076a40d5edc46 100644 (file)
@@ -988,11 +988,12 @@ TAGS::
 
 # Sanitation targets -- clean leaves libraries, executables and tags
 # files, which clobber removes those as well
+pycremoval:
+       find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
 
-clean:
+clean: pycremoval
        find . -name '*.o' -exec rm -f {} ';'
        find . -name '*.s[ol]' -exec rm -f {} ';'
-       find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
        find $(srcdir)/build -name 'fficonfig.h' -exec rm -f {} ';' || true
        find $(srcdir)/build -name 'fficonfig.py' -exec rm -f {} ';' || true