@@ -14,16 +14,8 @@ INSTALL_PREFIX :=
1414# Treat compiler warnings as errors (Sets COMPILE_WARNING_AS_ERROR on amongoc)
1515WARNINGS_AS_ERRORS := false
1616
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-
2517.SILENT :
26- .PHONY : docs-html docs-serve default build test format format-check packages
18+ .PHONY : default
2719
2820# If given no other target, runs the build
2921default : build
@@ -36,7 +28,7 @@ THIS_DIR := $(shell dirname $(THIS_FILE))
3628# Directory where we will scribble build files
3729BUILD_DIR ?= $(THIS_DIR ) /_build/auto
3830
39- PYTHON_RUN :=
31+ PYTHON_RUN := python
4032# Run CMake within the uv environment
4133CMAKE_RUN := cmake
4234
@@ -45,12 +37,15 @@ SPHINX_ARGS := --jobs="$(SPHINX_JOBS)" --write-all --show-traceback --builder=di
4537
4638DOCS_SRC := $(THIS_DIR ) /docs
4739DOCS_OUT := $(BUILD_DIR ) /docs/dev/html
40+ .PHONY : docs-html docs-serve
4841docs-html :
4942 sphinx-build $(SPHINX_ARGS ) $(DOCS_SRC ) $(DOCS_OUT )
5043
5144docs-serve :
5245 sphinx-autobuild $(SPHINX_ARGS ) $(DOCS_SRC ) $(DOCS_OUT )
5346
47+ CMAKE_CONFIGURE_ARGS :=
48+ .PHONY : configure build build-fast
5449configure :
5550 $(CMAKE_RUN ) \
5651 -S " $( THIS_DIR) " \
@@ -62,6 +57,7 @@ configure:
6257 -D BUILD_TESTING=$(BUILD_TESTING ) \
6358 -D MONGO_SANITIZE=" $( SANITIZE) " \
6459 -D CMAKE_INSTALL_PREFIX=$(INSTALL_PREFIX ) \
60+ $(CMAKE_CONFIGURE_ARGS ) \
6561 -G " Ninja Multi-Config"
6662
6763build : configure
@@ -70,6 +66,7 @@ build: configure
7066build-fast :
7167 $(CMAKE_RUN ) --build " $( BUILD_DIR) "
7268
69+ .PHONY : test test-fast ctest-run
7370test : build
7471 $(MAKE ) test-fast
7572
@@ -86,6 +83,7 @@ ctest-run:
8683 || :
8784 uv tool run --isolated junit2html " $( JUNIT_OUTPUT) " " $( JUNIT_OUTPUT) .html"
8885
86+ .PHONY : install install-fast package
8987install : build
9088 $(MAKE ) install-fast
9189
@@ -104,11 +102,13 @@ package-fast:
104102 cpack -B " $( CPACK_OUT) " -C " $( PACKAGE_CONFIGS) " -G " $( PACKAGE_FORMATS) "
105103 rm -r -- " $( CPACK_OUT) /_CPack_Packages"
106104
105+ .PHONY : format format-check
107106format-check :
108- uv run --group=format --isolated $(PYTHON_RUN ) tools/format.py --mode=check
107+ $(PYTHON_RUN ) tools/format.py --mode=check
109108
110109format :
111- uv run --group=format --isolated $(PYTHON_RUN ) tools/format.py
110+ $(PYTHON_RUN ) tools/format.py
112111
112+ .PHONY : packages
113113packages :
114114 bash $(THIS_DIR ) /tools/earthly.sh -a +build-multi/ _build/pkgs
0 commit comments