Merge lp:~richard-wilbur/bzr/1540333-makefiles into lp:bzr

Proposed by Richard Wilbur
Status: Work in progress
Proposed branch: lp:~richard-wilbur/bzr/1540333-makefiles
Merge into: lp:bzr
Diff against target: 149 lines (+24/-45)
2 files modified
Makefile (+20/-41)
doc/ru/_static/ru/Makefile (+4/-4)
To merge this branch: bzr merge lp:~richard-wilbur/bzr/1540333-makefiles
Reviewer Review Type Date Requested Status
Vincent Ladeuil Pending
Review via email: mp+284600@code.launchpad.net

Description of the change

Fixes lp:1540333
Initial problem when trying to rebuild documentation to test changes: couldn't clean the documentation build.
Also found and fixed an inconsistency between the naming convention in the main Makefile and doc/ru/_static/ru/Makefile for the Russion documentation.

What packages should be installed in order to be able to do a full rebuild of everything for Linux?

To post a comment you must log in.
6616. By Richard Wilbur

Remove circular dependencies on doc/en/Makefile and doc/en/make.bat

Unmerged revisions

6616. By Richard Wilbur

Remove circular dependencies on doc/en/Makefile and doc/en/make.bat

6615. By Richard Wilbur

clean-sphinx should depend on the Makefiles it intends on using. Russian static documentation Makefile updated to naming convention used in ./Makefile.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile'
--- Makefile 2012-03-09 16:48:55 +0000
+++ Makefile 2016-02-01 13:44:14 +0000
@@ -1,4 +1,4 @@
1# Copyright (C) 2005-2011 Canonical Ltd1# Copyright (C) 2005-2011, 2016 Canonical Ltd
2#2#
3# This program is free software; you can redistribute it and/or modify3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by4# it under the terms of the GNU General Public License as published by
@@ -47,8 +47,8 @@
47 --subunit $(tests) | tee selftest.log47 --subunit $(tests) | tee selftest.log
48 echo `date` ": selftest ends" 1>&248 echo `date` ": selftest ends" 1>&2
49 # An empty log file should catch errors in the $(PYTHON)49 # An empty log file should catch errors in the $(PYTHON)
50 # command above (the '|' swallow any errors since 'make'50 # command above (the '|' swallows any errors since 'make'
51 # sees the 'tee' exit code for the whole line51 # sees the 'tee' exit code for the whole line)
52 if [ ! -s selftest.log ] ; then exit 1 ; fi52 if [ ! -s selftest.log ] ; then exit 1 ; fi
53 # Check that there were no errors reported.53 # Check that there were no errors reported.
54 subunit-stats < selftest.log54 subunit-stats < selftest.log
@@ -125,25 +125,19 @@
125# for installation instructions.125# for installation instructions.
126docs-sphinx: html-sphinx126docs-sphinx: html-sphinx
127127
128DOC_SUBDIRS := $(shell find doc/ -maxdepth 1 -mindepth 1 -type d -print |\
129 LC_ALL=C sort)
130
131DOC_NEN_SUBDIRS := $(filter-out doc/en,$(DOC_SUBDIRS))
132
128# Clean out generated documentation133# Clean out generated documentation
129clean-sphinx:134clean-sphinx: $(foreach d,$(DOC_NEN_SUBDIRS),$(d)/Makefile)
130 cd doc/en && make clean135 $(foreach d,$(DOC_SUBDIRS), make --directory=$(d) clean; )
131 cd doc/es && make clean
132 cd doc/ja && make clean
133 cd doc/ru && make clean
134 cd doc/developers && make clean
135136
136SPHINX_DEPENDENCIES = \137SPHINX_DEPENDENCIES = \
137 doc/en/release-notes/index.txt \138 doc/en/release-notes/index.txt \
138 doc/en/user-reference/index.txt \139 doc/en/user-reference/index.txt \
139 doc/es/Makefile \140 $(foreach d,$(DOC_SUBDIRS), $(d)/Makefile $(d)/make.bat)
140 doc/es/make.bat \
141 doc/ja/Makefile \
142 doc/ja/make.bat \
143 doc/ru/Makefile \
144 doc/ru/make.bat \
145 doc/developers/Makefile \
146 doc/developers/make.bat
147141
148NEWS_FILES = $(wildcard doc/en/release-notes/bzr-*.txt)142NEWS_FILES = $(wildcard doc/en/release-notes/bzr-*.txt)
149143
@@ -153,19 +147,15 @@
153doc/en/release-notes/index.txt: $(NEWS_FILES) tools/generate_release_notes.py147doc/en/release-notes/index.txt: $(NEWS_FILES) tools/generate_release_notes.py
154 $(PYTHON) tools/generate_release_notes.py $@ $(NEWS_FILES)148 $(PYTHON) tools/generate_release_notes.py $@ $(NEWS_FILES)
155149
156doc/%/Makefile: doc/en/Makefile150$(foreach d,$(DOC_NEN_SUBDIRS),$(d)/Makefile): doc/en/Makefile
157 $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"151 $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
158152
159doc/%/make.bat: doc/en/make.bat153$(foreach d,$(DOC_NEN_SUBDIRS),$(d)/make.bat): doc/en/make.bat
160 $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"154 $(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
161155
162# Build the html docs using Sphinx.156# Build the html docs using Sphinx.
163html-sphinx: $(SPHINX_DEPENDENCIES)157html-sphinx: $(SPHINX_DEPENDENCIES)
164 cd doc/en && make html158 $(foreach d,$(DOC_SUBDIRS), make --directory=$(d) html; )
165 cd doc/es && make html
166 cd doc/ru && make html
167 cd doc/ja && make html
168 cd doc/developers && make html
169159
170# Build the PDF docs using Sphinx. This requires numerous LaTeX160# Build the PDF docs using Sphinx. This requires numerous LaTeX
171# packages. See http://sphinx.pocoo.org/builders.html for details.161# packages. See http://sphinx.pocoo.org/builders.html for details.
@@ -185,20 +175,12 @@
185# Note: HtmlHelp Workshop needs to be used on the generated hhp files175# Note: HtmlHelp Workshop needs to be used on the generated hhp files
186# to generate the final chm files.176# to generate the final chm files.
187chm-sphinx: $(SPHINX_DEPENDENCIES)177chm-sphinx: $(SPHINX_DEPENDENCIES)
188 cd doc/en && make htmlhelp178 $(foreach d,$(DOC_SUBDIRS), make --directory=$(d) htmlhelp; )
189 cd doc/es && make htmlhelp
190 cd doc/ru && make htmlhelp
191 cd doc/ja && make htmlhelp
192 cd doc/developers && make htmlhelp
193179
194180
195# Build the texinfo files using Sphinx.181# Build the texinfo files using Sphinx.
196texinfo-sphinx: $(SPHINX_DEPENDENCIES)182texinfo-sphinx: $(SPHINX_DEPENDENCIES)
197 cd doc/en && make texinfo183 $(foreach d,$(DOC_SUBDIRS), make --directory=$(d) texinfo; )
198 cd doc/es && make texinfo
199 cd doc/ru && make texinfo
200 cd doc/ja && make texinfo
201 cd doc/developers && make texinfo
202184
203### Documentation Website ###185### Documentation Website ###
204186
@@ -207,11 +189,8 @@
207189
208# Build and package docs into a website, complete with downloads.190# Build and package docs into a website, complete with downloads.
209doc-website: html-sphinx pdf-sphinx191doc-website: html-sphinx pdf-sphinx
210 $(PYTHON) tools/package_docs.py doc/en $(DOC_WEBSITE_BUILD)192 $(foreach d,$(DOC_SUBDIRS), \
211 $(PYTHON) tools/package_docs.py doc/es $(DOC_WEBSITE_BUILD)193 $(PYTHON) tools/package_docs.py $(d) $(DOC_WEBSITE_BUILD); )
212 $(PYTHON) tools/package_docs.py doc/ru $(DOC_WEBSITE_BUILD)
213 $(PYTHON) tools/package_docs.py doc/ja $(DOC_WEBSITE_BUILD)
214 $(PYTHON) tools/package_docs.py doc/developers $(DOC_WEBSITE_BUILD)
215194
216195
217### Plain Documentation ###196### Plain Documentation ###
@@ -435,8 +414,8 @@
435update-pot: po/bzr.pot414update-pot: po/bzr.pot
436415
437TRANSLATABLE_PYFILES:=$(shell find bzrlib -name '*.py' \416TRANSLATABLE_PYFILES:=$(shell find bzrlib -name '*.py' \
438 | grep -v 'bzrlib/tests/' \417 | grep -v 'bzrlib/tests/' \
439 | grep -v 'bzrlib/doc' \418 | grep -v 'bzrlib/doc' \
440 )419 )
441420
442po/bzr.pot: $(PYFILES) $(DOCFILES)421po/bzr.pot: $(PYFILES) $(DOCFILES)
443422
=== modified file 'doc/ru/_static/ru/Makefile'
--- doc/ru/_static/ru/Makefile 2009-09-07 05:26:43 +0000
+++ doc/ru/_static/ru/Makefile 2016-02-01 13:44:14 +0000
@@ -1,5 +1,5 @@
1TARGETS=bzr-quick-reference.png bzr-quick-reference.pdf1TARGETS=bzr-ru-quick-reference.png bzr-ru-quick-reference.pdf
2OBJECTS=bzr-quick-reference.svg Makefile2OBJECTS=bzr-ru-quick-reference.svg Makefile
33
4all: $(TARGETS)4all: $(TARGETS)
55
@@ -11,9 +11,9 @@
11.svg.png:11.svg.png:
12 rsvg-convert -d 300 -p 300 -z 3.3346 -f png -o $@ $<12 rsvg-convert -d 300 -p 300 -z 3.3346 -f png -o $@ $<
1313
14bzr-quick-reference.png: $(OBJECTS)14bzr-ru-quick-reference.png: $(OBJECTS)
1515
16bzr-quick-reference.pdf: $(OBJECTS)16bzr-ru-quick-reference.pdf: $(OBJECTS)
1717
18clean:18clean:
19 rm -f $(TARGETS)19 rm -f $(TARGETS)