mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 11:56:58 +00:00
Make all headers part of make's dependencies computations. Otherwise, updating audit.h, common.h, scoped_base_variants.h, scoped_common.h, scoped_multiple_domain_variants.h, or wrappers.h, re-running make and running selftests could lead to testing stale headers. Fixes:6a500b2297("selftests/landlock: Add tests for audit flags and domain IDs") Fixes:fefcf0f7cf("selftests/landlock: Test abstract UNIX socket scoping") Fixes:5147779d5e("selftests/landlock: Add wrappers.h") Signed-off-by: Matthieu Buffet <matthieu@buffet.re> Link: https://lore.kernel.org/r/20251027011440.1838514-1-matthieu@buffet.re Signed-off-by: Mickaël Salaün <mic@digikod.net>
28 lines
572 B
Makefile
28 lines
572 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# First run: make -C ../../../.. headers_install
|
|
|
|
CFLAGS += -Wall -O2 $(KHDR_INCLUDES)
|
|
|
|
LOCAL_HDRS += $(wildcard *.h)
|
|
|
|
src_test := $(wildcard *_test.c)
|
|
|
|
TEST_GEN_PROGS := $(src_test:.c=)
|
|
|
|
TEST_GEN_PROGS_EXTENDED := \
|
|
true \
|
|
sandbox-and-launch \
|
|
wait-pipe \
|
|
wait-pipe-sandbox
|
|
|
|
# Short targets:
|
|
$(TEST_GEN_PROGS): LDLIBS += -lcap -lpthread
|
|
$(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static
|
|
|
|
include ../lib.mk
|
|
|
|
# Targets with $(OUTPUT)/ prefix:
|
|
$(TEST_GEN_PROGS): LDLIBS += -lcap -lpthread
|
|
$(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static
|