From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F19747A0BA for ; Tue, 4 Aug 2026 17:02:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785862968; cv=none; b=KmW6DbjncPjS6iFyvhr1Dd9Pg9aqF+z5owH8SIAKcpwmhnN3Dx7FIggtWd1ck6Wmo9d6r9dzj+27nz+vipD8cIwFHZHBmUBIBNw+F4i12R3jl9ssUOYpxycEac+QBD4jvOA1ENfkOCnJwpUdYLj4whsB80b+rTkI7LyYNJTTQCY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785862968; c=relaxed/simple; bh=u9BAuDn+fCBGHoifYl9xBLOynLXU4OVQqLNUx5lzpEg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=I9ZJWFJTJ7rCaSgITN7bXZ/bJ3uRnEY3z3GZm5WQMlD9lntS3VGFGRVtG7/mFREJ6zPe81evAhtnfRKrKu2qolD5LFC09qkZnJzEVtbr0F4eVlIeNi9gD++CSRn05IfnowgWd78WIJaK37Ujvhanh/c8bnyRby3KV3B4PvY7A1U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=sEnawRUr; arc=none smtp.client-ip=209.85.210.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sEnawRUr" Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-84e04df8c46so43971b3a.2 for ; Tue, 04 Aug 2026 10:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785862952; x=1786467752; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=N3iaHl28vcuH673OrNEDIdxgQwmSMzDjZW2KtmuBGoA=; b=sEnawRUrB8oZ0F1dV80+4VBIIsXtN0vzv/mhtxKWNKCALPwn296BVDVpYyZO5aklB0 gIGO/FWc9pCglsCijdIlDnkoVnnQZMqPyE6f5jYEUHS0g4ip0S0wbSiD9jbx2aMlHnnK GMidYbJbFWv+JEkteWSGZ8iaZzMk7IcvmPnzKPW+S7bLWoY/ORuvwo4bPe25l5AHLVYb VgtPfahTUTmEUIdWogXGZJ5XXtYxH/YfE8aOEcSsUS4aYYKXcpQGMXAFkPypI30uJlfS YvqczRUFtTLIdZ8COR8N8wmkJ6VTlNBKmGExybuBU8yNuVxTjQ85/T1kpANusl2dsNNA dGIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785862952; x=1786467752; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=N3iaHl28vcuH673OrNEDIdxgQwmSMzDjZW2KtmuBGoA=; b=EVLdOTaG6gPbiKug5i0g3B9wzpeCUht8vvlA0GpAnwiTWKdyRQYy9J7ZNaY3HLQkwM lbiLv7vcMcJ2UnsmOnz/NGiPbzbaeChd0dvooFgNhmhBv2yykofHHn97hpgxtzHdzDjO e+/dLGFPDaX7dJeBo2aXO6R5cdcXrRvxSIOvmZYigBEHfA7dOWI3Tw2B5DD0mlWt4EvL wD3FyVinbfdvIkehksFQGTyBV8DUWKpbO1DqkrfluabtCCCwnItBNBfxFwYFv6Sc04ZE cTpG9Gvd4tQf/LNKy56kqfzOQptTiIZzRAr0B4K+21sjE1ii1z9q5qSUHwUVRDVQkeeW T1rw== X-Gm-Message-State: AOJu0YxeRqZBtOmYKKKmfISeKSKcvYAOxo22ddrdrWZms6qrYaO/ck48 36mS5+z/YlyrlPZlGvZCfrsLEk+xb88kklrfFFh/6Gef3kCvLf8VlmB1n1xUllG/Tbs= X-Gm-Gg: AR+sD10rP0NjocAlE9MH8TV4tdtRPSBOjsuOr8d5oygdhxS0IDdKtml6e+uW0rPRAZ0 lCvhmjKLeUJ/eXPYUUUiQA02VAtG+MUHD8AIkOr+dejuexTL++VvhVYY5aqs1kDnn5g94kkWeNM HKiu6WPM9EhVSb7fXUWwFHb2EyE36WiVtH/TEpc5kLDNcvW8kIMd5wr6oYLAg1BdBPPsLfZfCgC cq6rlhSB4AgPLjs86IVTYear43hgYAI9GFP7qajK1dSfv6n1n7cg1Mxee7NECL6io4oit0fCUvn YQ/nZ6/aR7ZM5lip8N7PFZbpY0+rjwRlNEvUY/guABT98SGtX+wwDyE0eZVoS8E0lZ/P5KCucrw z0CP+eyhjDSnIqBqFNML+05qU98p2ZGo3ZCbQbPUHhCpZ/oaHOpYWkpSQnPomlOvi4kYBJpXUKu XFt/+JrWKWWLNOxset/Epg1XSPQgeLWps73NeYtSBYyU01Sr/e7Xj3M1+X9nTRg0TBF12+VklJx 6F8XfYVOpA= X-Received: by 2002:a05:6a00:3687:b0:848:467d:293b with SMTP id d2e1a72fcca58-84f2dfb4e5bmr320699b3a.11.1785862951994; Tue, 04 Aug 2026 10:02:31 -0700 (PDT) Received: from powertower.localdomain ([64.180.35.234]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84f2e4d3926sm55508b3a.28.2026.08.04.10.02.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Aug 2026 10:02:31 -0700 (PDT) From: Mykola Lysenko To: bpf@vger.kernel.org Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, eddyz87@gmail.com, martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev, jolsa@kernel.org, memxor@gmail.com, nickolay.lysenko@gmail.com Subject: [RFC PATCH bpf-next v5 7/8] selftests/bpf: move shared build definitions into Makefile.buildvars Date: Tue, 4 Aug 2026 10:01:55 -0700 Message-ID: <20260804170156.1709916-8-nickolay.lysenko@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260804170156.1709916-1-nickolay.lysenko@gmail.com> References: <20260804170156.1709916-1-nickolay.lysenko@gmail.com> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Move the definitions that are not rules into Makefile.buildvars: output-tree layout, libbpf/bpftool binary locations, BPF_CFLAGS/COMMON_CFLAGS assembly, libelf/libpcap probes, endianness and clang feature detection, signing key paths, the permissive-mode knob with its skip_on_fail helper, and the libarena skeleton names. This is preparation for building each test runner instance in its own sub-make: the definitions become includable by more than one makefile. No rules or recipes are changed; definitions keep their order. Two evaluation-time changes are called out in comments: the include sits after ../lib.mk, so CFLAGS is assembled by *prepending* COMMON_CFLAGS (keeping the include-search order identical to before, when the definitions preceded lib.mk's additions), and CLANG_SYS_INCLUDES becomes an immediate assignment (expanding get_sys_includes forks several shells; CLANG and CLANG_TARGET_ARCH are final by this point). BPF_GCC, TEST_KMODS, the VMLINUX_BTF block and the knobs the runner never reads (SKIP_*, submake_extras, TEST_KMOD_TARGETS) stay in the Makefile at their current positions - the first two are needed before lib.mk is included, where Makefile.buildvars cannot yet be, and reach the runners through the environment (a later patch exports them). The srctree fallback and PKG_CONFIG also stay: ../../../build/Makefile.feature captures both at parse time and is parsed before Makefile.buildvars is included - with srctree still empty, the LLVM feature probe would fail silently and disable the jit-disassembler helpers. Makefile.buildvars keeps guarded copies of both for the runner sub-makes, which never parse Makefile.feature. Suggested-by: Eduard Zingerman Assisted-by: Claude:claude-fable-5 shellcheck Signed-off-by: Mykola Lysenko --- tools/testing/selftests/bpf/Makefile | 143 +-------------- .../testing/selftests/bpf/Makefile.buildvars | 171 ++++++++++++++++++ 2 files changed, 173 insertions(+), 141 deletions(-) create mode 100644 tools/testing/selftests/bpf/Makefile.buildvars diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index dbde2f6bd..58c567a22 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -3,60 +3,15 @@ include ../../../build/Build.include include ../../../scripts/Makefile.arch include ../../../scripts/Makefile.include -CXX ?= $(CROSS_COMPILE)g++ -OBJCOPY ?= $(CROSS_COMPILE)objcopy - -TOOLSDIR := $(abspath ../../..) -LIBDIR := $(TOOLSDIR)/lib -BPFDIR := $(LIBDIR)/bpf -TOOLSINCDIR := $(TOOLSDIR)/include -TOOLSARCHINCDIR := $(TOOLSDIR)/arch/$(SRCARCH)/include -BPFTOOLDIR := $(TOOLSDIR)/bpf/bpftool -APIDIR := $(TOOLSINCDIR)/uapi -ifneq ($(O),) -GENDIR := $(O)/include/generated -else -GENDIR := $(abspath ../../../../include/generated) -endif -GENHDR := $(GENDIR)/autoconf.h PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config -ifneq ($(wildcard $(GENHDR)),) - GENFLAGS := -DHAVE_GENHDR -endif - BPF_GCC ?= $(shell command -v bpf-gcc;) -ifdef ASAN -SAN_CFLAGS ?= -fsanitize=address -fno-omit-frame-pointer -else -SAN_CFLAGS ?= -endif -SAN_LDFLAGS ?= $(SAN_CFLAGS) -RELEASE ?= -OPT_FLAGS ?= $(if $(RELEASE),-O2,-O0) - -LIBELF_CFLAGS := $(shell $(PKG_CONFIG) libelf --cflags 2>/dev/null) -LIBELF_LIBS := $(shell $(PKG_CONFIG) libelf --libs 2>/dev/null || echo -lelf) SKIP_DOCS ?= SKIP_LLVM ?= SKIP_LIBBFD ?= SKIP_CRYPTO ?= -# When BPF_STRICT_BUILD is 1, any BPF object, skeleton, test object, or -# benchmark compilation failure is fatal. Set to 0 to tolerate failures -# and continue building the remaining tests. -BPF_STRICT_BUILD ?= 1 -PERMISSIVE := $(filter 0,$(BPF_STRICT_BUILD)) - -# Permissive-mode recipe suffix: on failure, remove the target, emit a -# SKIP marker and report success so the rest of the build continues. -# $(1) - SKIP tag (BPF, TEST, BENCH, SKEL, LINK, ...) -# $(2) - optional extra files to remove alongside the target -# $(3) - optional note appended to the SKIP message -skip_on_fail = $(if $(PERMISSIVE),|| { $(RM) $@ $(2); \ - printf ' %-12s %s\n' 'SKIP-$(1)' '$(notdir $@)$(if $(3), $(3))' 1>&2; }) - ifeq ($(srctree),) srctree := $(patsubst %/,%,$(dir $(CURDIR))) srctree := $(patsubst %/,%,$(dir $(srctree))) @@ -64,39 +19,15 @@ srctree := $(patsubst %/,%,$(dir $(srctree))) srctree := $(patsubst %/,%,$(dir $(srctree))) endif -COMMON_CFLAGS = -g $(OPT_FLAGS) -rdynamic -std=gnu11 \ - -Wall -Werror -fno-omit-frame-pointer \ - -Wno-unused-but-set-variable \ - $(GENFLAGS) $(SAN_CFLAGS) $(LIBELF_CFLAGS) \ - -I$(CURDIR) -I$(INCLUDE_DIR) -I$(GENDIR) -I$(LIBDIR) \ - -I$(TOOLSINCDIR) -I$(TOOLSARCHINCDIR) -I$(APIDIR) -I$(OUTPUT) \ - -I$(CURDIR)/libarena/include -LDFLAGS += $(SAN_LDFLAGS) -LDLIBS += $(LIBELF_LIBS) -lz -lrt -lpthread - -PCAP_CFLAGS := $(shell $(PKG_CONFIG) --cflags libpcap 2>/dev/null && echo "-DTRAFFIC_MONITOR=1") -PCAP_LIBS := $(shell $(PKG_CONFIG) --libs libpcap 2>/dev/null) -LDLIBS += $(PCAP_LIBS) -CFLAGS += $(COMMON_CFLAGS) $(PCAP_CFLAGS) - # Some utility functions use LLVM libraries jit_disasm_helpers.c-CFLAGS = $(LLVM_CFLAGS) -ifneq ($(LLVM),) -# Silence some warnings when compiled with clang -CFLAGS += -Wno-unused-command-line-argument -endif # Check whether bpf cpu=v4 is supported or not by clang ifneq ($(shell $(CLANG) --target=bpf -mcpu=help 2>&1 | grep 'v4'),) CLANG_CPUV4 := 1 endif -# Check whether clang supports BPF address sanitizer (requires LLVM 22+) -CLANG_HAS_ARENA_ASAN := $(shell echo 'int x;' | \ - $(CLANG) --target=bpf -fsanitize=kernel-address \ - -mllvm -asan-shadow-addr-space=1 \ - -x c -c - -o /dev/null 2>/dev/null && echo 1) # Order correspond to 'make run_tests' order TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_progs \ @@ -220,21 +151,8 @@ ifeq ($(feature-llvm),1) endif endif -SCRATCH_DIR := $(OUTPUT)/tools -BUILD_DIR := $(SCRATCH_DIR)/build -INCLUDE_DIR := $(SCRATCH_DIR)/include -BPFOBJ := $(BUILD_DIR)/libbpf/libbpf.a -ifneq ($(CROSS_COMPILE),) -HOST_BUILD_DIR := $(BUILD_DIR)/host -HOST_SCRATCH_DIR := $(OUTPUT)/host-tools -HOST_INCLUDE_DIR := $(HOST_SCRATCH_DIR)/include -else -HOST_BUILD_DIR := $(BUILD_DIR) -HOST_SCRATCH_DIR := $(SCRATCH_DIR) -HOST_INCLUDE_DIR := $(INCLUDE_DIR) -endif -HOST_BPFOBJ := $(HOST_BUILD_DIR)/libbpf/libbpf.a -RESOLVE_BTFIDS := $(HOST_BUILD_DIR)/resolve_btfids/resolve_btfids +include Makefile.buildvars + VMLINUX_BTF_PATHS ?= $(if $(O),$(O)/vmlinux) \ $(if $(KBUILD_OUTPUT),$(KBUILD_OUTPUT)/vmlinux) \ ../../../../vmlinux \ @@ -324,16 +242,6 @@ $(TEST_KMOD_TARGETS): $(addprefix test_kmods/,$(TEST_KMODS)) $(Q)$(if $(PERMISSIVE),if [ -f test_kmods/$(@F) ]; then )cp test_kmods/$(@F) $@$(if $(PERMISSIVE),; fi) -DEFAULT_BPFTOOL := $(HOST_SCRATCH_DIR)/sbin/bpftool -ifneq ($(CROSS_COMPILE),) -CROSS_BPFTOOL := $(SCRATCH_DIR)/sbin/bpftool -TRUNNER_BPFTOOL := $(CROSS_BPFTOOL) -USE_BOOTSTRAP := "" -else -TRUNNER_BPFTOOL := $(DEFAULT_BPFTOOL) -USE_BOOTSTRAP := "bootstrap/" -endif - $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED): $(BPFOBJ) TESTING_HELPERS := $(OUTPUT)/testing_helpers.o @@ -354,7 +262,6 @@ $(OUTPUT)/test_maps: $(TESTING_HELPERS) $(OUTPUT)/test_verifier: $(TESTING_HELPERS) $(CAP_HELPERS) $(UNPRIV_HELPERS) $(OUTPUT)/xsk.o: $(BPFOBJ) -BPFTOOL ?= $(DEFAULT_BPFTOOL) $(DEFAULT_BPFTOOL): $(wildcard $(BPFTOOLDIR)/*.[ch] $(BPFTOOLDIR)/Makefile) \ $(HOST_BPFOBJ) | $(HOST_BUILD_DIR)/bpftool $(Q)$(MAKE) $(submake_extras) -C $(BPFTOOLDIR) \ @@ -447,45 +354,6 @@ $(RESOLVE_BTFIDS): $(HOST_BPFOBJ) | $(HOST_BUILD_DIR)/resolve_btfids \ HOSTPKG_CONFIG='$(PKG_CONFIG)' \ OUTPUT=$(HOST_BUILD_DIR)/resolve_btfids/ BPFOBJ=$(HOST_BPFOBJ) -# Get Clang's default includes on this system, as opposed to those seen by -# '--target=bpf'. This fixes "missing" files on some architectures/distros, -# such as asm/byteorder.h, asm/socket.h, asm/sockios.h, sys/cdefs.h etc. -# -# Use '-idirafter': Don't interfere with include mechanics except where the -# build would have failed anyways. -define get_sys_includes -$(shell $(1) $(2) -v -E - &1 \ - | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }') \ -$(shell $(1) $(2) -dM -E - /dev/null) +LIBELF_LIBS := $(shell $(PKG_CONFIG) libelf --libs 2>/dev/null || echo -lelf) + +# When BPF_STRICT_BUILD is 1, any BPF object, skeleton, test object, or +# benchmark compilation failure is fatal. Set to 0 to tolerate failures +# and continue building the remaining tests. +BPF_STRICT_BUILD ?= 1 +PERMISSIVE := $(filter 0,$(BPF_STRICT_BUILD)) + +# Permissive-mode recipe suffix: on failure, remove the target, emit a +# SKIP marker and report success so the rest of the build continues. +# $(1) - SKIP tag (BPF, TEST, BENCH, SKEL, LINK, ...) +# $(2) - optional extra files to remove alongside the target +# $(3) - optional note appended to the SKIP message +skip_on_fail = $(if $(PERMISSIVE),|| { $(RM) $@ $(2); \ + printf ' %-12s %s\n' 'SKIP-$(1)' '$(notdir $@)$(if $(3), $(3))' 1>&2; }) + +ifeq ($(srctree),) +srctree := $(patsubst %/,%,$(dir $(CURDIR))) +srctree := $(patsubst %/,%,$(dir $(srctree))) +srctree := $(patsubst %/,%,$(dir $(srctree))) +srctree := $(patsubst %/,%,$(dir $(srctree))) +endif + +COMMON_CFLAGS = -g $(OPT_FLAGS) -rdynamic -std=gnu11 \ + -Wall -Werror -fno-omit-frame-pointer \ + -Wno-unused-but-set-variable \ + $(GENFLAGS) $(SAN_CFLAGS) $(LIBELF_CFLAGS) \ + -I$(CURDIR) -I$(INCLUDE_DIR) -I$(GENDIR) -I$(LIBDIR) \ + -I$(TOOLSINCDIR) -I$(TOOLSARCHINCDIR) -I$(APIDIR) -I$(OUTPUT) \ + -I$(CURDIR)/libarena/include +LDFLAGS += $(SAN_LDFLAGS) +LDLIBS += $(LIBELF_LIBS) -lz -lrt -lpthread + +PCAP_CFLAGS := $(shell $(PKG_CONFIG) --cflags libpcap 2>/dev/null && echo "-DTRAFFIC_MONITOR=1") +PCAP_LIBS := $(shell $(PKG_CONFIG) --libs libpcap 2>/dev/null) +LDLIBS += $(PCAP_LIBS) +# Unlike the pre-split Makefile, this file is included after ../lib.mk +# (top level) or without it (runner), so COMMON_CFLAGS is prepended to +# preserve the original include-search order. +LIB_MK_CFLAGS := $(CFLAGS) +CFLAGS = $(COMMON_CFLAGS) $(PCAP_CFLAGS) $(LIB_MK_CFLAGS) + +ifneq ($(LLVM),) +# Silence some warnings when compiled with clang +CFLAGS += -Wno-unused-command-line-argument +endif + +# Check whether clang supports BPF address sanitizer (requires LLVM 22+) +CLANG_HAS_ARENA_ASAN := $(shell echo 'int x;' | \ + $(CLANG) --target=bpf -fsanitize=kernel-address \ + -mllvm -asan-shadow-addr-space=1 \ + -x c -c - -o /dev/null 2>/dev/null && echo 1) + +SCRATCH_DIR := $(OUTPUT)/tools +BUILD_DIR := $(SCRATCH_DIR)/build +INCLUDE_DIR := $(SCRATCH_DIR)/include +BPFOBJ := $(BUILD_DIR)/libbpf/libbpf.a +ifneq ($(CROSS_COMPILE),) +HOST_BUILD_DIR := $(BUILD_DIR)/host +HOST_SCRATCH_DIR := $(OUTPUT)/host-tools +HOST_INCLUDE_DIR := $(HOST_SCRATCH_DIR)/include +else +HOST_BUILD_DIR := $(BUILD_DIR) +HOST_SCRATCH_DIR := $(SCRATCH_DIR) +HOST_INCLUDE_DIR := $(INCLUDE_DIR) +endif +HOST_BPFOBJ := $(HOST_BUILD_DIR)/libbpf/libbpf.a +RESOLVE_BTFIDS := $(HOST_BUILD_DIR)/resolve_btfids/resolve_btfids + +DEFAULT_BPFTOOL := $(HOST_SCRATCH_DIR)/sbin/bpftool +ifneq ($(CROSS_COMPILE),) +CROSS_BPFTOOL := $(SCRATCH_DIR)/sbin/bpftool +TRUNNER_BPFTOOL := $(CROSS_BPFTOOL) +USE_BOOTSTRAP := "" +else +TRUNNER_BPFTOOL := $(DEFAULT_BPFTOOL) +USE_BOOTSTRAP := "bootstrap/" +endif + +BPFTOOL ?= $(DEFAULT_BPFTOOL) + +# Get Clang's default includes on this system, as opposed to those seen by +# '--target=bpf'. This fixes "missing" files on some architectures/distros, +# such as asm/byteorder.h, asm/socket.h, asm/sockios.h, sys/cdefs.h etc. +# +# Use '-idirafter': Don't interfere with include mechanics except where the +# build would have failed anyways. +define get_sys_includes +$(shell $(1) $(2) -v -E - &1 \ + | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }') \ +$(shell $(1) $(2) -dM -E -