-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (27 loc) · 742 Bytes
/
Copy pathMakefile
File metadata and controls
41 lines (27 loc) · 742 Bytes
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
NAME = intersect
# ---------- Helper scripts ----------
ORG2NW := bash scripts/org2nw.sh
PRETANGLE := awk -f scripts/preTangle.awk
# ---------- Basic tangling ----------
all: $(NAME).go lang_actions
$(NAME).go: $(NAME).org
$(ORG2NW) $(NAME).org | $(PRETANGLE) | notangle -R$(NAME).go > $(NAME).go
# ---------- Basic make subcommands ----------
.PHONY: doc clean
doc:
make -C doc
clean:
rm -f $(NAME) *.go
make clean -C doc
publish:
if mountpoint -q ~/owncloud; then \
cp doc/$(NAME)Doc.pdf ~/owncloud/github_docs; \
fi
# ---------- Language actions area ----------
lang_actions: $(NAME).go go.mod go.sum
gofmt -w $(NAME).go
go build $(NAME).go
go.mod:
go mod init $(NAME).go
go.sum: go.mod $(NAME).go
go mod tidy