← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/turnip:fix-build-tarball into turnip:master

 

Colin Watson has proposed merging ~cjwatson/turnip:fix-build-tarball into turnip:master.

Commit message:
Fix build-tarball target when dependencies/ is missing

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/turnip/+git/turnip/+merge/387437
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/turnip:fix-build-tarball into turnip:master.
diff --git a/Makefile b/Makefile
index ad76c8f..d10a9b2 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ PIP_SOURCE_DIR := dependencies
 
 PIP_ARGS ?= --quiet
 ifneq ($(PIP_SOURCE_DIR),)
-override PIP_ARGS += --no-index --find-links=file://$(realpath $(PIP_SOURCE_DIR))/
+override PIP_ARGS += --no-index --find-links=file://$(shell readlink -f $(PIP_SOURCE_DIR))/
 endif
 
 # Create archives in labelled directories (e.g.
@@ -34,6 +34,9 @@ SWIFT_OBJECT_PATH = turnip-builds/$(TARBALL_BUILD_LABEL)/$(TARBALL_FILE_NAME)
 
 build: $(ENV)
 
+$(PIP_SOURCE_DIR):
+	git clone $(DEPENDENCIES_URL) $(PIP_SOURCE_DIR)
+
 bootstrap:
 	if [ -d dependencies ]; then \
 		git -C dependencies pull; \
@@ -105,7 +108,7 @@ $(PIP_CACHE): $(ENV)
 		-r requirements.txt
 
 # XXX cjwatson 2015-10-16: limit to only interesting files
-build-tarball:
+build-tarball: $(PIP_SOURCE_DIR)
 	@echo "Creating deployment tarball at $(TARBALL_BUILD_PATH)"
 	rm -rf $(PIP_CACHE)
 	$(MAKE) $(PIP_CACHE)