Merge lp:~jml/launchpad/dont-build-apidocs into lp:launchpad/db-devel

Proposed by Jonathan Lange
Status: Merged
Merged at revision: not available
Proposed branch: lp:~jml/launchpad/dont-build-apidocs
Merge into: lp:launchpad/db-devel
Diff against target: None lines
To merge this branch: bzr merge lp:~jml/launchpad/dont-build-apidocs
Reviewer Review Type Date Requested Status
Eleanor Berger (community) Approve
Review via email: mp+9588@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jonathan Lange (jml) wrote :

This branch tweaks the Makefile so that if api doc generation fails, then you won't get obscure syntax errors when you run 'make apidoc' again.

The problem was that shell redirection always creates an empty file. So if the command failed, there'd still be an empty file there. This means that 'make' thinks the target has been successfully built.

The solution is redirecting to a temporary file, then move that file to the correct location only if it is successful.

Revision history for this message
Eleanor Berger (intellectronica) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2009-07-29 02:20:10 +0000
3+++ Makefile 2009-08-03 15:38:29 +0000
4@@ -44,10 +44,12 @@
5 $(PY) ./utilities/make-dummy-hosted-branches
6
7 $(WADL_FILE): $(BZR_VERSION_INFO)
8- LPCONFIG=$(LPCONFIG) $(PY) ./utilities/create-lp-wadl.py > $@
9+ LPCONFIG=$(LPCONFIG) $(PY) ./utilities/create-lp-wadl.py > $@.tmp
10+ mv $@.tmp $@
11
12 $(API_INDEX): $(WADL_FILE)
13- bin/apiindex $(WADL_FILE) > $@
14+ bin/apiindex $(WADL_FILE) > $@.tmp
15+ mv $@.tmp $@
16
17 apidoc: compile $(API_INDEX)
18

Subscribers

People subscribed via source and target branches

to status/vote changes: