-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (53 loc) · 1.41 KB
/
Makefile
File metadata and controls
64 lines (53 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
GHC_VERSION := 9.6.6
BIN_DIR := ./bin
BINS := \
hbs2 \
hbs2-peer \
hbs2-keyman \
hbs2-fixer \
hbs2-git-subscribe \
hbs2-git-dashboard \
git-remote-hbs2 \
git-hbs2 \
hbs2-cli \
hbs2-sync \
fixme-new \
hbs2-storage-simple-benchmarks \
ifeq ($(origin .RECIPEPREFIX), undefined)
$(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
endif
.RECIPEPREFIX = >
$(BIN_DIR):
> @mkdir -p $@
.PHONY: symlinks
symlinks: $(BIN_DIR)
> @mkdir -p $(BIN_DIR)
> @echo $(BIN_DIR)
> @for bin in $(BINS); do \
> path=`find dist-newstyle -type f -name $$bin -path "*$(GHC_VERSION)*" | head -n 1`; \
> if [ -n "$$path" ]; then \
> echo "Creating symlink for $$bin"; \
> ln -sf $$PWD/$$path $(BIN_DIR)/$$bin; \
> else \
> echo "Binary $$bin for GHC $(GHC_VERSION) not found"; \
> fi; \
> done
.PHONY: build
build:
> nix develop -c cabal build all
.PHONY: test-core
test-core:
> nix develop -c cabal run hbs2-core:test
.PHONY: test-raft
test-raft:
> nix develop -c ghcid -c 'cabal repl' raft-algo -T RaftAlgo.Proto.devTest
README.md:
> pandoc README.md -t gfm -s -o README1.md --table-of-contents
> @mv README1.md README.md
> @echo Remove old TOC before publishing!