Skip to content

Commit 2db2c25

Browse files
committed
selftests/powerpc: Fix standalone powerpc build
The changes to enable building with a separate output directory, in commit a8ba798 ("selftests: enable O and KBUILD_OUTPUT") broke building the powerpc selftests on their own, eg: $ cd tools/testing/selftests/powerpc; make It was partially fixed in commit e53aff4 ("selftests: lib.mk Fix individual test builds"), which defined OUTPUT for standalone tests. But that only defines OUTPUT within the Makefile, the value is not exported so sub-shells can't see it. We could export OUTPUT, but it's actually cleaner to just expand the value of OUTPUT before we invoke the shell. Fixes: a8ba798 ("selftests: enable O and KBUILD_OUTPUT") Signed-off-by: Michael Ellerman <[email protected]>
1 parent cc638a4 commit 2db2c25

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/testing/selftests/powerpc/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,34 +34,34 @@ endif
3434
all: $(SUB_DIRS)
3535

3636
$(SUB_DIRS):
37-
BUILD_TARGET=$$OUTPUT/$@; mkdir -p $$BUILD_TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -k -C $@ all
37+
BUILD_TARGET=$(OUTPUT)/$@; mkdir -p $$BUILD_TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -k -C $@ all
3838

3939
include ../lib.mk
4040

4141
override define RUN_TESTS
4242
@for TARGET in $(SUB_DIRS); do \
43-
BUILD_TARGET=$$OUTPUT/$$TARGET; \
43+
BUILD_TARGET=$(OUTPUT)/$$TARGET; \
4444
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests;\
4545
done;
4646
endef
4747

4848
override define INSTALL_RULE
4949
@for TARGET in $(SUB_DIRS); do \
50-
BUILD_TARGET=$$OUTPUT/$$TARGET; \
50+
BUILD_TARGET=$(OUTPUT)/$$TARGET; \
5151
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET install;\
5252
done;
5353
endef
5454

5555
override define EMIT_TESTS
5656
@for TARGET in $(SUB_DIRS); do \
57-
BUILD_TARGET=$$OUTPUT/$$TARGET; \
57+
BUILD_TARGET=$(OUTPUT)/$$TARGET; \
5858
$(MAKE) OUTPUT=$$BUILD_TARGET -s -C $$TARGET emit_tests;\
5959
done;
6060
endef
6161

6262
clean:
6363
@for TARGET in $(SUB_DIRS); do \
64-
BUILD_TARGET=$$OUTPUT/$$TARGET; \
64+
BUILD_TARGET=$(OUTPUT)/$$TARGET; \
6565
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET clean; \
6666
done;
6767
rm -f tags

0 commit comments

Comments
 (0)