Home | History | Annotate | Download | only in futex
      1 SUBDIRS := functional
      2 
      3 TEST_PROGS := run.sh
      4 
      5 .PHONY: all clean
      6 
      7 include ../lib.mk
      8 
      9 all:
     10 	for DIR in $(SUBDIRS); do		\
     11 		BUILD_TARGET=$$OUTPUT/$$DIR;	\
     12 		mkdir $$BUILD_TARGET  -p;	\
     13 		make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
     14 	done
     15 
     16 override define RUN_TESTS
     17 	@if [ `dirname $(OUTPUT)` = $(PWD) ]; then ./run.sh; fi
     18 endef
     19 
     20 override define INSTALL_RULE
     21 	mkdir -p $(INSTALL_PATH)
     22 	install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
     23 
     24 	@for SUBDIR in $(SUBDIRS); do \
     25 		BUILD_TARGET=$$OUTPUT/$$SUBDIR;	\
     26 		mkdir $$BUILD_TARGET  -p;	\
     27 		$(MAKE) OUTPUT=$$BUILD_TARGET -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \
     28 	done;
     29 endef
     30 
     31 override define EMIT_TESTS
     32 	echo "./run.sh"
     33 endef
     34 
     35 clean:
     36 	for DIR in $(SUBDIRS); do		\
     37 		BUILD_TARGET=$$OUTPUT/$$DIR;	\
     38 		mkdir $$BUILD_TARGET  -p;	\
     39 		make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
     40 	done
     41