/
annex_cfg.html
1524 lines (1097 loc) · 51.4 KB
/
annex_cfg.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<title>FCM: User Guide: Annex: FCM Configuration File</title>
<meta name="author" content="FCM team" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="../etc/fcm-icon.png" type="image/png" />
<link rel="shortcut icon" href="../etc/fcm-icon.png" type="image/png" />
<link href="../etc/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" />
<link href="../etc/fcm.css" rel="stylesheet" media="screen" />
</head>
<body>
<div class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href=".."><span class="fcm-version">FCM</span></a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../installation/">Installation</a></li>
<li><a class="active" href="#">User Guide</a></li>
</ul>
</div>
</div>
</div>
<div class="page-header">
<div class="fcm-page-content pull-right well well-sm"></div>
<h1>FCM: User Guide: Annex: FCM Configuration File</h1>
</div>
<div class="container">
<div class="row">
<div class="col-md-12">
<h2 id="syntax">Syntax</h2>
<h3 id="syntax.comment">Syntax: comment</h3>
<p>An empty line, a line with only space characters and a line beginning with
a <kbd>#</kbd> character is a comment line. For example:</p>
<pre>
# This is a comment.
# This is also a comment.
</pre>
<p>Also, if a line contains a space character followed by a <kbd>#</kbd>
character then this, and any following characters, are treated as an end of
line comment and are ignored.</p>
<h3 id="syntax.declaration">Syntax: declaration</h3>
<p>The general syntax of a declaration consists of a label, a set of
modifiers, a list of name-spaces, and a value:</p>
<pre>
label{mod:mod-value}[ns] = value
label{mod:mod-value} = value
label[ns] = value
label = value
label = value\
value # "value value"
label = value\
\value # "valuevalue"
</pre>
<p>The label is compulsory. It defines the declaration, and may have one or
more characters in the alpha-numeric, the underscore, the minus sign and the
full stop. The label cannot be substituted with a variable.</p>
<p>The modifier is an optional part of the syntax, but may be a compulsory
part of some declarations. The modifiers are embedded between a pair of curly
braces and must come after the label, but before the name-spaces and the
equal sign. It should be a comma-separated list of colon-separated key-value
pairs, (i.e. <kbd>{key1: value1, key2: value2, ...}</kbd>). The value in each
modifier is optional - if a key is set without a value, its value is assumed
to be 1. The contents of the modifiers can be substituted using a
variable.</p>
<p>The name-space is an optional part of the syntax, but may be a compulsory
part of some declarations. The name-spaces are embedded between a pair of
square braces and must come after the label and/or modifiers but before the
equal sign. It should be a space-separated list of names. If a name contains
space, the space character can be escaped using a backslash character or the
name can be quoted. The contents of the name-spaces can be substituted using
a variable.</p>
<p>The first non-space character after the equal sign begins the value of the
declaration. If there is nothing after the equal sign, the value is an empty
string. The contents of the value can be substituted using a variable.
Trailing space characters are ignored. The end of line can be escaped using a
backslash, and the value of the declaration will continue from the next
non-comment line. If the first non-space character on that line is a
backslash then the line contents up to and including that backslash are
ignored.</p>
<h3 id="syntax.variable">Syntax: variable</h3>
<p>A variable is used to substitute commonly used values in a declaration. It
can refer to an environment variable or can be defined locally using the
syntax:</p>
<pre>
$var = value # Sets "var" variable to "value"
$var{?} = value # Sets "var" variable to "value" only if "var" is not defined
# E.g.:
$projects = foo bar baz
$long_path = src/path/is/very/very/very/long
$UMDIR{?} = /projects/um1
# time passes...
extract.ns = $projects
extract.path-excl[$projects egg ham] = doc man ${long_path}_longer
build.prop{cc.defs} = foo=\$foo # escape substitution
</pre>
<p>The name of a variable must begin with an alphabet or an underscore and
followed by 0 or more alpha-numeric or underscore characters, (i.e. it must
match this regular expression: <var>^[A-Za-z_][A-Za-z0-9_]*$</var>).</p>
<p>Locally defined variables only apply in the context of the configuration
file and are not passed down, for instance, to the compiler. If there is an
environment variable with the same identifier, its value is normally
overridden (within the context of the configuration file) by any local
setting. However, if a <kbd>?</kbd> modifier is given, it assigns the value
to the variable only if the variable is not already defined (either as an
environment variable or locally). Substitution can be escaped using a
backslash character in front of the dollar sign. Any attempt to reference an
undefined variable will trigger an exception.</p>
<p>Note: <var>$HERE</var> is a reserved variable to indicate the parent
directory of the current configuration file. (The system ignores the $HERE
environment variable, if there is one.) Any attempt to assign a value to
<var>$HERE</var> will trigger an exception.</p>
<h3 id="syntax.include">Syntax: include</h3>
<p>An <code>include</code> declaration specifies the logical locations of a
list of configuration files, where contents are to be included inline:</p>
<pre>
include{type:type} = location ...
# E.g.:
include = fcm:foo/path/to/config/file
include = svn://server/path/to/config/file@1234
include{type:svn} = http://server/path/to/config/file
include = /path/to/config/file $HERE/another-config-file
include = $HERE/another-config-file
include = ~/path/to/config/file ~fred/path/to/config/file
</pre>
<p>If the value of an <code>include</code> declaration is a relative path,
the system will search the directory containing the current configuration
file for the include file. More include search paths can be specified using
the <code>include-path</code> declaration. E.g.:</p>
<pre>
# Define or replace include search paths
include-path=/path/to/some/cfg /path/to/more/cfg
# Append to include search paths
include-path{+}=host2:/path/to/cfg
include-path{type:svn,+}=https://host1/path/to/cfg
# ... Include files can now be relative paths
include=foo.cfg bar.cfg
</pre>
<p>Some commands, e.g. <code>fcm make</code>, accept one or more
<code>--config-file-path=PATH</code> command line option, which can be used
to pre-define the include search paths when they read their configuration
files.</p>
<p>Currently, the location can be a path in the file system, a Subversion URL,
a FCM keyword pointing to a Subversion URL, or a location in the file system
of a remote host accessible via passphrase-less SSH. The system will attempt
to make an intelligent guess of the location type. To allow for future
expansion, both the <code>include</code> and the <code>include-path</code>
declarations accept a <var>type:TYPE</var> modifier (where TYPE can currently
be <samp>fs</samp> for a file system path or <samp>svn</samp> for a Subversion
location) to allow the location type to be defined where it is ambiguous.</p>
<h2 id="keyword">FCM Keyword Configuration</h2>
<p>The keyword configuration files are mainly used to define FCM location
keywords and related settings. The <code>fcm</code> command searches for
keyword configuration files from the following locations:</p>
<ol>
<li><dfn>(Deprecated)</dfn> <samp>$HOME/.fcm</samp> - expects FCM 1
configuration file format. See <a href="annex_fcm_cfg.html">Annex:
Declarations in FCM 1 central/user configuration file</a> for detail.</li>
<li><samp>$FCM/etc/fcm/keyword.cfg</samp> where <var>$FCM/bin/</var> is the
path at which <code>fcm</code> is installed.</li>
<li><samp>$HOME/.metomi/fcm/keyword.cfg</samp>.</li>
</ol>
<p>The following are declarations recognised by the keyword configuration
files:</p>
<dl>
<dt id="keyword.location">location</dt>
<dd>
<p><dfn>description</dfn>: Associates a namespace with a location, and
allows the use of <samp>fcm:namespace</samp> as a substitute of the
location.</p>
<p><dfn>modifier</dfn>: <var>primary</var>: Optional. If specified, the
location is a primary location, i.e. the system will create the
<samp>_tr</samp>, <samp>_br</samp>, <samp>_tg</samp>, <samp>-tr</samp>,
<samp>-br</samp> and <samp>-tg</samp> keywords for this location.</p>
<p><dfn>modifier</dfn>: <var>type</var>: Optional. Specifies the type of
the location. The system currently supports <samp>svn</samp> for a
Subversion location and <samp>fs</samp> for a file system location. If
not specified, the system will make an intelligent guess based on the
given value.</p>
<p><dfn>namespace</dfn>: The namespace to be associated with the
location.</p>
<p><dfn>value</dfn>: A valid location of a type supported by the
system.</p>
<p><dfn>example</dfn>:</p>
<pre>
location{primary}[var] = svn://fcm5/VAR_svn/VAR
location{primary, type:svn}[egg] = http://chicken/egg
</pre>
</dd>
<dt id="keyword.revision">revision</dt>
<dd>
<p><dfn>description</dfn>: Associates a keyword with a revision of a
location in a version control system.</p>
<p><dfn>namespace</dfn>: The namespace of a location (already defined
using the <code>location</code> declaration), followed by a colon and the
namespace of the revision.</p>
<p><dfn>value</dfn>: A valid revision of the location.</p>
<p><dfn>example</dfn>:</p>
<pre>
revision[um:vn7.5] = 18479
revision[egg:free-range] = 1
</pre>
</dd>
<dt id="keyword.browser.comp-pat">browser.comp-pat</dt>
<dd>
<p><dfn>description</dfn>: Specifies a regular expression to capture
components in the scheme-specific part of a version control system
location (already defined using the <code>location{primary}</code>
declaration). These components can then be used in the
<code>browser.loc-tmpl</code> template string.</p>
<p><dfn>namespace</dfn>: Optional. The namespace of a location. If not
specified, the declaration applies globally.</p>
<p><dfn>value</dfn>: A valid regular expression.</p>
<p><dfn>example</dfn>:</p>
<pre>
browser.comp-pat = (?msx-i:\A // ([^/]+) /+ ([^/]+)_svn /*(.*) \z) # default
browser.comp-pat[egg] = (?msx-i:\A//([^/]+)/(.*)\z)
</pre>
</dd>
<dt id="keyword.browser.loc-tmpl">browser.loc-tmpl</dt>
<dd>
<p><dfn>description</dfn>: Specifies a template string, in which the
components captured by the <code>browser.comp.pat</code> regular
expression are used to fill in the numbered fields. The template should
have one more field than the number of components captured by
<code>browser.comp-pat</code>. The final field is used to place the
revision, which is generated via the <code>browser.rev-tmpl</code>.</p>
<p><dfn>namespace</dfn>: Optional. The namespace of a location. If not
specified, the declaration applies globally.</p>
<p><dfn>value</dfn>: A valid template.</p>
<p><dfn>example</dfn>:</p>
<pre>
browser.loc-tmpl = http://{1}/projects/{2}/intertrac/source:/{3}{4} # default
browser.loc-tmpl[egg] = http://{1}/intertrac/source:/{3}{4}
</pre>
</dd>
<dt id="keyword.browser.rev-tmpl">browser.rev-tmpl</dt>
<dd>
<p><dfn>description</dfn>: Specifies a template string, which should have
a single numbered field for filling in the revision number.</p>
<p><dfn>namespace</dfn>: Optional. The namespace of a location. If not
specified, the declaration applies globally.</p>
<p><dfn>value</dfn>: A valid template.</p>
<p><dfn>example</dfn>:</p>
<pre>
browser.rev-tmpl = @{1} # default
</pre>
</dd>
</dl>
<h2 id="external">FCM External Configuration</h2>
<p>The external configuration files are used to define the name of external
commands used by the FCM system. The <code>fcm</code> command searches for
external configuration files from the following locations:</p>
<ol>
<li><samp>$FCM/etc/fcm/external.cfg</samp> where <var>$FCM/bin/</var> is
the path at which <code>fcm</code> is installed.</li>
<li><samp>$HOME/.metomi/fcm/external.cfg</samp>.</li>
</ol>
<p>The following are declarations recognised by the external configuration
files:</p>
<dl>
<dt id="external.browser">browser</dt>
<dd>
<p><dfn>description</dfn>: Specifies the command to invoke the web
browser. (default=<samp>firefox</samp>)</p>
<p><dfn>example</dfn>:</p>
<pre>
browser = konqueror
</pre>
</dd>
<dt id="external.diff3">diff3</dt>
<dd>
<p><dfn>description</dfn>: The shell command used by the extract system of
FCM Make to perform a 3-way merge. (default=<samp>diff3</samp>)</p>
<p><dfn>example</dfn>:</p>
<pre>
diff3 = diff3
</pre>
</dd>
<dt id="external.diff3.flags">diff3.flags</dt>
<dd>
<p><dfn>description</dfn>: The options used by the 3-way merge shell
command. (default=<samp>-E -m</samp>)</p>
<p><dfn>example</dfn>:</p>
<pre>
diff3.flags = -E -m
</pre>
</dd>
<dt id="external.graphic-diff">graphic-diff</dt>
<dd>
<p><dfn>description</dfn>: Specifies the command to invoke the graphic
diff tool. (default=<samp>xxdiff</samp>)</p>
<p><dfn>example</dfn>:</p>
<pre>
graphic-diff = tkdiff
</pre>
</dd>
<dt id="external.graphic-merge">graphic-merge</dt>
<dd>
<p><dfn>description</dfn>: Specifies the command to invoke the graphic
merge tool. (default=<samp>xxdiff</samp>)</p>
<p><dfn>example</dfn>:</p>
<pre>
graphic-merge = xxdiff
</pre>
</dd>
<dt id="external.ssh">ssh</dt>
<dd>
<p><dfn>description</dfn>: The secure remote shell command to execute
commands on a remote host. (default=<samp>ssh</samp>)</p>
<p><dfn>example</dfn>:</p>
<pre>
ssh = ssh
</pre>
</dd>
<dt id="external.ssh.flags">ssh.flags</dt>
<dd>
<p><dfn>description</dfn>: The options used by the secure shell command to
execute commands on a remote host. (default=<samp>-n
-oBatchMode=yes</samp>)</p>
<p><dfn>example</dfn>:</p>
<pre>
ssh.flags = -n -oBatchMode=yes
</pre>
</dd>
<dt id="external.rsync">rsync</dt>
<dd>
<p><dfn>description</dfn>: The <code>rsync</code> command.
(default=<samp>rsync</samp>)</p>
<p><dfn>example</dfn>:</p>
<pre>
rsync = rsync
</pre>
</dd>
<dt id="external.rsync.flags">rsync.flags</dt>
<dd>
<p><dfn>description</dfn>: The options used by the <code>rsync</code>
command. (default=<samp>-a --exclude=.* --delete-excluded --timeout=900
--rsh=ssh\ -oBatchMode=yes</samp>)</p>
<p><dfn>example</dfn>:</p>
<pre>
rsync.flags = -a --exclude=.* --delete-excluded --timeout=900 --rsh=ssh\ -oBatchMode=yes
</pre>
</dd>
</dl>
<h2 id="make">FCM Make Configuration</h2>
<p>A typical FCM make configuration consists of some top level declarations
to define the make, and specific declarations for each step. The top level
declarations are described below, and the specific declarations for each type
of step will be described in the sub-sections to follow.</p>
<p>Note:</p>
<ul>
<li>Unless stated otherwise, FCM make configuration declarations are
non-cumulative, i.e. if more than one declarations apply to the
<dfn>same</dfn> configuration, the value of the last declaration overrides
those of the earlier ones. E.g.:
<pre>
# Sets the Fortran compiler flags for the root name-space
build.prop{fc.flags} = -O3
# build.prop{fc.flags}[/] = -O3
# Sets the C/Fortran compiler flags for the "foo/bar" name-space
build.prop{cc.flags, fc.flags}[foo/bar] = -g -C
# build.prop{cc.flags}[foo/bar] = -g -C
# build.prop{fc.flags}[/] = -O3
# build.prop{fc.flags}[foo/bar] = -g -C
# Sets the Fortran compiler flags for the root and "foo/bar" name-spaces
build.prop{fc.flags}[/ foo/bar] = -O2
# build.prop{cc.flags}[foo/bar] = -g -C
# build.prop{fc.flags}[/] = -O2
# build.prop{fc.flags}[foo/bar] = -O2
# Sets the Fortran compiler flags for the "foo/bar" name-spaces
build.prop{fc.flags}[foo/bar] = -O1
# build.prop{cc.flags}[foo/bar] = -g -C
# build.prop{fc.flags}[/] = -O2
# build.prop{fc.flags}[foo/bar] = -O1
</pre>
</li>
<li>Unless stated otherwise, declarations are inherited.</li>
<li>The default values of the property settings of each step class (e.g.
<code>build.prop{fc}</code>) can be modified in:
<ol>
<li>The site configuration file <samp>$FCM/etc/fcm/make.cfg</samp>
where <var>$FCM/bin/</var> is the path at which <code>fcm</code> is
installed.</li>
<li>The user configuration file
<samp>$HOME/.metomi/fcm/make.cfg</samp>.</li>
<li><samp>*.prop{class,*}</samp> declarations in the FCM make
configuration file of the current session.</li>
</ol>
<p>The syntax is identical to a normal FCM make configuration file
declaration except that:</p>
<ul>
<li>Only <samp>*.prop{*}</samp> declarations are accepted.</li>
<li>The settings apply to a step class, not an individual step.</li>
<li>Name-space is not allowed.</li>
</ul>
</li>
</ul>
<p>For further details, please refer to the chapter on <a href=
"make.html">FCM Make</a>.</p>
<dl>
<dt id="make.description">description</dt>
<dd>
<p><dfn>description</dfn>: Specifies a description string for the current
make.</p>
<p><dfn>value</dfn>: A string.</p>
<p><dfn>example</dfn>:</p>
<pre>
description = Release 2.71.82
</pre>
</dd>
<dt id="make.dest">dest</dt>
<dd>
<p><dfn>description</dfn>: Specifies the output destination of the make
system. If not specified, the system assumes the output destination to be
the current working directory. This setting is not inherited.</p>
<p><dfn>value</dfn>: A writable directory path.</p>
<p><dfn>example</dfn>:</p>
<pre>
dest = path
# E.g.:
dest = $HERE
</pre>
</dd>
<dt id="make.name">name</dt>
<dd>
<p><dfn>description</dfn>: Specifies the NAME of the make, so that the
command will search for <q>fcm-make<var>NAME</var>.cfg</q> instead of
<q>fcm-make.cfg</q>, and will write context files in
<q>.fcm-make<var>NAME</var>/</q> and log files as
<q>fcm-make<var>NAME</var>.log</q>, etc.</p>
<p><dfn>value</dfn>: A file name friendly string.</p>
<p><dfn>example</dfn>:</p>
<pre>
name = -friend
</pre>
</dd>
<dt id="make.require-version">require-version</dt>
<dd>
<p><dfn>description</dfn>: Specifies the minimum FCM version and
optionally the maximum FCM version that can be used on the current
configuration. If specified, FCM make fails immediately if its version
does not meet the criteria.</p>
<p><dfn>value</dfn>: The minimum version required, and optionally the
maximum version required.</p>
<p><dfn>example</dfn>:</p>
<pre>
# Requires minimum FCM release at 2016.02.0
require-version = 2016.02.0
# Requires minimum FCM release at 2016.02.0, and maximum at 2038.01.0
require-version = 2016.02.0 2038.01.0
</pre>
</dd>
<dt id="make.steps">steps</dt>
<dd>
<p><dfn>description</dfn>: Specifies a list of steps for the make system
to invoke. Each specified step can either be the ID of a known
sub-system, i.e. <samp>extract</samp>, <samp>mirror</samp>,
<samp>preprocess</samp> and <samp>build</samp>, or an ID defined using
the <code>step.class</code> declaration. (See below.)</p>
<p><dfn>value</dfn>: A list of steps for the make system to invoke.</p>
<p><dfn>example</dfn>:</p>
<pre>
steps = id-1 id-2 ...
# E.g.:
steps = extract mirror
</pre>
</dd>
<dt id="make.step.class">step.class</dt>
<dd>
<p><dfn>description</dfn>: Defines custom step IDs. This allows built-in
steps to be renamed, or re-used in multiple steps.</p>
<p><dfn>namespace</dfn>: Specifies the step IDs.</p>
<p><dfn>value</dfn>: An ID of a known sub-system, i.e.
<samp>extract</samp>, <samp>mirror</samp>, <samp>preprocess</samp> and
<samp>build</samp>.</p>
<p><dfn>example</dfn>:</p>
<pre>
step.class[id ...] = id-of-class
# E.g.:
step.class[build-qxrecon build-ieee] = build
</pre>
</dd>
<dt id="make.use">use</dt>
<dd>
<p><dfn>description</dfn>: Specifies inheritance locations. It is worth
noting that this declaration is cumulative, i.e. a <code>use</code>
declaration adds more inheritance locations rather than overrides the
inheritance locations of any previous <code>use</code> declarations.</p>
<p><dfn>value</dfn>: A list of paths where this make can inherit items
and properties from.</p>
<p><dfn>example</dfn>:</p>
<pre>
use = path1 path2 ...
E.g.:
use = /path/to/inherit
</pre>
</dd>
</dl>
<h3 id="make.extract">FCM Make Configuration: Extract</h3>
<p>All declarations are prefixed with <samp>extract.*</samp>. Where
appropriate, replace the leading <samp>extract</samp> with the appropriate
step ID. With the exception of the <code>extract.location{diff}</code>
declaration, any attempt to specify any extract declarations in an inherited
extract will result in an exception.</p>
<dl>
<dt id="make.extract.ns">extract.ns</dt>
<dd>
<p><dfn>description</dfn>: Specifies a list of names of the projects to
extract.</p>
<p><dfn>value</dfn>: A space-delimited list of names of the projects to
extract.</p>
<p><dfn>example</dfn>:</p>
<pre>
extract.ns = gen ops um var ver
</pre>
</dd>
<dt id="make.extract.location">extract.location</dt>
<dd>
<p><dfn>description</dfn>: Specifies the location of the base source tree
a project. If the base source tree is not specified for a Subversion
project, the system will try to use <samp>trunk@HEAD</samp>.</p>
<p><dfn>modifier</dfn>: <var>type</var>: Specifies the type of the
locations. The system currently supports <samp>svn</samp> for a Subversion
location, <samp>ssh</samp> for a file system on a remote host accessible
via SSH and RSYNC, and <samp>fs</samp> for a file system location.
(default=<samp>svn</samp> if the location is recognised as a Subversion
URL, <samp>ssh</samp> if the location has the form
<var>[USER@]HOST:PATH</var> and <var>HOST</var> is a valid remote host,
<samp>fs</samp> otherwise)</p>
<p><dfn>namespace</dfn>: A space-delimited list of project IDs.</p>
<p><dfn>value</dfn>: A location, which can be a full path in the file
system, or a relative location of the project root.</p>
<p><dfn>example</dfn>:</p>
<pre>
extract.location[um] = trunk@vn7.5
extract.location[gen ops var] = trunk@HEAD
</pre>
</dd>
<dt id="make.extract.location.diff">extract.location{diff}</dt>
<dd>
<p><dfn>description</dfn>: Specifies the location(s) of one or more diff
source trees of a project. It is OK to add more diff source trees in an
inheriting extract.</p>
<p><dfn>modifier</dfn>: <var>type</var>: -as above-</p>
<p><dfn>namespace</dfn>: A project ID.</p>
<p><dfn>value</dfn>: A space-delimited list of locations. A location can
be a full path in the file system, or a relative location of the project
root.</p>
<p><dfn>example</dfn>:</p>
<pre>
extract.location{diff}[gen] = \
branches/dev/fred/r12345_678 \
branches/dev/free/r12345_678@123
</pre>
</dd>
<dt id="make.extract.location.primary">extract.location{primary}</dt>
<dd>
<p><dfn>description</dfn>: Specifies the project locations for an
extract, if they are not already defined in the keyword
configuration.</p>
<p><dfn>modifier</dfn>: <var>type</var>: -as above-</p>
<p><dfn>namespace</dfn>: A project ID.</p>
<p><dfn>value</dfn>: A project location. The location can be a path in
the file system, a Subversion URL or a FCM keyword pointing to a
Subversion URL.</p>
<p><dfn>example</dfn>:</p>
<pre>
extract.location{primary}[egg] = svn://server2/egg
extract.location{primary,type:svn}[foo] = http://server1/foo
</pre>
</dd>
<dt id="make.extract.path-excl">extract.path-excl / <span id=
"make.extract.path-incl">extract.path-incl</span></dt>
<dd>
<p><dfn>description</dfn>: Specifies the paths in a project tree to
exclude/include. (A path-incl takes precedence over a path-excl
declaration.)</p>
<p><dfn>namespace</dfn>: A space-delimited list of project IDs.</p>
<p><dfn>value</dfn>: A space-delimited list of paths in a project
tree.</p>
<p><dfn>example</dfn>:</p>
<pre>
extract.path-excl[foo] = / # everything
extract.path-incl[foo] = bin lib src/code
</pre>
</dd>
<dt id="make.extract.path-root">extract.path-root</dt>
<dd>
<p><dfn>description</dfn>: Specifies the root paths in the source trees
of the projects to be extracted. By default, the root path is the
root of a source tree. If this setting is specified, the system will only
extract source files under the specified root path. The system will also
adjust the name-space of each source file to be relative to the specified
root path. The <code>extract.path-excl</code> and
<code>extract.path-incl</code> declarations will apply from the level of
the specified root path.</p>
<p><dfn>namespace</dfn>: A space-delimited list of project IDs.</p>
<p><dfn>value</dfn>: A relative path in the project source trees.</p>
<p><dfn>example</dfn>:</p>
<pre>
extract.path-root[gen] = src/code
</pre>
</dd>
<dt id="make.extract.prop">extract.prop</dt>
<dd>
<p><dfn>description</dfn>: Sets or modifies a property.</p>
<p><dfn>modifier</dfn>: <var>diff3</var>: The shell command to perform a
3-way merge. If not specified, use the <a href="#external.diff3">diff3</a>
setting of the FCM external configuration.</p>
<p><dfn>modifier</dfn>: <var>diff3.flags</var>: The options used by the
3-way merge shell command. If not specified, use the <a href=
"#external.diff3.flags">diff3.flags</a> setting of the FCM external
configuration.</p>
<p><dfn>value</dfn>: The value of the property.</p>
<p><dfn>example</dfn>:</p>
<pre>
extract.prop{diff3} = diff3
extract.prop{diff3.flags} = -E -m
</pre>
</dd>
</dl>
<h3 id="make.mirror">FCM Make Configuration: Mirror</h3>
<p>All declarations are prefixed with <samp>mirror.*</samp>. Where
appropriate, replace the leading <samp>mirror</samp> with the appropriate
ID.</p>
<dl>
<dt id="make.mirror.target">mirror.target</dt>
<dd>
<p><dfn>description</dfn>: Specifies the mirror target. This setting is
not inherited.</p>
<p><dfn>value</dfn>: The mirror target.</p>
<p><dfn>example</dfn>:</p>
<pre>
mirror.target = fred@server:/path/of/dest
# Or if the current user ID is "fred"
# Or if the user ID for "server" is configured under "~/.ssh/config"
mirror.target = server:/path/of/dest
# Or if mirroring to a path accessible only by user ID "bob"
mirror.target = bob@localhost:/path/of/dest
# Or if the current user ID is "fred" and local host is "server"
mirror.target = /path/of/dest
</pre>
</dd>
<dt id="make.mirror.prop">mirror.prop</dt>
<dd>
<p><dfn>description</dfn>: Sets or modifies a property.</p>
<p><dfn>modifier</dfn>: See below.</p>
<p><dfn>value</dfn>: The value of the property.</p>
<p><dfn>example</dfn>:</p>
<pre>
mirror.prop{rsync} = cnysr
</pre>
</dd>
</dl>
<p>The following is a list of properties accepted by the
<code>mirror.prop</code> declaration:</p>
<dl>
<dt id="make.mirror.prop.config-file.name">config-file.name</dt>
<dd>The context name to be included in the generated configuration file in
the mirror destination.</dd>
<dt id="make.mirror.prop.config-file.steps">config-file.steps</dt>
<dd>The steps to be included in the generated configuration file in the
mirror destination.</dd>
<dt id="make.mirror.prop.no-config-file">no-config-file</dt>
<dd>If specified, do not generate a <samp>fcm-make.cfg</samp> in the mirror
target.</dd>
<dt id="make.mirror.prop.ssh">ssh</dt>
<dd>The secure remote shell command to execute commands on a remote machine.
If not specified, use the <a href= "#external.ssh">ssh</a> setting of the
FCM external configuration.</dd>
<dt id="make.mirror.prop.ssh.flags">ssh.flags</dt>
<dd>The flags used by the remote shell command to execute commands on a
remote machine. If not specified, use the <a href=
"#external.ssh.flags">ssh.flags</a> setting of the FCM external
configuration.</dd>
<dt id="make.mirror.prop.rsync">rsync</dt>
<dd>The <code>rsync</code> command. If not specified, use the <a href=
"#external.rsync">rsync</a> setting of the FCM external configuration.</dd>
<dt id="make.mirror.prop.rsync.flags">rsync.flags</dt>
<dd>The options used by the <code>rsync</code> command. If not specified,
use the <a href= "#external.rsync.flags">rsync.flags</a> setting of the FCM
external configuration.</dd>
</dl>
<h3 id="make.build">FCM Make Configuration: Build</h3>
<p>All declarations are prefixed with <samp>build.*</samp>. Where
appropriate, replace the leading <samp>build</samp> with the appropriate
ID.</p>
<dl>
<dt id="make.build.source">build.source</dt>
<dd>
<p><dfn>description</dfn>: Specifies one or more source files and/or
directories.</p>
<p><dfn>namespace</dfn>: Optional. Specifies the namespace of the
specified paths.</p>
<p><dfn>value</dfn>: A list of space-delimited file system paths.</p>
<p><dfn>example</dfn>:</p>
<pre>
build.source[foo] = $HOME/foo $DATADIR/foo
</pre>
</dd>
<dt id="make.build.ns-excl">build.ns-excl / <span id=
"make.build.ns-incl">build.ns-incl</span></dt>
<dd>
<p><dfn>description</dfn>: Specifies the name-spaces in the source tree
to exclude/include. (A <code>build.ns-incl</code> takes precedence over a
<code>build.ns-excl</code> declaration.)</p>
<p><dfn>value</dfn>: A list of space-delimited items. Each item is a
name-space to exclude/include.</p>
<p><dfn>example</dfn>:</p>
<pre>
build.ns-excl = / # exclude everything
build.ns-incl = foo bar/baz # include items in these name-spaces
</pre>
</dd>
<dt id="make.build.target">build.target</dt>
<dd>
<p><dfn>description</dfn>: Selects targets to build according to their
keys, categories and tasks.</p>
<p><dfn>modifier</dfn>: <samp>key</samp> (default if no modifier
specified), <samp>category</samp> or <samp>task</samp></p>
<p><dfn>namespace</dfn>: Not allowed if modifier is <samp>key</samp>.
Optional if modifier is <samp>category</samp> or <samp>task</samp>. If
specified, setting only applies to given name-spaces. Otherwise, setting
applies to all name-spaces.</p>
<p><dfn>value</dfn>: A list of space-delimited items (according to the
modifier).</p>
<p><dfn>example</dfn>:</p>
<pre>
build.target{category}[etc/namelists etc/configs] = etc
build.target{category}[src/hello src/greet src/world] = bin lib
build.target{task}[src/public] = archive install
build.target = egg.sh mince.py
</pre>
</dd>
<dt id="make.build.target-rename">build.target-rename</dt>
<dd>
<p><dfn>description</dfn>: Rename targets.</p>
<p><dfn>value</dfn>: A list of space-delimited items. Each item should be
the (automatic) key of a target, followed by a colon and its preferred
key.</p>
<p><dfn>example</dfn>:</p>
<pre>
build.target-rename = hello.exe:hello
</pre>
</dd>
<dt id="make.build.prop">build.prop</dt>
<dd>
<p><dfn>description</dfn>: Sets or modifies a property.</p>
<p><dfn>modifier</dfn>: The name of one (or more) property. See
below.</p>
<p><dfn>namespace</dfn>: Optional. A list of space-delimited namespaces to
which this setting applies. The namespaces can be target names, when used
with target properties (dependency properties are regarded as source
properties), or the hierarchical namespaces of source files. If not
specified, the setting applies to the global/root namespace. N.B. Not all
build properties accept a namespace. See below for detail.</p>
<p><dfn>value</dfn>: The value of the property.</p>
<p><dfn>example</dfn>:</p>
<pre>
build.prop{fc} = gfortran
build.prop{cc.flags,fc.flags} = -C -g
build.prop{fc.flags}[foo/bar] = -C -g -W
build.prop{fc.flags}[egg ham bacon] = -C -W
build.prop{fc.flag-define} = -D%s
build.prop{cc.defs,fc.defs}[gen] = LOWERCASE UNDERSCORE
build.prop{fc.libs}[myprog.exe] = netcdf grib