diff mbox series

[17/17] tests: drop headers from Makefile dependencies

Message ID 20241118150256.135432-18-cgoettsche@seltendoof.de (mailing list archive)
State New
Headers show
Series [01/17] Fix typos | expand

Commit Message

Christian Göttsche Nov. 18, 2024, 3:02 p.m. UTC
From: Christian Göttsche <cgzones@googlemail.com>

Clang does not support header files included in the compile command:

    clang -g -O2 -Werror -Wall -Wextra -Wno-error=unused-parameter -D_GNU_SOURCE -DHAVE_BPF -DHAVE_FS_WATCH_PERM -DHAVE_BPF    bpf_test.c bpf_common.c bpf_common.h  -lselinux -lbpf -o bpf_test
    clang: error: cannot specify -o when generating multiple output files

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 tests/binder/Makefile    | 4 ++--
 tests/bpf/Makefile       | 2 +-
 tests/fdreceive/Makefile | 2 +-
 tests/keys/Makefile      | 2 --
 tests/tun_tap/Makefile   | 2 +-
 5 files changed, 5 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/tests/binder/Makefile b/tests/binder/Makefile
index b89d4db..5c3a589 100644
--- a/tests/binder/Makefile
+++ b/tests/binder/Makefile
@@ -3,7 +3,7 @@  INCLUDEDIR ?= /usr/include
 
 TARGETS = check_binder client manager service_provider
 LDLIBS += -lselinux -lrt
-DEPS = binder_common.c binder_common.h
+DEPS = binder_common.c
 
 ifeq ($(shell test -e $(INCLUDEDIR)/linux/android/binderfs.h && echo true),true)
 CFLAGS += -DHAVE_BINDERFS
@@ -11,7 +11,7 @@  TARGETS += check_binderfs
 endif
 
 ifneq (,$(findstring -DHAVE_BPF,$(CFLAGS)))
-	DEPS += ../bpf/bpf_common.c ../bpf/bpf_common.h
+	DEPS += ../bpf/bpf_common.c
 	LDLIBS += -lbpf
 endif
 
diff --git a/tests/bpf/Makefile b/tests/bpf/Makefile
index 1ae8ce9..6b26ff9 100644
--- a/tests/bpf/Makefile
+++ b/tests/bpf/Makefile
@@ -1,5 +1,5 @@ 
 TARGETS = bpf_test
-DEPS = bpf_common.c bpf_common.h
+DEPS = bpf_common.c
 LDLIBS += -lselinux -lbpf
 
 # export so that BPF_ENABLED entries get built correctly on local build
diff --git a/tests/fdreceive/Makefile b/tests/fdreceive/Makefile
index d9f8927..4b1fb8c 100644
--- a/tests/fdreceive/Makefile
+++ b/tests/fdreceive/Makefile
@@ -1,7 +1,7 @@ 
 TARGETS = client server
 
 ifneq (,$(findstring -DHAVE_BPF,$(CFLAGS)))
-	DEPS = ../bpf/bpf_common.c ../bpf/bpf_common.h
+	DEPS = ../bpf/bpf_common.c
 	LDLIBS += -lbpf
 endif
 
diff --git a/tests/keys/Makefile b/tests/keys/Makefile
index d9f36ff..d3793db 100644
--- a/tests/keys/Makefile
+++ b/tests/keys/Makefile
@@ -1,8 +1,6 @@ 
 TARGETS = keyctl keyctl_relabel keyring_service request_keys
 LDLIBS += -lselinux -lkeyutils
 
-$(TARGETS): keys_common.h
-
 all: $(TARGETS)
 
 clean:
diff --git a/tests/tun_tap/Makefile b/tests/tun_tap/Makefile
index 11f5b03..f4b69d5 100644
--- a/tests/tun_tap/Makefile
+++ b/tests/tun_tap/Makefile
@@ -1,5 +1,5 @@ 
 TARGETS = tun_tap tun_relabel
-DEPS = tun_common.c tun_common.h
+DEPS = tun_common.c
 LDLIBS += -lselinux
 
 all: $(TARGETS)