Skip to content

Commit

Permalink
selftests/powerpc/ptrace: Fix out-of-tree build
Browse files Browse the repository at this point in the history
We should use TEST_GEN_PROGS, not TEST_PROGS. That tells the selftests
makefile (lib.mk) that those tests are generated (built), and so it
adds the $(OUTPUT) prefix for us, making the out-of-tree build work
correctly.

It also means we don't need our own clean rule, lib.mk does it.

We also have to update the ptrace-pkey and core-pkey rules to use
$(OUTPUT).

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Joel Stanley authored and Michael Ellerman committed Oct 31, 2018
1 parent 9c87156 commit c39b790
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions tools/testing/selftests/powerpc/ptrace/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
# SPDX-License-Identifier: GPL-2.0
TEST_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \
TEST_GEN_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \
ptrace-tar ptrace-tm-tar ptrace-tm-spd-tar ptrace-vsx ptrace-tm-vsx \
ptrace-tm-spd-vsx ptrace-tm-spr ptrace-hwbreak ptrace-pkey core-pkey \
perf-hwbreak ptrace-syscall

top_srcdir = ../../../../..
include ../../lib.mk

all: $(TEST_PROGS)

CFLAGS += -m64 -I../../../../../usr/include -I../tm -mhtm -fno-pie

ptrace-pkey core-pkey: child.h
ptrace-pkey core-pkey: LDLIBS += -pthread

$(TEST_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h
$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: child.h
$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: LDLIBS += -pthread

clean:
rm -f $(TEST_PROGS) *.o
$(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h

0 comments on commit c39b790

Please sign in to comment.