summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Burke <rich.g.burke@gmail.com>2018-02-07 20:15:05 +0000
committerRichard Burke <rich.g.burke@gmail.com>2018-02-07 20:15:05 +0000
commitffbd489206c5e76b5c2e7ac251f088880678ea06 (patch)
tree2472f463550bfdd007b65bec1b1ef4cbc7c80860
parente80cb8c08753e7b0e785cacdda67ea1b7633d145 (diff)
Break makefile targets into smaller stepsv0.1.2
-rw-r--r--Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index f2ebcb0..4be3829 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,15 @@ all: $(BINARY)
$(BINARY): build-libgit2
$(GOCMD) build $(GRV_BUILD_FLAGS) -o $(BINARY) $(GRV_SOURCE_DIR)
+.PHONY: build-only
+build-only:
+ make -C $(GIT2GO_DIR) install-static
+ $(GOCMD) build $(GRV_BUILD_FLAGS) -o $(BINARY) $(GRV_SOURCE_DIR)
+
+.PHONY: build-libgit2
+build-libgit2: apply-git2go-patch
+ make -C $(GIT2GO_DIR) install-static
+
.PHONY: install
install: $(BINARY)
install -m755 -d $(GOBIN_DIR)
@@ -37,13 +46,11 @@ update-test:
$(GOCMD) get github.com/golang/lint/golint
$(GOCMD) get github.com/stretchr/testify/mock
-.PHONY: build-libgit2
-build-libgit2: update
+.PHONY: apply-git2go-patch
+apply-git2go-patch: update
if patch --dry-run -N -d $(GIT2GO_DIR) -p1 < $(GIT2GO_PATCH) >/dev/null; then \
patch -d $(GIT2GO_DIR) -p1 < $(GIT2GO_PATCH); \
fi
- cd $(GIT2GO_DIR) && git submodule update --init;
- make -C $(GIT2GO_DIR) install-static
# Only tested on Ubuntu.
# Requires dependencies static library versions to be present alongside dynamic ones