-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (36 loc) · 1.31 KB
/
Makefile
File metadata and controls
46 lines (36 loc) · 1.31 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
.PHONY: help test docs docs-serve build clean format format-julia format-cpp
JULIA ?= julia
help:
@echo "Semigroups.jl Makefile"
@echo ""
@echo "Usage: make <target>"
@echo ""
@echo "Targets:"
@echo " test Run the test suite"
@echo " docs Build documentation"
@echo " docs-serve Build and serve documentation locally"
@echo " build Build C++ bindings"
@echo " clean Clean build artifacts"
@echo " format Format Julia and C++ code"
@echo " format-julia Format Julia code only"
@echo " format-cpp Format C++ code only"
test:
$(JULIA) --project=. -e 'using Pkg; Pkg.test()'
docs:
$(JULIA) --project=docs -e 'using Pkg; Pkg.develop(path="."); Pkg.instantiate()'
$(JULIA) --project=docs docs/make.jl
docs-serve:
$(JULIA) --project=docs -e 'using Pkg; Pkg.add("LiveServer")'
$(JULIA) --project=docs -e 'using LiveServer; servedocs(; include_dirs = ["src"])'
build:
$(JULIA) --project=. -e 'using Pkg; Pkg.build("Semigroups")'
clean:
rm -rf docs/build
rm -rf deps/build
rm -f deps/lib/*.dylib deps/lib/*.so
format: format-julia format-cpp
format-julia:
$(JULIA) -e 'using Pkg; Pkg.add("JuliaFormatter")'
$(JULIA) -e 'using JuliaFormatter; format("src"); format("test"); format("docs")'
format-cpp:
find deps/src -name "*.cpp" -o -name "*.hpp" | xargs clang-format-15 -i