Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Annotation of /trunk/src/test/Makefile
Parent Directory
|
Revision Log
Revision 913 -
(hide annotations)
(download)
Sun Nov 20 19:39:30 2011 UTC (13 years, 3 months ago) by amb
File size: 2177 byte(s)
Sun Nov 20 19:39:30 2011 UTC (13 years, 3 months ago) by amb
File size: 2177 byte(s)
Fix some more Makefile oddities.
1 | amb | 691 | # Test cases Makefile |
2 | # | ||
3 | # Part of the Routino routing software. | ||
4 | # | ||
5 | amb | 698 | # This file Copyright 2011 Andrew M. Bishop |
6 | amb | 691 | # |
7 | # This program is free software: you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU Affero General Public License as published by | ||
9 | # the Free Software Foundation, either version 3 of the License, or | ||
10 | # (at your option) any later version. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU Affero General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU Affero General Public License | ||
18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | # | ||
20 | |||
21 | # Routino executables | ||
22 | |||
23 | EXE=../planetsplitter ../planetsplitter-slim \ | ||
24 | ../router ../router-slim \ | ||
25 | ../filedumper ../filedumper-slim | ||
26 | |||
27 | # Compilation targets | ||
28 | |||
29 | O=$(notdir $(wildcard *.osm)) | ||
30 | S=$(foreach f,$(O),$(addsuffix .sh,$(basename $f))) | ||
31 | |||
32 | ######## | ||
33 | |||
34 | all : | ||
35 | @true | ||
36 | |||
37 | ######## | ||
38 | |||
39 | amb | 698 | exe : |
40 | amb | 691 | cd .. && $(MAKE) |
41 | |||
42 | ######## | ||
43 | |||
44 | amb | 698 | test : exe |
45 | amb | 691 | @status=true ;\ |
46 | [ -d fat ] || mkdir fat ;\ | ||
47 | for script in $(S); do \ | ||
48 | echo "" ;\ | ||
49 | echo "Testing: $$script (non-slim) ... " ;\ | ||
50 | if ./$$script fat; then echo "... passed"; else echo "... FAILED"; status=false; fi ;\ | ||
51 | done ;\ | ||
52 | [ -d slim ] || mkdir slim ;\ | ||
53 | for script in $(S); do \ | ||
54 | echo "" ;\ | ||
55 | echo "Testing: $$script (slim) ... " ;\ | ||
56 | if ./$$script slim; then echo "... passed"; else echo "... FAILED"; status=false; fi ;\ | ||
57 | done ;\ | ||
58 | echo "" ;\ | ||
59 | if $$status; then echo "Success: all tests passed"; else echo "Warning: Some tests FAILED"; fi ;\ | ||
60 | $$status || exit 1 ;\ | ||
61 | echo "" ;\ | ||
62 | echo "Comparing: slim and non-slim results ... " ;\ | ||
63 | if diff -q -r slim fat; then echo "... matched"; else echo "... match FAILED"; status=false; fi ;\ | ||
64 | amb | 709 | echo "" ;\ |
65 | if $$status; then echo "Success: slim and non-slim results match"; else echo "Warning: slim and non-slim results are different - FAILED"; fi ;\ | ||
66 | amb | 691 | $$status |
67 | |||
68 | ######## | ||
69 | |||
70 | clean: | ||
71 | rm -rf slim | ||
72 | rm -rf fat | ||
73 | amb | 739 | rm -f *.log |
74 | rm -f core | ||
75 | amb | 691 | rm -f *~ |
76 | |||
77 | ######## | ||
78 | |||
79 | distclean: clean | ||
80 | @true | ||
81 | amb | 913 | |
82 | ######## | ||
83 | |||
84 | .PHONY:: all test install clean distclean |