1# Copyright (C) Simon Wright <simon@pushface.org>. 2 3# This package is free software; you can redistribute it and/or modify 4# it under terms of the GNU General Public License as published by the 5# Free Software Foundation; either version 2, or (at your option) any 6# later version. This package is distributed in the hope that it will 7# be useful, but WITHOUT ANY WARRANTY; without even the implied 8# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 9# the GNU General Public License for more details. You should have 10# received a copy of the GNU General Public License distributed with 11# this package; see file COPYING. If not, write to the Free Software 12# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 13 14# (GNU) Makefile for test of Booch Components distribution. 15 16ifneq (, $(findstring CYGWIN, $(sys))) 17 EXE = .exe 18else 19 EXE = 20endif 21 22GNATMAKE=gnatmake 23 24##################### 25# Default build rule 26%$(EXE): %.adb 27 $(GNATMAKE) -p -Ptests $< 28 29######## 30# Tests 31 32test: 33 for t in $(TESTABLE); do \ 34 echo running $$t; \ 35 ./$$t 2>&1 | tee $$t.log; \ 36 done 37 38TESTABLE += avl_test$(EXE) 39TEST_SRC += avl_test.ad[bs] avl_test_support.ad[bs] 40avl_test$(EXE): force 41 42TESTABLE += bag_test$(EXE) 43TEST_SRC += bag_test.ad[bs] bag_test_support.ad[bs] 44bag_test$(EXE): force 45 46TESTABLE += collection_test$(EXE) 47TEST_SRC += collection_test.ad[bs] collection_test_support.ad[bs] 48collection_test$(EXE): force 49 50TESTABLE += deque_test 51TEST_SRC += deque_test.ad[bs] deque_test_support.ad[bs] 52deque_test$(EXE): force 53 54TESTABLE += graph_test$(EXE) 55TEST_SRC += graph_test.ad[bs] graph_test_support.ad[bs] 56graph_test$(EXE): force 57 58TESTABLE += list_test$(EXE) 59TEST_SRC += list_test.ad[bs] list_test_support.ad[bs] 60list_test$(EXE): force 61 62TESTABLE += map_test$(EXE) 63TEST_SRC += map_test.ad[bs] map_test_support.ad[bs] chunks.ad[bs] 64map_test$(EXE): force 65 66TESTABLE += ordered_collection_test$(EXE) 67TEST_SRC += ordered_collection_test.ad[bs] \ 68 ordered_collection_test_support.ad[bs] 69ordered_collection_test$(EXE): force 70 71TESTABLE += ordered_queue_test$(EXE) 72TEST_SRC += ordered_queue_test.ad[bs] ordered_queue_test_support.ad[bs] 73ordered_queue_test$(EXE): force 74 75TESTABLE += queue_test$(EXE) 76TEST_SRC += queue_test.ad[bs] queue_test_support.ad[bs] 77queue_test$(EXE): force 78 79TESTABLE += ring_test$(EXE) 80TEST_SRC += ring_test.ad[bs] ring_test_support.ad[bs] \ 81tests-rings.ad[bs] 82ring_test$(EXE): force 83 84TESTABLE += set_test$(EXE) 85TEST_SRC += set_test.ad[bs] set_test_support.ad[bs] 86set_test$(EXE): force 87 88TESTABLE += smart_test$(EXE) 89TEST_SRC += bc-support-smart_pointers-test_finalize.ad[bs] \ 90smart_test.ad[bs] \ 91smart_test_support.ad[bs] \ 92tests-auto_pointers.ad[bs] 93smart_test$(EXE): force 94 95TESTABLE += sort_test$(EXE) 96TEST_SRC += sort_test.adb 97sort_test$(EXE): force 98 99TESTABLE += stack_test$(EXE) 100TEST_SRC += stack_test.ad[bs] stack_test_support.ad[bs] 101stack_test$(EXE): force 102 103TESTABLE += stream_test$(EXE) 104TEST_SRC += stream_test.ad[bs] stream_test_support.ad[bs] \ 105stream_test_support-tc[bdu].ad[bs] 106stream_test$(EXE): force 107 108TESTABLE += tree_test$(EXE) 109TEST_SRC += tree_test.ad[bs] tree_test_support.ad[bs] \ 110tests-avl_trees.ad[bs] tests-multiway_trees.ad[bs] 111tree_test$(EXE): force 112 113testable: .build $(TESTABLE) 114 115TEST_SRC += assertions.ad[bs] \ 116global_heap.ad[bs] \ 117tests-support.ad[bs] tests-items.ad[bs] \ 118tests-main.adb tests.ads 119 120dist: 121 mkdir $(DIST)/tests 122 cp $(TEST_SRC) Makefile tests.gpr AUnit_Tests.gpr $(DIST)/tests/ 123 124.build: 125 mkdir $@ 126 127clean:: 128 rm -f $(TESTABLE) 129 rm -rf .build 130 131.PHONY: clean dist force 132