-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
102 lines (84 loc) · 2.17 KB
/
Makefile
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!make
# -*- coding: utf-8 -*-
# Copyright (C) 2023 Benjamin Thomas Schwertfeger
# GitHub: https://github.com/btschwertfeger
PROJECT := BiasAdjustCXX
TEST_PROJECT := TestBiasAdjustCXX
TEST_DIR := tests
.PHONY := build rebuild dev redev install uninstall test build-val doc redoc changelog pre-commit clean help
help:
@grep "^##" Makefile | sed -e "s/##//"
## ======= B U I L D I N G =======
## build Compile the BiasAdjustCXX command-line tool
##
build:
cmake -S . -B build && cmake --build build --target $(PROJECT)
## rebuild Rebuild BiasAdjustCXX
##
rebuild: clean build
## dev Build and Compile the testsuite
##
dev:
cmake -S . -B build && cmake --build build --target $(TEST_PROJECT)
## redev Rebuild the testsuite
##
redev: clean dev
## build-val Build the validation tool (not actively maintained!)
##
build-val:
cmake -S validation/ -B validation/build && cmake --build validation/build
## doc Build the documentation
##
doc:
cd docs && make html
## redoc Rebuild the documentation
##
redoc: clean doc
## ======= U N -/ I N S T A L L A T I O N =======
## install Installation of the BiasAdjustCXX tool
## (after a successful the build)
##
install:
cd build && make install
## uninstall Remove of the BiasAdjustCXX tool
##
uninstall:
cd build && make uninstall
## install-val Install the validation tool
##
install-val:
cd validation/build && make install
## uninstall-val Uninstall the validation tool
##
uninstall-val:
cd validation/build && make uninstall
## ======= T E S T I N G =======
## test Run the unit tests
## (after executing the `dev`-target)
##
test:
cd build/tests && ctest
retest: dev test
## ======= M I S C E L A N I O U S =======
## changelog Create the changelog
##
changelog:
docker run -it --rm \
-v $(PWD):/usr/local/src/your-app \
githubchangeloggenerator/github-changelog-generator \
-u btschwertfeger \
-p BiasAdjustCXX \
-t $(GHTOKEN) \
--breaking-labels Breaking \
--enhancement-labels Feature
## pre-commit Run the pre-commit hooks
##
pre-commit:
pre-commit run -a
## Clean Delete the generated files
##
clean:
rm -rf \
build tests/build validation/build \
.ipynb_checkpoints examples/.ipynb_checkpoints\
docs/_build