From: Alistair Popple <apopple@nvidia.com>
To: <linux-kselftest@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
<shuah@kernel.org>, <akpm@linux-foundation.org>,
<jhubbard@nvidia.com>, <sandipan@linux.ibm.com>,
<linuxram@us.ibm.com>, <harish@linux.ibm.com>,
<dave.hansen@intel.com>, <rcampbell@nvidia.com>,
Alistair Popple <apopple@nvidia.com>
Subject: [PATCH 1/2] kselftest/vm: Rename TARGETS to BUILD_TARGETS
Date: Mon, 24 May 2021 23:03:07 +1000 [thread overview]
Message-ID: <20210524130308.16343-1-apopple@nvidia.com> (raw)
The TARGETS variable can be used when building selftests to specify a
subset of selftests to build and run like so:
make -C tools/testing/selftests TARGETS=ptrace run_tests
However specifying TARGETS=vm results in the following build error as
the TARGETS variable is used internally in the Makefile:
make[1]: *** No rule to make target 'vm.c', needed by
'linux/kselftest/vm/vm_32'. Stop.
Fix this by renaming the vm Makefile TARGETS variable to BUILD_TARGETS.
Signed-off-by: Alistair Popple <apopple@nvidia.com>
---
tools/testing/selftests/vm/Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
index 73e1cc96d7c2..110751ce8701 100644
--- a/tools/testing/selftests/vm/Makefile
+++ b/tools/testing/selftests/vm/Makefile
@@ -49,9 +49,9 @@ CAN_BUILD_I386 := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_32bit_progra
CAN_BUILD_X86_64 := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_64bit_program.c)
CAN_BUILD_WITH_NOPIE := $(shell ./../x86/check_cc.sh $(CC) ../x86/trivial_program.c -no-pie)
-TARGETS := protection_keys
-BINARIES_32 := $(TARGETS:%=%_32)
-BINARIES_64 := $(TARGETS:%=%_64)
+BUILD_TARGETS := protection_keys
+BINARIES_32 := $(BUILD_TARGETS:%=%_32)
+BINARIES_64 := $(BUILD_TARGETS:%=%_64)
ifeq ($(CAN_BUILD_WITH_NOPIE),1)
CFLAGS += -no-pie
@@ -104,7 +104,7 @@ $(BINARIES_32): CFLAGS += -m32
$(BINARIES_32): LDLIBS += -lrt -ldl -lm
$(BINARIES_32): $(OUTPUT)/%_32: %.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(notdir $^) $(LDLIBS) -o $@
-$(foreach t,$(TARGETS),$(eval $(call gen-target-rule-32,$(t))))
+$(foreach t,$(BUILD_TARGETS),$(eval $(call gen-target-rule-32,$(t))))
endif
ifeq ($(CAN_BUILD_X86_64),1)
@@ -112,7 +112,7 @@ $(BINARIES_64): CFLAGS += -m64
$(BINARIES_64): LDLIBS += -lrt -ldl
$(BINARIES_64): $(OUTPUT)/%_64: %.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(notdir $^) $(LDLIBS) -o $@
-$(foreach t,$(TARGETS),$(eval $(call gen-target-rule-64,$(t))))
+$(foreach t,$(BUILD_TARGETS),$(eval $(call gen-target-rule-64,$(t))))
endif
# x86_64 users should be encouraged to install 32-bit libraries
--
2.20.1
next reply other threads:[~2021-05-24 13:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 13:03 Alistair Popple [this message]
2021-05-24 13:03 ` [PATCH 2/2] kselftest/vm: Add test_hmm.sh to TEST_FILES Alistair Popple
2022-03-03 23:33 [PATCH 1/2] kselftest/vm: Rename TARGETS to BUILD_TARGETS Yosry Ahmed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210524130308.16343-1-apopple@nvidia.com \
--to=apopple@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@intel.com \
--cc=harish@linux.ibm.com \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxram@us.ibm.com \
--cc=rcampbell@nvidia.com \
--cc=sandipan@linux.ibm.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).