Rev 2936: Makefile fixes - hooks.html generation & allow python to be overridden (Ian Clatworthy) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Oct 24 13:49:20 BST 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 2936
revision-id: pqm at pqm.ubuntu.com-20071024124917-xb75eckyxx6vkrlg
parent: pqm at pqm.ubuntu.com-20071024090631-gwml8hkp57feuoy3
parent: ian.clatworthy at internode.on.net-20071024120629-ug18cmlmjnynlbn1
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2007-10-24 13:49:17 +0100
message:
  Makefile fixes - hooks.html generation & allow python to be overridden (Ian Clatworthy)
modified:
  Makefile                       Makefile-20050805140406-d96e3498bb61c5bb
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
    ------------------------------------------------------------
    revno: 2935.1.1
    merged: ian.clatworthy at internode.on.net-20071024120629-ug18cmlmjnynlbn1
    parent: pqm at pqm.ubuntu.com-20071024090631-gwml8hkp57feuoy3
    parent: ian.clatworthy at internode.on.net-20071024080025-0nrboebjvpy0jqsu
    committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
    branch nick: ianc-integration
    timestamp: Wed 2007-10-24 22:06:29 +1000
    message:
      Makefile fixes - hooks.html generation & allow python to be overridden (Ian Clatworthy)
    ------------------------------------------------------------
    revno: 2934.2.1
    merged: ian.clatworthy at internode.on.net-20071024080025-0nrboebjvpy0jqsu
    parent: pqm at pqm.ubuntu.com-20071024072800-p2qtv2632xrbrs02
    committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
    branch nick: bzr.Makefile-fixes
    timestamp: Wed 2007-10-24 18:00:25 +1000
    message:
      generates hooks.html correctly and generalise python command in Makefile
=== modified file 'Makefile'
--- a/Makefile	2007-10-20 03:27:12 +0000
+++ b/Makefile	2007-10-24 08:00:25 +0000
@@ -31,7 +31,7 @@
 	$(PYTHON) setup.py build_ext -i
 
 check: docs extensions
-	python -Werror -O ./bzr selftest -1v $(tests)
+	$(PYTHON) -Werror -O ./bzr selftest -1v $(tests)
 	@echo "Running all tests with no locale."
 	LC_CTYPE= LANG=C LC_ALL= ./bzr selftest -1v $(tests) 2>&1 | sed -e 's/^/[ascii] /'
 
@@ -48,16 +48,16 @@
 	pyflakes bzrlib | grep -v ' imported but unused'
 
 clean:
-	python setup.py clean
+	$(PYTHON) setup.py clean
 	-find . -name "*.pyc" -o -name "*.pyo" -o -name "*.so" | xargs rm -f
 
 # Build API documentation
 docfiles = bzr bzrlib
 api-docs:
 	mkdir -p api/html
-	PYTHONPATH=$(PWD) python tools/bzr_epydoc --html -o api/html --docformat 'restructuredtext en' $(docfiles)
+	PYTHONPATH=$(PWD) $(PYTHON) tools/bzr_epydoc --html -o api/html --docformat 'restructuredtext en' $(docfiles)
 check-api-docs:
-	PYTHONPATH=$(PWD) python tools/bzr_epydoc --check --docformat 'restructuredtext en' $(docfiles)
+	PYTHONPATH=$(PWD) $(PYTHON) tools/bzr_epydoc --check --docformat 'restructuredtext en' $(docfiles)
 
 # build tags for emacs and vim
 TAGS:
@@ -73,9 +73,9 @@
 
 # set PRETTY to get docs that look like the Bazaar web site
 ifdef PRETTY
-rst2html := python tools/rst2prettyhtml.py doc/bazaar-vcs.org.kid 
+rst2html := $(PYTHON) tools/rst2prettyhtml.py doc/bazaar-vcs.org.kid 
 else
-rst2html := python tools/rst2html.py --link-stylesheet --footnote-references=superscript 
+rst2html := $(PYTHON) tools/rst2html.py --link-stylesheet --footnote-references=superscript 
 endif
 
 # translate txt docs to html
@@ -86,6 +86,7 @@
 doc_dir := doc/en/user-guide
 txt_files := $(wildcard $(addsuffix /*.txt, $(doc_dir))) $(derived_txt_files) \
 	doc/en/mini-tutorial/index.txt \
+	doc/en/user-reference/hooks.txt \
 	doc/index.txt
 non_txt_files := \
        doc/default.css \
@@ -113,17 +114,17 @@
 		 tools/doc_generate/autodoc_rstx.py
 
 doc/en/user-reference/bzr_man.txt: $(MAN_DEPENDENCIES)
-	python generate_docs.py -o $@ rstx
+	$(PYTHON) generate_docs.py -o $@ rstx
 
 doc/en/developer-guide/HACKING.txt: doc/developers/HACKING.txt
-	python tools/win32/ostools.py copytodir doc/developers/HACKING.txt doc/en/developer-guide
+	$(PYTHON) tools/win32/ostools.py copytodir doc/developers/HACKING.txt doc/en/developer-guide
 
 doc/en/release-notes/NEWS.txt: NEWS
-	python -c "import shutil; shutil.copyfile('$<', '$@')"
+	$(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
 
 MAN_PAGES = man1/bzr.1
 man1/bzr.1: $(MAN_DEPENDENCIES)
-	python generate_docs.py -o $@ man
+	$(PYTHON) generate_docs.py -o $@ man
 
 # build a png of our performance task list
 doc/developers/performance.png: doc/developers/performance.dot
@@ -140,11 +141,11 @@
 # produce a tree containing just the final docs, ready for uploading to the web
 HTMLDIR := html_docs
 html-docs: docs
-	python tools/win32/ostools.py copytree $(WEB_DOCS) $(HTMLDIR)
+	$(PYTHON) tools/win32/ostools.py copytree $(WEB_DOCS) $(HTMLDIR)
 
 # clean produced docs
 clean-docs:
-	python tools/win32/ostools.py remove $(ALL_DOCS) \
+	$(PYTHON) tools/win32/ostools.py remove $(ALL_DOCS) \
 	$(HTMLDIR) $(derived_txt_files)
 
 
@@ -153,10 +154,10 @@
 # make bzr.exe for win32 with py2exe
 exe:
 	@echo *** Make bzr.exe
-	python setup.py build_ext -i -f
-	python setup.py py2exe > py2exe.log
-	python tools/win32/ostools.py copytodir tools/win32/start_bzr.bat win32_bzr.exe
-	python tools/win32/ostools.py copytodir tools/win32/bazaar.url win32_bzr.exe
+	$(PYTHON) setup.py build_ext -i -f
+	$(PYTHON) setup.py py2exe > py2exe.log
+	$(PYTHON) tools/win32/ostools.py copytodir tools/win32/start_bzr.bat win32_bzr.exe
+	$(PYTHON) tools/win32/ostools.py copytodir tools/win32/bazaar.url win32_bzr.exe
 
 # win32 installer for bzr.exe
 installer: exe copy-docs
@@ -164,22 +165,22 @@
 	cog.py -d -o tools/win32/bzr.iss tools/win32/bzr.iss.cog
 	iscc /Q tools/win32/bzr.iss
 
-# win32 python's distutils-based installer
-# require to have python interpreter installed on win32
+# win32 Python's distutils-based installer
+# require to have Python interpreter installed on win32
 python-installer: docs
 	python24 setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
 	python25 setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
 
 copy-docs: docs
-	python tools/win32/ostools.py copytodir README win32_bzr.exe/doc
-	python tools/win32/ostools.py copytree $(WEB_DOCS) win32_bzr.exe
+	$(PYTHON) tools/win32/ostools.py copytodir README win32_bzr.exe/doc
+	$(PYTHON) tools/win32/ostools.py copytree $(WEB_DOCS) win32_bzr.exe
 
 # clean on win32 all installer-related files and directories
 clean-win32: clean-docs
-	python tools/win32/ostools.py remove build
-	python tools/win32/ostools.py remove win32_bzr.exe
-	python tools/win32/ostools.py remove py2exe.log
-	python tools/win32/ostools.py remove tools/win32/bzr.iss
-	python tools/win32/ostools.py remove bzr-setup*.exe
-	python tools/win32/ostools.py remove bzr-*win32.exe
-	python tools/win32/ostools.py remove dist
+	$(PYTHON) tools/win32/ostools.py remove build
+	$(PYTHON) tools/win32/ostools.py remove win32_bzr.exe
+	$(PYTHON) tools/win32/ostools.py remove py2exe.log
+	$(PYTHON) tools/win32/ostools.py remove tools/win32/bzr.iss
+	$(PYTHON) tools/win32/ostools.py remove bzr-setup*.exe
+	$(PYTHON) tools/win32/ostools.py remove bzr-*win32.exe
+	$(PYTHON) tools/win32/ostools.py remove dist

=== modified file 'NEWS'
--- a/NEWS	2007-10-24 08:12:18 +0000
+++ b/NEWS	2007-10-24 12:06:29 +0000
@@ -94,6 +94,9 @@
 
    * New *Bazaar in Five Minutes* guide.  (Matthew Revell)
 
+   * The hooks reference documentation is now converted to html as expected.
+     (Ian Clatworthy)
+
   BUG FIXES:
 
    * Make sure to use ``O_BINARY`` when opening files to check their
@@ -276,6 +279,9 @@
      boolean indicating whether a new file graph node was recorded.
      (Robert Collins)
 
+   * The python path used in the Makefile can now be overridden.
+     (Andrew Bennetts, Ian Clatworthy)
+
   TESTING:
 
    * New transport implementation ``trace+`` which is useful for testing,




More information about the bazaar-commits mailing list