New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
35-include-relative-cfg-in-2-dirs.t in vendors/FCM-2017.10.0/t/fcm-make – NEMO

source: vendors/FCM-2017.10.0/t/fcm-make/35-include-relative-cfg-in-2-dirs.t @ 13688

Last change on this file since 13688 was 10672, checked in by nicolasmartin, 5 years ago

Reimport latest FCM release

File size: 2.2 KB
Line 
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 "fcm make", include relative config
21#-------------------------------------------------------------------------------
22. $(dirname $0)/test_header
23#-------------------------------------------------------------------------------
24tests 6
25#-------------------------------------------------------------------------------
26mkdir cfg1 cfg2
27cat >cfg1/fcm-make-head.cfg <<'__CFG__'
28steps=build
29build.source=src
30__CFG__
31cat >cfg1/fcm-make-tail.cfg <<'__CFG__'
32build.target=hello.exe
33__CFG__
34cat >cfg2/fcm-make-tail.cfg <<'__CFG__'
35build.target=hello
36build.prop{file-ext.bin}=
37__CFG__
38
39mkdir src
40cat >src/hello.f90 <<'__FORTRAN__'
41program hello
42write(*, '(a)') 'Hello World!'
43end program hello
44__FORTRAN__
45
46#-------------------------------------------------------------------------------
47cat >fcm-make.cfg <<'__CFG__'
48include-path = $HERE/cfg1 $HERE/cfg2
49include = fcm-make-head.cfg fcm-make-tail.cfg
50__CFG__
51
52fcm_make_build_hello_tests "$TEST_KEY_BASE-1" '.exe'
53#-------------------------------------------------------------------------------
54cat >fcm-make.cfg <<'__CFG__'
55include-path = $HERE/cfg2
56include-path{+} = $HERE/cfg1
57include = fcm-make-head.cfg fcm-make-tail.cfg
58__CFG__
59
60fcm_make_build_hello_tests "$TEST_KEY_BASE-2" ''
61#-------------------------------------------------------------------------------
62exit 0
Note: See TracBrowser for help on using the repository browser.