← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:make-compile-only-once into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:make-compile-only-once into launchpad:master.

Commit message:
Avoid running "make compile" twice

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/378293

The apidoc target used a submake to express its prerequisites on the compile and $(API_INDEX) targets, but that resulted in the compile target typically being run twice.  Rephrase this using normal make prerequisites so that it's only run once.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:make-compile-only-once into launchpad:master.
diff --git a/Makefile b/Makefile
index 0fc97c2..b7374bc 100644
--- a/Makefile
+++ b/Makefile
@@ -102,11 +102,11 @@ $(API_INDEX): $(VERSION_INFO) $(PY)
 	    --force "$(APIDOC_TMPDIR)"
 	mv $(APIDOC_TMPDIR) $(APIDOC_DIR)
 
-apidoc:
 ifdef LP_MAKE_NO_WADL
+apidoc:
 	@echo "Skipping WADL generation."
 else
-	$(MAKE) compile $(API_INDEX)
+apidoc: compile $(API_INDEX)
 endif
 
 # Used to generate HTML developer documentation for Launchpad.