Skip to content

Commit 90cb371

Browse files
committed
Make: fix default target.
One of the build configuration includes accidentally redefined the default target. Also, propagate RUST_BACKTRACE variable to the worker processes.
1 parent 2557fb5 commit 90cb371

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Makefile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,19 @@ NGINX_TESTS_DIR ?= $(NGINX_SOURCE_DIR)/tests
2020
NGINX_BUILD_DIR ?= $(CURDIR)/objs-$(BUILD)
2121

2222
TEST_NGINX_BINARY = $(NGINX_BUILD_DIR)/nginx
23+
TEST_NGINX_GLOBALS += env RUST_BACKTRACE;
2324

2425
# "build" always calls cargo and causes relinking.
2526
# Clearing this var allows to skip the build step: "make test TEST_PREREQ="
2627
TEST_PREREQ = build
2728

29+
30+
.PHONY: all
31+
32+
all: ## Build, lint and test the module
33+
all: build check unittest test
34+
35+
2836
# Conditionals via include, compatible with most implementations of make
2937

3038
# GNU make 3.81 or earlier
@@ -35,6 +43,7 @@ MAKE_FLAVOR!= echo posix
3543
include build/compat-$(MAKE_FLAVOR).mk
3644
include build/build-$(BUILD).mk
3745

46+
3847
# Set up environment propagation
3948

4049
BUILD_ENV += NGINX_SOURCE_DIR="$(NGINX_SOURCE_DIR)"
@@ -44,12 +53,10 @@ TEST_ENV += RUST_BACKTRACE=1
4453
TEST_ENV += TEST_NGINX_BINARY="$(TEST_NGINX_BINARY)"
4554
TEST_ENV += TEST_NGINX_GLOBALS="$(TEST_NGINX_GLOBALS)"
4655

47-
# Build targets
4856

49-
.PHONY: all help build check test clean
57+
# Build targets
5058

51-
all: ## Build, lint and test the module
52-
all: build check unittest test
59+
.PHONY: help build check unittest test clean
5360

5461
help:
5562
@echo "Available targets:"

0 commit comments

Comments
 (0)