Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
134 lines (104 loc) Β· 3.76 KB
/
Copy pathjustfile
File metadata and controls
134 lines (104 loc) Β· 3.76 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
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# openage build wrapper; forwards recipes to the build dir (ninja by default)
# run `just` to list the recipes; see ./configure for build dir setup
builddir := "bin"
# forward to ninja; make is only relevant for --makefile-generator build dirs
buildcmd := `test -f bin/build.ninja && echo "ninja -C bin" || echo "make --no-print-directory -C bin"`
# list the available recipes
help:
@just --list
# build the entire project
build:
{{buildcmd}}
# build libopenage only
libopenage:
{{buildcmd}} libopenage
# install openage
install:
{{buildcmd}} install
# generate the C++ sources from the codegen definitions
codegen:
{{buildcmd}} cppgen
# generate the .pxd files from the C++ headers
pxdgen:
{{buildcmd}} pxdgen
# compile the .pyx files to .cpp
cythonize:
{{buildcmd}} cythonize
# create the in-place python modules
inplacemodules:
{{buildcmd}} inplacemodules
# compile the .py files to .pyc
compilepy:
{{buildcmd}} compilepy
# create the documentation
doc:
{{buildcmd}} doc
# run the game
run: build
cd {{builddir}} && ./run main
# run the tests (C++ and python)
tests: build
cd {{builddir}} && ./run test -a
# tests + checkfast; the recipe for regular devbuilds
test: tests checkfast
# remove object files and binaries
cleanelf:
{{buildcmd}} clean
# remove the sources created by codegen
cleancodegen:
{{buildcmd}} cleancodegen
# remove the generated .pxd files
cleanpxdgen:
{{buildcmd}} cleanpxdgen
# remove the .cpp files created by cython
cleancython:
{{buildcmd}} cleancython
# remove object files, binaries, python modules and generated code
clean: cleancodegen cleanpxdgen cleancython cleanelf
# remove remains of in-source builds
cleaninsourcebuild:
@echo "cleaning remains of in-source builds"
rm -rf DartConfiguration.tcl codegen_depend_cache codegen_target_cache Doxyfile Testing
@find . -not -path "./.bin/*" -type f -name CTestTestfile.cmake -print -delete
@find . -not -path "./.bin/*" -type f -name cmake_install.cmake -print -delete
@find . -not -path "./.bin/*" -type f -name CMakeCache.txt -print -delete
@find . -not -path "./.bin/*" -type f -name Makefile -print -delete
@find . -not -path "./.bin/*" -type d -name CMakeFiles -print -exec rm -r {} +
@find . -not -path "./.bin/*" -type d -name __pycache__ -print -exec rm -r {} +
# remove the build directories and cmake-time generated code
cleanbuilddirs: cleaninsourcebuild
@if test -d {{builddir}}; then {{buildcmd}} clean cleancython cleanpxdgen cleancodegen || true; fi
@echo cleaning symlinks to build directories
rm -f {{builddir}}
@echo cleaning build directories
rm -rf .bin
@echo cleaning cmake-time generated code
rm -f Doxyfile openage/config.py libopenage/config.h libopenage/config.cpp
# additionally remove the converted assets
mrproper: cleanbuilddirs
@echo cleaning converted assets
rm -rf userassets
# additionally remove anything not checked into the git repo
mrproperer: mrproper
@if ! test -d .git; then echo "mrproperer is only available for gitrepos."; false; fi
@echo removing ANYTHING that is not checked into the git repo
@echo ENTER to confirm
@read val && git clean -x -d -f
# fast code compliance checks
checkfast:
uv run python3 -m buildsystem.codecompliance --fast
# code compliance checks for merging to master
checkmerge:
uv run python3 -m buildsystem.codecompliance --merge
# full code compliance checks for files changed since origin/master
checkchanged:
uv run python3 -m buildsystem.codecompliance --merge --only-changed-files=origin/master
# full code compliance checks for uncommitted files
checkuncommited:
uv run python3 -m buildsystem.codecompliance --merge --only-changed-files=HEAD
# python compliance checks
checkpy:
uv run python3 -m buildsystem.codecompliance --ruff --ty
# full code compliance check
checkall:
uv run python3 -m buildsystem.codecompliance --all