[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4Bza3fDw+M-S-1G1D+hsoCEum=WEoycbFgi2c-cdfG8=Ckw@mail.gmail.com>
Date: Fri, 12 Jul 2019 13:15:00 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Ilya Leoshkevich <iii@...ux.ibm.com>
Cc: bpf <bpf@...r.kernel.org>, Networking <netdev@...r.kernel.org>,
gor@...ux.ibm.com, heiko.carstens@...ibm.com
Subject: Re: [PATCH bpf] selftests/bpf: put test_stub.o into $(OUTPUT)
On Fri, Jul 12, 2019 at 7:00 AM Ilya Leoshkevich <iii@...ux.ibm.com> wrote:
>
> Add a rule to put test_stub.o in $(OUTPUT) and change the references to
> it accordingly. This prevents test_stub.o from being created in the
> source directory.
>
> Signed-off-by: Ilya Leoshkevich <iii@...ux.ibm.com>
> ---
Makes sense.
Acked-by: Andrii Nakryiko <andriin@...com>
> tools/testing/selftests/bpf/Makefile | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index 277d8605e340..66b6f7fb683c 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -83,13 +83,16 @@ all: $(TEST_CUSTOM_PROGS)
> $(OUTPUT)/urandom_read: $(OUTPUT)/%: %.c
> $(CC) -o $@ $< -Wl,--build-id
>
> +$(OUTPUT)/test_stub.o: test_stub.c
> + $(CC) $(TEST_PROGS_CFLAGS) $(CFLAGS) -c -o $@ $<
> +
> $(OUTPUT)/test_maps: map_tests/*.c
>
> BPFOBJ := $(OUTPUT)/libbpf.a
>
> -$(TEST_GEN_PROGS): test_stub.o $(BPFOBJ)
> +$(TEST_GEN_PROGS): $(OUTPUT)/test_stub.o $(BPFOBJ)
>
> -$(TEST_GEN_PROGS_EXTENDED): test_stub.o $(OUTPUT)/libbpf.a
> +$(TEST_GEN_PROGS_EXTENDED): $(OUTPUT)/test_stub.o $(OUTPUT)/libbpf.a
>
> $(OUTPUT)/test_dev_cgroup: cgroup_helpers.c
> $(OUTPUT)/test_skb_cgroup_id_user: cgroup_helpers.c
> --
> 2.21.0
>
Powered by blists - more mailing lists