Merge ~ines-almeida/txpkgupload:refactor-makefile-commands into txpkgupload:master

Proposed by Ines Almeida
Status: Merged
Approved by: Ines Almeida
Approved revision: 3b08ba9872a1c776d82ae9fea58eab919d815051
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ines-almeida/txpkgupload:refactor-makefile-commands
Merge into: txpkgupload:master
Diff against target: 40 lines (+8/-5)
1 file modified
Makefile (+8/-5)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+446311@code.launchpad.net

Commit message

Refactor Makefile logic

This will ensure that the dependencies repository isn't cloned on every command that builds the virtual env which should be unnecessary in a few cases, e.g., when the txpkgupload charm builds from the tarball (given the tarball should already contain the dependencies)

To post a comment you must log in.
Revision history for this message
Guruprasad (lgp171188) :
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Makefile b/Makefile
2index 55d04d0..98163b0 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -36,10 +36,14 @@ SWIFT_OBJECT_PATH = \
6 $(SWIFT_CONTAINER_NAME)/$(TARBALL_BUILD_LABEL)/$(TARBALL_FILE_NAME)
7
8
9-default: compile
10+default: bootstrap
11
12
13-bootstrap compile:
14+bootstrap: $(DEPENDENCY_DIR)
15+ $(MAKE) compile
16+
17+
18+compile:
19 $(MAKE) $(ENV)
20 [ ! -d .git ] || $(MAKE) $(VERSION_INFO)
21
22@@ -68,7 +72,7 @@ $(DEPENDENCY_DIR):
23 git clone $(DEPENDENCY_REPO) $(DEPENDENCY_DIR)
24
25
26-$(ENV): | $(DEPENDENCY_DIR)
27+$(ENV):
28 mkdir -p $(ENV)
29 (echo '[easy_install]'; \
30 echo 'find_links = file://$(DEPENDENCY_DIR)/') \
31@@ -105,8 +109,7 @@ clean: clean_pip
32 build-tarball:
33 @echo "Creating deployment tarball at $(TARBALL_BUILD_PATH)"
34 rm -rf $(ENV)
35- $(MAKE) $(ENV)
36- $(MAKE) $(VERSION_INFO)
37+ $(MAKE) bootstrap
38 $(PIP) wheel -f $(DEPENDENCY_DIR) --no-index -w $(WHEELS) \
39 -r bootstrap-requirements.txt -r requirements.txt
40 mkdir -p $(TARBALL_BUILD_DIR)

Subscribers

People subscribed via source and target branches

to all changes: