Skip to content

Commit

Permalink
make: Add deps stop target for dqlite
Browse files Browse the repository at this point in the history
Signed-off-by: Julian Pelizäus <[email protected]>
  • Loading branch information
roosterfish committed Nov 25, 2024
1 parent 62ec1f0 commit deaa6f2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
GOMIN=1.22.7
GOCOVERDIR ?= $(shell go env GOCOVERDIR)
GOPATH ?= $(shell go env GOPATH)
DQLITE_PATH=$(GOPATH)/deps/dqlite
DQLITE_BRANCH=master

.PHONY: default
default: build

# Build dependencies
.PHONY: deps
deps:
# dqlite (+raft)
@if [ ! -e "$(DQLITE_PATH)" ]; then \
echo "Retrieving dqlite from ${DQLITE_BRANCH} branch"; \
git clone --depth=1 --branch "${DQLITE_BRANCH}" "https://github.com/canonical/dqlite" "$(DQLITE_PATH)"; \
elif [ -e "$(DQLITE_PATH)/.git" ]; then \
echo "Updating existing dqlite branch"; \
cd "$(DQLITE_PATH)"; git pull; \
fi

cd "$(DQLITE_PATH)" && \
autoreconf -i && \
./configure --enable-build-raft && \
make

# Build targets.
.PHONY: build
build:
Expand Down

0 comments on commit deaa6f2

Please sign in to comment.