Merge tag 'xtensa-20180225' of git://github.com/jcmvbkbc/linux-xtensa
[cris-mirror.git] / tools / testing / selftests / futex / Makefile
blobcea4adcd42b8877f7e5a05d57a837bcc61c1d97d
1 # SPDX-License-Identifier: GPL-2.0
2 SUBDIRS := functional
4 TEST_PROGS := run.sh
6 .PHONY: all clean
8 include ../lib.mk
10 all:
11 @for DIR in $(SUBDIRS); do \
12 BUILD_TARGET=$(OUTPUT)/$$DIR; \
13 mkdir $$BUILD_TARGET -p; \
14 make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
15 if [ -e $$DIR/$(TEST_PROGS) ]; then
16 rsync -a $$DIR/$(TEST_PROGS) $$BUILD_TARGET/;
18 done
20 override define RUN_TESTS
21 @cd $(OUTPUT); ./run.sh
22 endef
24 override define INSTALL_RULE
25 mkdir -p $(INSTALL_PATH)
26 install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
28 @for SUBDIR in $(SUBDIRS); do \
29 BUILD_TARGET=$(OUTPUT)/$$SUBDIR; \
30 mkdir $$BUILD_TARGET -p; \
31 $(MAKE) OUTPUT=$$BUILD_TARGET -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \
32 done;
33 endef
35 override define EMIT_TESTS
36 echo "./run.sh"
37 endef
39 override define CLEAN
40 @for DIR in $(SUBDIRS); do \
41 BUILD_TARGET=$(OUTPUT)/$$DIR; \
42 mkdir $$BUILD_TARGET -p; \
43 make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
44 done
45 endef