1 | #!/bin/bash |
---|
2 | #------------------------------------------------------------------------------- |
---|
3 | # (C) British Crown Copyright 2006-17 Met Office. |
---|
4 | # |
---|
5 | # This file is part of FCM, tools for managing and building source code. |
---|
6 | # |
---|
7 | # FCM is free software: you can redistribute it and/or modify |
---|
8 | # it under the terms of the GNU 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 | # FCM 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 General Public License for more details. |
---|
16 | # |
---|
17 | # You should have received a copy of the GNU General Public License |
---|
18 | # along with FCM. If not, see <http://www.gnu.org/licenses/>. |
---|
19 | #------------------------------------------------------------------------------- |
---|
20 | # Tests for "fcm make", "build.prop{dep.o}" top namespace. |
---|
21 | # (Cyclic dependency bug in 2013-09.) |
---|
22 | #------------------------------------------------------------------------------- |
---|
23 | . $(dirname $0)/test_header |
---|
24 | #------------------------------------------------------------------------------- |
---|
25 | tests 2 |
---|
26 | cp -r $TEST_SOURCE_DIR/$TEST_KEY_BASE/* . |
---|
27 | #------------------------------------------------------------------------------- |
---|
28 | TEST_KEY="$TEST_KEY_BASE" |
---|
29 | run_pass "$TEST_KEY" fcm make |
---|
30 | sed '/^\[info\] \(source->target\|target\) /!d' .fcm-make/log >"$TEST_KEY.log" |
---|
31 | file_cmp "$TEST_KEY.log" "$TEST_KEY.log" <<'__LOG__' |
---|
32 | [info] source->target / -> (archive) lib/ libo.a |
---|
33 | [info] source->target lib -> (archive) lib/ lib/libo.a |
---|
34 | [info] source->target lib/earth.f90 -> (install) include/ earth.f90 |
---|
35 | [info] source->target lib/earth.f90 -> (ext-iface) include/ earth.interface |
---|
36 | [info] source->target lib/earth.f90 -> (compile) o/ world.o |
---|
37 | [info] source->target lib/greet.f90 -> (install) include/ greet.f90 |
---|
38 | [info] source->target lib/greet.f90 -> (ext-iface) include/ greet.interface |
---|
39 | [info] source->target lib/greet.f90 -> (compile) o/ greet.o |
---|
40 | [info] source->target lib/greet_fmt_mod.f90 -> (install) include/ greet_fmt_mod.f90 |
---|
41 | [info] source->target lib/greet_fmt_mod.f90 -> (compile+) include/ greet_fmt_mod.mod |
---|
42 | [info] source->target lib/greet_fmt_mod.f90 -> (compile) o/ greet_fmt_mod.o |
---|
43 | [info] source->target main -> (archive) lib/ main/libo.a |
---|
44 | [info] source->target main/hello.f90 -> (link) bin/ hello.exe |
---|
45 | [info] source->target main/hello.f90 -> (install) include/ hello.f90 |
---|
46 | [info] source->target main/hello.f90 -> (compile) o/ hello.o |
---|
47 | [info] source->target main/hi.f90 -> (link) bin/ hi.exe |
---|
48 | [info] source->target main/hi.f90 -> (install) include/ hi.f90 |
---|
49 | [info] source->target main/hi.f90 -> (compile) o/ hi.o |
---|
50 | [info] target hi.exe |
---|
51 | [info] target - greet.o |
---|
52 | [info] target - - greet_fmt_mod.mod |
---|
53 | [info] target - - - greet_fmt_mod.o |
---|
54 | [info] target - greet_fmt_mod.o |
---|
55 | [info] target - hi.o |
---|
56 | [info] target - world.o |
---|
57 | [info] target hello.exe |
---|
58 | [info] target - greet.o (n-deps=1) |
---|
59 | [info] target - greet_fmt_mod.o |
---|
60 | [info] target - hello.o |
---|
61 | [info] target - world.o |
---|
62 | __LOG__ |
---|
63 | #------------------------------------------------------------------------------- |
---|
64 | exit 0 |
---|