[PATCH 2 of 2] Makefile: remove the build folder manually

Brodie Rao brodie at bitheap.org
Sat Sep 25 20:05:26 CDT 2010


# HG changeset patch
# User Brodie Rao <brodie at bitheap.org>
# Date 1285462065 18000
# Node ID e406f6553c9cd778fb269cd94756837c6a0364f2
# Parent  30af95ad22284dd55120ac5442d753b9138b93f0
Makefile: remove the build folder manually

Given a system Python version of 2.6, the following won't clean up build:

  $ make local PYTHON=python2.7
  $ make clean

Distutils only cleans up build subdirectories for the current Python
version.

This patch cleans up the build folder even if PYTHON=python2.7 isn't
specified to clean.

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -45,7 +45,7 @@ clean:
 	-$(PYTHON) setup.py clean --all # ignore errors from this command
 	find . \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
 	rm -f MANIFEST mercurial/__version__.py tests/*.err
-	rm -rf mercurial/locale
+	rm -rf build mercurial/locale
 	$(MAKE) -C doc clean
 
 install: install-bin install-doc


More information about the Mercurial-devel mailing list