@@ -14,16 +14,8 @@ INSTALL_PREFIX :=
14
14
# Treat compiler warnings as errors (Sets COMPILE_WARNING_AS_ERROR on amongoc)
15
15
WARNINGS_AS_ERRORS := false
16
16
17
- # *** Execution Parameters ***
18
- # Set the LAUNCHER parameter to prefix all executed commands
19
- LAUNCHER :=
20
-
21
- # Update the shell to be executed by the launching command. Make will use
22
- # this to execute all commands in the Makefile:
23
- SHELL := $(LAUNCHER ) $(SHELL )
24
-
25
17
.SILENT :
26
- .PHONY : docs-html docs-serve default build test format format-check packages
18
+ .PHONY : default
27
19
28
20
# If given no other target, runs the build
29
21
default : build
@@ -36,7 +28,7 @@ THIS_DIR := $(shell dirname $(THIS_FILE))
36
28
# Directory where we will scribble build files
37
29
BUILD_DIR ?= $(THIS_DIR ) /_build/auto
38
30
39
- PYTHON_RUN :=
31
+ PYTHON_RUN := python
40
32
# Run CMake within the uv environment
41
33
CMAKE_RUN := cmake
42
34
@@ -45,12 +37,15 @@ SPHINX_ARGS := --jobs="$(SPHINX_JOBS)" --write-all --show-traceback --builder=di
45
37
46
38
DOCS_SRC := $(THIS_DIR ) /docs
47
39
DOCS_OUT := $(BUILD_DIR ) /docs/dev/html
40
+ .PHONY : docs-html docs-serve
48
41
docs-html :
49
42
sphinx-build $(SPHINX_ARGS ) $(DOCS_SRC ) $(DOCS_OUT )
50
43
51
44
docs-serve :
52
45
sphinx-autobuild $(SPHINX_ARGS ) $(DOCS_SRC ) $(DOCS_OUT )
53
46
47
+ CMAKE_CONFIGURE_ARGS :=
48
+ .PHONY : configure build build-fast
54
49
configure :
55
50
$(CMAKE_RUN ) \
56
51
-S " $( THIS_DIR) " \
@@ -62,6 +57,7 @@ configure:
62
57
-D BUILD_TESTING=$(BUILD_TESTING ) \
63
58
-D MONGO_SANITIZE=" $( SANITIZE) " \
64
59
-D CMAKE_INSTALL_PREFIX=$(INSTALL_PREFIX ) \
60
+ $(CMAKE_CONFIGURE_ARGS ) \
65
61
-G " Ninja Multi-Config"
66
62
67
63
build : configure
@@ -70,6 +66,7 @@ build: configure
70
66
build-fast :
71
67
$(CMAKE_RUN ) --build " $( BUILD_DIR) "
72
68
69
+ .PHONY : test test-fast ctest-run
73
70
test : build
74
71
$(MAKE ) test-fast
75
72
@@ -86,6 +83,7 @@ ctest-run:
86
83
|| :
87
84
uv tool run --isolated junit2html " $( JUNIT_OUTPUT) " " $( JUNIT_OUTPUT) .html"
88
85
86
+ .PHONY : install install-fast package
89
87
install : build
90
88
$(MAKE ) install-fast
91
89
@@ -104,11 +102,13 @@ package-fast:
104
102
cpack -B " $( CPACK_OUT) " -C " $( PACKAGE_CONFIGS) " -G " $( PACKAGE_FORMATS) "
105
103
rm -r -- " $( CPACK_OUT) /_CPack_Packages"
106
104
105
+ .PHONY : format format-check
107
106
format-check :
108
- uv run --group=format --isolated $(PYTHON_RUN ) tools/format.py --mode=check
107
+ $(PYTHON_RUN ) tools/format.py --mode=check
109
108
110
109
format :
111
- uv run --group=format --isolated $(PYTHON_RUN ) tools/format.py
110
+ $(PYTHON_RUN ) tools/format.py
112
111
112
+ .PHONY : packages
113
113
packages :
114
114
bash $(THIS_DIR ) /tools/earthly.sh -a +build-multi/ _build/pkgs
0 commit comments