lkml.org 
[lkml]   [2023]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] selftests: uevent: use shared makefile library
Date
This makes the uevent selftests build not write to the source tree
unconditionally, as that breaks out of tree builds when the source tree
is read-only. It also avoids leaving a git repository in a dirty state
after a build.

Signed-off-by: Antonio Terceiro <antonio.terceiro@linaro.org>
---
tools/testing/selftests/uevent/Makefile | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/tools/testing/selftests/uevent/Makefile b/tools/testing/selftests/uevent/Makefile
index f7baa9aa2932..9d1ba09baa90 100644
--- a/tools/testing/selftests/uevent/Makefile
+++ b/tools/testing/selftests/uevent/Makefile
@@ -1,17 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
all:

-include ../lib.mk
-
-.PHONY: all clean
-
-BINARIES := uevent_filtering
-CFLAGS += -Wl,-no-as-needed -Wall
-
-uevent_filtering: uevent_filtering.c ../kselftest.h ../kselftest_harness.h
- $(CC) $(CFLAGS) $< -o $@
+# SPDX-License-Identifier: GPL-2.0
+CFLAGS += -Wl,-no-as-needed -Wall $(KHDR_INCLUDES)

-TEST_PROGS += $(BINARIES)
-EXTRA_CLEAN := $(BINARIES)
+TEST_GEN_PROGS = uevent_filtering

-all: $(BINARIES)
+include ../lib.mk
--
2.43.0

\
 
 \ /
  Last update: 2023-12-21 21:40    [W:0.040 / U:2.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site