OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [ada/] [vms_data.ads] - Blame information for rev 729

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 706 jeremybenn
------------------------------------------------------------------------------
2
--                                                                          --
3
--                         GNAT COMPILER COMPONENTS                         --
4
--                                                                          --
5
--                             V M S _ D A T A                              --
6
--                                                                          --
7
--                                 S p e c                                  --
8
--                                                                          --
9
--          Copyright (C) 1996-2011, Free Software Foundation, Inc.         --
10
--                                                                          --
11
-- GNAT is free software;  you can  redistribute it  and/or modify it under --
12
-- terms of the  GNU General Public License as published  by the Free Soft- --
13
-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
14
-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
15
-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
16
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
17
-- for  more details.  You should have  received  a copy of the GNU General --
18
-- Public License  distributed with GNAT; see file COPYING3.  If not, go to --
19
-- http://www.gnu.org/licenses for a complete copy of the license.          --
20
--                                                                          --
21
-- GNAT was originally developed  by the GNAT team at  New York University. --
22
-- Extensive contributions were provided by Ada Core Technologies Inc.      --
23
--                                                                          --
24
------------------------------------------------------------------------------
25
 
26
--  This package contains, for each of the command of the GNAT driver, one
27
--  constant array; each component of this array is a string that defines,
28
--  in coded form as explained below, the conversion of a VMS qualifier of the
29
--  command to the corresponding switch of the GNAT tool corresponding to the
30
--  command.
31
 
32
--  This package is used by the GNAT driver to invokes the GNAT tools with the
33
--  switches corresponding to the VMS qualifier and by the Project Manager to
34
--  convert VMS qualifiers in project files to their corresponding switch
35
--  values.
36
 
37
--  This package is also an input to the tool that generates the VMS GNAT
38
--  help information automatically.
39
 
40
--  NOTE: the format of this package must follow the following rules, so that
41
--        the VMS GNAT help tool works properly:
42
 
43
--    - Each command zone (where the eventual qualifiers are declared) must
44
--      begin with a boxed comment of the form:
45
 
46
--      ---------------------------------
47
--      -- Switches for GNAT <COMMAND> --
48
--      ---------------------------------
49
 
50
--      where <COMMAND> is the name of a GNAT command in capital letters, for
51
--      example BIND, COMPILE, XREF, ...
52
 
53
--    - each qualifier declaration must be followed either by
54
--         - a comment starting with "--  NODOC", to indicate that there is
55
--           no documentation for this qualifier, or
56
--         - a contiguous sequence of comments that constitute the
57
--           documentation of the qualifier.
58
 
59
--    - each command zone ends with the declaration of the constant array
60
--      for the command, of the form:
61
 
62
--      <Command>__Switches : aliased constant Switches :=
63
 
64
package VMS_Data is
65
 
66
   ----------------
67
   -- QUALIFIERS --
68
   ----------------
69
 
70
   --  The syntax of a qualifier declaration is as follows:
71
 
72
   --    SWITCH_STRING ::= "/ command-qualifier-name TRANSLATION"
73
 
74
   --    TRANSLATION ::=
75
   --      DIRECT_TRANSLATION
76
   --    | DIRECTORIES_TRANSLATION
77
   --    | FILE_TRANSLATION
78
   --    | NO_SPACE_FILE_TRANSL
79
   --    | NUMERIC_TRANSLATION
80
   --    | STRING_TRANSLATION
81
   --    | OPTIONS_TRANSLATION
82
   --    | COMMANDS_TRANSLATION
83
   --    | ALPHANUMPLUS_TRANSLATION
84
   --    | OTHER_TRANSLATION
85
 
86
   --    DIRECT_TRANSLATION       ::= space UNIX_SWITCHES
87
   --    DIRECTORIES_TRANSLATION  ::= =* UNIX_SWITCH *
88
   --    DIRECTORY_TRANSLATION    ::= =% UNIX_SWITCH %
89
   --    FILE_TRANSLATION         ::= =@ UNIX_SWITCH @
90
   --    NO_SPACE_FILE_TRANSL     ::= =< UNIX_SWITCH >
91
   --    NUMERIC_TRANSLATION      ::= =# UNIX_SWITCH # | # number #
92
   --    STRING_TRANSLATION       ::= =" UNIX_SWITCH "
93
   --    OPTIONS_TRANSLATION      ::= =OPTION {space OPTION}
94
   --    COMMANDS_TRANSLATION     ::= =? ARGS space command-name
95
   --    ALPHANUMPLUS_TRANSLATION ::= =| UNIX_SWITCH |
96
 
97
   --    UNIX_SWITCHES ::= UNIX_SWITCH {, UNIX_SWITCH}
98
 
99
   --    UNIX_SWITCH ::= unix-switch-string | !unix-switch-string | `string'
100
 
101
   --    OPTION ::= option-name space UNIX_SWITCHES
102
 
103
   --    ARGS ::= -cargs | -bargs | -largs
104
 
105
   --  Here command-qual is the name of the switch recognized by the GNATCmd.
106
   --  This is always given in upper case in the templates, although in the
107
   --  actual commands, either upper or lower case is allowed.
108
 
109
   --  The unix-switch-string always starts with a minus, and has no commas
110
   --  or spaces in it. Case is significant in the unix switch string. If a
111
   --  unix switch string is preceded by the not sign (!) it means that the
112
   --  effect of the corresponding command qualifier is to remove any previous
113
   --  occurrence of the given switch in the command line.
114
 
115
   --  The DIRECTORIES_TRANSLATION format is used where a list of directories
116
   --  is given. This possible corresponding formats recognized by GNATCmd are
117
   --  as shown by the following example for the case of PATH
118
 
119
   --    PATH=direc
120
   --    PATH=(direc,direc,direc,direc)
121
 
122
   --  When more than one directory is present for the DIRECTORIES case, then
123
   --  multiple instances of the corresponding unix switch are generated,
124
   --  with the file name being substituted for the occurrence of *.
125
 
126
   --  The FILE_TRANSLATION format is similar except that only a single
127
   --  file is allowed, not a list of files, and only one unix switch is
128
   --  generated as a result.
129
 
130
   --  the NO_SPACE_FILE_TRANSL is similar to FILE_TRANSLATION, except that
131
   --  no space is inserted between the switch and the file name.
132
 
133
   --  The NUMERIC_TRANSLATION format is similar to the FILE_TRANSLATION case
134
   --  except that the parameter is a decimal integer in the range 0 to 999999.
135
 
136
   --  For the OPTIONS_TRANSLATION case, GNATCmd similarly permits one or
137
   --  more options to appear (although only in some cases does the use of
138
   --  multiple options make logical sense). For example, taking the
139
   --  case of ERRORS for GCC, the following are all allowed:
140
 
141
   --    /ERRORS=BRIEF
142
   --    /ERRORS=(FULL,VERBOSE)
143
   --    /ERRORS=(BRIEF IMMEDIATE)
144
 
145
   --  If no option is provided (e.g. just /ERRORS is written), then the
146
   --  first option in the list is the default option. For /ERRORS this
147
   --  is NORMAL, so /ERRORS with no option is equivalent to /ERRORS=NORMAL.
148
 
149
   --  The COMMANDS_TRANSLATION case is only used for gnatmake, to correspond
150
   --  to the use of -cargs, -bargs and -largs (the ARGS string as indicated
151
   --  is one of these three possibilities). The name given by COMMAND is the
152
   --  corresponding command name to be used to interpret the switches to be
153
   --  passed on. Switches of this type set modes, e.g. /COMPILER_QUALIFIERS
154
   --  sets the mode so that all subsequent switches, up to another switch
155
   --  with COMMANDS_TRANSLATION apply to the corresponding commands issued
156
   --  by the make utility. For example
157
 
158
   --    /COMPILER_QUALIFIERS /LIST /BINDER_QUALIFIERS /MAIN
159
   --    /COMPILER_QUALIFIERS /NOLIST /COMPILE_CHECKS=SYNTAX
160
 
161
   --  Clearly these switches must come at the end of the list of switches
162
   --  since all subsequent switches apply to an issued command.
163
 
164
   --  For the DIRECT_TRANSLATION case, an implicit additional qualifier
165
   --  declaration is created by prepending NO to the name of the qualifier,
166
   --  and then inverting the sense of the UNIX_SWITCHES string. For example,
167
   --  given the qualifier definition:
168
 
169
   --     "/LIST -gnatl"
170
 
171
   --  An implicit qualifier definition is created:
172
 
173
   --     "/NOLIST !-gnatl"
174
 
175
   --  In the case where, a ! is already present, inverting the sense of the
176
   --  switch means removing it.
177
 
178
   subtype S is String;
179
   --  A synonym to shorten the table
180
 
181
   type String_Ptr is access constant String;
182
   --  String pointer type used throughout
183
 
184
   type Switches is array (Natural range <>) of String_Ptr;
185
   --  Type used for array of switches
186
 
187
   type Switches_Ptr is access constant Switches;
188
 
189
   ----------------------------
190
   -- Switches for GNAT BIND --
191
   ----------------------------
192
 
193
   S_Bind_Add     : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*"      &
194
                                            "-aP*";
195
   --        /ADD_PROJECT_SEARCH_PATH=(directory[,...])
196
   --
197
   --   Add directories to the project search path.
198
 
199
   S_Bind_ALI     : aliased constant S := "/ALI_LIST "                     &
200
                                            "-A";
201
   --        /NOALI_LIST (D)
202
   --        /ALI_LIST
203
   --
204
   --    Output full names of all the ALI files in the partition. The output is
205
   --    written to SYS$OUTPUT.
206
 
207
   S_Bind_Bind    : aliased constant S := "/BIND_FILE="                    &
208
                                            "ADA "                         &
209
                                               "-A "                       &
210
                                            "C "                           &
211
                                               "-C";
212
   --        /BIND_FILE[=bind-file-option]
213
   --
214
   --   Specifies the language of the binder generated file.
215
   --
216
   --        ADA (D)    Binder file is Ada.
217
   --
218
   --        C          Binder file is 'C'.
219
 
220
   S_Bind_Build   : aliased constant S := "/BUILD_LIBRARY=|"               &
221
                                            "-L|";
222
   --        /BUILD_LIBRARY=xxx
223
   --
224
   --        Binds the units for library building. In this case the adainit and
225
   --        adafinal procedures are rename to xxxinit and xxxfinal. Implies
226
   --        /NOMAIN.
227
 
228
   S_Bind_Current : aliased constant S := "/CURRENT_DIRECTORY "            &
229
                                            "!-I-";
230
   --        /CURRENT_DIRECTORY (D)
231
   --        /NOCURRENT_DIRECTORY
232
   --
233
   --        Look for source, library or object files in the default directory.
234
 
235
   S_Bind_Debug   : aliased constant S := "/DEBUG="                        &
236
                                            "TRACEBACK "                   &
237
                                               "-g2 "                      &
238
                                            "ALL "                         &
239
                                               "-g3 "                      &
240
                                            "NONE "                        &
241
                                               "-g0 "                      &
242
                                            "SYMBOLS "                     &
243
                                               "-g1 "                      &
244
                                            "NOSYMBOLS "                   &
245
                                               "!-g1 "                     &
246
                                            "LINK "                        &
247
                                               "-g3 "                      &
248
                                            "NOTRACEBACK "                 &
249
                                               "!-g2";
250
   --        /DEBUG[=debug-level]
251
   --        /NODEBUG
252
   --
253
   --    Specify level of debugging information generated for the elaboration
254
   --    routine.  See corresponding qualifier for GNAT COMPILE.
255
 
256
   S_Bind_DebugX  : aliased constant S := "/NODEBUG "                      &
257
                                            "!-g";
258
   --  NODOC  (see /DEBUG)
259
 
260
   S_Bind_Elab    : aliased constant S := "/ELABORATION_DEPENDENCIES "     &
261
                                            "-e";
262
   --        /ELABORATION_DEPENDENCIES
263
   --        /NOELABORATION_DEPENDENCIES (D)
264
   --
265
   --   Output complete list of elaboration-order dependencies, showing the
266
   --   reason for each dependency. This output can be rather extensive but may
267
   --   be useful in diagnosing problems with elaboration order. The output is
268
   --   written to SYS$OUTPUT.
269
 
270
   S_Bind_Error   : aliased constant S := "/ERROR_LIMIT=#"                 &
271
                                            "-m#";
272
   --        /ERROR_LIMIT=nnn
273
   --
274
   --   Limit number of detected errors to nnn (1-999999).
275
 
276
   S_Bind_Ext     : aliased constant S := "/EXTERNAL_REFERENCE=" & '"'     &
277
                                            "-X" & '"';
278
   --       /EXTERNAL_REFERENCE="name=val"
279
   --
280
   --   Specifies an external reference to the project manager. Useful only if
281
   --   /PROJECT_FILE is used.
282
   --
283
   --   Example:
284
   --      /EXTERNAL_REFERENCE="DEBUG=TRUE"
285
 
286
   S_Bind_Follow  : aliased constant S := "/FOLLOW_LINKS_FOR_FILES "       &
287
                                            "-eL";
288
   --        /NOFOLLOW_LINKS_FOR_FILES (D)
289
   --        /FOLLOW_LINKS_FOR_FILES
290
   --
291
   --    Follow links when parsing project files
292
 
293
   S_Bind_Force   : aliased constant S := "/FORCE_ELAB_FLAGS "             &
294
                                            "-F";
295
   --        /NOFORCE_ELAB_FLAGS (D)
296
   --        /FORCE_ELAB_FLAGS
297
   --
298
   --    Force checking of elaboration Flags
299
 
300
   S_Bind_Help    : aliased constant S := "/HELP "                         &
301
                                            "-h";
302
   --        /HELP
303
   --
304
   --   Output usage information.
305
 
306
   S_Bind_Init    : aliased constant S := "/INITIALIZE_SCALARS="           &
307
                                            "INVALID "                     &
308
                                               "-Sin "                     &
309
                                            "LOW "                         &
310
                                               "-Slo "                     &
311
                                            "HIGH "                        &
312
                                               "-Shi";
313
   --        /INITIALIZE_SCALARS[=scalar-option]
314
   --
315
   --   Indicate how uninitialized scalar values for which a pragma
316
   --   Initialize_Scalars applies should be initialized.
317
   --   scalar-option may be one of the following:
318
   --
319
   --      INVALID (D)  Initialize with an invalid value.
320
   --      LOW          Initialize with the lowest valid value of the subtype.
321
   --      HIGH         Initialize with the highest valid value of the subtype.
322
 
323
   S_Bind_Leap    : aliased constant S := "/ENABLE_LEAP_SECONDS "          &
324
                                            "-y";
325
   --      /ENABLE_LEAP_SECONDS
326
   --      /NOENABLE_LEAP_SECONDS (D)
327
   --
328
   --   Enable leap seconds support in Ada.Calendar and its children.
329
 
330
   S_Bind_Library : aliased constant S := "/LIBRARY_SEARCH=*"              &
331
                                            "-aO*";
332
   --        /LIBRARY_SEARCH=(direc[,...])
333
   --
334
   --        When looking for library and object files look also in directories
335
   --        specified.
336
 
337
   S_Bind_Linker  : aliased constant S := "/LINKER_OPTION_LIST "           &
338
                                            "-K";
339
   --        /NOLINKER_OPTION_LIST (D)
340
   --        /LINKER_OPTION_LIST
341
   --
342
   --        Output linker options to SYS$OUTPUT.  Includes library search
343
   --        paths, contents of pragmas Ident and Linker_Options, and
344
   --        libraries added by GNAT BIND.
345
 
346
   S_Bind_Main    : aliased constant S := "/MAIN "                         &
347
                                            "!-n";
348
   --        /MAIN (D)
349
   --
350
   --   The main program is in Ada.
351
   --
352
   --        /NOMAIN
353
   --
354
   --   The main program is not in Ada.
355
 
356
   S_Bind_Alloc32 : aliased constant S := "/32_MALLOC "                    &
357
                                            "-H32";
358
   --        /32_MALLOC
359
   --
360
   --        Use 32-bit allocations for `__gnat_malloc' (and thus for
361
   --        access types).
362
 
363
   S_Bind_Alloc64 : aliased constant S := "/64_MALLOC "                    &
364
                                            "-H64";
365
   --        /64_MALLOC
366
   --
367
   --        Use 64-bit allocations for `__gnat_malloc' (and thus for
368
   --        access types).
369
 
370
   S_Bind_Mess    : aliased constant S := "/MESSAGES_PROJECT_FILE="        &
371
                                            "DEFAULT "                     &
372
                                               "-vP0 "                     &
373
                                            "MEDIUM "                      &
374
                                               "-vP1 "                     &
375
                                            "HIGH "                        &
376
                                               "-vP2";
377
   --        /MESSAGES_PROJECT_FILE[=messages-option]
378
   --
379
   --   Specifies the "verbosity" of the parsing of project files.
380
   --   messages-option may be one of the following:
381
   --
382
   --      DEFAULT (D)  No messages are output if there is no error or warning.
383
   --
384
   --      MEDIUM       A small number of messages are output.
385
   --
386
   --      HIGH         A great number of messages are output, most of them not
387
   --                   being useful for the user.
388
 
389
   S_Bind_Nostinc : aliased constant S := "/NOSTD_INCLUDES "               &
390
                                            "-nostdinc";
391
   --        /NOSTD_INCLUDES
392
   --
393
   --    Do not look for sources the in the system default directory.
394
 
395
   S_Bind_Nostlib : aliased constant S := "/NOSTD_LIBRARIES "              &
396
                                            "-nostdlib";
397
   --        /NOSTD_LIBRARIES
398
   --
399
   --    Do not look for library files in the system default directory.
400
 
401
   S_Bind_No_Time : aliased constant S := "/NO_TIME_STAMP_CHECK "          &
402
                                            "-t";
403
   --  NODOC (see /TIME_STAMP_CHECK)
404
 
405
   S_Bind_Object  : aliased constant S := "/OBJECT_LIST "                  &
406
                                            "-O";
407
   --        /NOOBJECT_LIST (D)
408
   --        /OBJECT_LIST
409
   --
410
   --    Output full names of all the object files that must be linked to
411
   --    provide the Ada component of the program. The output is written to
412
   --    SYS$OUTPUT.
413
 
414
   S_Bind_Order   : aliased constant S := "/ORDER_OF_ELABORATION "         &
415
                                            "-l";
416
   --        /NOORDER_OF_ELABORATION (D)
417
   --        /ORDER_OF_ELABORATION
418
   --
419
   --   Output chosen elaboration order. The output is written to SYS$OUTPUT.
420
 
421
   S_Bind_Output  : aliased constant S := "/OUTPUT=@"                      &
422
                                            "-o@";
423
   --        /OUTPUT=filename
424
   --
425
   --   File name to use for the program containing the elaboration code.
426
 
427
   S_Bind_OutputX : aliased constant S := "/NOOUTPUT "                     &
428
                                            "-c";
429
   --        /NOOUTPUT
430
   --
431
   --   Check only. Do not generate the binder output file.
432
   --
433
   --   In this mode the binder performs all error checks but does not generate
434
   --   an output file.
435
 
436
   S_Bind_Pess    : aliased constant S := "/PESSIMISTIC_ELABORATION "      &
437
                                            "-p";
438
   --        /PESSIMISTIC_ELABORATION
439
   --
440
   --   Causes the binder to choose a "pessimistic" elaboration order, i.e. one
441
   --   which is most likely to cause elaboration order problems. This can be
442
   --   useful in testing portable code to make sure that there are no missing
443
   --   elaborate pragmas.
444
 
445
   S_Bind_Project : aliased constant S := "/PROJECT_FILE=<"                &
446
                                            "-P>";
447
   --        /PROJECT_FILE=filename
448
   --
449
   --   Specifies the main project file to be used. The project files rooted
450
   --   at the main project file will be parsed before the invocation of the
451
   --   binder. The source and object directories to be searched will be
452
   --   communicated to the binder through logical names ADA_PRJ_INCLUDE_FILE
453
   --   and ADA_PRJ_OBJECTS_FILE.
454
 
455
   S_Bind_Read    : aliased constant S := "/READ_SOURCES="                 &
456
                                            "ALL "                         &
457
                                               "-s "                       &
458
                                            "NONE "                        &
459
                                               "-x "                       &
460
                                            "AVAILABLE "                   &
461
                                               "!-x,!-s";
462
   --        /READ_SOURCES[=(keyword[,...])]
463
   --        /NOREAD_SOURCES
464
   --
465
   --   The following keyword are accepted:
466
   --
467
   --      ALL (D)      Require source files to be present. In this mode, the
468
   --                   binder insists on being able to locate all source files
469
   --                   that are referenced and checks their consistency.  In
470
   --                   normal mode, if a source file cannot be located it is
471
   --                   simply ignored. If you specify the ALL keyword, a
472
   --                   missing source file is an error.
473
   --
474
   --      NONE         Exclude source files. In this mode, the binder only
475
   --                   checks that ALI files are consistent with one another.
476
   --                   source files are not accessed.  The binder runs faster
477
   --                   in this mode, and there is still a guarantee that the
478
   --                   resulting program is self-consistent.
479
   --
480
   --                   If a source file has been edited since it was last
481
   --                   compiled and you specify the NONE keyword, the binder
482
   --                   will not detect that the object file is out of date
483
   --                   with the source file.
484
   --
485
   --                   This is the same as specifying /NOREAD_SOURCES.
486
   --
487
   --      AVAILABLE    Check that object files are consistent with one
488
   --                   another and are consistent with any source files that
489
   --                   can be located.
490
 
491
   S_Bind_ReadX   : aliased constant S := "/NOREAD_SOURCES "               &
492
                                            "-x";
493
   --  NODOC (see /READ_SOURCES)
494
 
495
   S_Bind_Rename  : aliased constant S := "/RENAME_MAIN=<"                 &
496
                                            "-M>";
497
   --        /RENAME_MAIN=xxx
498
   --
499
   --   Renames the generated main program from main to xxx.
500
   --   This is useful in the case of some cross-building environments, where
501
   --   the actual main program is separate from the one generated
502
   --   by GNAT BIND.
503
 
504
   S_Bind_Report  : aliased constant S := "/REPORT_ERRORS="                &
505
                                            "VERBOSE "                     &
506
                                               "-v "                       &
507
                                            "BRIEF "                       &
508
                                               "-b "                       &
509
                                            "DEFAULT "                     &
510
                                               "!-b,!-v";
511
   --        /REPORT_ERRORS[=(keyword[,...])]
512
   --           VERBOSE (D)
513
   --           BRIEF
514
   --           DEFAULT
515
   --        /NOREPORT_ERRORS
516
   --
517
   --   With the DEFAULT keyword (which is not the default when the binder is
518
   --   run from GNAT BIND) or the /NOREPORT_ERRORS qualifier, brief error
519
   --   messages are generated to SYS$ERROR.  If the VERBOSE keyword is
520
   --   present, a header is written to SYS$OUTPUT and any error messages are
521
   --   directed to SYS$OUTPUT  All that is written to SYS$ERROR is a brief
522
   --   summary message.
523
   --
524
   --   If the BRIEF keyword is specified, the binder will generate brief error
525
   --   messages to SYS$ERROR even if verbose mode is specified. This is
526
   --   relevant only when used together with the VERBOSE keyword or /VERBOSE
527
   --   qualifier.
528
 
529
   S_Bind_ReportX : aliased constant S := "/NOREPORT_ERRORS "              &
530
                                            "!-b,!-v";
531
   --  NODOC (see /REPORT_ERRORS)
532
 
533
   S_Bind_Restr   : aliased constant S := "/RESTRICTION_LIST "             &
534
                                            "-r";
535
   --        /NORESTRICTION_LIST (D)
536
   --        /RESTRICTION_LIST
537
   --
538
   --   Generate list of pragma Restrictions that could be applied to the
539
   --   current unit. This is useful for code audit purposes, and also may be
540
   --   used to improve code generation in some cases.
541
 
542
   S_Bind_Return  : aliased constant S := "/RETURN_CODES="                 &
543
                                            "POSIX "                       &
544
                                               "!-X1 "                     &
545
                                            "VMS "                         &
546
                                               "-X1";
547
   --        /RETURN_CODES=POSIX (D)
548
   --        /RETURN_CODES=VMS
549
   --
550
   --   Specifies the style of default exit code returned. Must be used in
551
   --   conjunction with and match the Link qualifier with same name.
552
   --
553
   --        POSIX (D)   Return Posix success (0) by default.
554
   --
555
   --        VMS         Return VMS success (1) by default.
556
 
557
   S_Bind_RTS     : aliased constant S := "/RUNTIME_SYSTEM=|"              &
558
                                            "--RTS=|";
559
   --      /RUNTIME_SYSTEM=xxx
560
   --
561
   --    Binds against an alternate runtime system named xxx or RTS-xxx.
562
 
563
   S_Bind_Search  : aliased constant S := "/SEARCH=*"                      &
564
                                            "-I*";
565
   --        /SEARCH=(directory[,...])
566
   --
567
   --   When looking for source or object files also look in directories
568
   --   specified.
569
   --
570
   --   This is the same as specifying both /LIBRARY_SEARCH and /SOURCE_SEARCH
571
   --   for a directory.
572
 
573
   S_Bind_Shared  : aliased constant S := "/SHARED "                       &
574
                                            "-shared,!-static";
575
   --        /SHARED
576
   --        /NOSHARED
577
   --
578
   --    Link against a shared GNAT run time when available.
579
 
580
   S_Bind_Slice   : aliased constant S := "/TIME_SLICE=#"                  &
581
                                            "-T#";
582
   --        /TIME_SLICE=nnn
583
   --
584
   --   Set the time slice value to nnn milliseconds. A value of zero means no
585
   --   time slicing and also indicates to the tasking run time to match as
586
   --   close as possible to the annex D requirements of the RM.
587
 
588
   S_Bind_Source  : aliased constant S := "/SOURCE_SEARCH=*"               &
589
                                            "-aI*";
590
   --        /SOURCE_SEARCH=(directory[,...])
591
   --
592
   --    When looking for source files also look in directories specified.
593
 
594
   S_Bind_Static  : aliased constant S := "/STATIC "                       &
595
                                            "-static,!-shared";
596
   --        /STATIC
597
   --        /NOSTATIC
598
   --
599
   --    Link against a static GNAT run time.
600
 
601
   S_Bind_Store   : aliased constant S := "/STORE_TRACEBACKS "             &
602
                                            "-E";
603
   --        /STORE_TRACEBACKS (D)
604
   --        /NOSTORE_TRACEBACKS
605
   --
606
   --   Store tracebacks in exception occurrences.
607
   --   This is the default on VMS, with the zero-cost exception mechanism.
608
   --   This qualifier has no impact, except when using the setjmp/longjmp
609
   --   exception mechanism, with the GNAT COMPILE qualifier /LONGJMP_SETJMP.
610
 
611
   S_Bind_Subdirs : aliased constant S := "/SUBDIRS=<"                     &
612
                                            "--subdirs=>";
613
   --        /SUBDIRS=dir
614
   --
615
   --   The actual directories (object, exec, library, ...) are subdirectories
616
   --   of the directory specified in the project file. If the subdirectory
617
   --   does not exist, it is created automatically.
618
 
619
   S_Bind_Time    : aliased constant S := "/TIME_STAMP_CHECK "             &
620
                                            "!-t";
621
   --      /TIME_STAMP_CHECK (D)
622
   --
623
   --   Time stamp errors will be treated as errors.
624
   --
625
   --      /NOTIME_STAMP_CHECK
626
   --
627
   --   Ignore time stamp errors. Any time stamp error messages are treated as
628
   --   warning messages. This switch essentially disconnects the normal
629
   --   consistency checking, and the resulting program may have undefined
630
   --   semantics if inconsistent units are present.
631
   --
632
   --   This means that /NOTIME_STAMP_CHECK should be used only in unusual
633
   --   situations, with extreme care.
634
 
635
   S_Bind_Verbose : aliased constant S := "/VERBOSE "                      &
636
                                            "-v";
637
   --        /VERBOSE (D)
638
   --        /NOVERBOSE
639
   --
640
   --   Equivalent to /REPORT_ERRORS=VERBOSE.
641
 
642
   S_Bind_Warn    : aliased constant S := "/WARNINGS="                     &
643
                                            "NORMAL "                      &
644
                                               "!-ws,!-we "                &
645
                                            "SUPPRESS "                    &
646
                                               "-ws "                      &
647
                                            "ERROR "                       &
648
                                               "-we";
649
   --      /WARNINGS[=(keyword[,...])]
650
   --      /NOWARNINGS
651
   --
652
   --   The following keywords are supported:
653
   --
654
   --        NORMAL (D)    Print warning messages and treat them as warning.
655
   --        SUPPRESS      Suppress all warning messages (same as /NOWARNINGS).
656
   --        ERROR         Treat any warning messages as fatal errors
657
 
658
   S_Bind_WarnX   : aliased constant S := "/NOWARNINGS "                   &
659
                                            "-ws";
660
   --  NODOC (see /WARNINGS)
661
 
662
   S_Bind_Wide    : aliased constant S := "/WIDE_CHARACTER_ENCODING="      &
663
                                            "BRACKETS "                    &
664
                                               "-gnatWb "                  &
665
                                            "HEX "                         &
666
                                               "-gnatWh "                  &
667
                                            "UPPER "                       &
668
                                               "-gnatWu "                  &
669
                                            "SHIFT_JIS "                   &
670
                                               "-gnatWs "                  &
671
                                            "UTF8 "                        &
672
                                               "-gnatW8 "                  &
673
                                            "EUC "                         &
674
                                               "-gnatWe";
675
   --        /NOWIDE_CHARACTER_ENCODING (D)
676
   --        /WIDE_CHARACTER_ENCODING[=encode-type]
677
   --
678
   --   Specifies the mechanism used to encode wide characters, overriding
679
   --   the default as set by the /WIDE_CHARACTER_ENCODING option for the
680
   --   compilation of the main program.
681
 
682
   S_Bind_Zero    : aliased constant S := "/ZERO_MAIN "                    &
683
                                            "-z";
684
   --        /NOZERO_MAIN (D)
685
   --        /ZERO_MAIN
686
   --
687
   --   Normally the binder checks that the unit name given on the command line
688
   --   corresponds to a suitable main subprogram. When /ZERO_MAIN is used,
689
   --   a list of ALI files can be given, and the execution of the program
690
   --   consists of elaboration of these units in an appropriate order.
691
 
692
   Bind_Switches : aliased constant Switches :=
693
                     (S_Bind_Add     'Access,
694
                      S_Bind_ALI     'Access,
695
                      S_Bind_Bind    'Access,
696
                      S_Bind_Build   'Access,
697
                      S_Bind_Current 'Access,
698
                      S_Bind_Debug   'Access,
699
                      S_Bind_DebugX  'Access,
700
                      S_Bind_Elab    'Access,
701
                      S_Bind_Error   'Access,
702
                      S_Bind_Ext     'Access,
703
                      S_Bind_Follow  'Access,
704
                      S_Bind_Force   'Access,
705
                      S_Bind_Help    'Access,
706
                      S_Bind_Init    'Access,
707
                      S_Bind_Leap    'Access,
708
                      S_Bind_Library 'Access,
709
                      S_Bind_Linker  'Access,
710
                      S_Bind_Main    'Access,
711
                      S_Bind_Alloc32 'Access,
712
                      S_Bind_Alloc64 'Access,
713
                      S_Bind_Mess    'Access,
714
                      S_Bind_Nostinc 'Access,
715
                      S_Bind_Nostlib 'Access,
716
                      S_Bind_No_Time 'Access,
717
                      S_Bind_Object  'Access,
718
                      S_Bind_Order   'Access,
719
                      S_Bind_Output  'Access,
720
                      S_Bind_OutputX 'Access,
721
                      S_Bind_Pess    'Access,
722
                      S_Bind_Project 'Access,
723
                      S_Bind_Read    'Access,
724
                      S_Bind_ReadX   'Access,
725
                      S_Bind_Rename  'Access,
726
                      S_Bind_Report  'Access,
727
                      S_Bind_ReportX 'Access,
728
                      S_Bind_Restr   'Access,
729
                      S_Bind_Return  'Access,
730
                      S_Bind_RTS     'Access,
731
                      S_Bind_Search  'Access,
732
                      S_Bind_Shared  'Access,
733
                      S_Bind_Slice   'Access,
734
                      S_Bind_Source  'Access,
735
                      S_Bind_Static  'Access,
736
                      S_Bind_Store   'Access,
737
                      S_Bind_Subdirs 'Access,
738
                      S_Bind_Time    'Access,
739
                      S_Bind_Verbose 'Access,
740
                      S_Bind_Warn    'Access,
741
                      S_Bind_WarnX   'Access,
742
                      S_Bind_Wide    'Access,
743
                      S_Bind_Zero    'Access);
744
 
745
   -----------------------------
746
   -- Switches for GNAT CHECK --
747
   -----------------------------
748
 
749
   S_Check_Add    : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*"      &
750
                                            "-aP*";
751
   --        /ADD_PROJECT_SEARCH_PATH=(directory[,...])
752
   --
753
   --   Add directories to the project search path.
754
 
755
   S_Check_All    : aliased constant S := "/ALL "                          &
756
                                            "-a";
757
   --        /NOALL (D)
758
   --        /ALL
759
   --
760
   --   Also check the components of the GNAT run time and process the needed
761
   --  components of the GNAT RTL when building and analyzing the global
762
   --  structure for checking the global rules.
763
 
764
   S_Check_Ext     : aliased constant S := "/EXTERNAL_REFERENCE=" & '"'    &
765
                                             "-X" & '"';
766
   --       /EXTERNAL_REFERENCE="name=val"
767
   --
768
   --   Specifies an external reference to the project manager. Useful only if
769
   --   /PROJECT_FILE is used.
770
   --
771
   --   Example:
772
   --      /EXTERNAL_REFERENCE="DEBUG=TRUE"
773
 
774
   S_Check_Files  : aliased constant S := "/FILES=@"                       &
775
                                             "-files=@";
776
   --      /FILES=filename
777
   --
778
   --   Take as arguments the files that are listed in the specified
779
   --   text file.
780
 
781
   S_Check_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES "       &
782
                                            "-eL";
783
   --        /NOFOLLOW_LINKS_FOR_FILES (D)
784
   --        /FOLLOW_LINKS_FOR_FILES
785
   --
786
   --    Follow links when parsing project files
787
 
788
   S_Check_Help   : aliased constant S := "/HELP "                         &
789
                                            "-h";
790
   --        /NOHELP (D)
791
   --        /HELP
792
   --
793
   --   Print information about currently implemented checks.
794
 
795
   S_Check_Locs   : aliased constant S := "/LOCS "                         &
796
                                            "-l";
797
   --        /NOLOCS (D)
798
   --        /LOCS
799
   --
800
   --   Use full source locations references in the report file.
801
 
802
   S_Diagnosis   : aliased constant S := "/DIAGNOSTIC_LIMIT=#"             &
803
                                            "-m#";
804
   --        /DIAGNOSTIC_LIMIT=500 (D)
805
   --        /DIAGNOSTIC_LIMIT=nnn
806
   --
807
   --   NNN is a decimal integer in the range of 1 to 1000 and limits the
808
   --   number of diagnostic messages to be generated into Stdout to that
809
   --   number.  Once that number has been reached, gnatcheck stops
810
   --   to print out diagnoses into Stderr. If NNN is equal to 0, this means
811
   --   that there is no limit on the number of diagnoses in Stdout.
812
 
813
   S_Check_Mess    : aliased constant S := "/MESSAGES_PROJECT_FILE="       &
814
                                             "DEFAULT "                    &
815
                                                "-vP0 "                    &
816
                                             "MEDIUM "                     &
817
                                                "-vP1 "                    &
818
                                             "HIGH "                       &
819
                                                "-vP2";
820
   --        /MESSAGES_PROJECT_FILE[=messages-option]
821
   --
822
   --   Specifies the "verbosity" of the parsing of project files.
823
   --   messages-option may be one of the following:
824
   --
825
   --      DEFAULT (D)  No messages are output if there is no error or warning.
826
   --
827
   --      MEDIUM       A small number of messages are output.
828
   --
829
   --      HIGH         A great number of messages are output, most of them not
830
   --                   being useful for the user.
831
 
832
   S_Check_Project : aliased constant S := "/PROJECT_FILE=<"               &
833
                                             "-P>";
834
   --        /PROJECT_FILE=filename
835
   --
836
   --   Specifies the main project file to be used. The project files rooted
837
   --   at the main project file will be parsed before the invocation of the
838
   --   gnatcheck. The source directories to be searched will be communicated
839
   --   to gnatcheck through logical name ADA_PRJ_INCLUDE_FILE.
840
 
841
   S_Check_Quiet  : aliased constant S := "/QUIET "                        &
842
                                            "-q";
843
   --        /NOQUIET (D)
844
   --        /QUIET
845
   --
846
   --   Work quietly, only output warnings and errors.
847
 
848
   S_Check_Time     : aliased constant S := "/TIME "                       &
849
                                               "-t";
850
   --        /NOTIME (D)
851
   --        /TIME
852
   --
853
   --   Print out execution time
854
 
855
   S_Check_Log      : aliased constant S := "/LOG "                        &
856
                                               "-log";
857
   --        /NOLOG (D)
858
   --        /LOG
859
   --
860
   --   Duplicate all the output sent to Stderr into a log file.
861
 
862
   S_Check_Short  : aliased constant S := "/SHORT "                        &
863
                                            "-s";
864
   --        /NOSHORT (D)
865
   --        /SHORT
866
   --
867
   --   Generate a short form of the report file.
868
 
869
   S_Check_Include : aliased constant S := "/INCLUDE_FILE=@"               &
870
                                            "--include-file=@";
871
 
872
   --        /INCLUDE_FILE=filename
873
   --
874
   --   Add the content of the specified text file to the generated report
875
   --   file.
876
 
877
   S_Check_Subdirs : aliased constant S := "/SUBDIRS=<"                    &
878
                                             "--subdirs=>";
879
   --        /SUBDIRS=dir
880
   --
881
   --   The actual directories (object, exec, library, ...) are subdirectories
882
   --   of the directory specified in the project file. If the subdirectory
883
   --   does not exist, it is created automatically.
884
 
885
   S_Check_Template  : aliased constant S := "/TEMPLATE=@"                 &
886
                                             "--write-rules=@";
887
   --      /TEMPLATE=filename
888
   --
889
   --   Generate the rule template into the specified file.
890
 
891
   S_Check_Verb   : aliased constant S := "/VERBOSE "                      &
892
                                            "-v";
893
   --        /NOVERBOSE (D)
894
   --        /VERBOSE
895
   --
896
   --   The version number and copyright notice are output, as well as exact
897
   --   copies of the gnat1 commands spawned to obtain the chop control
898
   --   information.
899
 
900
   S_Check_Out  : aliased constant S := "/OUTPUT=@"                &
901
                                             "-o@";
902
   --        /OUTPUT=filename
903
   --
904
   --   Specify the name of the output file.
905
 
906
   Check_Switches : aliased constant Switches :=
907
                      (S_Check_Add     'Access,
908
                       S_Check_All     'Access,
909
                       S_Diagnosis     'Access,
910
                       S_Check_Ext     'Access,
911
                       S_Check_Files   'Access,
912
                       S_Check_Follow  'Access,
913
                       S_Check_Help    'Access,
914
                       S_Check_Locs    'Access,
915
                       S_Check_Mess    'Access,
916
                       S_Check_Project 'Access,
917
                       S_Check_Quiet   'Access,
918
                       S_Check_Time    'Access,
919
                       S_Check_Log     'Access,
920
                       S_Check_Short   'Access,
921
                       S_Check_Include 'Access,
922
                       S_Check_Subdirs 'Access,
923
                       S_Check_Template'Access,
924
                       S_Check_Verb    'Access,
925
                       S_Check_Out     'Access);
926
 
927
   ----------------------------
928
   -- Switches for GNAT CHOP --
929
   ----------------------------
930
 
931
   S_Chop_Comp   : aliased constant S := "/COMPILATION "                   &
932
                                            "-c";
933
   --        /NOCOMPILATION (D)
934
   --        /COMPILATION
935
   --
936
   --   Compilation mode, handle configuration pragmas strictly according to
937
   --   RM rules.
938
 
939
   S_Chop_File   : aliased constant S := "/FILE_NAME_MAX_LENGTH=#"         &
940
                                            "-k#";
941
   --        /FILE_NAME_MAX_LENGTH[=nnn]
942
   --
943
   --   Limit generated file names to NNN (default of 8) characters. This is
944
   --   useful if the resulting set of files is required to be interoperable
945
   --   with systems like MS-DOS which limit the length of file names.
946
 
947
   S_Chop_Help   : aliased constant S := "/HELP "                          &
948
                                            "-h";
949
   --        /NOHELP (D)
950
   --        /HELP
951
   --
952
   --   Print usage information.
953
 
954
   S_Chop_Over   : aliased constant S := "/OVERWRITE "                     &
955
                                            "-w";
956
   --        /NOOVERWRITE (D)
957
   --        /OVERWRITE
958
   --
959
   --   Overwrite existing file names. Normally GNAT CHOP regards it as a
960
   --   fatal error situation if there is already a file with the same name as
961
   --   a file it would otherwise output. The /OVERWRITE qualifier bypasses
962
   --   this check, and any such existing files will be silently overwritten.
963
 
964
   S_Chop_Pres   : aliased constant S := "/PRESERVE "                      &
965
                                            "-p";
966
   --        /NOPRESERVE (D)
967
   --        /PRESERVE
968
   --
969
   --   Causes the file modification time stamp of the input file to be
970
   --   preserved and used for the time stamp of the output file(s). This may
971
   --   be useful for preserving coherency of time stamps in an environment
972
   --   where gnatchop is used as part of a standard build process.
973
 
974
   S_Chop_Quiet  : aliased constant S := "/QUIET "                         &
975
                                            "-q";
976
   --        /NOQUIET (D)
977
   --        /QUIET
978
   --
979
   --   Work quietly, only output warnings and errors.
980
 
981
   S_Chop_Ref    : aliased constant S := "/REFERENCE "                     &
982
                                            "-r";
983
   --        /NOREFERENCE (D)
984
   --        /REFERENCE
985
   --
986
   --   Generate "Source_Reference" pragmas. Use this qualifier if the output
987
   --   files are regarded as temporary and development is to be done in terms
988
   --   of the original unchopped file. The /REFERENCE qualifier causes
989
   --   "Source_Reference" pragmas to be inserted into each of the generated
990
   --   files to refers back to the original file name and line number.  The
991
   --   result is that all error messages refer back to the original unchopped
992
   --   file.
993
   --
994
   --   In addition, the debugging information placed into the object file
995
   --   (when the /DEBUG qualifier of GNAT COMPILE or GNAT MAKE is specified)
996
   --   also refers back to this original file so that tools like profilers
997
   --   and debuggers will give information in terms of the original unchopped
998
   --   file.
999
 
1000
   S_Chop_Verb   : aliased constant S := "/VERBOSE "                       &
1001
                                            "-v";
1002
   --        /NOVERBOSE (D)
1003
   --        /VERBOSE
1004
   --
1005
   --   The version number and copyright notice are output, as well as exact
1006
   --   copies of the gnat1 commands spawned to obtain the chop control
1007
   --   information.
1008
 
1009
   Chop_Switches : aliased constant Switches :=
1010
                     (S_Chop_Comp   'Access,
1011
                      S_Chop_File   'Access,
1012
                      S_Chop_Help   'Access,
1013
                      S_Chop_Over   'Access,
1014
                      S_Chop_Pres   'Access,
1015
                      S_Chop_Quiet  'Access,
1016
                      S_Chop_Ref    'Access,
1017
                      S_Chop_Verb   'Access);
1018
 
1019
   -----------------------------
1020
   -- Switches for GNAT CLEAN --
1021
   -----------------------------
1022
 
1023
   S_Clean_Add    : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*"      &
1024
                                            "-aP*";
1025
   --        /ADD_PROJECT_SEARCH_PATH=(directory[,...])
1026
   --
1027
   --   Add directories to the project search path.
1028
 
1029
   S_Clean_Compil  : aliased constant S := "/COMPILER_FILES_ONLY "         &
1030
                                             "-c";
1031
   --        /NOCOMPILER_FILES_ONLY (D)
1032
   --        /COMPILER_FILES_ONLY
1033
   --
1034
   --   Only attempt to delete the files produced by the compiler, not those
1035
   --   produced by the binder or the linker. The files that are not to be
1036
   --   deleted are library files, interface copy files, binder generated files
1037
   --   and executable files.
1038
 
1039
   S_Clean_Current : aliased constant S := "/CURRENT_DIRECTORY "           &
1040
                                            "!-I-";
1041
   --        /CURRENT_DIRECTORY (D)
1042
   --
1043
   --   Look for ALI or object files in the directory where GNAT CLEAN was
1044
   --   invoked.
1045
   --
1046
   --        /NOCURRENT_DIRECTORY
1047
   --
1048
   --   Do not look for ALI or object files in the directory where GNAT CLEAN
1049
   --   was invoked.
1050
 
1051
   S_Clean_Delete  : aliased constant S := "/DELETE "                      &
1052
                                            "!-n";
1053
   --        /DELETE (D)
1054
   --
1055
   --   Delete the files that are not read-only.
1056
   --
1057
   --        /NODELETE
1058
   --
1059
   --   Informative-only mode. Do not delete any files. Output the list of the
1060
   --   files that would have been deleted if this switch was not specified.
1061
 
1062
   S_Clean_Dirobj  : aliased constant S := "/DIRECTORY_OBJECTS=@"          &
1063
                                            "-D@";
1064
   --        /DIRECTORY_OBJECTS=<file>
1065
   --
1066
   --   Find the object files and .ALI files in <file>.
1067
   --   This qualifier is not compatible with /PROJECT_FILE.
1068
 
1069
   S_Clean_Ext     : aliased constant S := "/EXTERNAL_REFERENCE=" & '"'    &
1070
                                            "-X" & '"';
1071
   --        /EXTERNAL_REFERENCE="name=val"
1072
   --
1073
   --   Specifies an external reference to the project manager. Useful only if
1074
   --   /PROJECT_FILE is used.
1075
   --
1076
   --   Example:
1077
   --      /EXTERNAL_REFERENCE="DEBUG=TRUE"
1078
 
1079
   S_Clean_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES "       &
1080
                                            "-eL";
1081
   --        /NOFOLLOW_LINKS_FOR_FILES (D)
1082
   --        /FOLLOW_LINKS_FOR_FILES
1083
   --
1084
   --    Follow links when parsing project files
1085
 
1086
   S_Clean_Full    : aliased constant S := "/FULL_PATH_IN_BRIEF_MESSAGES " &
1087
                                            "-F";
1088
   --        /NOFULL_PATH_IN_BRIEF_MESSAGES (D)
1089
   --        /FULL_PATH_IN_BRIEF_MESSAGES
1090
   --
1091
   --   When using project files, if some errors or warnings are detected
1092
   --   during parsing and verbose mode is not in effect (no use of qualifier
1093
   --   /VERBOSE), then error lines start with the full path name of the
1094
   --   project file, rather than its simple file name.
1095
 
1096
   S_Clean_Help    : aliased constant S := "/HELP "                        &
1097
                                            "-h";
1098
   --        /NOHELP (D)
1099
   --        /HELP
1100
   --
1101
   --   Output a message explaining the usage of gnatclean.
1102
 
1103
   S_Clean_Index   : aliased constant S := "/SOURCE_INDEX=#"               &
1104
                                             "-i#";
1105
   --        /SOURCE_INDEX=nnn
1106
   --
1107
   --   Specifies the index of the units in the source file
1108
   --   By default, source files are mono-unit and there is no index
1109
 
1110
   S_Clean_Mess    : aliased constant S := "/MESSAGES_PROJECT_FILE="       &
1111
                                            "DEFAULT "                     &
1112
                                               "-vP0 "                     &
1113
                                            "MEDIUM "                      &
1114
                                               "-vP1 "                     &
1115
                                            "HIGH "                        &
1116
                                               "-vP2";
1117
   --        /MESSAGES_PROJECT_FILE[=messages-option]
1118
   --
1119
   --   Specifies the "verbosity" of the parsing of project files.
1120
   --   messages-option may be one of the following:
1121
   --
1122
   --      DEFAULT (D) No messages are output if there is no error or warning.
1123
   --
1124
   --      MEDIUM      A small number of messages are output.
1125
   --
1126
   --      HIGH        A great number of messages are output, most of them not
1127
   --                  being useful for the user.
1128
 
1129
   S_Clean_Object  : aliased constant S := "/OBJECT_SEARCH=*"              &
1130
                                            "-aO*";
1131
   --        /OBJECT_SEARCH=(directory,...)
1132
   --
1133
   --   When searching for library and object files, look in the specified
1134
   --   directories. The order in which library files are searched is the same
1135
   --   as for MAKE.
1136
 
1137
   S_Clean_Project : aliased constant S := "/PROJECT_FILE=<"               &
1138
                                            "-P>";
1139
   --        /PROJECT_FILE=filename
1140
   --
1141
   --   Specifies the main project file to be used. The project files rooted
1142
   --   at the main project file will be parsed before the invocation of the
1143
   --   compiler. The source and object directories to be searched will be
1144
   --   communicated to gnatclean through logical names ADA_PRJ_INCLUDE_FILE
1145
   --   and ADA_PRJ_OBJECTS_FILE.
1146
 
1147
   S_Clean_Quiet   : aliased constant S := "/QUIET "                       &
1148
                                            "-q";
1149
   --        /NOQUIET (D)
1150
   --        /QUIET
1151
   --
1152
   --   Quiet output. If there are no error, do not output anything, except in
1153
   --   verbose mode (qualifier /VERBOSE) or in informative-only mode
1154
   --  (qualifier /NODELETE).
1155
 
1156
   S_Clean_Recurs  : aliased constant S := "/RECURSIVE "                   &
1157
                                            "-r";
1158
   --        /NORECURSIVE (D)
1159
   --        /RECURSIVE
1160
   --
1161
   --   When a project file is specified (using switch -P), clean all imported
1162
   --   and extended project files, recursively. If this qualifier is not
1163
   --   specified, only the files related to the main project file are to be
1164
   --   deleted. This qualifier has no effect if no project file is specified.
1165
 
1166
   S_Clean_Search  : aliased constant S := "/SEARCH=*"                     &
1167
                                            "-I*";
1168
   --        /SEARCH=(directory,...)
1169
   --
1170
   --   Equivalent to /OBJECT_SEARCH=(directory,...).
1171
 
1172
   S_Clean_Subdirs : aliased constant S := "/SUBDIRS=<"                    &
1173
                                              "--subdirs=>";
1174
   --        /SUBDIRS=dir
1175
   --
1176
   --   The actual directories (object, exec, library, ...) are subdirectories
1177
   --   of the directory specified in the project file. If the subdirectory
1178
   --   does not exist, it is created automatically.
1179
 
1180
   S_Clean_USL : aliased constant S :=  "/UNCHECKED_SHARED_LIB_IMPORTS " &
1181
                                           "--unchecked-shared-lib-imports";
1182
   --        /NOUNCHECKED_SHARED_LIB_IMPORTS (D)
1183
   --        /UNCHECKED_SHARED_LIB_IMPORTS
1184
   --
1185
   --   Allow shared library projects to import static library projects
1186
 
1187
   S_Clean_Verbose : aliased constant S := "/VERBOSE "                     &
1188
                                            "-v";
1189
   --        /NOVERBOSE (D)
1190
   --        /VERBOSE
1191
   --
1192
   --   Verbose mode.
1193
 
1194
   Clean_Switches : aliased constant Switches :=
1195
                      (S_Clean_Add    'Access,
1196
                       S_Clean_Compil 'Access,
1197
                       S_Clean_Current'Access,
1198
                       S_Clean_Delete 'Access,
1199
                       S_Clean_Dirobj 'Access,
1200
                       S_Clean_Ext    'Access,
1201
                       S_Clean_Follow 'Access,
1202
                       S_Clean_Full   'Access,
1203
                       S_Clean_Help   'Access,
1204
                       S_Clean_Index  'Access,
1205
                       S_Clean_Mess   'Access,
1206
                       S_Clean_Object 'Access,
1207
                       S_Clean_Project'Access,
1208
                       S_Clean_Quiet  'Access,
1209
                       S_Clean_Recurs 'Access,
1210
                       S_Clean_Search 'Access,
1211
                       S_Clean_Subdirs'Access,
1212
                       S_Clean_Verbose'Access,
1213
                       S_Clean_USL    'Access);
1214
 
1215
   -------------------------------
1216
   -- Switches for GNAT COMPILE --
1217
   -------------------------------
1218
 
1219
   S_GCC_Ada_83  : aliased constant S := "/83 "                            &
1220
                                             "-gnat83";
1221
   --        /NO83 (D)
1222
   --        /83
1223
   --
1224
   --   Although GNAT is primarily an Ada 95 compiler, it accepts this
1225
   --   qualifier to specify that an Ada 83 mode program is being compiled. If
1226
   --   you specify this qualifier, GNAT rejects Ada 95 extensions and applies
1227
   --   Ada 83 semantics. It is not possible to guarantee this qualifier does
1228
   --   a perfect job; for example, some subtle tests of pathological cases,
1229
   --   such as are found in ACVC tests that have been removed from the ACVC
1230
   --   suite for Ada 95, may not compile correctly. However for practical
1231
   --   purposes, using this qualifier should ensure that programs that
1232
   --   compile correctly under the /83 qualifier can be ported reasonably
1233
   --   easily to an Ada 83 compiler. This is the main use of this qualifier.
1234
   --
1235
   --   With few exceptions (most notably the need to use "<>" on
1236
   --   unconstrained generic formal parameters), it is not necessary to use
1237
   --   this qualifier switch when compiling Ada 83 programs, because, with
1238
   --   rare and obscure exceptions, Ada 95 is upwardly compatible with Ada
1239
   --   83. This means that a correct Ada 83 program is usually also a correct
1240
   --   Ada 95 program.
1241
 
1242
   S_GCC_Ada_95  : aliased constant S := "/95 "                            &
1243
                                             "-gnat95";
1244
   --        /95 (D)
1245
   --
1246
   --   Allows GNAT to recognize the full range of Ada 95 constructs.
1247
   --   This is the normal default for GNAT Pro.
1248
 
1249
   S_GCC_Ada_05 : aliased constant S := "/05 "                             &
1250
                                             "-gnat05";
1251
   --        /05 (D)
1252
   --
1253
   --   Allows GNAT to recognize the full range of Ada 2005 constructs.
1254
 
1255
   S_GCC_Ada_2005 : aliased constant S := "/2005 "                         &
1256
                                             "-gnat2005";
1257
   --        /05 (D)
1258
   --
1259
   --   Allows GNAT to recognize the full range of Ada 2005 constructs.
1260
   --   Equivalent to /05 (/2005 is the preferred usage).
1261
 
1262
   S_GCC_Ada_12 : aliased constant S := "/12 "                             &
1263
                                             "-gnat12";
1264
   --        /05 (D)
1265
   --
1266
   --   Allows GNAT to recognize all implemented proposed Ada 2012
1267
   --   extensions. See features file for list of implemented features.
1268
 
1269
   S_GCC_Ada_2012 : aliased constant S := "/2012 "                         &
1270
                                             "-gnat2012";
1271
   --        /05 (D)
1272
   --
1273
   --   Allows GNAT to recognize all implemented proposed Ada 2012
1274
   --   extensions. See features file for list of implemented features.
1275
   --   Equivalent to /12 (/2012 is the preferred usage).
1276
 
1277
   S_GCC_Add     : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*"       &
1278
                                            "-aP*";
1279
   --        /ADD_PROJECT_SEARCH_PATH=(directory[,...])
1280
   --
1281
   --   Add directories to the project search path.
1282
 
1283
   S_GCC_Asm     : aliased constant S := "/ASM "                           &
1284
                                             "-S,!-c";
1285
   --        /NOASM (D)
1286
   --        /ASM
1287
   --
1288
   --   Use to cause the assembler source file to be generated, using S as the
1289
   --   filetype, instead of the object file. This may be useful if you need
1290
   --   to examine the generated assembly code.
1291
 
1292
   S_GCC_AValid  : aliased constant S := "/ASSUME_VALID "                  &
1293
                                             "-gnatB";
1294
   --        /NO_ASSUME_VALID (D)
1295
   --        /ASSUME_VALID
1296
   --
1297
   --   Use to tell the compiler to assume that all objects have valid values
1298
   --   except those occurring as prefixes to 'Valid attributes. In the default
1299
   --   mode, the compiler assumes that values may be invalid unless it can
1300
   --   be sure that they are valid, and code is generated to allow for this
1301
   --   possibility. The use of /ASSUME_VALID will improve the code.
1302
 
1303
   S_GCC_CategW  : aliased constant S := "/CATEGORIZATION_WARNINGS "  &
1304
                                             "-gnateP";
1305
   --        /NO_CATEGORIZATION_WARNINGS (D)
1306
   --        /CATEGORIZATION_WARNINGS
1307
   --
1308
   --   Use to tell the compiler to disable categorization dependency errors.
1309
   --   Ada requires that units that WITH one another have compatible
1310
   --   categories, for example a Pure unit cannot WITH a Preelaborate unit.
1311
   --   If this switch is used, these errors become warnings (which can be
1312
   --   ignored, or suppressed in the usual manner). This can be useful in
1313
   --   some specialized circumstances such as the temporary use of special
1314
   --   test software.
1315
 
1316
   S_GCC_Checks  : aliased constant S := "/CHECKS="                        &
1317
                                             "FULL "                       &
1318
                                                "-gnato,!-gnatE,!-gnatp "  &
1319
                                             "OVERFLOW "                   &
1320
                                                "-gnato "                  &
1321
                                             "ELABORATION "                &
1322
                                                "-gnatE "                  &
1323
                                             "ASSERTIONS "                 &
1324
                                                "-gnata "                  &
1325
                                             "DEFAULT "                    &
1326
                                                "!-gnato,!-gnatp "         &
1327
                                             "STACK "                      &
1328
                                                "-fstack-check "           &
1329
                                             "SUPPRESS_ALL "               &
1330
                                                "-gnatp "                  &
1331
                                             "UNSUPPRESS_ALL "             &
1332
                                                "-gnat-p";
1333
   --        /NOCHECKS
1334
   --        /CHECKS[=(keyword[,...])]
1335
   --
1336
   --   If you compile with the default options, GNAT will insert many runtime
1337
   --   checks into the compiled code, including code that performs range
1338
   --   checking against constraints, but not arithmetic overflow checking for
1339
   --   integer operations (including division by zero) or checks for access
1340
   --   before elaboration on subprogram calls.  All other runtime checks, as
1341
   --   required by the Ada 95 Reference Manual, are generated by default.
1342
   --
1343
   --   You may specify one or more of the following keywords to the /CHECKS
1344
   --   qualifier to modify this behavior:
1345
   --
1346
   --     DEFAULT          The behavior described above. This is the default
1347
   --                      if the /CHECKS qualifier is not present on the
1348
   --                      command line. Same as /NOCHECKS.
1349
   --
1350
   --     OVERFLOW        Enables overflow checking for integer operations and
1351
   --                     checks for access before elaboration on subprogram
1352
   --                     calls. This causes GNAT to generate slower and larger
1353
   --                     executable programs by adding code to check for both
1354
   --                     overflow and division by zero (resulting in raising
1355
   --                     "Constraint_Error" as required by Ada semantics).
1356
   --                     Similarly, GNAT does not generate elaboration check
1357
   --                     by default, and you must specify this keyword to
1358
   --                     enable them.
1359
   --
1360
   --                     Note that this keyword does not affect the code
1361
   --                     generated for any floating-point operations; it
1362
   --                     applies only to integer operations. For the case of
1363
   --                     floating-point, GNAT has the "Machine_Overflows"
1364
   --                     attribute set to "False" and the normal mode of
1365
   --                     operation is to generate IEEE NaN and infinite values
1366
   --                     on overflow or invalid operations (such as dividing
1367
   --                     0.0 by 0.0).
1368
   --
1369
   --     ELABORATION     Enables dynamic checks for access-before-elaboration
1370
   --                     on subprogram calls and generic instantiations.
1371
   --
1372
   --     ASSERTIONS      The pragmas "Assert" and "Debug" normally have no
1373
   --                     effect and are ignored. This keyword causes "Assert"
1374
   --                     and "Debug" pragmas to be activated, as well as
1375
   --                     "Check", "Precondition" and "Postcondition" pragmas.
1376
   --
1377
   --     SUPPRESS_ALL    Suppress all runtime checks as though you have
1378
   --                     "pragma Suppress (all_checks)" in your source. Use
1379
   --                     this switch to improve the performance of the code at
1380
   --                     the expense of safety in the presence of invalid data
1381
   --                     or program bugs.
1382
   --
1383
   --     UNSUPPRESS_ALL  Cancels effect of previous SUPPRESS_ALL.
1384
   --
1385
   --     DEFAULT         Suppress the effect of any option OVERFLOW or
1386
   --                     ASSERTIONS.
1387
   --
1388
   --     FULL (D)        Similar to OVERFLOW, but suppress the effect of any
1389
   --                     option ELABORATION or SUPPRESS_ALL.
1390
   --
1391
   --   These keywords only control the default setting of the checks.  You
1392
   --   may modify them using either "Suppress" (to remove checks) or
1393
   --   "Unsuppress" (to add back suppressed checks) pragmas in your program
1394
   --   source.
1395
 
1396
   S_GCC_ChecksX : aliased constant S := "/NOCHECKS "                      &
1397
                                             "-gnatp,!-gnato,!-gnatE";
1398
   --  NODOC (see /CHECKS)
1399
 
1400
   S_GCC_Compres : aliased constant S := "/COMPRESS_NAMES "                &
1401
                                             "-gnatC";
1402
   --        /NOCOMPRESS_NAMES (D)
1403
   --        /COMPRESS_NAMES
1404
   --
1405
   --   Compress debug information and external symbol name table entries.
1406
   --   In the generated debugging information, and also in the case of long
1407
   --   external names, the compiler uses a compression mechanism if the name
1408
   --   is very long.  This compression method uses a checksum, and avoids
1409
   --   trouble on some operating systems which have difficulty with very long
1410
   --   names.
1411
 
1412
   S_GCC_Config  : aliased constant S := "/CONFIGURATION_PRAGMAS_FILE=<"   &
1413
                                             "-gnatec>";
1414
   --        /CONFIGURATION_PRAGMAS_FILE=file
1415
   --
1416
   --   Specify a configuration pragmas file that need to be taken into account
1417
 
1418
   S_GCC_Current : aliased constant S := "/CURRENT_DIRECTORY "             &
1419
                                             "!-I-";
1420
   --        /CURRENT_DIRECTORY (D)
1421
   --        /NOCURRENT_DIRECTORY
1422
   --
1423
   --   Look for source files in the default directory.
1424
 
1425
   S_GCC_Data    : aliased constant S := "/DATA_PREPROCESSING=<"           &
1426
                                            "-gnatep>";
1427
   --        /DATA_PREPROCESSING=file_name
1428
   --
1429
   --   This qualifier indicates to the compiler the file name (without
1430
   --   directory information) of the preprocessor data file to use.
1431
   --   The preprocessor data file should be found in the source directories.
1432
   --
1433
   --   A preprocessing data file is a text file with significant lines
1434
   --   indicating how should be preprocessed either a specific source or all
1435
   --   sources not mentioned in other lines. A significant line is a non
1436
   --   empty, non comment line. Comments are similar to Ada comments.
1437
   --
1438
   --  Each significant line starts with either a literal string or the
1439
   --  character '*'. A literal string is the file name (without directory
1440
   --  information) of the source to preprocess. A character '*' indicates the
1441
   --  preprocessing for all the sources that are not specified explicitly on
1442
   --  other lines. It is an error to have two lines with the same file name
1443
   --  or two lines starting with the character '*'.
1444
   --
1445
   --  After the file name or the character '*', another optional literal
1446
   --  string indicating the file name of the definition file to be used for
1447
   --  preprocessing. (see 15.3 Form of Definitions File. The definition files
1448
   --  are found by the compiler in one of the source directories. In some
1449
   --  cases, when compiling a source in a directory other than the current
1450
   --  directory, if the definition file is in the current directory, it may
1451
   --  be necessary to add the current directory as a source directory through
1452
   --  qualifier "/SEARCH=[]", otherwise the compiler would not find the
1453
   --  definition file.
1454
   --
1455
   --  Then, optionally, switches similar to those of gnatprep may be found.
1456
   --  Those switches are:
1457
   --
1458
   --   -b              Causes both preprocessor lines and the lines deleted by
1459
   --                   preprocessing to be replaced by blank lines, preserving
1460
   --                   the line number. This switch is always implied;
1461
   --                   however, if specified after `-c' it cancels the effect
1462
   --                   of `-c'.
1463
   --
1464
   --   -c              Causes both preprocessor lines and the lines deleted by
1465
   --                   preprocessing to be retained as comments marked with
1466
   --                   the special string "--! ".
1467
   --
1468
   --   -Dsymbol=value  Define or redefine a symbol, associated with value.
1469
   --                   A symbol is an Ada identifier, or an Ada reserved word,
1470
   --                   with the exception of "if", "else", "elsif", "end",
1471
   --                   "and", "or" and "then". value is either a literal
1472
   --                   string, an Ada identifier or any Ada reserved word.
1473
   --                   A symbol declared with this switch replaces a symbol
1474
   --                   with the same name defined in a definition file.
1475
   --
1476
   --   -s              Causes a sorted list of symbol names and values to be
1477
   --                   listed on the standard output file.
1478
   --
1479
   --   -u              Causes undefined symbols to be treated as having the
1480
   --                   value FALSE in the context of a preprocessor test.
1481
   --                   In the absence of this option, an undefined symbol
1482
   --                   in a #if or #elsif test will be treated as an error.
1483
   --
1484
   --   Examples of valid lines in a preprocessor data file:
1485
   --
1486
   --     "toto.adb"  "prep.def" -u
1487
   --     --  preprocess "toto.adb", using definition file "prep.def",
1488
   --     --  undefined symbol are False.
1489
   --
1490
   --     * -c -DVERSION=V101
1491
   --     --  preprocess all other sources without a definition file;
1492
   --     --  suppressed lined are commented; symbol VERSION has the value
1493
   --     --  V101.
1494
   --
1495
   --     "titi.adb" "prep2.def" -s
1496
   --     --  preprocess "titi.adb", using definition file "prep2.def";
1497
   --     --  list all symbols with their values.
1498
 
1499
   S_GCC_Debug   : aliased constant S := "/DEBUG="                         &
1500
                                            "SYMBOLS "                     &
1501
                                               "-g2 "                      &
1502
                                            "NOSYMBOLS "                   &
1503
                                               "!-g2 "                     &
1504
                                            "TRACEBACK "                   &
1505
                                               "-g1 "                      &
1506
                                            "ALL "                         &
1507
                                               "-g3 "                      &
1508
                                            "NONE "                        &
1509
                                               "-g0 "                      &
1510
                                            "NOTRACEBACK "                 &
1511
                                               "-g0";
1512
   --        /DEBUG[=debug-level]
1513
   --        /NODEBUG
1514
   --
1515
   --   Specifies how much debugging information is to be included in
1516
   --   the resulting object fie.
1517
   --
1518
   --   'debug-level' is one of the following:
1519
   --
1520
   --        SYMBOLS (D)    Include both debugger symbol records and traceback
1521
   --                       in the object file.
1522
   --
1523
   --        ALL            Include debugger symbol records, traceback plus
1524
   --                       extra debug information in the object file.
1525
   --
1526
   --        NONE           Excludes both debugger symbol records and traceback
1527
   --                       from the object file.  Same as /NODEBUG.
1528
   --
1529
   --        TRACEBACK      Includes only traceback records in the object
1530
   --                       file. This is the default when /DEBUG is not used.
1531
 
1532
   S_GCC_DebugX  : aliased constant S := "/NODEBUG "                       &
1533
                                             "!-g";
1534
   --  NODOC (see /Debug)
1535
 
1536
   S_GCC_Dist    : aliased constant S := "/DISTRIBUTION_STUBS="            &
1537
                                            "RECEIVER "                    &
1538
                                               "-gnatzr "                  &
1539
                                            "CALLER "                      &
1540
                                              "-gnatzc";
1541
   --        /NODISTRIBUTION_STUBS (D)
1542
   --        /DISTRIBUTION_STUBS[=dist-opt]
1543
   --
1544
   --   'dist-opt' is either RECEIVER (the default) or SENDER and indicates
1545
   --   that stubs for use in distributed programs (see the Distributed
1546
   --   Systems Annex of the Ada RM) should be generated.
1547
 
1548
   S_GCC_DistX   : aliased constant S := "/NODISTRIBUTION_STUBS "          &
1549
                                            "!-gnatzr,!-gnatzc";
1550
   --  NODOC (see /DISTRIBUTION_STUBS)
1551
 
1552
   S_GCC_Error   : aliased constant S := "/ERROR_LIMIT=#"                  &
1553
                                            "-gnatm#";
1554
   --        /NOERROR_LIMIT (D)
1555
   --        /ERROR_LIMIT=nnn
1556
   --
1557
   --   NNN is a decimal integer in the range of 1 to 999999 and limits the
1558
   --   number of error messages to be generated to that number.  Once that
1559
   --   number has been reached, the compilation is abandoned.
1560
   --   Specifying 999999 is equivalent to /NOERROR_LIMIT.
1561
 
1562
   S_GCC_ErrorX  : aliased constant S := "/NOERROR_LIMIT "                 &
1563
                                            "-gnatm999999";
1564
   --  NODOC (see /ERROR_LIMIT)
1565
 
1566
   S_GCC_Except  : aliased constant S := "/EXTRA_EXCEPTION_INFORMATION "   &
1567
                                            "-gnateE";
1568
   --        /EXTRA_EXCEPTION_INFORMATION
1569
   --
1570
   --   Generate extra information in exception messages, in particular
1571
   --   display extra column information and the value and range associated
1572
   --   with index and range check failures, and extra column information for
1573
   --   access checks.
1574
 
1575
   S_GCC_Expand  : aliased constant S := "/EXPAND_SOURCE "                 &
1576
                                            "-gnatG";
1577
   --        /NOEXPAND_SOURCE (D)
1578
   --        /EXPAND_SOURCE
1579
   --
1580
   --   Produces a listing of the expanded code in Ada source form. For
1581
   --   example, all tasking constructs are reduced to appropriate run-time
1582
   --   library calls. The maximum line length for the listing 72.
1583
 
1584
   S_GCC_Lexpand : aliased constant S := "/LEXPAND_SOURCE=#"               &
1585
                                            "-gnatG#";
1586
   --        /LEXPAND_SOURCE=nnn
1587
   --
1588
   --   Produces a listing of the expanded code in Ada source form. For
1589
   --   example, all tasking constructs are reduced to appropriate run-time
1590
   --   library calls. The parameter is the maximum line length for the
1591
   --   listing.
1592
 
1593
   S_GCC_Extend  : aliased constant S := "/EXTENSIONS_ALLOWED "            &
1594
                                            "-gnatX";
1595
   --        /NOEXTENSIONS_ALLOWED (D)
1596
   --        /EXTENSIONS_ALLOWED
1597
   --
1598
   --   GNAT specific language extensions allowed.
1599
 
1600
   S_GCC_Ext     : aliased constant S := "/EXTERNAL_REFERENCE=" & '"'      &
1601
                                            "-X" & '"';
1602
   --        /EXTERNAL_REFERENCE="name=val"
1603
   --
1604
   --   Specifies an external reference to the project manager. Useful only if
1605
   --   /PROJECT_FILE is used.
1606
   --
1607
   --   Example:
1608
   --      /EXTERNAL_REFERENCE="DEBUG=TRUE"
1609
 
1610
   S_GCC_File    : aliased constant S := "/FILE_NAME_MAX_LENGTH=#"         &
1611
                                            "-gnatk#";
1612
   --        /FILE_NAME_MAX_LENGTH=nnn
1613
   --
1614
   --   Activates file name "krunching". NNN, a decimal integer in the range
1615
   --   1-999, indicates the maximum allowable length of a file name (not
1616
   --   including the ADS or ADB filetype. The default is not to enable file
1617
   --   name krunching.
1618
 
1619
   S_GCC_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES "       &
1620
                                            "-eL";
1621
   --        /NOFOLLOW_LINKS_FOR_FILES (D)
1622
   --        /FOLLOW_LINKS_FOR_FILES
1623
   --
1624
   --    Follow links when parsing project files
1625
 
1626
   S_GCC_Force   : aliased constant S := "/FORCE_ALI "                     &
1627
                                            "-gnatQ";
1628
   --        /NOFORCE_ALI (D)
1629
   --        /FORCE_ALI
1630
   --
1631
   --   In normal operation mode, the .ALI file is not generated if any
1632
   --   illegalities are detected in the program. The use of this qualifier
1633
   --   forces generation of the .ALI file. This file is marked as being
1634
   --   in error, so it cannot be used for binding purposes, but it does
1635
   --   contain reasonably complete cross-reference information, and thus may
1636
   --   be useful for use by tools (e.g. semantic browsing tools or integrated
1637
   --   development environments) that are driven from the .ALI file.
1638
 
1639
   S_GCC_Full    : aliased constant S := "/FULL_PATH_IN_BRIEF_MESSAGES "   &
1640
                                            "-gnatef";
1641
   --        /NOFULL_PATH_IN_BRIEF_MESSAGES (D)
1642
   --        /FULL_PATH_IN_BRIEF_MESSAGES
1643
   --
1644
   --   When using project files, if some errors or warnings are detected
1645
   --   during parsing and verbose mode is not in effect (no use of qualifier
1646
   --   /VERBOSE), then error lines start with the full path name of the
1647
   --   project file, rather than its simple file name.
1648
 
1649
   S_GCC_Generate : aliased constant S := "/GENERATE_PROCESSED_SOURCE "    &
1650
                                             "-gnateG";
1651
   --        /NOGENERATE_PROCESSED_SOURCE (D)
1652
   --        /GENERATE_PROCESSED_SOURCE
1653
   --
1654
   --        Generate a file <source>_prep if the integrated preprocessing
1655
   --        is modifying the source text.
1656
 
1657
   S_GCC_GNAT    : aliased constant S := "/GNAT_INTERNAL "                 &
1658
                                            "-gnatg";
1659
   --        /NOGNAT_INTERNAL (D)
1660
   --        /GNAT_INTERNAL
1661
   --
1662
   --        Internal GNAT implementation mode. This should not be used for
1663
   --        applications programs, it is intended only for use by the compiler
1664
   --        and its run-time library. For documentation, see the GNAT sources.
1665
   --        Note that it implies /WARNINGS=ALL,ERRORS and /STYLE_CHECKS=GNAT
1666
   --        so that all standard warnings and all standard style options are
1667
   --        turned on. All warnings and style error messages are treated as
1668
   --        errors.
1669
 
1670
   S_GCC_Help    : aliased constant S := "/HELP "                          &
1671
                                            "-gnath";
1672
   --        /NOHELP (D)
1673
   --        /HELP
1674
   --
1675
   --   Output usage information.
1676
 
1677
   S_GCC_Ident   : aliased constant S := "/IDENTIFIER_CHARACTER_SET="      &
1678
                                             "DEFAULT "                    &
1679
                                                "-gnati1 "                 &
1680
                                             "1 "                          &
1681
                                                "-gnati1 "                 &
1682
                                             "2 "                          &
1683
                                                "-gnati2 "                 &
1684
                                             "3 "                          &
1685
                                                "-gnati3 "                 &
1686
                                             "4 "                          &
1687
                                                "-gnati4 "                 &
1688
                                             "5 "                          &
1689
                                                "-gnati5 "                 &
1690
                                             "PC "                         &
1691
                                                "-gnatip "                 &
1692
                                             "PC850 "                      &
1693
                                                "-gnati8 "                 &
1694
                                             "FULL_UPPER "                 &
1695
                                                "-gnatif "                 &
1696
                                             "NO_UPPER "                   &
1697
                                                "-gnatin "                 &
1698
                                             "WIDE "                       &
1699
                                                "-gnatiw";
1700
   --        /NOIDENTIFIER_CHARACTER_SET (D)
1701
   --        /IDENTIFIER_CHARACTER_SET=char-set
1702
   --
1703
   --   Normally GNAT recognizes the Latin-1 character set in source program
1704
   --   identifiers, as described in the reference manual. This qualifier
1705
   --   causes GNAT to recognize alternate character sets in identifiers.
1706
   --   'char-set' is one of the following strings indicating the character
1707
   --   set:
1708
   --
1709
   --        DEFAULT (D) Equivalent to 1, below. Also equivalent to
1710
   --                    /NOIDENTIFIER_CHARACTER_SET.
1711
   --
1712
   --        1           The basic character set is Latin-1. This character
1713
   --                    set is defined by ISO standard 8859, part 1. The lower
1714
   --                    half (character codes 16#00# ... 16#7F#) is identical
1715
   --                    to standard ASCII coding, but the upper half is used
1716
   --                    to represent additional characters. This includes
1717
   --                    extended letters used by European languages, such as
1718
   --                    the umlaut used in German.
1719
   --
1720
   --                    You may use any of these extended characters freely
1721
   --                    in character or string literals. In addition, the
1722
   --                    extended characters that represent letters can be
1723
   --                    used in identifiers.
1724
   --
1725
   --        2           Latin-2 letters allowed in identifiers, with uppercase
1726
   --                    and lowercase equivalence.
1727
   --
1728
   --        3           Latin-3 letters allowed in identifiers, with uppercase
1729
   --                    and lower case equivalence.
1730
   --
1731
   --        4           Latin-4 letters allowed in identifiers, with uppercase
1732
   --                    and lower case equivalence.
1733
   --
1734
   --        PC          IBM PC code page 437.  This code page is the normal
1735
   --                    default for PCs in the U.S. It corresponds to the
1736
   --                    original IBM PC character set. This set has some, but
1737
   --                    not all, of the extended Latin-1 letters, but these
1738
   --                    letters do not have the same encoding as Latin-1. In
1739
   --                    this mode, these letters are allowed in identifiers
1740
   --                    with uppercase and lowercase equivalence.
1741
   --
1742
   --        PC850       This code page (850) is a modification of 437 extended
1743
   --                    to include all the Latin-1 letters, but still not with
1744
   --                    the usual Latin-1 encoding. In this mode, all these
1745
   --                    letters are allowed in identifiers with uppercase and
1746
   --                    lower case equivalence.
1747
   --
1748
   --        FULL_UPPER  Any character in the range 80-FF allowed in
1749
   --                    identifiers, and all are considered distinct.  In
1750
   --                    other words, there are no uppercase and lower case
1751
   --                    equivalences in this range.
1752
   --
1753
   --        NO_UPPER    No upper-half characters in the range 80-FF are
1754
   --                    allowed in identifiers.  This gives Ada 95
1755
   --                    compatibility for identifier names.
1756
   --
1757
   --        WIDE        GNAT allows wide character codes to appear in
1758
   --                    character and string literals, and also optionally
1759
   --                    in identifiers.  See the /WIDE_CHARACTER_ENCODING
1760
   --                    qualifier for information on encoding formats.
1761
 
1762
   S_GCC_IdentX  : aliased constant S := "/NOIDENTIFIER_CHARACTER_SET "    &
1763
                                             "-gnati1";
1764
   --  NODOC (see /IDENTIFIER_CHARACTER_SET)
1765
 
1766
   S_GCC_Ignore  : aliased constant S := "/IGNORE_REP_CLAUSES "            &
1767
                                             "-gnatI";
1768
   --        /IGNORE_REP_CLAUSES
1769
   --
1770
   --   Causes all representation clauses to be ignored and treated as
1771
   --   comments. Useful when compiling foreign code (for example when ASIS
1772
   --   is used to analyze such code).
1773
 
1774
   S_GCC_Immed   : aliased constant S := "/IMMEDIATE_ERRORS "              &
1775
                                             "-gnatdO";
1776
   --        /NOIMMEDIATE_ERRORS (D)
1777
   --        /IMMEDIATE_ERRORS
1778
   --
1779
   --   Causes errors to be displayed as soon as they are encountered, rather
1780
   --   than after compilation is terminated. If GNAT terminates prematurely
1781
   --   or goes into an infinite loop, the last error message displayed may
1782
   --   help to pinpoint the culprit.
1783
 
1784
   S_GCC_Inline  : aliased constant S := "/INLINE="                        &
1785
                                            "PRAGMA "                      &
1786
                                              "-gnatn "                    &
1787
                                            "FULL "                        &
1788
                                              "-gnatN "                    &
1789
                                            "SUPPRESS "                    &
1790
                                              "-fno-inline";
1791
   --        /NOINLINE (D)
1792
   --        /INLINE[=keyword]
1793
   --
1794
   --   Selects the level of inlining for your program.  In the absence of this
1795
   --   qualifier, GNAT does not attempt inlining across units and does not
1796
   --   need to access the bodies of subprograms for which "pragma Inline" is
1797
   --   specified if they are not in the current unit.
1798
   --
1799
   --   The supported keywords are as follows:
1800
   --
1801
   --        PRAGMA (D)  Recognize and process "Inline" pragmas.  However,
1802
   --                    for the inlining to actually occur, optimization
1803
   --                    must be enabled.  This enables inlining across unit
1804
   --                    boundaries, that is, inlining a call in one unit of
1805
   --                    a subprogram declared in a with'ed unit. The compiler
1806
   --                    will access these bodies, creating an extra source
1807
   --                    dependency for the resulting object file, and where
1808
   --                    possible, the call will be inlined.
1809
   --
1810
   --                    This qualifier also turns on full optimization and
1811
   --                    requests GNAT to try to attempt automatic inlining
1812
   --                    of small subprograms within a unit.
1813
   --
1814
   --                    Specifying /OPTIMIZE=NONE will disable the main effect
1815
   --                    of this qualifier, but you may specify other
1816
   --                    optimization options, to get either lower
1817
   --                    (/OPTIMIZE=SOME) or higher (/OPTIMIZE=UNROLL_LOOPS)
1818
   --                    levels of optimization.
1819
   --
1820
   --        FULL        Front end inlining. The front end inlining activated
1821
   --                    by this switch is generally more extensive, and quite
1822
   --                    often more effective than the standard PRAGMA inlining
1823
   --                    mode. It will also generate additional dependencies.
1824
   --
1825
   --        SUPPRESS    Suppresses all inlining, even if other optimization
1826
   --                        or inlining switches are set.
1827
 
1828
   S_GCC_InlineX : aliased constant S := "/NOINLINE "                      &
1829
                                             "!-gnatn,!-gnatN";
1830
   --  NODOC (see /INLINE)
1831
 
1832
   S_GCC_Intsrc  : aliased constant S := "/INTERSPERSE_SOURCE "            &
1833
                                             "-gnatL";
1834
 
1835
   --        /NO_INTERSPERSE_SOURCE (D)
1836
   --        /INTERSPERSE_SOURCE
1837
   --
1838
   --   Causes output from /XDEBUG or /EXPAND_SOURCE to be interspersed with
1839
   --   lines from the original source file, output as comment lines with the
1840
   --   associated line number.
1841
 
1842
   S_GCC_Just   : aliased constant S := "/JUSTIFY_MESSAGES=#"              &
1843
                                             "-gnatj#";
1844
 
1845
   --        /NO_JUSTIFY_MESSAGES (D)
1846
   --        /JUSTIFY_MESSAGES=nnn
1847
   --
1848
   --   Causes error messages to be reformatted so that a message and all its
1849
   --   continuation lines count as one warning or error in the statistics on
1850
   --   total errors, and the message is broken down into lines (justified) so
1851
   --   that no line is longer than nnn characters. The default message
1852
   --   behavior (each message counted separately and not reformatted to fit
1853
   --   a particular line length) can be obtained using /NO_JUSTIFY_MESSAGES.
1854
 
1855
   S_GCC_JustX  : aliased constant S := "/NO_JUSTIFY_MESSAGES "            &
1856
                                             "-gnatj0";
1857
 
1858
   --  NODOC (see /JUSTIFY_MESSAGES)
1859
 
1860
   S_GCC_Length  : aliased constant S := "/MAX_LINE_LENGTH=#"              &
1861
                                             "-gnatyM#";
1862
   --        /MAX_LINE_LENGTH=nnn
1863
   --
1864
   --   Set maximum line length.
1865
   --   The length of lines must not exceed the given value nnn.
1866
 
1867
   S_GCC_List    : aliased constant S := "/LIST "                          &
1868
                                             "-gnatl";
1869
   --        /NOLIST (D)
1870
   --        /LIST
1871
   --
1872
   --   Cause a full listing of the file to be generated. In the case where
1873
   --   a body is compiled, the corresponding spec is also listed, along
1874
   --   with any subunits.
1875
 
1876
   S_GCC_Machine : aliased constant S := "/MACHINE_CODE_LISTING "          &
1877
                                             "-source-listing";
1878
   --        /NOMACHINE_CODE_LISTING (D)
1879
   --        /MACHINE_CODE_LISTING
1880
   --
1881
   --   Cause a full machine code listing of the file to be generated to
1882
   --   <filename>.lis. Interspersed source is included if the /DEBUG
1883
   --   qualifier is also present.
1884
 
1885
   S_GCC_Mapping : aliased constant S := "/MAPPING_FILE=<"                 &
1886
                                            "-gnatem>";
1887
   --        /MAPPING_FILE=file_name
1888
   --
1889
   --   Use mapping file file_name
1890
   --
1891
   --   A mapping file is a way to communicate to the compiler two mappings:
1892
   --   from unit names to file names (without any directory information) and
1893
   --   from file names to path names (with full directory information).
1894
   --   These mappings are used by the compiler to short-circuit the path
1895
   --   search.
1896
   --
1897
   --   The use of mapping files is not required for correct operation of the
1898
   --   compiler, but mapping files can improve efficiency, particularly when
1899
   --   sources are read over a slow network connection. In normal operation,
1900
   --   you need not be concerned with the format or use of mapping files,
1901
   --   and /MAPPING_FILE is not a qualifier that you would use explicitly.
1902
   --   It is intended only for use by automatic tools such as GNAT MAKE
1903
   --   running under the project file facility. The description here of the
1904
   --   format of mapping files is provided for completeness and for possible
1905
   --   use by other tools.
1906
   --
1907
   --   A mapping file is a sequence of sets of three lines. In each set, the
1908
   --   first line is the unit name, in lower case, with "%s" appended for
1909
   --   specifications and "%b" appended for bodies; the second line is the
1910
   --   file name; and the third line is the path name.
1911
   --
1912
   --   Example:
1913
   --
1914
   --      main%b
1915
   --      main.2_ada
1916
   --      /gnat/project1/sources/main.2_ada
1917
   --
1918
   --   When qualifier ?MAPPING_FILE is specified, the compiler will create in
1919
   --   memory the two mappings from the specified file. If there is any
1920
   --   problem (non existent file, truncated file or duplicate entries),
1921
   --   no mapping will be created.
1922
   --
1923
   --   Several /MAPPING_FILE qualifiers may be specified; however, only the
1924
   --   last one on the command line will be taken into account.
1925
   --
1926
   --   When using a project file, GNAT MAKE creates a temporary mapping file
1927
   --   and communicates it to the compiler using this switch.
1928
 
1929
   S_GCC_Multi   : aliased constant S := "/MULTI_UNIT_INDEX=#"             &
1930
                                            "-gnateI#";
1931
   --        /MULTI_UNIT_INDEX=nnn
1932
   --
1933
   --   Specify the index of the unit to compile in a multi-unit source file.
1934
 
1935
   S_GCC_Mess    : aliased constant S := "/MESSAGES_PROJECT_FILE="         &
1936
                                            "DEFAULT "                     &
1937
                                               "-vP0 "                     &
1938
                                            "MEDIUM "                      &
1939
                                               "-vP1 "                     &
1940
                                            "HIGH "                        &
1941
                                               "-vP2";
1942
   --        /MESSAGES_PROJECT_FILE[=messages-option]
1943
   --
1944
   --   Specifies the "verbosity" of the parsing of project files.
1945
   --   messages-option may be one of the following:
1946
   --
1947
   --      DEFAULT (D) No messages are output if there is no error or warning.
1948
   --
1949
   --      MEDIUM      A small number of messages are output.
1950
   --
1951
   --      HIGH        A great number of messages are output, most of them not
1952
   --                  being useful for the user.
1953
 
1954
   S_GCC_Nesting  : aliased constant S := "/MAX_NESTING=#"                 &
1955
                                             "-gnatyL#";
1956
   --        /MAX_NESTING=nnn
1957
   --
1958
   --   Set maximum level of nesting of constructs (including subprograms,
1959
   --   loops, blocks, packages, and conditionals).
1960
   --   The level of nesting must not exceed the given value nnn.
1961
   --   A value of zero disable this style check (not enabled by default).
1962
 
1963
   S_GCC_Noadc   : aliased constant S := "/NO_GNAT_ADC "                   &
1964
                                             "-gnatA";
1965
   --        /NO_GNAT_ADC
1966
   --
1967
   --   Cause the compiler to ignore any configuration pragmas file GNAT.ADC
1968
   --   in the default directory. Implied by qualifier /PROJECT_FILE.
1969
   --   Often used in conjunction with qualifier /CONFIGURATION_PRAGMAS_FILE.
1970
 
1971
   S_GCC_Noload  : aliased constant S := "/NOLOAD "                        &
1972
                                             "-gnatc";
1973
   --        /NOLOAD
1974
   --
1975
   --   Cause the compiler to operate in semantic check mode with full
1976
   --   checking for all illegalities specified in the reference manual, but
1977
   --   without generation of any source code (no object or ALI file
1978
   --   generated).
1979
   --
1980
   --   Since dependent files must be accessed, you must follow the GNAT
1981
   --   semantic restrictions on file structuring to operate in this mode:
1982
   --
1983
   --   o The needed source files must be accessible.
1984
   --   o Each file must contain only one compilation unit.
1985
   --   o The file name and unit name must match.
1986
   --
1987
   --   The output consists of error messages as appropriate. No object file
1988
   --   or ALI file is generated. The checking corresponds exactly to the
1989
   --   notion of legality in the Ada reference manual.
1990
   --
1991
   --   Any unit can be compiled in semantics-checking-only mode, including
1992
   --   units that would not normally be compiled (generic library units,
1993
   --   subunits, and specifications where a separate body is present).
1994
 
1995
   S_GCC_Nostinc : aliased constant S := "/NOSTD_INCLUDES "                &
1996
                                             "-nostdinc";
1997
   --        /NOSTD_INCLUDES
1998
   --
1999
   --   Do not look in the default directory for source files of the runtime.
2000
 
2001
   S_GCC_Nostlib : aliased constant S := "/NOSTD_LIBRARIES "               &
2002
                                            "-nostdlib";
2003
   --        /NOSTD_LIBRARIES
2004
   --
2005
   --    Do not look for library files in the system default directory.
2006
 
2007
   S_GCC_NoWarnP  : aliased constant S := "/NOWARNING_PRAGMAS "            &
2008
                                             "-gnatd.i";
2009
   --        /NOWARNING_PRAGMAS
2010
   --
2011
   --   Causes all Warnings pragmas to be ignored. Useful to check if the
2012
   --   program has obsolete warnings pragmas that are hiding problems.
2013
 
2014
   S_GCC_Opt     : aliased constant S := "/OPTIMIZE="                      &
2015
                                            "ALL "                         &
2016
                                               "-O2,!-O0,!-O1,!-O3 "       &
2017
                                            "NONE "                        &
2018
                                               "-O0,!-O1,!-O2,!-O3 "       &
2019
                                            "SOME "                        &
2020
                                               "-O1,!-O0,!-O2,!-O3 "       &
2021
                                            "SPACE "                       &
2022
                                               "-Os,!-O0,!-O1,!-O2,!-O3 "  &
2023
                                            "DEVELOPMENT "                 &
2024
                                               "-O1,!-O0,!-O2,!-O3 "       &
2025
                                            "UNROLL_LOOPS "                &
2026
                                               "-funroll-loops "           &
2027
                                            "NO_STRICT_ALIASING "          &
2028
                                               "-fno-strict-aliasing "     &
2029
                                            "INLINING "                    &
2030
                                               "-O3,!-O0,!-O1,!-O2";
2031
   --        /NOOPTIMIZE (D)
2032
   --        /OPTIMIZE[=(keyword[,...])]
2033
   --
2034
   --   Selects the level of optimization for your program.  The supported
2035
   --   keywords are as follows:
2036
   --
2037
   --      ALL (D)       Perform most optimizations, including those that
2038
   --                    may be expensive.
2039
   --
2040
   --      NONE          Do not do any optimizations. Same as /NOOPTIMIZE.
2041
   --
2042
   --      SOME          Perform some optimizations, but omit ones that
2043
   --                    are costly in compilation time.
2044
   --
2045
   --      SPACE         Optimize space usage
2046
   --
2047
   --      DEVELOPMENT   Same as SOME.
2048
   --
2049
   --      INLINING      Full optimization, and also attempt automatic inlining
2050
   --                    of small subprograms within a unit
2051
   --
2052
   --      UNROLL_LOOPS  Try to unroll loops. This keyword may be specified
2053
   --                    with any keyword above other than NONE. Loop
2054
   --                    unrolling usually, but not always, improves the
2055
   --                    performance of programs.
2056
   --
2057
   --      NO_STRICT_ALIASING
2058
   --                    Suppress aliasing analysis. When optimization is
2059
   --                    enabled (ALL or SOME above), the compiler assumes
2060
   --                    that pointers do in fact point to legitimate values
2061
   --                    of the pointer type (allocated from the proper pool).
2062
   --                    If this assumption is violated, e.g. by the use of
2063
   --                    unchecked conversion, then it may be necessary to
2064
   --                    suppress this assumption using this keyword (which
2065
   --                    may be specified only in conjunction with any
2066
   --                    keyword above, other than NONE).
2067
 
2068
   S_GCC_OptX    : aliased constant S := "/NOOPTIMIZE "                    &
2069
                                            "-O0,!-O1,!-O2,!-O3";
2070
   --  NODOC (see /OPTIMIZE)
2071
 
2072
   S_GCC_Output  : aliased constant S := "/OUTPUT_FILE=<"                  &
2073
                                            "-gnatl=>";
2074
   --        /OUTPUT_FILE=fname
2075
   --
2076
   --   This has the same effect as /LIST except that the output is written
2077
   --   to a file instead of to standard output. If the given fname
2078
   --   does not start with a period, then it is the full name of the file
2079
   --   to be written. If fname starts with a period, the name of the file
2080
   --   is the concatenation of to the name of the file being compiled with
2081
   --   fname where the period is replace by an underline. For example, if
2082
   --   file xyz.adb is compiled with -gnatl=.lst, then the output is written
2083
   --   to file xyz.adb_lst.
2084
 
2085
   S_GCC_Pointer : aliased constant S := "/POINTER_SIZE="                  &
2086
                                            "64 "                          &
2087
                                               "-mmalloc64 "               &
2088
                                            "LONG "                        &
2089
                                               "-mmalloc64 "               &
2090
                                            "32 "                          &
2091
                                               "-mno-malloc64 "            &
2092
                                            "SHORT "                       &
2093
                                               "-mno-malloc64";
2094
   --        /POINTER_SIZE=64 (D)
2095
   --        /POINTER_SIZE[=(keyword[,...])]
2096
   --
2097
   --   Change how pointers and descriptors are allocated. The following
2098
   --   keywords are supported:
2099
   --
2100
   --        64 (D)       Allocate heap pointers in 64bit space except as
2101
   --                     constrained by a 32bit size clause or by
2102
   --                     Convention_C and generate 64bit descriptors for
2103
   --                     Descriptor mechanisms for calling imported
2104
   --                     subprograms and accept both 64bit and 32bit
2105
   --                     descriptors for calls to exported subprograms.
2106
   --
2107
   --        LONG         Equivalent to option 64.
2108
   --
2109
   --        32           Allocate all heap pointers in 32bit space and
2110
   --                     generate 32bit descriptors for Descriptor
2111
   --                     mechanisms for calling imported subprograms.
2112
   --
2113
   --        SHORT        Equivalent to option 32.
2114
 
2115
   S_GCC_Polling : aliased constant S := "/POLLING "                       &
2116
                                            "-gnatP";
2117
   --        /NOPOLLING (D)
2118
   --        /POLLING
2119
   --
2120
   --   Enable polling. See the description of pragma Polling in the GNAT
2121
   --   Reference Manual for full details.
2122
 
2123
   S_GCC_Project : aliased constant S := "/PROJECT_FILE=<"                 &
2124
                                            "-P>";
2125
   --        /PROJECT_FILE=filename
2126
   --
2127
   --   Specifies the main project file to be used. The project files rooted
2128
   --   at the main project file will be parsed before the invocation of the
2129
   --   compiler. The source and object directories to be searched will be
2130
   --   communicated to the compiler through logical names
2131
   --   ADA_PRJ_INCLUDE_FILE and ADA_PRJ_OBJECTS_FILE.
2132
 
2133
   S_GCC_Psta    : aliased constant S := "/PRINT_STANDARD "                &
2134
                                            "-gnatS";
2135
   --        /PRINT_STANDARD
2136
   --
2137
   --   cause the compiler to output a representation of package Standard
2138
   --   in a form very close to standard Ada. It is not quite possible to
2139
   --   do this and remain entirely Standard (since new numeric base types
2140
   --   cannot be created in standard Ada), but the output is easily
2141
   --   readable to any Ada programmer, and is useful to determine the
2142
   --   characteristics of target dependent types in package Standard.
2143
 
2144
   S_GCC_Reswarn : aliased constant S := "/TREAT_RESTRICTIONS_AS_WARNINGS " &
2145
                                             "-gnatr";
2146
 
2147
   --        /NO_TREAT_RESTRICTIONS_AS_WARNINGS (D)
2148
   --        /TREAT_RESTRICTIONS_AS_WARNINGS
2149
   --
2150
   --   Causes all restrictions to be treated as warnings (pragma Restriction
2151
   --   treated as Restriction_Warnings, pragma Profile as Profile_Warnings,
2152
   --   and pragma Ravenscar sets restriction warnings instead of restrictions)
2153
 
2154
   S_GCC_Report  : aliased constant S := "/REPORT_ERRORS="                 &
2155
                                            "VERBOSE "                     &
2156
                                               "-gnatv "                   &
2157
                                            "BRIEF "                       &
2158
                                               "-gnatb "                   &
2159
                                            "FULL "                        &
2160
                                               "-gnatf "                   &
2161
                                            "IMMEDIATE "                   &
2162
                                               "-gnatdO "                  &
2163
                                            "DEFAULT "                     &
2164
                                               "!-gnatb,!-gnatv";
2165
   --        /NOREPORT_ERRORS (D)
2166
   --        /REPORT_ERRORS[=(keyword[,...])]
2167
   --
2168
   --   Change the way errors are reported.  The following keywords are
2169
   --   supported:
2170
   --
2171
   --        VERBOSE (D)  Verbose mode. Full error output with source lines
2172
   --                     to SYS$OUTPUT.
2173
   --
2174
   --        BRIEF        Generate the brief format error messages to
2175
   --                     SYS$OUTPUT as well as the verbose format message or
2176
   --                     full listing.
2177
   --
2178
   --        FULL         Normally, the compiler suppresses error messages that
2179
   --                     are likely to be redundant. This keyword causes all
2180
   --                     error messages to be generated. One particular effect
2181
   --                     is for the case of references to undefined variables.
2182
   --                     If a given variable is referenced several times, the
2183
   --                     normal format of messages produces one error.  With
2184
   --                     FULL, each undefined reference produces a separate
2185
   --                     error message.
2186
   --
2187
   --        IMMEDIATE    Normally, the compiler saves up error messages and
2188
   --                     generates them at the end of compilation in proper
2189
   --                     sequence.  This keyword causes error messages to be
2190
   --                     generated as soon as they are detected. The use of
2191
   --                     IMMEDIATE usually causes error messages to be
2192
   --                     generated out of sequence. Use it when the compiler
2193
   --                     blows up due to an internal error.  In this case, the
2194
   --                     error messages may be lost. Sometimes blowups are
2195
   --                     the result of mishandled error messages, so you may
2196
   --                     want to run with this keyword to determine whether
2197
   --                     any error messages were generated.
2198
   --
2199
   --      DEFAULT        Turn off VERBOSE and BRIEF. Same as /NOREPORT_ERRORS.
2200
 
2201
   S_GCC_ReportX : aliased constant S := "/NOREPORT_ERRORS "               &
2202
                                            "!-gnatb,!-gnatv";
2203
   --  NODOC (see /REPORT_ERRORS)
2204
 
2205
   S_GCC_Repinfo : aliased constant S := "/REPRESENTATION_INFO="           &
2206
                                            "DEFAULT "                     &
2207
                                               "-gnatR "                   &
2208
                                            "NONE "                        &
2209
                                               "-gnatR0 "                  &
2210
                                            "ARRAYS "                      &
2211
                                               "-gnatR1 "                  &
2212
                                            "ARRAYS_FILE "                 &
2213
                                               "-gnatR1s "                 &
2214
                                            "OBJECTS "                     &
2215
                                               "-gnatR2 "                  &
2216
                                            "OBJECTS_FILE "                &
2217
                                               "-gnatR2s "                 &
2218
                                            "SYMBOLIC "                    &
2219
                                               "-gnatR3 "                  &
2220
                                            "SYMBOLIC_FILE "               &
2221
                                               "-gnatR3s";
2222
   --        /NOREPRESENTATION_INFO (D)
2223
   --        /REPRESENTATION_INFO[=(keyword[,...])]
2224
   --
2225
   --   This qualifier controls output from the compiler of a listing showing
2226
   --   representation information for declared types and objects.
2227
   --
2228
   --        ARRAYS (D)      Size and alignment information is listed for
2229
   --                        declared array and record types.
2230
   --
2231
   --        ARRAYS_FILE     Similar to ARRAYS, but the output is to a file
2232
   --                        with the name 'file_rep' where 'file' is the name
2233
   --                        of the corresponding source file.
2234
   --
2235
   --        NONE            no information is output (equivalent to omitting
2236
   --                        the /REPRESENTATION_INFO qualifiers).
2237
   --
2238
   --        OBJECTS         Size and alignment information is listed for all
2239
   --                        declared types and objects.
2240
   --
2241
   --        OBJECTS_FILE    Similar to OBJECTS, but the output is to a file
2242
   --                        with the name 'file_rep' where 'file' is the name
2243
   --                        of the corresponding source file.
2244
   --
2245
   --        SYMBOLIC        Symbolic expression information for values that
2246
   --                        are computed at run time for variant records.
2247
   --
2248
   --        SYMBOLIC_FILE   Similar to SYMBOLIC, but the output is to a file
2249
   --                        with the name 'file_rep' where 'file' is the name
2250
   --                        of the corresponding source file.
2251
   --
2252
   --        DEFAULT         Equivalent to ARRAYS.
2253
 
2254
   S_GCC_RepinfX : aliased constant S := "/NOREPRESENTATION_INFO "         &
2255
                                            "!-gnatR";
2256
   --  NODOC (see /REPRESENTATION_INFO)
2257
 
2258
   S_GCC_RTS     : aliased constant S := "/RUNTIME_SYSTEM=|"               &
2259
                                            "--RTS=|";
2260
   --        /RUNTIME_SYSTEM=xxx
2261
   --
2262
   --    Build against an alternate runtime system named xxx or RTS-xxx.
2263
 
2264
   S_GCC_SCO     : aliased constant S := "/SCO_OUTPUT "   &
2265
                                            "-gnateS";
2266
   --        /NOSCO_OUTPUT (D)
2267
   --        /SCO_OUTPUT
2268
   --
2269
   --   Controls the output of SCO (Source Coverage Obligation) information
2270
   --   in the generated ALI file. This information is used by advanced source
2271
   --   coverage tools. For a full description of the SCO format, see unit
2272
   --   SCOs in the compiler sources (sco.ads/sco.adb).
2273
 
2274
   S_GCC_Search  : aliased constant S := "/SEARCH=*"                       &
2275
                                            "-I*";
2276
   --        /SEARCH=(directory[,...])
2277
   --
2278
   --    When looking for source files also look in directories specified.
2279
 
2280
   S_GCC_Src_Info : aliased constant S := "/SRC_INFO=<"                    &
2281
                                             "--source-info=>";
2282
   --        /SRC_INFO=source-info-file
2283
   --
2284
   --   Specify a source info file to be read or written by the Project
2285
   --   Manager when project files are used.
2286
 
2287
   S_GCC_Style   : aliased constant S := "/STYLE_CHECKS="                  &
2288
                                            "ALL_BUILTIN "                 &
2289
                                               "-gnatyy "                  &
2290
                                            "0 "                           &
2291
                                               "-gnaty0 "                  &
2292
                                            "1 "                           &
2293
                                               "-gnaty1 "                  &
2294
                                            "2 "                           &
2295
                                               "-gnaty2 "                  &
2296
                                            "3 "                           &
2297
                                               "-gnaty3 "                  &
2298
                                            "4 "                           &
2299
                                               "-gnaty4 "                  &
2300
                                            "5 "                           &
2301
                                               "-gnaty5 "                  &
2302
                                            "6 "                           &
2303
                                               "-gnaty6 "                  &
2304
                                            "7 "                           &
2305
                                               "-gnaty7 "                  &
2306
                                            "8 "                           &
2307
                                               "-gnaty8 "                  &
2308
                                            "9 "                           &
2309
                                               "-gnaty9 "                  &
2310
                                            "ATTRIBUTE "                   &
2311
                                               "-gnatya "                  &
2312
                                            "NOATTRIBUTE "                 &
2313
                                               "-gnaty-a "                 &
2314
                                            "ARRAY_INDEXES "               &
2315
                                               "-gnatyA "                  &
2316
                                            "NOARRAY_INDEXES "             &
2317
                                               "-gnaty-A "                 &
2318
                                            "BLANKS "                      &
2319
                                               "-gnatyb "                  &
2320
                                            "NOBLANKS "                    &
2321
                                               "-gnaty-b "                 &
2322
                                            "BOOLEAN_OPERATORS "           &
2323
                                               "-gnatyB "                  &
2324
                                            "NOBOOLEAN_OPERATORS "         &
2325
                                               "-gnaty-B "                 &
2326
                                            "COMMENTS "                    &
2327
                                               "-gnatyc "                  &
2328
                                            "COMMENTS1 "                   &
2329
                                               "-gnatyC "                  &
2330
                                            "COMMENTS2 "                   &
2331
                                               "-gnatyc "                  &
2332
                                            "NOCOMMENTS "                  &
2333
                                               "-gnaty-c "                 &
2334
                                            "DOS_LINE_ENDINGS "            &
2335
                                               "-gnatyd "                  &
2336
                                            "NODOS_LINE_ENDINGS "          &
2337
                                               "-gnaty-d "                 &
2338
                                            "END "                         &
2339
                                               "-gnatye "                  &
2340
                                            "NOEND "                       &
2341
                                               "-gnaty-e "                 &
2342
                                            "VTABS "                       &
2343
                                               "-gnatyf "                  &
2344
                                            "NOVTABS "                     &
2345
                                               "-gnaty-f "                 &
2346
                                            "GNAT "                        &
2347
                                               "-gnatyg "                  &
2348
                                            "HTABS "                       &
2349
                                               "-gnatyh "                  &
2350
                                            "NOHTABS "                     &
2351
                                               "-gnaty-h "                 &
2352
                                            "IF_THEN "                     &
2353
                                               "-gnatyi "                  &
2354
                                            "NOIF_THEN "                   &
2355
                                               "-gnaty-i "                 &
2356
                                            "KEYWORD "                     &
2357
                                               "-gnatyk "                  &
2358
                                            "NOKEYWORD "                   &
2359
                                               "-gnaty-k "                 &
2360
                                            "LAYOUT "                      &
2361
                                               "-gnatyl "                  &
2362
                                            "NOLAYOUT "                    &
2363
                                               "-gnaty-l "                 &
2364
                                            "LINE_LENGTH "                 &
2365
                                               "-gnatym "                  &
2366
                                            "NOLINE_LENGTH "               &
2367
                                               "-gnaty-m "                 &
2368
                                            "MODE_IN "                     &
2369
                                               "-gnatyI "                  &
2370
                                            "NOMODE_IN "                   &
2371
                                               "-gnaty-I "                 &
2372
                                            "NONE "                        &
2373
                                               "-gnatyN "                  &
2374
                                            "STANDARD_CASING "             &
2375
                                               "-gnatyn "                  &
2376
                                            "NOSTANDARD_CASING "           &
2377
                                               "-gnaty-n "                 &
2378
                                            "ORDERED_SUBPROGRAMS "         &
2379
                                               "-gnatyo "                  &
2380
                                            "NOORDERED_SUBPROGRAMS "       &
2381
                                               "-gnaty-o "                 &
2382
                                            "OVERRIDING_INDICATORS "       &
2383
                                               "-gnatyO "                  &
2384
                                            "NOOVERRIDING_INDICATORS "     &
2385
                                               "-gnaty-O "                 &
2386
                                            "PRAGMA "                      &
2387
                                               "-gnatyp "                  &
2388
                                            "NOPRAGMA "                    &
2389
                                               "-gnaty-p "                 &
2390
                                            "REFERENCES "                  &
2391
                                               "-gnatyr "                  &
2392
                                            "NOREFERENCES "                &
2393
                                               "-gnaty-r "                 &
2394
                                            "SPECS "                       &
2395
                                               "-gnatys "                  &
2396
                                            "NOSPECS "                     &
2397
                                               "-gnaty-s "                 &
2398
                                            "STATEMENTS_AFTER_THEN_ELSE "  &
2399
                                               "-gnatyS "                  &
2400
                                            "NOSTATEMENTS_AFTER_THEN_ELSE " &
2401
                                               "-gnaty-S "                 &
2402
                                            "TOKEN "                       &
2403
                                               "-gnatyt "                  &
2404
                                            "NOTOKEN "                     &
2405
                                               "-gnaty-t "                 &
2406
                                            "UNNECESSARY_BLANK_LINES "     &
2407
                                               "-gnatyu "                  &
2408
                                            "NOUNNECESSARY_BLANK_LINES "   &
2409
                                               "-gnaty-u "                 &
2410
                                            "XTRA_PARENS "                 &
2411
                                               "-gnaty-x "                 &
2412
                                            "NOXTRA_PARENS "               &
2413
                                               "-gnaty-x ";
2414
   --        /NOSTYLE_CHECKS (D)
2415
   --        /STYLE_CHECKS[=(keyword,[...])]
2416
   --
2417
   --   Normally, GNAT permits any code layout consistent with the reference
2418
   --   manual requirements.  This qualifier imposes style checking on the
2419
   --   input source code.  The following keywords are supported:
2420
   --
2421
   --      ALL_BUILTIN (D)      Equivalent to the following list of options:
2422
   --                           3, ATTRIBUTE, BLANKS, COMMENTS2, END, VTABS,
2423
   --                           HTABS, IF_THEN, KEYWORD, LAYOUT, LINE_LENGTH,
2424
   --                           PRAGMA, REFERENCES, SPECS, TOKEN.
2425
   --
2426
   --      1 .. 9               Specify indentation level from 1 to 9.
2427
   --                           The general style of required indentation is as
2428
   --                           specified by the examples in the Ada Reference
2429
   --                           Manual. Full line comments must be aligned with
2430
   --                           the -- starting on a column that is a multiple
2431
   --                           of the alignment level.
2432
   --
2433
   --      ATTRIBUTE            Check attribute casing.
2434
   --                           Attribute names, including the case of keywords
2435
   --                           such as digits used as attributes names,
2436
   --                           must be written in mixed case, that is,
2437
   --                           the initial letter and any letter following an
2438
   --                           underscore must be uppercase.
2439
   --                           All other letters must be lowercase.
2440
   --
2441
   --      ARRAY_INDEXES        Check indexes of array attributes.
2442
   --                           For array attributes First, Last, Range,
2443
   --                           or Length, the index number must be omitted
2444
   --                           for one-dimensional arrays and is required
2445
   --                           for multi-dimensional arrays.
2446
   --
2447
   --      BLANKS               Blanks not allowed at statement end.
2448
   --                           Trailing blanks are not allowed at the end of
2449
   --                           statements. The purpose of this rule, together
2450
   --                           with option HTABS (no horizontal tabs), is to
2451
   --                           enforce a canonical format for the use of
2452
   --                           blanks to separate source tokens.
2453
   --
2454
   --      COMMENTS2            Check comments.
2455
   --      COMMENTS             Comments must meet the following set of rules:
2456
   --
2457
   --                             * The "--" that starts the column must either
2458
   --                               start in column one, or else at least one
2459
   --                               blank must precede this sequence.
2460
   --
2461
   --                             * Comments that follow other tokens on a line
2462
   --                               must have at least one blank following the
2463
   --                               "--" at the start of the comment.
2464
   --
2465
   --                             * Full line comments must have two blanks
2466
   --                               following the "--" that starts the comment,
2467
   --                               with the following exceptions.
2468
   --
2469
   --                             * A line consisting only of the "--"
2470
   --                               characters, possibly preceded by blanks is
2471
   --                               permitted.
2472
   --
2473
   --                             * A comment starting with "--x" where x is
2474
   --                               a special character is permitted. This
2475
   --                               allows proper processing of the output
2476
   --                               generated by specialized tools including
2477
   --                               gnatprep (where --! is used) and the SPARK
2478
   --                               annotation language (where --# is used).
2479
   --                               For the purposes of this rule, a special
2480
   --                               character is defined as being in one of the
2481
   --                               ASCII ranges 16#21#..16#2F# or
2482
   --                               16#3A#..16#3F#.
2483
   --
2484
   --                             * A line consisting entirely of minus signs,
2485
   --                               possibly preceded by blanks, is permitted.
2486
   --                               This allows the construction of box
2487
   --                               comments where lines of minus signs are
2488
   --                               used to form the top and bottom of the box.
2489
   --
2490
   --                             * If a comment starts and ends with "--" is
2491
   --                               permitted as long as at least one blank
2492
   --                               follows the initial "--". Together with
2493
   --                               the preceding rule, this allows the
2494
   --                               construction of box comments, as shown in
2495
   --                               the following example:
2496
   --
2497
   --                               ---------------------------
2498
   --                               -- This is a box comment --
2499
   --                               ---------------------------
2500
   --
2501
   --      COMMENTS1            Check comments (single space).
2502
   --                           Like COMMENTS2, but the -- of a comment only
2503
   --                           requires one or more spaces following, instead
2504
   --                           of two or more spaces.
2505
   --
2506
   --      DOS_LINE_ENDINGS     Check that no DOS line terminators are present
2507
   --                           All lines must be terminated by a single
2508
   --                           ASCII.LF character. In particular the DOS line
2509
   --                           terminator sequence CR / LF is not allowed).
2510
   --
2511
   --      END                  Check end/exit labels.
2512
   --                           Optional labels on end statements ending
2513
   --                           subprograms and on exit statements exiting
2514
   --                           named loops, are required to be present.
2515
   --
2516
   --      GNAT                 Enforces a set of style conventions that
2517
   --                           match the style used in the GNAT source code.
2518
   --                           This maybe useful when developing code that
2519
   --                           is eventually intended to be incorporated into
2520
   --                           GNAT. For further details, see GNAT sources.
2521
   --
2522
   --      HTABS                No horizontal tabs.
2523
   --                           Horizontal tab characters are not permitted in
2524
   --                           the source text. Together with the BLANKS
2525
   --                           (no blanks at end of line) option, this
2526
   --                           enforces a canonical form for the use of blanks
2527
   --                           to separate source tokens.
2528
   --
2529
   --      IF_THEN              Check if-then layout.
2530
   --                           The keyword then must appear either on the
2531
   --                           same line as the corresponding if, or on a line
2532
   --                           on its own, lined up under the if with at least
2533
   --                           one non-blank line in between containing all or
2534
   --                           part of the condition to be tested.
2535
   --
2536
   --      KEYWORD              Check keyword casing.
2537
   --                           All keywords must be in lower case (with the
2538
   --                           exception of keywords such as digits used as
2539
   --                           attribute names to which this check does not
2540
   --                           apply).
2541
   --
2542
   --      LAYOUT               Check layout.
2543
   --                           Layout of statement and declaration constructs
2544
   --                           must follow the recommendations in the Ada
2545
   --                           Reference Manual, as indicated by the form of
2546
   --                           the syntax rules. For example an else keyword
2547
   --                           must be lined up with the corresponding if
2548
   --                           keyword.
2549
   --
2550
   --                           There are two respects in which the style rule
2551
   --                           enforced by this check option are more liberal
2552
   --                           than those in the Ada Reference Manual.
2553
   --                           First in the case of record declarations,
2554
   --                           it is permissible to put the record keyword on
2555
   --                           the same line as the type keyword, and then
2556
   --                           the end in end record must line up under type.
2557
   --                           For example, either of the following two
2558
   --                           layouts is acceptable:
2559
   --
2560
   --                           type q is record
2561
   --                              a : integer;
2562
   --                              b : integer;
2563
   --                           end record;
2564
   --
2565
   --                           type q is
2566
   --                              record
2567
   --                                 a : integer;
2568
   --                                 b : integer;
2569
   --                              end record;
2570
   --
2571
   --                           Second, in the case of a block statement,
2572
   --                           a permitted alternative is to put the block
2573
   --                           label on the same line as the declare or begin
2574
   --                           keyword, and then line the end keyword up under
2575
   --                           the block label. For example both the following
2576
   --                           are permitted:
2577
   --
2578
   --
2579
   --
2580
   --                           Block : declare
2581
   --                              A : Integer := 3;
2582
   --                           begin
2583
   --                              Proc (A, A);
2584
   --                           end Block;
2585
   --
2586
   --                           Block :
2587
   --                              declare
2588
   --                                 A : Integer := 3;
2589
   --                              begin
2590
   --                                 Proc (A, A);
2591
   --                              end Block;
2592
   --
2593
   --                           The same alternative format is allowed for
2594
   --                           loops. For example, both of the following are
2595
   --                           permitted:
2596
   --
2597
   --
2598
   --
2599
   --                           Clear : while J < 10 loop
2600
   --                              A (J) := 0;
2601
   --                           end loop Clear;
2602
   --
2603
   --                           Clear :
2604
   --                              while J < 10 loop
2605
   --                                 A (J) := 0;
2606
   --                              end loop Clear;
2607
   --
2608
   --
2609
   --
2610
   --      LINE_LENGTH          Check maximum line length.
2611
   --                           The length of source lines must not exceed 79
2612
   --                           characters, including any trailing blanks
2613
   --                           The value of 79 allows convenient display on
2614
   --                           an 80 character wide device or window, allowing
2615
   --                           for possible special treatment of 80 character
2616
   --                           lines.
2617
   --
2618
   --      NONE                 Clear any previously set style checks.
2619
   --
2620
   --      ORDERED_SUBPROGRAMS  Check order of subprogram bodies.
2621
   --                           All subprogram bodies in a given scope (e.g.
2622
   --                           a package body) must be in alphabetical order.
2623
   --                           The ordering rule uses normal Ada rules for
2624
   --                           comparing strings, ignoring casing of letters,
2625
   --                           except that if there is a trailing numeric
2626
   --                           suffix, then the value of this suffix is used
2627
   --                           in the ordering (e.g. Junk2 comes before
2628
   --                           Junk10).
2629
   --
2630
   --      OVERRIDING_INDICATORS Check that overriding subprograms are
2631
   --                           explicitly marked as such. The declaration of
2632
   --                           a primitive operation of a type extension that
2633
   --                           overrides an inherited operation must carry
2634
   --                           an overriding indicator.
2635
   --
2636
   --      PRAGMA               Check pragma casing.
2637
   --                           Pragma names must be written in mixed case,
2638
   --                           that is, the initial letter and any letter
2639
   --                           following an underscore must be uppercase.
2640
   --                           All other letters must be lowercase.
2641
   --
2642
   --      REFERENCES           Check references.
2643
   --                           All identifier references must be cased in the
2644
   --                           same way as the corresponding declaration.
2645
   --                           No specific casing style is imposed on
2646
   --                           identifiers. The only requirement is for
2647
   --                           consistency of references with declarations.
2648
   --
2649
   --      SPECS                Check separate specs.
2650
   --                           Separate declarations ("specs") are required
2651
   --                           for subprograms (a body is not allowed to serve
2652
   --                           as its own declaration). The only exception is
2653
   --                           that parameterless library level procedures are
2654
   --                           not required to have a separate declaration.
2655
   --                           This exception covers the most frequent form of
2656
   --                           main program procedures.
2657
   --
2658
   --      STANDARD_CASING      Check casing of entities in Standard.
2659
   --                           Any identifier from Standard must be cased to
2660
   --                           match the presentation in the Ada Reference
2661
   --                           Manual (for example, Integer and ASCII.NUL).
2662
   --
2663
   --      TOKEN                Check token spacing.
2664
   --                           The following token spacing rules are enforced:
2665
   --
2666
   --                             * The keywords abs and not must be followed
2667
   --                               by a space.
2668
   --
2669
   --                             * The token => must be surrounded by spaces.
2670
   --
2671
   --                             * The token <> must be preceded by a space or
2672
   --                               a left parenthesis.
2673
   --
2674
   --                             * Binary operators other than ** must be
2675
   --                               surrounded by spaces. There is no
2676
   --                               restriction on the layout of the ** binary
2677
   --                               operator.
2678
   --
2679
   --                             * Colon must be surrounded by spaces.
2680
   --
2681
   --                             * Colon-equal (assignment) must be surrounded
2682
   --                               by spaces.
2683
   --
2684
   --                             * Comma must be the first non-blank character
2685
   --                               on the line, or be immediately preceded by
2686
   --                               a non-blank character, and must be followed
2687
   --                               by a space.
2688
   --
2689
   --                             * If the token preceding a left paren ends
2690
   --                               with a letter or digit, then a space must
2691
   --                               separate the two tokens.
2692
   --
2693
   --                             * A right parenthesis must either be the
2694
   --                               first non-blank character on a line, or it
2695
   --                               must be preceded by a non-blank character.
2696
   --
2697
   --                             * A semicolon must not be preceded by
2698
   --                               a space, and must not be followed by
2699
   --                               a non-blank character.
2700
   --
2701
   --                             * A unary plus or minus may not be followed
2702
   --                               by a space.
2703
   --
2704
   --                             * A vertical bar must be surrounded by
2705
   --                               spaces.
2706
   --
2707
   --                           In the above rules, appearing in column one is
2708
   --                           always permitted, that is, counts as meeting
2709
   --                           either a requirement for a required preceding
2710
   --                           space, or as meeting a requirement for no
2711
   --                           preceding space.
2712
   --
2713
   --                           Appearing at the end of a line is also always
2714
   --                           permitted, that is, counts as meeting either
2715
   --                           a requirement for a following space,
2716
   --                           or as meeting a requirement for no following
2717
   --                           space.
2718
   --
2719
   --      UNNECESSARY_BLANK_LINES
2720
   --                           Check for unnecessary blank lines.
2721
   --                           A blank line is considered unnecessary if it
2722
   --                           appears at the end of the file, or if more
2723
   --                           than one blank line occurs in sequence.
2724
   --
2725
   --      VTABS                No form feeds or vertical tabs.
2726
   --                           Form feeds or vertical tab characters are not
2727
   --                           permitted in the source text.
2728
   --
2729
   --      XTRA_PARENS          Check for the use of an unnecessary extra
2730
   --                           level of parentheses (C - style) around
2731
   --                           conditions in if statements, while statements
2732
   --                           and exit statements.
2733
 
2734
   S_GCC_StyleX  : aliased constant S := "/NOSTYLE_CHECKS "                &
2735
                                            "!-gnatg,!-gnaty*";
2736
   --  NODOC (see /STYLE_CHECKS)
2737
 
2738
   S_GCC_Subdirs : aliased constant S := "/SUBDIRS=<"                      &
2739
                                            "--subdirs=>";
2740
   --        /SUBDIRS=dir
2741
   --
2742
   --   The actual directories (object, exec, library, ...) are subdirectories
2743
   --   of the directory specified in the project file. If the subdirectory
2744
   --   does not exist, it is created automatically.
2745
 
2746
   S_GCC_Symbol  : aliased constant S := "/SYMBOL_PREPROCESSING=" & '"'    &
2747
                                            "-gnateD" & '"';
2748
   --        /SYMBOL_PREPROCESSING="symbol=value"
2749
   --
2750
   --   Define or redefine a preprocessing symbol, associated with value.
2751
   --   If "=value" is not specified, then the value of the symbol is True.
2752
   --   A symbol is an identifier, following normal Ada (case-insensitive)
2753
   --   rules for its syntax, and value is any sequence (including an empty
2754
   --   sequence) of characters from the set (letters, digits, period,
2755
   --   underline). Ada reserved words may be used as symbols, with the
2756
   --   exceptions of "if", "else", "elsif", "end", "and", "or" and "then".
2757
   --
2758
   --   A symbol declared with this qualifier on the command line replaces
2759
   --   a symbol with the same name either in a definition file or specified
2760
   --   with a switch -D in the preprocessor data file.
2761
   --
2762
   --   This qualifier is similar to qualifier /ASSOCIATE of
2763
   --   GNAT PREPROCESSING.
2764
 
2765
   S_GCC_Syntax  : aliased constant S := "/SYNTAX_ONLY "                   &
2766
                                            "-gnats";
2767
   --        /NOSYNTAX_ONLY (D)
2768
   --        /SYNTAX_ONLY
2769
   --
2770
   --   Run GNAT in syntax checking only mode.  You can check a series of
2771
   --   files in a single command, and can use wild cards to specify such a
2772
   --   group of files.
2773
   --
2774
   --   You may use other qualifiers in conjunction with this qualifier. In
2775
   --   particular, /LIST and /REPORT_ERRORS=VERBOSE are useful to control the
2776
   --   format of any generated error messages.
2777
   --
2778
   --   The output is simply the error messages, if any. No object file or ALI
2779
   --   file is generated by a syntax-only compilation. Also, no units other
2780
   --   than the one specified are accessed. For example, if a unit "X" with's
2781
   --   a unit "Y", compiling unit "X" in syntax check only mode does not
2782
   --   access the source file containing unit "Y".
2783
   --
2784
   --   Normally, GNAT allows only a single unit in a source file. However,
2785
   --   this restriction does not apply in syntax-check-only mode, and it is
2786
   --   possible to check a file containing multiple compilation units
2787
   --   concatenated together. This is primarily used by the GNAT CHOP
2788
   --   command.
2789
 
2790
   S_GCC_Table   : aliased constant S := "/TABLE_MULTIPLIER=#"             &
2791
                                            "-gnatT#";
2792
   --        /TABLE_MULTIPLIER=nnn
2793
   --
2794
   --   All compiler tables start at nnn times usual starting size.
2795
 
2796
   S_GCC_Trace   : aliased constant S := "/TRACE_UNITS "                   &
2797
                                            "-gnatdc";
2798
   --        /TRACE_UNITS
2799
   --        /NOTRACE_UNITS
2800
   --
2801
   --   This switch that does for the frontend what /VERBOSE does for the
2802
   --   backend. The system prints the name of each unit, either a compilation
2803
   --   unit or nested unit, as it is being analyzed.
2804
 
2805
   S_GCC_Tree    : aliased constant S := "/TREE_OUTPUT "                   &
2806
                                            "-gnatt";
2807
   --        /TREE_OUTPUT
2808
   --        /NOTREE_OUTPUT
2809
   --
2810
   --   Cause GNAT to write the internal tree for a unit to a file (with the
2811
   --   filetype ATB for a body or ATS for a spec).  This is not normally
2812
   --   required, but is used by separate analysis tools. Typically these
2813
   --   tools do the necessary compilations automatically, so you should never
2814
   --   have to specify this switch in normal operation.
2815
 
2816
   S_GCC_Trys    : aliased constant S := "/TRY_SEMANTICS "                 &
2817
                                            "-gnatq";
2818
   --        /TRY_SEMANTICS
2819
   --        /NOTRY_SEMANTICS
2820
   --
2821
   --   In normal operation mode the compiler first parses the program and
2822
   --   determines if there are any syntax errors. If there are, appropriate
2823
   --   error messages are generated and compilation is immediately
2824
   --   terminated.  This qualifier tells GNAT to continue with semantic
2825
   --   analysis even if syntax errors have been found.  This may enable the
2826
   --   detection of more errors in a single run. On the other hand, the
2827
   --   semantic analyzer is more likely to encounter some internal fatal
2828
   --   error when given a syntactically invalid tree.
2829
 
2830
   S_GCC_USL : aliased constant S := "/UNCHECKED_SHARED_LIB_IMPORTS "      &
2831
                                         "--unchecked-shared-lib-imports";
2832
   --        /NOUNCHECKED_SHARED_LIB_IMPORTS (D)
2833
   --        /UNCHECKED_SHARED_LIB_IMPORTS
2834
   --
2835
   --   Allow shared library projects to import static library projects
2836
 
2837
   S_GCC_Units   : aliased constant S := "/UNITS_LIST "                    &
2838
                                            "-gnatu";
2839
   --        /NOUNITS_LIST (D)
2840
   --        /UNITS_LIST
2841
   --
2842
   --   Print a list of units required by this compilation on SYS$OUTPUT.  The
2843
   --   listing includes all units on which the unit being compiled depends
2844
   --   either directly or indirectly.
2845
 
2846
   S_GCC_Unique  : aliased constant S := "/UNIQUE_ERROR_TAG "              &
2847
                                            "-gnatU";
2848
   --        /NOUNIQUE_ERROR_TAG (D)
2849
   --        /UNIQUE_ERROR_TAG
2850
   --
2851
   --   Tag compiler error messages with the string "error: ".
2852
 
2853
   S_GCC_Upcase  : aliased constant S := "/UPPERCASE_EXTERNALS "           &
2854
                                            "-gnatF";
2855
   --        /NOUPPERCASE_EXTERNALS (D)
2856
   --        /UPPERCASE_EXTERNALS
2857
   --
2858
   --   Fold default and explicit external names in pragmas Import and Export
2859
   --   to uppercase for compatibility with the default behavior of DEC C.
2860
 
2861
   S_GCC_Valid   : aliased constant S := "/VALIDITY_CHECKING="             &
2862
                                            "DEFAULT "                     &
2863
                                               "-gnatVd "                  &
2864
                                            "NODEFAULT "                   &
2865
                                               "-gnatVD "                  &
2866
                                            "COPIES "                      &
2867
                                               "-gnatVc "                  &
2868
                                            "NOCOPIES "                    &
2869
                                               "-gnatVC "                  &
2870
                                            "COMPONENTS "                  &
2871
                                               "-gnatVe "                  &
2872
                                            "NOCOMPONENTS "                &
2873
                                               "-gnatVE "                  &
2874
                                            "FLOATS "                      &
2875
                                               "-gnatVf "                  &
2876
                                            "NOFLOATS "                    &
2877
                                               "-gnatVF "                  &
2878
                                            "IN_PARAMS "                   &
2879
                                               "-gnatVi "                  &
2880
                                            "NOIN_PARAMS "                 &
2881
                                               "-gnatVI "                  &
2882
                                            "MOD_PARAMS "                  &
2883
                                               "-gnatVm "                  &
2884
                                            "NOMOD_PARAMS "                &
2885
                                               "-gnatVM "                  &
2886
                                            "OPERANDS "                    &
2887
                                               "-gnatVo "                  &
2888
                                            "NOOPERANDS "                  &
2889
                                               "-gnatVO "                  &
2890
                                            "PARAMETERS "                  &
2891
                                               "-gnatVp "                  &
2892
                                            "NOPARAMETERS "                &
2893
                                               "-gnatVP "                  &
2894
                                            "RETURNS "                     &
2895
                                               "-gnatVr "                  &
2896
                                            "NORETURNS "                   &
2897
                                               "-gnatVR "                  &
2898
                                            "SUBSCRIPTS "                  &
2899
                                               "-gnatVs "                  &
2900
                                            "NOSUBSCRIPTS "                &
2901
                                               "-gnatVS "                  &
2902
                                            "TESTS "                       &
2903
                                               "-gnatVt "                  &
2904
                                            "NOTESTS "                     &
2905
                                               "-gnatVT "                  &
2906
                                            "ALL "                         &
2907
                                               "-gnatVa "                  &
2908
                                            "NONE "                        &
2909
                                               "-gnatVn";
2910
   --        /VALIDITY_CHECKING[=(keyword,[...])]
2911
   --
2912
   --   Control level of validity checking.
2913
   --
2914
   --        DEFAULT (D)     In this mode checks are made to prevent
2915
   --                        erroneous behavior in accordance with the RM.
2916
   --                        Notably extra checks may be needed for case
2917
   --                        statements and subscripted array assignments.
2918
   --
2919
   --        NONE            No special checks for invalid values are
2920
   --                        performed. This means that references to
2921
   --                        uninitialized variables can cause erroneous
2922
   --                        behavior from constructs like case statements
2923
   --                        and subscripted array assignments. In this
2924
   --                        mode, invalid values can lead to erroneous
2925
   --                        behavior.
2926
   --
2927
   --        FULL            Every assignment is checked for validity, so
2928
   --                        that it is impossible to assign invalid values.
2929
   --                        The RM specifically allows such assignments,
2930
   --                        but in this mode, invalid values can never be
2931
   --                        assigned, and an attempt to perform such an
2932
   --                        assignment immediately raises Constraint_Error.
2933
   --                        This behavior is allowed (but not required) by
2934
   --                        the RM. This mode is intended as a debugging aid,
2935
   --                        and may be useful in helping to track down
2936
   --                        uninitialized variables. It may be useful to
2937
   --                        use this in conjunction with the Normalize_Scalars
2938
   --                        pragma which attempts to initialize with invalid
2939
   --                        values where possible.
2940
 
2941
   S_GCC_Verbose : aliased constant S := "/VERBOSE "                       &
2942
                                            "-v";
2943
   --        /VERBOSE
2944
   --        /NOVERBOSE
2945
   --
2946
   --   Show commands generated by the GCC driver. Normally used only for
2947
   --   debugging purposes or if you need to be sure what version of the
2948
   --   compiler you are executing.
2949
 
2950
   S_GCC_Verb_Asm : aliased constant S := "/VERBOSE_ASM " &
2951
                                          "-S,-verbose_asm,!-c";
2952
   --        /NOASM (D)
2953
   --        /ASM
2954
   --
2955
   --   Use to cause the assembler source file to be generated, using S as the
2956
   --   filetype, instead of the object file. This may be useful if you need
2957
   --   to examine the generated assembly code.
2958
 
2959
   S_GCC_Warn    : aliased constant S := "/WARNINGS="                      &
2960
                                            "DEFAULT "                     &
2961
                                               "!-gnatws,!-gnatwe "        &
2962
                                            "ALL "                         &
2963
                                               "-gnatwa "                  &
2964
                                            "EVERY "                       &
2965
                                               "-gnatw.e "                 &
2966
                                            "OPTIONAL "                    &
2967
                                               "-gnatwa "                  &
2968
                                            "NOOPTIONAL "                  &
2969
                                               "-gnatwA "                  &
2970
                                            "NOALL "                       &
2971
                                               "-gnatwA "                  &
2972
                                            "ALL_GCC "                     &
2973
                                               "-Wall "                    &
2974
                                            "FAILING_ASSERTIONS "          &
2975
                                               "-gnatw.a "                 &
2976
                                            "NO_FAILING_ASSERTIONS "       &
2977
                                               "-gnatw.A "                 &
2978
                                            "BAD_FIXED_VALUES "            &
2979
                                               "-gnatwb "                  &
2980
                                            "NO_BAD_FIXED_VALUES "         &
2981
                                               "-gnatwB "                  &
2982
                                            "BIASED_REPRESENTATION "       &
2983
                                               "-gnatw.b "                 &
2984
                                            "NO_BIASED_REPRESENTATION "    &
2985
                                               "-gnatw.B "                 &
2986
                                            "CONDITIONALS "                &
2987
                                               "-gnatwc "                  &
2988
                                            "NOCONDITIONALS "              &
2989
                                               "-gnatwC "                  &
2990
                                            "MISSING_COMPONENT_CLAUSES "   &
2991
                                               "-gnatw.c "                 &
2992
                                            "NOMISSING_COMPONENT_CLAUSES " &
2993
                                               "-gnatw.C "                 &
2994
                                            "IMPLICIT_DEREFERENCE "        &
2995
                                               "-gnatwd "                  &
2996
                                            "NO_IMPLICIT_DEREFERENCE "     &
2997
                                               "-gnatwD "                  &
2998
                                            "ERRORS "                      &
2999
                                               "-gnatwe "                  &
3000
                                            "UNREFERENCED_FORMALS "        &
3001
                                               "-gnatwf "                  &
3002
                                            "NOUNREFERENCED_FORMALS "      &
3003
                                               "-gnatwF "                  &
3004
                                            "UNRECOGNIZED_PRAGMAS "        &
3005
                                               "-gnatwg "                  &
3006
                                            "NOUNRECOGNIZED_PRAGMAS "      &
3007
                                               "-gnatwG "                  &
3008
                                            "HIDING "                      &
3009
                                               "-gnatwh "                  &
3010
                                            "NOHIDING "                    &
3011
                                               "-gnatwH "                  &
3012
                                            "AVOIDGAPS "                   &
3013
                                               "-gnatw.h "                 &
3014
                                            "NOAVOIDGAPS "                 &
3015
                                               "-gnatw.H "                 &
3016
                                            "IMPLEMENTATION "              &
3017
                                               "-gnatwi "                  &
3018
                                            "NOIMPLEMENTATION "            &
3019
                                               "-gnatwI "                  &
3020
                                            "OBSOLESCENT "                 &
3021
                                               "-gnatwj "                  &
3022
                                            "NOOBSOLESCENT "               &
3023
                                               "-gnatwJ "                  &
3024
                                            "CONSTANT_VARIABLES "          &
3025
                                               "-gnatwk "                  &
3026
                                            "NOCONSTANT_VARIABLES "        &
3027
                                               "-gnatwK "                  &
3028
                                            "ELABORATION "                 &
3029
                                               "-gnatwl "                  &
3030
                                            "NOELABORATION "               &
3031
                                               "-gnatwL "                  &
3032
                                            "MODIFIED_UNREF "              &
3033
                                               "-gnatwm "                  &
3034
                                            "NOMODIFIED_UNREF "            &
3035
                                               "-gnatwM "                  &
3036
                                            "SUSPICIOUS_MODULUS "          &
3037
                                               "-gnatw.m "                 &
3038
                                            "NOSUSPICIOUS_MODULUS "        &
3039
                                               "-gnatw.M "                 &
3040
                                            "NORMAL "                      &
3041
                                               "-gnatwn "                  &
3042
                                            "OVERLAYS "                    &
3043
                                               "-gnatwo "                  &
3044
                                            "NOOVERLAYS "                  &
3045
                                               "-gnatwO "                  &
3046
                                            "OUT_PARAM_UNREF "             &
3047
                                               "-gnatw.o "                 &
3048
                                            "NOOUT_PARAM_UNREF "           &
3049
                                               "-gnatw.O "                 &
3050
                                            "INEFFECTIVE_INLINE "          &
3051
                                               "-gnatwp "                  &
3052
                                            "NOINEFFECTIVE_INLINE "        &
3053
                                               "-gnatwP "                  &
3054
                                            "MISSING_PARENS "              &
3055
                                               "-gnatwq "                  &
3056
                                            "PARAMETER_ORDER "             &
3057
                                               "-gnatw.p "                 &
3058
                                            "NOPARAMETER_ORDER "           &
3059
                                               "-gnatw.P "                 &
3060
                                            "NOMISSING_PARENS "            &
3061
                                               "-gnatwQ "                  &
3062
                                            "REDUNDANT "                   &
3063
                                               "-gnatwr "                  &
3064
                                            "NOREDUNDANT "                 &
3065
                                               "-gnatwR "                  &
3066
                                            "OBJECT_RENAMES "              &
3067
                                               "-gnatw.r "                 &
3068
                                            "NOOBJECT_RENAMES "            &
3069
                                               "-gnatw.R "                 &
3070
                                            "SUPPRESS "                    &
3071
                                               "-gnatws "                  &
3072
                                            "OVERRIDING_SIZE "             &
3073
                                               "-gnatw.s "                 &
3074
                                            "NOOVERRIDING_SIZE "           &
3075
                                               "-gnatw.S "                 &
3076
                                            "DELETED_CODE "                &
3077
                                               "-gnatwt "                  &
3078
                                            "NODELETED_CODE "              &
3079
                                               "-gnatwT "                  &
3080
                                            "UNINITIALIZED "               &
3081
                                               "-Wuninitialized "          &
3082
                                            "UNUSED "                      &
3083
                                               "-gnatwu "                  &
3084
                                            "NOUNUSED "                    &
3085
                                               "-gnatwU "                  &
3086
                                            "UNORDERED_ENUMERATIONS "      &
3087
                                               "-gnatw.u "                 &
3088
                                            "NOUNORDERED_ENUMERATIONS "    &
3089
                                               "-gnatw.U "                 &
3090
                                            "VARIABLES_UNINITIALIZED "     &
3091
                                               "-gnatwv "                  &
3092
                                            "NOVARIABLES_UNINITIALIZED "   &
3093
                                               "-gnatwV "                  &
3094
                                            "REVERSE_BIT_ORDER "           &
3095
                                               "-gnatw.v "                 &
3096
                                            "NOREVERSE_BIT_ORDER "         &
3097
                                               "-gnatw.V "                 &
3098
                                            "LOWBOUND_ASSUMED "            &
3099
                                               "-gnatww "                  &
3100
                                            "NOLOWBOUND_ASSUMED "          &
3101
                                               "-gnatwW "                  &
3102
                                            "WARNINGS_OFF_PRAGMAS "        &
3103
                                               "-gnatw.w "                 &
3104
                                            "NO_WARNINGS_OFF_PRAGMAS "     &
3105
                                               "-gnatw.W "                 &
3106
                                            "IMPORT_EXPORT_PRAGMAS "       &
3107
                                               "-gnatwx "                  &
3108
                                            "NOIMPORT_EXPORT_PRAGMAS "     &
3109
                                               "-gnatwX "                  &
3110
                                            "LOCAL_RAISE_HANDLING "        &
3111
                                               "-gnatw.x "                 &
3112
                                            "NOLOCAL_RAISE_HANDLING "      &
3113
                                               "-gnatw.X "                 &
3114
                                            "ADA_2005_COMPATIBILITY "      &
3115
                                               "-gnatwy "                  &
3116
                                            "NOADA_2005_COMPATIBILITY "    &
3117
                                               "-gnatwY "                  &
3118
                                            "UNCHECKED_CONVERSIONS "       &
3119
                                               "-gnatwz "                  &
3120
                                            "NOUNCHECKED_CONVERSIONS "     &
3121
                                               "-gnatwZ";
3122
   --        /NOWARNINGS
3123
   --
3124
   --   Suppress the output of all warning messages from the GNAT front end.
3125
   --   Note that it does not suppress warnings from the gcc back end.
3126
   --
3127
   --        /WARNINGS[=(keyword[,...])]
3128
   --
3129
   --   In addition to error messages, corresponding to illegalities as
3130
   --   defined in the reference manual, the compiler detects two kinds of
3131
   --   warning situations.  First, the compiler considers some constructs
3132
   --   suspicious and generates a warning message to alert you to a possible
3133
   --   error. Second, if the compiler detects a situation that is sure to
3134
   --   raise an exception at runtime, it generates a warning message.
3135
   --
3136
   --   You may specify the following keywords to change this behavior:
3137
   --
3138
   --   DEFAULT (D)             The default behavior above.
3139
   --
3140
   --   ALL                     Activate all optional warnings.
3141
   --                           Activates most optional warning messages,
3142
   --                           see remaining list in this section for
3143
   --                           details on optional warning messages that
3144
   --                           can be individually controlled.
3145
   --                           The warnings that are not turned on by
3146
   --                           this option are BIASED_ROUNDING,
3147
   --                           IMPLICIT_DEREFERENCE, HIDING and
3148
   --                           ELABORATION. All other optional Ada
3149
   --                           warnings are turned on.
3150
   --
3151
   --   EVERY                   Activate every optional warning.
3152
   --                           Activates all optional warnings, including
3153
   --                           those listed above as exceptions for ALL.
3154
   --
3155
   --   NOALL                   Suppress all optional errors.
3156
   --                           Suppresses all optional warning messages
3157
   --                           that can be activated by option ALL.
3158
   --
3159
   --   ALL_GCC                 Request additional messages from the GCC
3160
   --                           backend.  Most of these are not relevant
3161
   --                           to Ada.
3162
   --
3163
   --   CONDITIONALS            Activate warnings for conditional
3164
   --                           Expressions used in tests that are known
3165
   --                           to be True or False at compile time. The
3166
   --                           default is that such warnings are not
3167
   --                           generated.
3168
   --
3169
   --   NOCONDITIONALS          Suppress warnings for conditional
3170
   --                           expressions used in tests that are known
3171
   --                           to be True or False at compile time.
3172
   --
3173
   --   IMPLICIT_DEREFERENCE    Activate warnings on implicit dereferencing.
3174
   --                           The use of a prefix of an access type in an
3175
   --                           indexed component, slice, or selected component
3176
   --                           without an explicit .all will generate
3177
   --                           a warning. With this warning enabled, access
3178
   --                           checks occur only at points where an explicit
3179
   --                           .all appears in the source code (assuming no
3180
   --                           warnings are generated as a result of this
3181
   --                           option). The default is that such warnings are
3182
   --                           not generated. Note that /WARNINGS=ALL does not
3183
   --                           affect the setting of this warning option.
3184
   --
3185
   --   NOIMPLICIT_DEREFERENCE  Suppress warnings on implicit dereferencing.
3186
   --                           in indexed components, slices, and selected
3187
   --                           components.
3188
   --
3189
   --   ELABORATION             Activate warnings on missing pragma
3190
   --                           Elaborate_All statements. The default is
3191
   --                           that such warnings are not generated.
3192
   --
3193
   --   NOELABORATION           Suppress warnings on missing pragma
3194
   --                           Elaborate_All statements.
3195
   --
3196
   --   ERRORS                  Warning messages are to be treated as errors.
3197
   --                           The warning string still appears, but the
3198
   --                           warning messages are counted as errors, and
3199
   --                           prevent the generation of an object file.
3200
   --
3201
   --   HIDING                  Activate warnings on hiding declarations.
3202
   --                           A declaration is considered hiding if it is
3203
   --                           for a non-overloadable entity, and it declares
3204
   --                           an entity with the same name as some other
3205
   --                           entity that is directly or use-visible. The
3206
   --                           default is that such warnings are not
3207
   --                           generated.
3208
   --
3209
   --   NOHIDING                Suppress warnings on hiding declarations.
3210
   --
3211
   --   IMPLEMENTATION          Activate warnings for a with of an internal
3212
   --                           GNAT implementation unit, defined as any unit
3213
   --                           from the Ada, Interfaces, GNAT, DEC or
3214
   --                           System hierarchies that is not documented in
3215
   --                           either the Ada Reference Manual or the GNAT
3216
   --                           Programmer's Reference Manual. Such units are
3217
   --                           intended only for internal implementation
3218
   --                           purposes and should not be with'ed by user
3219
   --                           programs. The default is that such warnings
3220
   --                           are generated.
3221
   --
3222
   --   NOIMPLEMENTATION        Disables warnings for a with of an internal
3223
   --                           GNAT implementation unit.
3224
   --
3225
   --   INEFFECTIVE_INLINE      Activate warnings on ineffective pragma Inlines
3226
   --                           Activates warnings for failure of front end
3227
   --                           inlining (activated by /INLINE=FULL) to inline
3228
   --                           a particular call. There are many reasons for
3229
   --                           not being able to inline a call, including most
3230
   --                           commonly that the call is too complex to
3231
   --                           inline. This warning can also be turned on
3232
   --                           using /INLINE=FULL.
3233
   --
3234
   --   NOINEFFECTIVE_INLINE    Suppress warnings on ineffective pragma Inlines
3235
   --                           Suppresses warnings on ineffective pragma
3236
   --                           Inlines. If the inlining mechanism cannot
3237
   --                           inline a call, it will simply ignore the
3238
   --                           request silently.
3239
   --
3240
   --   MISSING_COMPONENT_CLAUSES
3241
   --                           Activate warnings for cases when there are
3242
   --                           component clauses for a record type, but not
3243
   --                           for every component of the record.
3244
   --
3245
   --   NOMISSING_COMPONENT_CLAUSES
3246
   --                           Suppress warnings for cases when there are
3247
   --                           missing component clauses for a record type.
3248
   --
3249
   --   MISSING_PARENS
3250
   --                           Activate warnings for cases where parentheses
3251
   --                           are not used and the result is potential
3252
   --                           ambiguity from a reader's point of view.
3253
   --                           For example (not a > b) when a and b are
3254
   --                           modular means (not (a) > b) and very likely
3255
   --                           the programmer intended (not (a > b)).
3256
   --
3257
   --   NOMISSING_PARENS
3258
   --                           Suppress warnings for cases where parentheses
3259
   --                           are not used and the result is potential
3260
   --                           ambiguity from a reader's point of view.
3261
   --
3262
   --   MODIFIED_UNREF          Activates warnings for variables that are
3263
   --                           assigned (using an initialization value or with
3264
   --                           one or more assignment statements) but whose
3265
   --                           value is never read. The warning is suppressed
3266
   --                           for volatile variables and also for variables
3267
   --                           that are renamings of other variables or for
3268
   --                           which an address clause is given. This warning
3269
   --                           can also be turned on using /WARNINGS/OPTIONAL.
3270
   --
3271
   --   NOMODIFIED_UNREF        Disables warnings for variables that are
3272
   --                           assigned or initialized, but never read.
3273
   --
3274
   --   NORMAL                  Sets normal warning mode, in which enabled
3275
   --                           warnings are issued and treated as warnings
3276
   --                           rather than errors. This is the default mode.
3277
   --                           It can be used to cancel the effect of an
3278
   --                           explicit /WARNINGS=SUPPRESS or
3279
   --                           /WARNINGS=ERRORS. It also cancels the effect
3280
   --                           of the implicit /WARNINGS=ERRORS that is
3281
   --                           activated by the use of /STYLE=GNAT.
3282
   --
3283
   --   OBSOLESCENT             Activates warnings for calls to subprograms
3284
   --                           marked with pragma Obsolescent and for use of
3285
   --                           features in Annex J of the Ada Reference
3286
   --                           Manual. In the case of Annex J, not all
3287
   --                           features are flagged. In particular use of the
3288
   --                           renamed packages (like Text_IO), use of package
3289
   --                           ASCII and use of the attribute 'Constrained are
3290
   --                           not flagged, since these are very common and
3291
   --                           would generate many annoying positive warnings.
3292
   --                           The default is that such warnings are not
3293
   --                           generated.
3294
   --
3295
   --   NOOBSOLESCENT           Disables warnings on use of obsolescent
3296
   --                           features.
3297
   --
3298
   --   OBJECT_RENAME           Activate warnings for non limited objects
3299
   --                           renaming parameterless functions.
3300
   --
3301
   --   NOOBJECT_RENAME         Suppress warnings for non limited objects
3302
   --                           renaming parameterless functions.
3303
   --
3304
   --   OPTIONAL                Equivalent to ALL.
3305
   --
3306
   --   NOOPTIONAL              Equivalent to NOALL.
3307
   --
3308
   --   OVERLAYS                Activate warnings for possibly unintended
3309
   --                           initialization effects of defining address
3310
   --                           clauses that cause one variable to overlap
3311
   --                           another. The default is that such warnings
3312
   --                           are generated.
3313
   --
3314
   --   NOOVERLAYS              Suppress warnings on possibly unintended
3315
   --                           initialization effects of defining address
3316
   --                           clauses that cause one variable to overlap
3317
   --                           another.
3318
   --
3319
   --   REDUNDANT               Activate warnings for redundant constructs.
3320
   --                           In particular assignments of a variable to
3321
   --                           itself, and a type conversion that converts
3322
   --                           an object to its own type. The default
3323
   --                           is that such warnings are not generated.
3324
   --
3325
   --   NOREDUNDANT             Suppress warnings for redundant constructs.
3326
   --
3327
   --   SUPPRESS                Completely suppress the output of all warning
3328
   --                           messages.  Same as /NOWARNINGS.
3329
   --
3330
   --   UNCHECKED_CONVERSIONS   Activates warnings on unchecked conversions.
3331
   --                           Causes warnings to be generated for
3332
   --                           unchecked conversions when the two types are
3333
   --                           known at compile time to have different sizes.
3334
   --                           The default is that such warnings are
3335
   --                           generated.
3336
   --
3337
   --   NOUNCHECKED_CONVERSIONS Suppress warnings for unchecked conversions.
3338
   --
3339
   --   UNINITIALIZED           Generate warnings for uninitialized variables.
3340
   --                           This is a GCC option, not an Ada option.
3341
   --                           You must also specify the /OPTIMIZE qualifier
3342
   --                           with a value other than NONE (in other words,
3343
   --                           this keyword works only if optimization is
3344
   --                           turned on).
3345
   --
3346
   --   UNREFERENCED_FORMALS    Activate warnings on unreferenced formals.
3347
   --                           Causes a warning to be generated if a formal
3348
   --                           parameter is not referenced in the body of
3349
   --                           the subprogram. This warning can also be turned
3350
   --                           on using option ALL or UNUSED.
3351
   --
3352
   --   NOUNREFERENCED_FORMALS  Suppress warnings on unreferenced formals.
3353
   --                           Suppresses warnings for unreferenced formal
3354
   --                           parameters. Note that the combination UNUSED
3355
   --                           followed by NOUNREFERENCED_FORMALS has the
3356
   --                           effect of warning on unreferenced entities
3357
   --                           other than subprogram formals.
3358
   --
3359
   --   UNUSED                  Activates warnings to be generated for entities
3360
   --                           that are defined but not referenced, and for
3361
   --                           units that are with'ed and not referenced. In
3362
   --                           the case of packages, a warning is also
3363
   --                           generated if no entities in the package are
3364
   --                           referenced. This means that if the package
3365
   --                           is referenced but the only references are in
3366
   --                           use clauses or renames declarations, a warning
3367
   --                           is still generated. A warning is also generated
3368
   --                           for a generic package that is with'ed but never
3369
   --                           instantiated.  In the case where a package or
3370
   --                           subprogram body is compiled, and there is a
3371
   --                           with on the corresponding spec that is only
3372
   --                           referenced in the body, a warning is also
3373
   --                           generated, noting that the with can be moved
3374
   --                           to the body. The default is that such warnings
3375
   --                           are not generated.
3376
   --
3377
   --   NOUNUSED                Suppress warnings for unused entities and
3378
   --                           packages.
3379
   --
3380
   --   VARIABLES_UNINITIALIZED Activates warnings on unassigned variables.
3381
   --                           Causes warnings to be generated when a variable
3382
   --                           is accessed which may not be properly
3383
   --                           uninitialized.
3384
   --                           The default is that such warnings are
3385
   --                           generated.
3386
   --
3387
   --   NOVARIABLES_UNINITIALIZED       Suppress warnings for uninitialized
3388
   --                                   variables.
3389
 
3390
   S_GCC_WarnX   : aliased constant S := "/NOWARNINGS "                    &
3391
                                            "-gnatws";
3392
   --  NODOC (see /WARNINGS)
3393
 
3394
   S_GCC_No_Back : aliased constant S := "/NO_BACK_END_WARNINGS "          &
3395
                                            "-w";
3396
   --        /NO_BACK_END_WARNINGS
3397
   --
3398
   --   Inhibit all warning messages of the GCC back-end.
3399
 
3400
   S_GCC_Wide    : aliased constant S := "/WIDE_CHARACTER_ENCODING="       &
3401
                                             "BRACKETS "                   &
3402
                                                "-gnatWb "                 &
3403
                                             "HEX "                        &
3404
                                                "-gnatWh "                 &
3405
                                             "UPPER "                      &
3406
                                                "-gnatWu "                 &
3407
                                             "SHIFT_JIS "                  &
3408
                                                "-gnatWs "                 &
3409
                                             "UTF8 "                       &
3410
                                                "-gnatW8 "                 &
3411
                                             "EUC "                        &
3412
                                                "-gnatWe";
3413
   --        /NOWIDE_CHARACTER_ENCODING (D)
3414
   --        /WIDE_CHARACTER_ENCODING[=encode-type]
3415
   --
3416
   --   Specifies the mechanism used to encode wide characters.  'encode-type'
3417
   --   is one of the following:
3418
   --
3419
   --   BRACKETS (D)    A wide character is encoded as ["xxxx"] where XXXX
3420
   --                   are four hexadecimal digits representing the coding
3421
   --                   ('Pos value) of the character in type
3422
   --                   Wide_Character. The hexadecimal digits may use upper
3423
   --                   or lower case letters.
3424
   --
3425
   --                   This notation can also be used for upper half
3426
   --                   Character values using the format ["xx"] where XX is
3427
   --                   two hexadecimal digits representing the coding ('Pos
3428
   --                   value) of the character in type Character (or
3429
   --                   Wide_Character). The hexadecimal digits may use upper
3430
   --                   of lower case.
3431
   --
3432
   --   NONE            No wide characters are allowed.  Same
3433
   --                   as /NOWIDE_CHARACTER_ENCODING.
3434
   --
3435
   --   HEX             In this encoding, a wide character is represented by
3436
   --                   the following five character sequence: ESC a b c d
3437
   --                   Where 'a', 'b', 'c', and 'd' are the four hexadecimal
3438
   --                   characters (using uppercase letters) of the wide
3439
   --                   character code. For example, ESC A345 is used to
3440
   --                   represent the wide character with code 16#A345#. This
3441
   --                   scheme is compatible with use of the full
3442
   --                   Wide_Character set.
3443
   --
3444
   --   UPPER           The wide character with encoding 16#abcd# where the
3445
   --                   upper bit is on (in other words, "a" is in the range
3446
   --                   8-F) is represented as two bytes, 16#ab# and 16#cd#.
3447
   --                   The second byte may never be a format control
3448
   --                   character, but is not required to be in the upper
3449
   --                   half. This method can be also used for shift-JIS or
3450
   --                   EUC, where the internal coding matches the external
3451
   --                   coding.
3452
   --
3453
   --   SHIFT_JIS       A wide character is represented by a two-character
3454
   --                   sequence, 16#ab# and 16#cd#, with the restrictions
3455
   --                   described for upper-half encoding as described above.
3456
   --                   The internal character code is the corresponding JIS
3457
   --                   character according to the standard algorithm for
3458
   --                   Shift-JIS conversion. Only characters defined in the
3459
   --                   JIS code set table can be used with this encoding
3460
   --                   method.
3461
   --
3462
   --   UTF8            A wide character is represented using
3463
   --                   UCS Transformation Format 8 (UTF-8) as defined in Annex
3464
   --                   R of ISO 10646-1/Am.2.  Depending on the character
3465
   --                   value, the representation is a one, two, or three byte
3466
   --                   sequence:
3467
   --
3468
   --                   16#0000#-16#007f#: 2#0xxxxxxx#
3469
   --                   16#0080#-16#07ff#: 2#110xxxxx# 2#10xxxxxx#
3470
   --                   16#0800#-16#ffff#: 2#1110xxxx# 2#10xxxxxx# 2#10xxxxxx#
3471
   --
3472
   --                   where the xxx bits correspond to the left-padded bits
3473
   --                   of the 16-bit character value. Note that all lower
3474
   --                   half ASCII characters are represented as ASCII bytes
3475
   --                   and all upper half characters and other wide characters
3476
   --                   are represented as sequences of upper-half (The full
3477
   --                   UTF-8 scheme allows for encoding 31-bit characters as
3478
   --                   6-byte sequences, but in this implementation, all UTF-8
3479
   --                   sequences of four or more bytes length will be treated
3480
   --                   as illegal).
3481
   --
3482
   --   EUC             A wide character is represented by a two-character
3483
   --                   sequence 16#ab# and 16#cd#, with both characters being
3484
   --                   in the upper half. The internal character code is the
3485
   --                   corresponding JIS character according to the EUC
3486
   --                   encoding algorithm. Only characters defined in the JIS
3487
   --                   code set table can be used with this encoding method.
3488
 
3489
   S_GCC_WideX   : aliased constant S := "/NOWIDE_CHARACTER_ENCODING "     &
3490
                                             "-gnatWn";
3491
   --  NODOC (see /WIDE_CHARACTER_ENCODING)
3492
 
3493
   S_GCC_Xdebug  : aliased constant S := "/XDEBUG "                        &
3494
                                            "-gnatD";
3495
   --        /NOXDEBUG (D)
3496
   --        /XDEBUG
3497
   --
3498
   --   Output expanded source files for source level debugging.
3499
   --   The expanded source (see /EXPAND_SOURCE) is written to files
3500
   --   with names formed by appending "_DG" to the input file name,
3501
   --   The debugging information generated by the /DEBUG qualifier will then
3502
   --   refer to the generated file. This allows source level debugging using
3503
   --   the generated code which is sometimes useful for complex code, for
3504
   --   example to find out exactly which part of a complex construction
3505
   --   raised an exception. The maximum line length for the output is 72.
3506
 
3507
   S_GCC_Lxdebug : aliased constant S := "/LXDEBUG=#"                      &
3508
                                            "-gnatD=#";
3509
   --        /LXDEBUG=nnn
3510
   --
3511
   --   Output expanded source files for source level debugging.
3512
   --   The expanded source (see /EXPAND_SOURCE) is written to files
3513
   --   with names formed by appending "_DG" to the input file name,
3514
   --   The debugging information generated by the /DEBUG qualifier will then
3515
   --   refer to the generated file. This allows source level debugging using
3516
   --   the generated code which is sometimes useful for complex code, for
3517
   --   example to find out exactly which part of a complex construction
3518
   --   raised an exception. The parameter is the maximum line length for
3519
   --   the output.
3520
 
3521
   S_GCC_Xref    : aliased constant S := "/XREF="                          &
3522
                                            "GENERATE "                    &
3523
                                               "!-gnatx "                  &
3524
                                            "SUPPRESS "                    &
3525
                                               "-gnatx";
3526
   --        /XREF[=keyword]
3527
   --
3528
   --   Normally the compiler generates full cross-referencing information in
3529
   --   the .ALI file. This information is used by a number of tools,
3530
   --   including GNAT FIND and GNAT XREF.
3531
   --
3532
   --        GENERATE (D)            Generate cross-referencing information.
3533
   --
3534
   --        SUPPRESS                Suppress cross-referencing information.
3535
   --                                This saves some space and may slightly
3536
   --                                speed up compilation, but means that some
3537
   --                                tools cannot be used.
3538
 
3539
   GCC_Switches : aliased constant Switches :=
3540
                    (S_GCC_Ada_83  'Access,
3541
                     S_GCC_Ada_95  'Access,
3542
                     S_GCC_Ada_05  'Access,
3543
                     S_GCC_Ada_2005'Access,
3544
                     S_GCC_Ada_12  'Access,
3545
                     S_GCC_Ada_2012'Access,
3546
                     S_GCC_Add     'Access,
3547
                     S_GCC_Asm     'Access,
3548
                     S_GCC_AValid  'Access,
3549
                     S_GCC_CategW  'Access,
3550
                     S_GCC_Checks  'Access,
3551
                     S_GCC_ChecksX 'Access,
3552
                     S_GCC_Compres 'Access,
3553
                     S_GCC_Config  'Access,
3554
                     S_GCC_Current 'Access,
3555
                     S_GCC_Debug   'Access,
3556
                     S_GCC_DebugX  'Access,
3557
                     S_GCC_Data    'Access,
3558
                     S_GCC_Dist    'Access,
3559
                     S_GCC_DistX   'Access,
3560
                     S_GCC_Error   'Access,
3561
                     S_GCC_ErrorX  'Access,
3562
                     S_GCC_Expand  'Access,
3563
                     S_GCC_Lexpand 'Access,
3564
                     S_GCC_Except  'Access,
3565
                     S_GCC_Extend  'Access,
3566
                     S_GCC_Ext     'Access,
3567
                     S_GCC_File    'Access,
3568
                     S_GCC_Follow  'Access,
3569
                     S_GCC_Force   'Access,
3570
                     S_GCC_Full    'Access,
3571
                     S_GCC_Generate'Access,
3572
                     S_GCC_GNAT    'Access,
3573
                     S_GCC_Help    'Access,
3574
                     S_GCC_Ident   'Access,
3575
                     S_GCC_IdentX  'Access,
3576
                     S_GCC_Ignore  'Access,
3577
                     S_GCC_Immed   'Access,
3578
                     S_GCC_Inline  'Access,
3579
                     S_GCC_InlineX 'Access,
3580
                     S_GCC_Intsrc  'Access,
3581
                     S_GCC_Just    'Access,
3582
                     S_GCC_JustX   'Access,
3583
                     S_GCC_Length  'Access,
3584
                     S_GCC_List    'Access,
3585
                     S_GCC_Output  'Access,
3586
                     S_GCC_Machine 'Access,
3587
                     S_GCC_Mapping 'Access,
3588
                     S_GCC_Multi   'Access,
3589
                     S_GCC_Mess    'Access,
3590
                     S_GCC_Nesting 'Access,
3591
                     S_GCC_Noadc   'Access,
3592
                     S_GCC_Noload  'Access,
3593
                     S_GCC_Nostinc 'Access,
3594
                     S_GCC_Nostlib 'Access,
3595
                     S_GCC_NoWarnP 'Access,
3596
                     S_GCC_Opt     'Access,
3597
                     S_GCC_OptX    'Access,
3598
                     S_GCC_Pointer 'Access,
3599
                     S_GCC_Polling 'Access,
3600
                     S_GCC_Project 'Access,
3601
                     S_GCC_Psta    'Access,
3602
                     S_GCC_Report  'Access,
3603
                     S_GCC_ReportX 'Access,
3604
                     S_GCC_Repinfo 'Access,
3605
                     S_GCC_RepinfX 'Access,
3606
                     S_GCC_RTS     'Access,
3607
                     S_GCC_SCO     'Access,
3608
                     S_GCC_Search  'Access,
3609
                     S_GCC_Src_Info'Access,
3610
                     S_GCC_Style   'Access,
3611
                     S_GCC_StyleX  'Access,
3612
                     S_GCC_Subdirs 'Access,
3613
                     S_GCC_Symbol  'Access,
3614
                     S_GCC_Syntax  'Access,
3615
                     S_GCC_Table   'Access,
3616
                     S_GCC_Trace   'Access,
3617
                     S_GCC_Tree    'Access,
3618
                     S_GCC_Trys    'Access,
3619
                     S_GCC_USL     'Access,
3620
                     S_GCC_Units   'Access,
3621
                     S_GCC_Unique  'Access,
3622
                     S_GCC_Upcase  'Access,
3623
                     S_GCC_Valid   'Access,
3624
                     S_GCC_Verbose 'Access,
3625
                     S_GCC_Verb_Asm'Access,
3626
                     S_GCC_Warn    'Access,
3627
                     S_GCC_WarnX   'Access,
3628
                     S_GCC_Wide    'Access,
3629
                     S_GCC_WideX   'Access,
3630
                     S_GCC_No_Back 'Access,
3631
                     S_GCC_Xdebug  'Access,
3632
                     S_GCC_Lxdebug 'Access,
3633
                     S_GCC_Xref    'Access);
3634
 
3635
   ----------------------------
3636
   -- Switches for GNAT ELIM --
3637
   ----------------------------
3638
 
3639
   S_Elim_Add    : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*"       &
3640
                                           "-aP*";
3641
   --        /ADD_PROJECT_SEARCH_PATH=(directory[,...])
3642
   --
3643
   --   Add directories to the project search path.
3644
 
3645
   S_Elim_All    : aliased constant S := "/ALL "                           &
3646
                                            "-a";
3647
   --        /NOALL (D)
3648
   --        /ALL
3649
   --
3650
   --   Also look for subprograms from the GNAT run time that can be
3651
   --   eliminated. Note that when 'gnat.adc' is produced using this switch,
3652
   --   the entire program must be recompiled with qualifier /ALL_FILES of
3653
   --   GNAT MAKE.
3654
 
3655
   S_Elim_Bind   : aliased constant S := "/BIND_FILE=<"                    &
3656
                                            "-b>";
3657
   --        /BIND_FILE=file_name
3658
   --
3659
   --   Specifies file_name as the bind file to process. If this qualifier is
3660
   --   not used, the name of the bind file is computed from the full expanded
3661
   --   Ada name of a main subprogram.
3662
 
3663
   S_Elim_Comp   : aliased constant S := "/COMPILER=@"                     &
3664
                                            "--GCC=@";
3665
   --        /COMPILER=path_name
3666
   --
3667
   --   Instructs GNAT ELIM to use a specific gcc compiler instead of one
3668
   --   available on the path.
3669
 
3670
   S_Elim_Config : aliased constant S := "/CONFIGURATION_PRAGMAS=<"        &
3671
                                            "-C>";
3672
   --        /CONFIGURATION_PRAGMAS=path_name
3673
   --
3674
   --   Specifies a file that contains configuration pragmas.
3675
   --   The file must be specified with absolute path.
3676
 
3677
   S_Elim_Current : aliased constant S := "/CURRENT_DIRECTORY "            &
3678
                                           "!-I-";
3679
   --        /CURRENT_DIRECTORY (D)
3680
   --        /NOCURRENT_DIRECTORY
3681
   --
3682
   --        Look for source files in the default directory.
3683
 
3684
   S_Elim_Ext     : aliased constant S := "/EXTERNAL_REFERENCE=" & '"'     &
3685
                                             "-X" & '"';
3686
   --       /EXTERNAL_REFERENCE="name=val"
3687
   --
3688
   --   Specifies an external reference to the project manager. Useful only if
3689
   --   /PROJECT_FILE is used.
3690
   --
3691
   --   Example:
3692
   --      /EXTERNAL_REFERENCE="DEBUG=TRUE"
3693
 
3694
   S_Elim_Follow  : aliased constant S := "/FOLLOW_LINKS_FOR_FILES "       &
3695
                                            "-eL";
3696
   --        /NOFOLLOW_LINKS_FOR_FILES (D)
3697
   --        /FOLLOW_LINKS_FOR_FILES
3698
   --
3699
   --    Follow links when parsing project files
3700
 
3701
   S_Elim_GNATMAKE : aliased constant S := "/GNATMAKE=@"                   &
3702
                                            "--GNATMAKE=@";
3703
   --        /GNATMAKE=path_name
3704
   --
3705
   --   Instructs GNAT MAKE to use a specific gnatmake instead of one available
3706
   --   on the path.
3707
 
3708
   S_Elim_Mess    : aliased constant S := "/MESSAGES_PROJECT_FILE="        &
3709
                                             "DEFAULT "                    &
3710
                                                "-vP0 "                    &
3711
                                             "MEDIUM "                     &
3712
                                                "-vP1 "                    &
3713
                                             "HIGH "                       &
3714
                                                "-vP2";
3715
   --        /MESSAGES_PROJECT_FILE[=messages-option]
3716
   --
3717
   --   Specifies the "verbosity" of the parsing of project files.
3718
   --   messages-option may be one of the following:
3719
   --
3720
   --      DEFAULT (D)  No messages are output if there is no error or warning.
3721
   --
3722
   --      MEDIUM       A small number of messages are output.
3723
   --
3724
   --      HIGH         A great number of messages are output, most of them not
3725
   --                   being useful for the user.
3726
 
3727
   S_Elim_Nodisp : aliased constant S := "/NO_DISPATCH "                   &
3728
                                          "--no-elim-dispatch";
3729
   --        /NONO_DISPATCH (D)
3730
   --        /NO_DISPATCH
3731
   --
3732
   --   Do not generate pragmas for dispatching operations.
3733
 
3734
   S_Elim_Ignore : aliased constant S := "/IGNORE=@"                       &
3735
                                         "--ignore=@";
3736
   --      /IGNORE=filename
3737
   --
3738
   --   Do not generate pragmas for subprograms declared in the sources
3739
   --  listed in a specified file
3740
 
3741
   S_Elim_Project : aliased constant S := "/PROJECT_FILE=<"                &
3742
                                             "-P>";
3743
   --        /PROJECT_FILE=filename
3744
   --
3745
   --   Specifies the main project file to be used. The project files rooted
3746
   --   at the main project file will be parsed before the invocation of the
3747
   --   gnatelim. The source directories to be searched will be communicated
3748
   --   to gnatelim through logical name ADA_PRJ_INCLUDE_FILE.
3749
 
3750
   S_Elim_Quiet   : aliased constant S := "/QUIET "                        &
3751
                                            "-q";
3752
   --        /NOQUIET (D)
3753
   --        /QUIET
3754
   --
3755
   --   Quiet mode: by default GNAT ELIM outputs to the standard error stream
3756
   --   the number of program units left to be processed. This option turns
3757
   --   this trace off.
3758
 
3759
   S_Elim_Files   : aliased constant S := "/FILES=@"                       &
3760
                                         "-files=@";
3761
 
3762
   --      /FILES=filename
3763
   --
3764
   --   Take as arguments the files that are listed in the specified
3765
   --   text file.
3766
 
3767
   S_Elim_Log     : aliased constant S := "/LOG "                          &
3768
                                          "-l";
3769
   --        /NOLOG (D)
3770
   --        /LOG
3771
   --
3772
   --   Duplicate all the output sent to Stderr into a default log file.
3773
 
3774
   S_Elim_Logfile : aliased constant S := "/LOGFILE=@"                     &
3775
                                          "-l@";
3776
 
3777
   --      /LOGFILE=logfilename
3778
   --
3779
   --   Duplicate all the output sent to Stderr into a specified log file.
3780
 
3781
   S_Elim_Main    : aliased constant S := "/MAIN=@"                        &
3782
                                          "-main=@";
3783
 
3784
   --      /MAIN=filename
3785
   --
3786
   --   Specify the main subprogram of the partition to analyse.
3787
 
3788
   S_Elim_Out     : aliased constant S := "/OUTPUT=@"                     &
3789
                                             "-o@";
3790
   --        /OUTPUT=filename
3791
   --
3792
   --   Specify the name of the output file.
3793
 
3794
   S_Elim_Time    : aliased constant S := "/TIME "                        &
3795
                                            "-t";
3796
   --        /NOTIME (D)
3797
   --        /TIME
3798
   --
3799
   --   Print out execution time
3800
 
3801
   S_Elim_Search : aliased constant S := "/SEARCH=*"                       &
3802
                                            "-I*";
3803
   --        /SEARCH=(directory, ...)
3804
   --
3805
   --   When looking for source files also look in the specified directories.
3806
 
3807
   S_Elim_Subdirs : aliased constant S := "/SUBDIRS=<"                     &
3808
                                             "--subdirs=>";
3809
   --        /SUBDIRS=dir
3810
   --
3811
   --   The actual directories (object, exec, library, ...) are subdirectories
3812
   --   of the directory specified in the project file. If the subdirectory
3813
   --   does not exist, it is created automatically.
3814
 
3815
   S_Elim_Verb   : aliased constant S := "/VERBOSE "                       &
3816
                                            "-v";
3817
   --        /NOVERBOSE (D)
3818
   --        /VERBOSE
3819
   --
3820
   --   Verbose mode: GNAT ELIM version information is output as Ada comments
3821
   --   to the standard output stream. Also, in addition to the number of
3822
   --   program units left, GNAT ELIM will output the name of the current unit
3823
   --   being processed.
3824
 
3825
   S_Elim_Warn   : aliased constant S := "/WARNINGS="                      &
3826
                                           "NORMAL "                       &
3827
                                               "-wn "                      &
3828
                                           "QUIET "                        &
3829
                                                "-ws";
3830
 
3831
   --      /WARNINGS[=(keyword[,...])]
3832
   --
3833
   --   The following keywords are supported:
3834
   --
3835
   --        NORMAL (D)    Print warning all the messages.
3836
   --        QUIET         Some warning messages are suppressed
3837
 
3838
   Elim_Switches : aliased constant Switches :=
3839
                     (S_Elim_Add     'Access,
3840
                      S_Elim_All     'Access,
3841
                      S_Elim_Bind    'Access,
3842
                      S_Elim_Comp    'Access,
3843
                      S_Elim_Config  'Access,
3844
                      S_Elim_Current 'Access,
3845
                      S_Elim_Ext     'Access,
3846
                      S_Elim_Files   'Access,
3847
                      S_Elim_Follow  'Access,
3848
                      S_Elim_GNATMAKE'Access,
3849
                      S_Elim_Log     'Access,
3850
                      S_Elim_Logfile 'Access,
3851
                      S_Elim_Main    'Access,
3852
                      S_Elim_Mess    'Access,
3853
                      S_Elim_Nodisp  'Access,
3854
                      S_Elim_Out     'Access,
3855
                      S_Elim_Project 'Access,
3856
                      S_Elim_Quiet   'Access,
3857
                      S_Elim_Search  'Access,
3858
                      S_Elim_Subdirs 'Access,
3859
                      S_Elim_Time    'Access,
3860
                      S_Elim_Verb    'Access,
3861
                      S_Elim_Warn    'Access);
3862
 
3863
   ----------------------------
3864
   -- Switches for GNAT FIND --
3865
   ----------------------------
3866
 
3867
   S_Find_Add     : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*"      &
3868
                                            "-aP*";
3869
   --        /ADD_PROJECT_SEARCH_PATH=(directory[,...])
3870
   --
3871
   --   Add directories to the project search path.
3872
 
3873
   S_Find_All     : aliased constant S := "/ALL_FILES "                    &
3874
                                            "-a";
3875
   --        /NOALL_FILES (D)
3876
   --        /ALL_FILES
3877
   --
3878
   --   If this switch is present, FIND and XREF will parse the read-only
3879
   --   files found in the library search path. Otherwise, these files will
3880
   --   be ignored. This option can be used to protect Gnat sources or your
3881
   --   own libraries from being parsed, thus making FIND and XREF much
3882
   --   faster, and their output much smaller.
3883
 
3884
   S_Find_Deriv   : aliased constant S := "/DERIVED_TYPE_INFORMATION "     &
3885
                                            "-d";
3886
   --        /NODERIVED_TYPE_INFORMATION (D)
3887
   --        /DERIVED_TYPE_INFORMATION
3888
   --
3889
   --   Output the parent type reference for each matching derived types.
3890
 
3891
   S_Find_Expr    : aliased constant S := "/EXPRESSIONS "                  &
3892
                                            "-e";
3893
   --        /NOEXPRESSIONS (D)
3894
   --        /EXPRESSIONS
3895
   --
3896
   --   By default, FIND accepts the simple regular expression set for pattern.
3897
   --   If this switch is set, then the pattern will be considered as a full
3898
   --   Unix-style regular expression.
3899
 
3900
   S_Find_Ext     : aliased constant S := "/EXTERNAL_REFERENCE=" & '"'     &
3901
                                            "-X" & '"';
3902
   --        /EXTERNAL_REFERENCE="name=val"
3903
   --
3904
   --   Specifies an external reference to the project manager. Useful only if
3905
   --   /PROJECT_FILE is used.
3906
   --
3907
   --   Example:
3908
   --      /EXTERNAL_REFERENCE="DEBUG=TRUE"
3909
 
3910
   S_Find_Follow  : aliased constant S := "/FOLLOW_LINKS_FOR_FILES "       &
3911
                                            "-eL";
3912
   --        /NOFOLLOW_LINKS_FOR_FILES (D)
3913
   --        /FOLLOW_LINKS_FOR_FILES
3914
   --
3915
   --    Follow links when parsing project files
3916
 
3917
   S_Find_Full    : aliased constant S := "/FULL_PATHNAME "                &
3918
                                            "-f";
3919
   --        /NOFULL_PATHNAME (D)
3920
   --        /FULL_PATHNAME
3921
   --
3922
   --   If this switch is set, the output file names will be preceded by their
3923
   --   directory (if the file was found in the search path). If this switch
3924
   --   is not set, the directory will not be printed.
3925
 
3926
   S_Find_Ignore  : aliased constant S := "/IGNORE_LOCALS "                &
3927
                                            "-g";
3928
   --        /NOIGNORE_LOCALS (D)
3929
   --        /IGNORE_LOCALS
3930
   --
3931
   --   If this switch is set, information is output only for library-level
3932
   --   entities, ignoring local entities. The use of this switch may
3933
   --   accelerate FIND and XREF.
3934
 
3935
   S_Find_Mess    : aliased constant S := "/MESSAGES_PROJECT_FILE="        &
3936
                                            "DEFAULT "                     &
3937
                                               "-vP0 "                     &
3938
                                            "MEDIUM "                      &
3939
                                               "-vP1 "                     &
3940
                                            "HIGH "                        &
3941
                                               "-vP2";
3942
   --        /MESSAGES_PROJECT_FILE[=messages-option]
3943
   --
3944
   --   Specifies the "verbosity" of the parsing of project files.
3945
   --   messages-option may be one of the following:
3946
   --
3947
   --      DEFAULT (D)  No messages are output if there is no error or warning.
3948
   --
3949
   --      MEDIUM       A small number of messages are output.
3950
   --
3951
   --      HIGH         A great number of messages are output, most of them not
3952
   --                   being useful for the user.
3953
 
3954
   S_Find_Nostinc : aliased constant S := "/NOSTD_INCLUDES "               &
3955
                                            "-nostdinc";
3956
   --        /NOSTD_INCLUDES
3957
   --
3958
   --   Do not look for sources in the system default directory.
3959
 
3960
   S_Find_Nostlib : aliased constant S := "/NOSTD_LIBRARIES "              &
3961
                                            "-nostdlib";
3962
   --        /NOSTD_LIBRARIES
3963
   --
3964
   --   Do not look for library files in the system default directory.
3965
 
3966
   S_Find_Object  : aliased constant S := "/OBJECT_SEARCH=*"               &
3967
                                            "-aO*";
3968
   --        /OBJECT_SEARCH=(directory,...)
3969
   --
3970
   --   When searching for library and object files, look in the specified
3971
   --   directories. The order in which library files are searched is the same
3972
   --   as for MAKE.
3973
 
3974
   S_Find_Print   : aliased constant S := "/PRINT_LINES "                  &
3975
                                            "-s";
3976
   --        /NOPRINT_LINES (D)
3977
   --        /PRINT_LINES
3978
   --
3979
   --   Output the content of the Ada source file lines were the entity was
3980
   --   found.
3981
 
3982
   S_Find_Project : aliased constant S := "/PROJECT=@"                     &
3983
                                            "-p@";
3984
   --        /PROJECT=file
3985
   --
3986
   --   Specify a project file to use. By default, FIND and XREF will try to
3987
   --   locate a project file in the current directory.
3988
   --
3989
   --   If a project file is either specified or found by the tools, then the
3990
   --   content of the source directory and object directory lines are added
3991
   --   as if they had been specified respectively by /SOURCE_SEARCH and
3992
   --   /OBJECT_SEARCH.
3993
   --
3994
   --   This qualifier is not compatible with /PROJECT_FILE
3995
 
3996
   S_Find_Prj     : aliased constant S := "/PROJECT_FILE=<"                &
3997
                                            "-P>";
3998
   --        /PROJECT_FILE=filename
3999
   --
4000
   --   Specifies the main project file to be used. The project files rooted
4001
   --   at the main project file will be parsed before looking for sources.
4002
   --   The source and object directories to be searched will be communicated
4003
   --   to gnatfind through logical names ADA_PRJ_INCLUDE_FILE and
4004
   --   ADA_PRJ_OBJECTS_FILE.
4005
 
4006
   S_Find_Ref     : aliased constant S := "/REFERENCES "                   &
4007
                                            "-r";
4008
   --        /NOREFERENCES (D)
4009
   --        /REFERENCES
4010
   --
4011
   --   By default, FIND will output only the information about the
4012
   --   declaration, body or type completion of the entities. If this switch
4013
   --   is set, the FIND will locate every reference to the entities in the
4014
   --   files specified on the command line (or in every file in the search
4015
   --   path if no file is given on the command line).
4016
 
4017
   S_Find_Search  : aliased constant S := "/SEARCH=*"                      &
4018
                                            "-I*";
4019
   --        /SEARCH=(directory,...)
4020
   --
4021
   --   Equivalent to:
4022
   --   /OBJECT_SEARCH=(directory,...) /SOURCE_SEARCH=(directory,...)
4023
 
4024
   S_Find_Source  : aliased constant S := "/SOURCE_SEARCH=*"               &
4025
                                            "-aI*";
4026
   --        /SOURCE_SEARCH=(directory,...)
4027
   --
4028
   --   When looking for source files also look in the specified directories.
4029
   --   The order in which source file search is undertaken is the same as for
4030
   --   MAKE.
4031
 
4032
   S_Find_Subdirs : aliased constant S := "/SUBDIRS=<"                     &
4033
                                             "--subdirs=>";
4034
   --        /SUBDIRS=dir
4035
   --
4036
   --   The actual directories (object, exec, library, ...) are subdirectories
4037
   --   of the directory specified in the project file. If the subdirectory
4038
   --   does not exist, it is created automatically.
4039
 
4040
   S_Find_Types   : aliased constant S := "/TYPE_HIERARCHY "               &
4041
                                            "-t";
4042
   --        /NOTYPE_HIERARCHY (D)
4043
   --        /TYPE_HIERARCHY
4044
   --
4045
   --   Output the type hierarchy for the specified type. It acts like the
4046
   --   /DERIVED_TYPE_INFORMATION qualifier, but recursively from parent type
4047
   --   to parent type. When this qualifier is specified it is not possible to
4048
   --   specify more than one file.
4049
 
4050
   Find_Switches : aliased constant Switches :=
4051
                     (S_Find_Add     'Access,
4052
                      S_Find_All     'Access,
4053
                      S_Find_Deriv   'Access,
4054
                      S_Find_Expr    'Access,
4055
                      S_Find_Ext     'Access,
4056
                      S_Find_Follow  'Access,
4057
                      S_Find_Full    'Access,
4058
                      S_Find_Ignore  'Access,
4059
                      S_Find_Mess    'Access,
4060
                      S_Find_Nostinc 'Access,
4061
                      S_Find_Nostlib 'Access,
4062
                      S_Find_Object  'Access,
4063
                      S_Find_Print   'Access,
4064
                      S_Find_Project 'Access,
4065
                      S_Find_Prj     'Access,
4066
                      S_Find_Ref     'Access,
4067
                      S_Find_Search  'Access,
4068
                      S_Find_Source  'Access,
4069
                      S_Find_Subdirs 'Access,
4070
                      S_Find_Types   'Access);
4071
 
4072
   ------------------------------
4073
   -- Switches for GNAT KRUNCH --
4074
   ------------------------------
4075
 
4076
   S_Krunch_Count  : aliased constant S := "/COUNT=#"                      &
4077
                                            "`#";
4078
   --        /COUNT=39 (D)
4079
   --        /COUNT=nnn
4080
   --
4081
   --   Limit file names to nnn characters (where nnn is a decimal
4082
   --   integer). The maximum file name length is 39, but if you want to
4083
   --   generate a set of files that would be usable if ported to a system
4084
   --   with some different maximum file length, then a different value can
4085
   --   be specified.
4086
 
4087
   Krunch_Switches : aliased constant Switches  :=
4088
                       (1 .. 1 => S_Krunch_Count  'Access);
4089
 
4090
   ----------------------------
4091
   -- Switches for GNAT LINK --
4092
   ----------------------------
4093
 
4094
   S_Link_Add     : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*"      &
4095
                                            "-aP*";
4096
   --        /ADD_PROJECT_SEARCH_PATH=(directory[,...])
4097
   --
4098
   --   Add directories to the project search path.
4099
 
4100
   S_Link_Bind    : aliased constant S := "/BIND_FILE="                    &
4101
                                            "ADA "                         &
4102
                                               "-A "                       &
4103
                                            "C "                           &
4104
                                               "-C";
4105
   --        /BIND_FILE=[bind-file-option]
4106
   --
4107
   --   Specifies the language of the binder generated file.
4108
   --
4109
   --        ADA (D)         Binder file is Ada.
4110
   --
4111
   --        C               Binder file is 'C'.
4112
 
4113
   S_Link_Debug   : aliased constant S := "/DEBUG="                        &
4114
                                            "ALL "                         &
4115
                                               "-g3 "                      &
4116
                                            "NONE "                        &
4117
                                               "-g0 "                      &
4118
                                            "TRACEBACK "                   &
4119
                                               "-g1 "                      &
4120
                                            "NOTRACEBACK "                 &
4121
                                               "-g0";
4122
   --        /NODEBUG (D)
4123
   --        /DEBUG[=debug-option]
4124
   --
4125
   --   Specifies the amount of debugging information included. 'debug-option'
4126
   --   is one of the following:
4127
   --
4128
   --        ALL (D)      Include full debugging information.
4129
   --
4130
   --        NONE         Provide no debugging information.  Same as /NODEBUG.
4131
   --
4132
   --        TRACEBACK    Provide sufficient debug information for a traceback.
4133
   --
4134
   --        NOTRACEBACK  Same as NONE.
4135
 
4136
   S_Link_Nodebug : aliased constant S := "/NODEBUG "                      &
4137
                                            "-g0";
4138
   --  NODOC (see /DEBUG)
4139
 
4140
   S_Link_Execut  : aliased constant S := "/EXECUTABLE=@"                  &
4141
                                            "-o@";
4142
   --        /EXECUTABLE=exec-name
4143
   --
4144
   --   'exec-name' specifies an alternative name for the generated executable
4145
   --   program. If this qualifier switch is omitted, the executable is called
4146
   --   the name of the main unit. So "$ GNAT LINK TRY.ALI" creates an
4147
   --   executable called TRY.EXE.
4148
 
4149
   S_Link_Ext     : aliased constant S := "/EXTERNAL_REFERENCE=" & '"'     &
4150
                                            "-X" & '"';
4151
   --        /EXTERNAL_REFERENCE="name=val"
4152
   --
4153
   --   Specifies an external reference to the project manager. Useful only if
4154
   --   /PROJECT_FILE is used.
4155
   --
4156
   --   Example:
4157
   --      /EXTERNAL_REFERENCE="DEBUG=TRUE"
4158
 
4159
   S_Link_Follow  : aliased constant S := "/FOLLOW_LINKS_FOR_FILES "       &
4160
                                            "-eL";
4161
   --        /NOFOLLOW_LINKS_FOR_FILES (D)
4162
   --        /FOLLOW_LINKS_FOR_FILES
4163
   --
4164
   --    Follow links when parsing project files
4165
 
4166
   S_Link_Forlink : aliased constant S := "/FOR_LINKER=" & '"'             &
4167
                                            "--for-linker=" & '"';
4168
   --        /FOR_LINKER=<string>
4169
   --
4170
   --   Transmit the option <string> to the underlying linker.
4171
 
4172
   S_Link_Force   : aliased constant S := "/FORCE_OBJECT_FILE_LIST "       &
4173
                                            "-f";
4174
   --        /NOFORCE_OBJECT_FILE_LIST (D)
4175
   --        /FORCE_OBJECT_FILE_LIST
4176
   --
4177
   --   Forces the generation of a file that contains commands for the linker.
4178
   --   This is useful in some cases to deal with special situations where the
4179
   --   command line length is exceeded.
4180
 
4181
   S_Link_Ident   : aliased constant S := "/IDENTIFICATION=" & '"'         &
4182
                                            "--for-linker=IDENT="          &
4183
                                            '"';
4184
   --        /IDENTIFICATION="<string>"
4185
   --
4186
   --   "<string>" specifies the string to be stored in the image file ident-
4187
   --   ification field in the image header. It overrides any pragma Ident
4188
   --   specified string.
4189
 
4190
   S_Link_Libdir  : aliased constant S := "/LIBDIR=*"                      &
4191
                                            "-L*";
4192
   --        /LIBDIR=(directory, ...)
4193
   --
4194
   --   Look for libraries in the specified directories.
4195
 
4196
   S_Link_Library : aliased constant S := "/LIBRARY=|"                     &
4197
                                            "-l|";
4198
   --        /LIBRARY=xyz
4199
   --
4200
   --   Link with library named "xyz".
4201
 
4202
   S_Link_Mess    : aliased constant S := "/MESSAGES_PROJECT_FILE="        &
4203
                                            "DEFAULT "                     &
4204
                                               "-vP0 "                     &
4205
                                            "MEDIUM "                      &
4206
                                               "-vP1 "                     &
4207
                                            "HIGH "                        &
4208
                                               "-vP2";
4209
   --        /MESSAGES_PROJECT_FILE[=messages-option]
4210
   --
4211
   --   Specifies the "verbosity" of the parsing of project files.
4212
   --   messages-option may be one of the following:
4213
   --
4214
   --      DEFAULT (D)  No messages are output if there is no error or warning.
4215
   --
4216
   --      MEDIUM       A small number of messages are output.
4217
   --
4218
   --      HIGH         A great number of messages are output, most of them not
4219
   --                   being useful for the user.
4220
 
4221
   S_Link_Nocomp  : aliased constant S := "/NOCOMPILE "                    &
4222
                                            "-n";
4223
   --        /NOCOMPILE
4224
   --
4225
   --   Do not compile the file generated by the binder.
4226
   --   This may be used when a link is rerun with different options,
4227
   --   but there is no need to recompile the binder generated file.
4228
 
4229
   S_Link_Noinhib : aliased constant S := "/NOINHIBIT-EXEC "               &
4230
                                            "--for-linker=--noinhibit-exec";
4231
   --        /NOINHIBIT-EXEC
4232
   --
4233
   --   Delete executable if there are errors or warnings.
4234
 
4235
   S_Link_Nofiles : aliased constant S := "/NOSTART_FILES "                &
4236
                                            "-nostartfiles";
4237
   --        /NOSTART_FILES
4238
   --
4239
   --   Link in default image initialization and startup functions.
4240
 
4241
   S_Link_Project : aliased constant S := "/PROJECT_FILE=<"                &
4242
                                            "-P>";
4243
   --        /PROJECT_FILE=filename
4244
   --
4245
   --   Specifies the main project file to be used. The project files rooted
4246
   --   at the main project file will be parsed before the invocation of the
4247
   --   linker.
4248
   --   The source and object directories to be searched will be communicated
4249
   --   to the linker through logical names ADA_PRJ_INCLUDE_FILE and
4250
   --   ADA_PRJ_OBJECTS_FILE.
4251
 
4252
   S_Link_Return  : aliased constant S := "/RETURN_CODES="                 &
4253
                                            "POSIX "                       &
4254
                                               "!-mvms-return-codes "      &
4255
                                            "VMS "                         &
4256
                                               "-mvms-return-codes";
4257
   --        /RETURN_CODES=POSIX (D)
4258
   --        /RETURN_CODES=VMS
4259
   --
4260
   --   Specifies the style of codes returned by
4261
   --   Ada.Command_Line.Set_Exit_Status. Must be used in conjunction with
4262
   --   and match the Bind qualifier with the same name.
4263
   --
4264
   --        POSIX (D)   Return Posix compatible exit codes.
4265
   --
4266
   --        VMS         Return VMS compatible exit codes. The value returned
4267
   --                    is identically equal to the Set_Exit_Status parameter.
4268
 
4269
   S_Link_Static  : aliased constant S := "/STATIC "                       &
4270
                                            "--for-linker=-static";
4271
   --        /NOSTATIC (D)
4272
   --        /STATIC
4273
   --
4274
   --   Indicate to the linker that the link is static.
4275
 
4276
   S_Link_Subdirs : aliased constant S := "/SUBDIRS=<"                     &
4277
                                             "--subdirs=>";
4278
   --        /SUBDIRS=dir
4279
   --
4280
   --   The actual directories (object, exec, library, ...) are subdirectories
4281
   --   of the directory specified in the project file. If the subdirectory
4282
   --   does not exist, it is created automatically.
4283
 
4284
   S_Link_Verb    : aliased constant S := "/VERBOSE "                      &
4285
                                            "-v";
4286
   --        /NOVERBOSE (D)
4287
   --        /VERBOSE
4288
   --
4289
   --   Causes additional information to be output, including a full list of
4290
   --   the included object files. This switch option is most useful when you
4291
   --   want to see what set of object files are being used in the link step.
4292
 
4293
   S_Link_ZZZZZ   : aliased constant S := "/<other> "                      &
4294
                                            "--for-linker=";
4295
   --        /<other>
4296
   --
4297
   --   Any other switch that will be transmitted to the underlying linker.
4298
 
4299
   Link_Switches : aliased constant Switches :=
4300
                     (S_Link_Add     'Access,
4301
                      S_Link_Bind    'Access,
4302
                      S_Link_Debug   'Access,
4303
                      S_Link_Nodebug 'Access,
4304
                      S_Link_Execut  'Access,
4305
                      S_Link_Ext     'Access,
4306
                      S_Link_Follow  'Access,
4307
                      S_Link_Forlink 'Access,
4308
                      S_Link_Force   'Access,
4309
                      S_Link_Ident   'Access,
4310
                      S_Link_Libdir  'Access,
4311
                      S_Link_Library 'Access,
4312
                      S_Link_Mess    'Access,
4313
                      S_Link_Nocomp  'Access,
4314
                      S_Link_Nofiles 'Access,
4315
                      S_Link_Noinhib 'Access,
4316
                      S_Link_Project 'Access,
4317
                      S_Link_Return  'Access,
4318
                      S_Link_Static  'Access,
4319
                      S_Link_Subdirs 'Access,
4320
                      S_Link_Verb    'Access,
4321
                      S_Link_ZZZZZ   'Access);
4322
 
4323
   ----------------------------
4324
   -- Switches for GNAT LIST --
4325
   ----------------------------
4326
 
4327
   S_List_Add     : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*"      &
4328
                                            "-aP*";
4329
   --        /ADD_PROJECT_SEARCH_PATH=(directory[,...])
4330
   --
4331
   --   Add directories to the project search path.
4332
 
4333
   S_List_All     : aliased constant S := "/ALL_UNITS "                    &
4334
                                            "-a";
4335
   --        /NOALL_UNITS (D)
4336
   --        /ALL_UNITS
4337
   --
4338
   --   Consider all units, including those of the predefined Ada library.
4339
   --   Especially useful with /DEPENDENCIES.
4340
 
4341
   S_List_Allproj : aliased constant S := "/ALL_PROJECTS "                 &
4342
                                            "-U";
4343
   --        /NOALL_PROJECTS (D)
4344
   --        /ALL_PROJECTS
4345
   --
4346
   --   When used with a project file and no file specified, indicate
4347
   --   that gnatls should be called for all sources of all projects in
4348
   --   the project tree.
4349
 
4350
   S_List_Current : aliased constant S := "/CURRENT_DIRECTORY "            &
4351
                                            "!-I-";
4352
   --        /CURRENT_DIRECTORY (D)
4353
   --        /NOCURRENT_DIRECTORY
4354
   --
4355
   --   Look for source, library or object files in the default directory.
4356
 
4357
   S_List_Depend  : aliased constant S := "/DEPENDENCIES "                 &
4358
                                            "-d";
4359
   --        /NODEPENDENCIES (D)
4360
   --        /DEPENDENCIES
4361
 
4362
   S_List_Ext     : aliased constant S := "/EXTERNAL_REFERENCE=" & '"'     &
4363
                                            "-X" & '"';
4364
   --        /EXTERNAL_REFERENCE="name=val"
4365
   --
4366
   --   Specifies an external reference to the project manager. Useful only if
4367
   --   /PROJECT_FILE is used.
4368
   --
4369
   --   Example:
4370
   --      /EXTERNAL_REFERENCE="DEBUG=TRUE"
4371
 
4372
   S_List_Files   : aliased constant S := "/FILES=@"                       &
4373
                                            "-files=@";
4374
   --        /FILES=filename
4375
   --
4376
   --   Take as arguments the files that are listed in the specified
4377
   --   text file.
4378
 
4379
   S_List_Follow  : aliased constant S := "/FOLLOW_LINKS_FOR_FILES "       &
4380
                                            "-eL";
4381
   --        /NOFOLLOW_LINKS_FOR_FILES (D)
4382
   --        /FOLLOW_LINKS_FOR_FILES
4383
   --
4384
   --    Follow links when parsing project files
4385
 
4386
   S_List_Mess    : aliased constant S := "/MESSAGES_PROJECT_FILE="        &
4387
                                            "DEFAULT "                     &
4388
                                               "-vP0 "                     &
4389
                                            "MEDIUM "                      &
4390
                                               "-vP1 "                     &
4391
                                            "HIGH "                        &
4392
                                               "-vP2";
4393
   --        /MESSAGES_PROJECT_FILE[=messages-option]
4394
   --
4395
   --   Specifies the "verbosity" of the parsing of project files.
4396
   --   messages-option may be one of the following:
4397
   --
4398
   --      DEFAULT (D)  No messages are output if there is no error or warning.
4399
   --
4400
   --      MEDIUM       A small number of messages are output.
4401
   --
4402
   --      HIGH         A great number of messages are output, most of them not
4403
   --                   being useful for the user.
4404
 
4405
   S_List_Nostinc : aliased constant S := "/NOSTD_INCLUDES "               &
4406
                                            "-nostdinc";
4407
   --        /NOSTD_INCLUDES
4408
   --
4409
   --   Do not look for sources of the run time in the standard directory.
4410
 
4411
   S_List_Object  : aliased constant S := "/OBJECT_SEARCH=*"               &
4412
                                            "-aO*";
4413
   --        /OBJECT_SEARCH=(directory,...)
4414
   --
4415
   --   When looking for library and object files look also in the specified
4416
   --   directories.
4417
 
4418
   S_List_Output  : aliased constant S := "/OUTPUT="                       &
4419
                                            "SOURCES "                     &
4420
                                               "-s "                       &
4421
                                            "DEPEND "                      &
4422
                                               "-d "                       &
4423
                                            "OBJECTS "                     &
4424
                                               "-o "                       &
4425
                                            "UNITS "                       &
4426
                                               "-u "                       &
4427
                                            "OPTIONS "                     &
4428
                                               "-h "                       &
4429
                                            "VERBOSE "                     &
4430
                                               "-v ";
4431
   --        /OUTPUT=(option,option,...)
4432
   --
4433
   --        SOURCES (D)     Only output information about source files.
4434
   --
4435
   --        DEPEND          List sources from which specified units depend on.
4436
   --
4437
   --        OBJECTS         Only output information about object files.
4438
   --
4439
   --        UNITS           Only output information about compilation units.
4440
   --
4441
   --        OPTIONS         Output the list of options.
4442
   --
4443
   --        VERBOSE         Output the complete source and object paths.
4444
   --                        Do not use the default column layout but instead
4445
   --                        use long format giving as much as information
4446
   --                        possible on each requested units, including
4447
   --                        special characteristics.
4448
 
4449
   S_List_Project : aliased constant S := "/PROJECT_FILE=<"                &
4450
                                            "-P>";
4451
   --        /PROJECT_FILE=filename
4452
   --
4453
   --   Specifies the main project file to be used. The project files rooted
4454
   --   at the main project file will be parsed before doing any listing.
4455
   --   The source and object directories to be searched will be communicated
4456
   --   to gnatlist through logical names ADA_PRJ_INCLUDE_FILE and
4457
   --   ADA_PRJ_OBJECTS_FILE.
4458
 
4459
   S_List_Search  : aliased constant S := "/SEARCH=*"                      &
4460
                                            "-I*";
4461
   --        /SEARCH=(directory,...)
4462
   --
4463
   --   Search the specified directories for both source and object files.
4464
 
4465
   S_List_Source  : aliased constant S := "/SOURCE_SEARCH=*"               &
4466
                                            "-aI*";
4467
   --        /SOURCE_SEARCH=(directory,...)
4468
   --
4469
   --   When looking for source files also look in the specified directories.
4470
 
4471
   S_List_Subdirs : aliased constant S := "/SUBDIRS=<"                     &
4472
                                             "--subdirs=>";
4473
   --        /SUBDIRS=dir
4474
   --
4475
   --   The actual directories (object, exec, library, ...) are subdirectories
4476
   --   of the directory specified in the project file. If the subdirectory
4477
   --   does not exist, it is created automatically.
4478
 
4479
   List_Switches : aliased constant Switches :=
4480
                     (S_List_Add     'Access,
4481
                      S_List_All     'Access,
4482
                      S_List_Allproj 'Access,
4483
                      S_List_Current 'Access,
4484
                      S_List_Depend  'Access,
4485
                      S_List_Ext     'Access,
4486
                      S_List_Files   'Access,
4487
                      S_List_Follow  'Access,
4488
                      S_List_Mess    'Access,
4489
                      S_List_Nostinc 'Access,
4490
                      S_List_Object  'Access,
4491
                      S_List_Output  'Access,
4492
                      S_List_Project 'Access,
4493
                      S_List_Search  'Access,
4494
                      S_List_Source  'Access,
4495
                      S_List_Subdirs 'Access);
4496
 
4497
   ----------------------------
4498
   -- Switches for GNAT MAKE --
4499
   ----------------------------
4500
 
4501
   S_Make_Actions : aliased constant S := "/ACTIONS="                      &
4502
                                            "COMPILE "                     &
4503
                                               "-c "                       &
4504
                                            "BIND "                        &
4505
                                               "-b "                       &
4506
                                            "LINK "                        &
4507
                                               "-l ";
4508
   --        /ACTIONS=(keyword[,...])
4509
   --
4510
   --  GNAT MAKE default behavior is to check if the sources are up to date,
4511
   --  compile those sources that are not up to date, bind the main source,
4512
   --  then link the executable.
4513
   --
4514
   --  With the /ACTIONS qualifier, GNAT MAKE may be restricted to one or
4515
   --  two of these three steps:
4516
   --
4517
   --  o Compile
4518
   --  o Bind
4519
   --  o Link
4520
   --
4521
   --
4522
   --   You may specify one or more of the following keywords to the /ACTIONS
4523
   --   qualifier:
4524
   --
4525
   --   BIND            Bind only. Can be combined with /ACTIONS=COMPILE
4526
   --                   to do compilation and binding, but no linking.
4527
   --                   Can be combined with /ACTIONS=LINK to do binding and
4528
   --                   linking. When not combined with /ACTIONS=COMPILE,
4529
   --                   all the units in the closure of the main program must
4530
   --                   have been previously compiled and must be up to date.
4531
   --
4532
   --   COMPILE         Compile only. Do not perform binding, except when
4533
   --                   /ACTIONS=BIND is also specified. Do not perform
4534
   --                   linking, except if both /ACTIONS=BIND and /ACTIONS=LINK
4535
   --                   are also specified.
4536
   --
4537
   --   LINK            Link only. Can be combined with /ACTIONS=BIND to do
4538
   --                   binding and linking. Linking will not be performed
4539
   --                   if combined with /ACTIONS=COMPILE but not with
4540
   --                   /ACTIONS=BIND\. When not combined with /ACTIONS=BIND
4541
   --                   all the units in the closure of the main program must
4542
   --                   have been previously compiled and must be up to date,
4543
   --                   and the main program need to have been bound.
4544
 
4545
   S_Make_Add     : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*"      &
4546
                                            "-aP*";
4547
   --        /ADD_PROJECT_SEARCH_PATH=(directory[,...])
4548
   --
4549
   --   Add directories to the project search path.
4550
 
4551
   S_Make_All     : aliased constant S := "/ALL_FILES "                    &
4552
                                            "-a";
4553
   --        /NOALL_FILES (D)
4554
   --        /ALL_FILES
4555
   --
4556
   --   Consider all files in the make process, even the GNAT internal system
4557
   --   files (for example, the predefined Ada library files). By default,
4558
   --   GNAT MAKE does not check these files (however, if there is an
4559
   --   installation problem, it will be caught when GNAT MAKE binds your
4560
   --   program). You may have to specify this qualifier if you are working on
4561
   --   GNAT itself.  The vast majority of GNAT MAKE users never need to
4562
   --   specify this switch.  All GNAT internal files with will be compiled
4563
   --   with /STYLE_CHECK=GNAT.
4564
 
4565
   S_Make_Allproj : aliased constant S := "/ALL_PROJECTS "                 &
4566
                                            "-U";
4567
   --        /NOALL_PROJECTS (D)
4568
   --        /ALL_PROJECTS
4569
   --
4570
   --   Implies /Unique.
4571
   --   When used without project files, it is equivalent to /UNIQUE.
4572
   --   When used with a project file with no main (neither on the command
4573
   --   line nor in the attribute Main) check every source of every project,
4574
   --   recompile all sources that are not up to date and rebuild libraries
4575
   --   if necessary.
4576
 
4577
   S_Make_Bind    : aliased constant S := "/BINDER_QUALIFIERS=?"           &
4578
                                            "-bargs BIND";
4579
   --        /BINDER_QUALIFIERS
4580
   --
4581
   --   Any qualifiers specified after this qualifier other than
4582
   --   /COMPILER_QUALIFIERS, /LINKER_QUALIFIERS and /MAKE_QUALIFIERS will be
4583
   --   passed to any GNAT BIND commands generated by GNAT MAKE.
4584
 
4585
   S_Make_Bindprj : aliased constant S := "/BND_LNK_FULL_PROJECT "         &
4586
                                            "-B";
4587
   --        /BND_LNK_FULL_PROJECT
4588
   --
4589
   --   Bind and link all sources of a project, without any consideration
4590
   --   to attribute Main, if there is one. This qualifier need to be
4591
   --   used in conjunction with the /PROJECT_FILE= qualifier and cannot
4592
   --   be used with a main subprogram on the command line or for
4593
   --   a library project file. As the binder is invoked with the option
4594
   --   meaning "No Ada main subprogram", the user must ensure that the
4595
   --   proper options are specified to the linker. This qualifier is
4596
   --   normally used when the main subprogram is in a foreign language
4597
   --   such as C.
4598
 
4599
   S_Make_Comp    : aliased constant S := "/COMPILER_QUALIFIERS=?"         &
4600
                                            "-cargs COMPILE";
4601
   --        /COMPILER_QUALIFIERS
4602
   --
4603
   --   Any qualifiers specified after this qualifier other than
4604
   --   /BINDER_QUALIFIERS, /LINKER_QUALIFIERS and /MAKE_QUALIFIERS will be
4605
   --   passed to any GNAT COMPILE commands generated by GNAT MAKE.
4606
 
4607
   S_Make_Cond    : aliased constant S := "/CONDITIONAL_SOURCE_SEARCH=*"   &
4608
                                            "-A*";
4609
   --        /CONDITIONAL_SOURCE_SEARCH=dir
4610
   --
4611
   --   Equivalent to "/SOURCE_SEARCH=dir /SKIP_MISSING=dir".
4612
 
4613
   S_Make_Cont    : aliased constant S := "/CONTINUE_ON_ERROR "            &
4614
                                            "-k";
4615
   --        /NOCONTINUE_ON_ERROR (D)
4616
   --        /CONTINUE_ON_ERROR
4617
   --
4618
   --   Keep going. Continue as much as possible after a compilation error.
4619
   --   To ease the programmer's task in case of compilation errors, the list
4620
   --   of sources for which the compile fails is given when GNAT MAKE
4621
   --   terminates.
4622
 
4623
   S_Make_Current : aliased constant S := "/CURRENT_DIRECTORY "            &
4624
                                            "!-I-";
4625
   --        /CURRENT_DIRECTORY (D)
4626
   --        /NOCURRENT_DIRECTORY
4627
   --
4628
   --   Look for source, library or object files in the default directory.
4629
 
4630
   S_Make_Dep     : aliased constant S := "/DEPENDENCIES_LIST "            &
4631
                                            "-M";
4632
   --        /NODEPENDENCIES_LIST (D)
4633
   --        /DEPENDENCIES_LIST
4634
   --
4635
   --   Check if all objects are up to date. If they are, output the object
4636
   --   dependences to SYS$OUTPUT in a form that can be directly exploited in
4637
   --   a Unix-style Makefile. By default, each source file is prefixed with
4638
   --   its (relative or absolute) directory name. This name is whatever you
4639
   --   specified in the various /SOURCE_SEARCH and /SEARCH qualifiers.  If
4640
   --   you also specify the /QUIET qualifier, only the source file names,
4641
   --   without relative paths, are output. If you just specify the
4642
   --   /DEPENDENCY_LIST qualifier, dependencies of the GNAT internal system
4643
   --   files are omitted.  This is typically what you want. If you also
4644
   --   specify the /ALL_FILES qualifier, dependencies of the GNAT internal
4645
   --   files are also listed. Note that dependencies of the objects in
4646
   --   external Ada libraries (see the /SKIP_MISSING qualifier) are never
4647
   --   reported.
4648
 
4649
   S_Make_Dirobj  : aliased constant S := "/DIRECTORY_OBJECTS=@"           &
4650
                                            "-D@";
4651
   --        /DIRECTORY_OBJECTS=<file>
4652
   --
4653
   --   Put all object files and .ALI files in <file>.
4654
   --   This qualifier is not compatible with /PROJECT_FILE.
4655
 
4656
   S_Make_Disprog : aliased constant S := "/DISPLAY_PROGRESS "             &
4657
                                            "-d";
4658
   --        /NOPLAY_PROGRESS (D)
4659
   --        /DISPLAY_PROGRESS
4660
   --
4661
   --   Display progress for each source, up to date or not, as a single line
4662
   --      completed x out of y (zz%)
4663
   --   If the file needs to be compiled this is displayed after the
4664
   --   invocation of the compiler. These lines are displayed even in quiet
4665
   --   output mode (/QUIET).
4666
 
4667
   S_Make_Doobj   : aliased constant S := "/DO_OBJECT_CHECK "              &
4668
                                            "-n";
4669
   --        /NODO_OBJECT_CHECK (D)
4670
   --        /DO_OBJECT_CHECK
4671
   --
4672
   --   Don't compile, bind, or link. Output a single command that will
4673
   --   recompile an out of date unit, if any. Repeated use of this option,
4674
   --   followed by carrying out the indicated compilation, will eventually
4675
   --   result in recompiling all required units.
4676
   --
4677
   --   If any ALI is missing during the process, GNAT MAKE halts and
4678
   --   displays an error message.
4679
 
4680
   S_Make_Execut  : aliased constant S := "/EXECUTABLE=@"                  &
4681
                                            "-o@";
4682
   --        /EXECUTABLE=exec-name
4683
   --
4684
   --   The name of the final executable program will be 'exec_name'. If this
4685
   --   qualifier is omitted the default name for the executable will be the
4686
   --   name of the input file with an EXE filetype.  You may prefix
4687
   --   'exec_name' with a relative or absolute directory path.
4688
 
4689
   S_Make_Ext     : aliased constant S := "/EXTERNAL_REFERENCE=" & '"'     &
4690
                                            "-X" & '"';
4691
   --        /EXTERNAL_REFERENCE="name=val"
4692
   --
4693
   --   Specifies an external reference to the project manager. Useful only if
4694
   --   /PROJECT_FILE is used.
4695
   --
4696
   --   Example:
4697
   --      /EXTERNAL_REFERENCE="DEBUG=TRUE"
4698
 
4699
   S_Make_Follow  : aliased constant S := "/FOLLOW_LINKS_FOR_FILES "       &
4700
                                            "-eL";
4701
   --        /NOFOLLOW_LINKS_FOR_FILES (D)
4702
   --        /FOLLOW_LINKS_FOR_FILES
4703
   --
4704
   --    Follow links when parsing project files
4705
 
4706
   S_Make_Force   : aliased constant S := "/FORCE_COMPILE "                &
4707
                                            "-f";
4708
   --        /NOFORCE_COMPILE (D)
4709
   --        /FORCE_COMPILE
4710
   --
4711
   --   Force recompilations. Recompile all sources, even though some object
4712
   --   files may be up to date, but don't recompile predefined or GNAT
4713
   --   internal files unless the /ALL_FILES qualifier is also specified.
4714
 
4715
   S_Make_Full    : aliased constant S := "/FULL_PATH_IN_BRIEF_MESSAGES "  &
4716
                                            "-F";
4717
   --        /NOFULL_PATH_IN_BRIEF_MESSAGES (D)
4718
   --        /FULL_PATH_IN_BRIEF_MESSAGES
4719
   --
4720
   --   When using project files, if some errors or warnings are detected
4721
   --   during parsing and verbose mode is not in effect (no use of qualifier
4722
   --   /VERBOSE), then error lines start with the full path name of the
4723
   --   project file, rather than its simple file name.
4724
 
4725
   S_Make_Hi_Verb : aliased constant S := "/HIGH_VERBOSITY "               &
4726
                                          "-vh";
4727
   --        /NOHIGH_VERBOSITY (D)
4728
   --        /HIGH_VERBOSITY
4729
   --
4730
   --   Displays the reason for all recompilations GNAT MAKE decides are
4731
   --   necessary, in high verbosity. Equivalent to /VERBOSE.
4732
 
4733
   S_Make_Inplace : aliased constant S := "/IN_PLACE "                     &
4734
                                            "-i";
4735
   --        /NOIN_PLACE (D)
4736
   --        /IN_PLACE
4737
   --
4738
   --   In normal mode, GNAT MAKE compiles all object files and ALI files
4739
   --   into the current directory. If the /IN_PLACE switch is used,
4740
   --   then instead object files and ALI files that already exist are over-
4741
   --   written in place. This means that once a large project is organized
4742
   --   into separate directories in the desired manner, then GNAT MAKE will
4743
   --   automatically maintain and update this organization. If no ALI files
4744
   --   are found on the Ada object path, the new object and ALI files are
4745
   --   created in the directory containing the source being compiled.
4746
 
4747
   S_Make_Index   : aliased constant S := "/SOURCE_INDEX=#"                &
4748
                                             "-eI#";
4749
   --        /SOURCE_INDEX=nnn
4750
   --
4751
   --   Specifies the index of the units in the source file
4752
   --   By default, source files are mono-unit and there is no index
4753
   --   When /SOURCE_INDEX=nnn is specified, only one main may be specified
4754
   --   on the command line.
4755
 
4756
   S_Make_Library : aliased constant S := "/LIBRARY_SEARCH=*"              &
4757
                                            "-L*";
4758
   --        /LIBRARY_SEARCH=(directory[,...])
4759
   --
4760
   --   Add the specified directories to the list of directories in which the
4761
   --   linker will search for libraries.
4762
 
4763
   S_Make_Link    : aliased constant S := "/LINKER_QUALIFIERS=?"           &
4764
                                            "-largs LINK";
4765
   --        /LINKER_QUALIFIERS
4766
   --
4767
   --   Any qualifiers specified after this qualifier other than
4768
   --   /COMPILER_QUALIFIERS, /BINDER_QUALIFIERS and /MAKE_QUALIFIERS will be
4769
   --   passed to any GNAT LINK commands generated by GNAT LINK.
4770
 
4771
   S_Make_Low_Verb : aliased constant S := "/LOW_VERBOSITY "               &
4772
                                           "-vl";
4773
   --        /NOLOW_VERBOSITY (D)
4774
   --        /LOW_VERBOSITY
4775
   --
4776
   --   Displays the reason for all recompilations GNAT MAKE decides are
4777
   --   necessary, in low verbosity, that is with less output than
4778
   --   /MEDIUM_VERBOSITY, /HIGH_VERBOSITY or /VERBOSE.
4779
 
4780
   S_Make_Make    : aliased constant S := "/MAKE_QUALIFIERS=?"             &
4781
                                            "-margs MAKE";
4782
   --        /MAKE_QUALIFIERS
4783
   --
4784
   --   Any qualifiers specified after this qualifier other than
4785
   --   /COMPILER_QUALIFIERS, /BINDER_QUALIFIERS and /LINKER_QUALIFIERS
4786
   --   are for the benefit of GNAT MAKE itself.
4787
 
4788
   S_Make_Mapping : aliased constant S := "/MAPPING "                      &
4789
                                            "-C";
4790
   --        /NOMAPPING (D)
4791
   --        /MAPPING
4792
   --
4793
   --   Use a mapping file.  A mapping file is a way to communicate to the
4794
   --   compiler two mappings: from unit names to file names (without any
4795
   --   directory information) and from file names to path names (with full
4796
   --   directory information). These mappings are used by the compiler to
4797
   --   short-circuit the path search. When GNAT MAKE is invoked with this
4798
   --   qualifier, it will create a mapping file, initially populated by the
4799
   --   project manager, if /PROJECT_File= is used, otherwise initially empty.
4800
   --   Each invocation of the compiler will add the newly accessed sources to
4801
   --   the mapping file. This will improve the source search during the next
4802
   --   invocations of the compiler
4803
 
4804
   S_Make_Med_Verb : aliased constant S := "/MEDIUM_VERBOSITY "            &
4805
                                           "-vm";
4806
   --        /NOMEDIUM_VERBOSITY (D)
4807
   --        /MEDIUM_VERBOSITY
4808
   --
4809
   --   Displays the reason for all recompilations GNAT MAKE decides are
4810
   --   necessary, in medium verbosity, that is with potentially less output
4811
   --   than /HIGH_VERBOSITY or /VERBOSE.
4812
 
4813
   S_Make_Mess    : aliased constant S := "/MESSAGES_PROJECT_FILE="        &
4814
                                            "DEFAULT "                     &
4815
                                               "-vP0 "                     &
4816
                                            "MEDIUM "                      &
4817
                                               "-vP1 "                     &
4818
                                            "HIGH "                        &
4819
                                               "-vP2";
4820
   --        /MESSAGES_PROJECT_FILE[=messages-option]
4821
   --
4822
   --   Specifies the "verbosity" of the parsing of project files.
4823
   --   messages-option may be one of the following:
4824
   --
4825
   --      DEFAULT (D)  No messages are output if there is no error or warning.
4826
   --
4827
   --      MEDIUM       A small number of messages are output.
4828
   --
4829
   --      HIGH         A great number of messages are output, most of them not
4830
   --                   being useful for the user.
4831
 
4832
   S_Make_Minimal : aliased constant S := "/MINIMAL_RECOMPILATION "        &
4833
                                            "-m";
4834
   --        /NOMINIMAL_RECOMPILATION (D)
4835
   --        /MINIMAL_RECOMPILATION
4836
   --
4837
   --   Specifies that the minimum necessary amount of recompilation
4838
   --   be performed. In this mode GNAT MAKE ignores time stamp differences
4839
   --   when the only modifications to a source file consist in
4840
   --   adding/removing comments, empty lines, spaces or tabs.
4841
 
4842
   S_Make_Missing : aliased constant S := "/CREATE_MISSING_DIRS "          &
4843
                                            "-p";
4844
   --        /NOCREATE_MISSING_DIRS (D)
4845
   --        /CREATE_MISSING_DIRS
4846
   --
4847
   --   When an object directory, a library directory or an exec directory
4848
   --   in missing, attempt to create the directory.
4849
 
4850
   S_Make_Nolink  : aliased constant S := "/NOLINK "                       &
4851
                                            "-c";
4852
   --        /NOLINK
4853
   --
4854
   --   Compile only. Do not perform binding and linking. If the root unit is
4855
   --   not a main unit, this is the default.  Otherwise GNAT MAKE will
4856
   --   attempt binding and linking unless all objects are up to date and the
4857
   --   executable is more recent than the objects.
4858
   --   This is equivalent to /ACTIONS=COMPILE
4859
 
4860
   S_Make_Nomain  : aliased constant S := "/NOMAIN "                       &
4861
                                            "-z";
4862
   --        /NOMAIN
4863
   --
4864
   --   No main subprogram. Bind and link the program even if the unit name
4865
   --   given on the command line is a package name. The resulting executable
4866
   --   will execute the elaboration routines of the package and its closure,
4867
   --   then the finalization routines.
4868
 
4869
   S_Make_Nonpro  : aliased constant S := "/NON_PROJECT_UNIT_COMPILATION " &
4870
                                            "-x";
4871
   --        /NON_PROJECT_UNIT_COMPILATION
4872
   --
4873
   --    Normally, when using project files, a unit that is not part of any
4874
   --    project file, cannot be compile. These units may be compile, when
4875
   --    needed, if this qualifier is specified.
4876
 
4877
   S_Make_Nostinc : aliased constant S := "/NOSTD_INCLUDES "               &
4878
                                            "-nostdinc";
4879
   --        /NOSTD_INCLUDES
4880
   --
4881
   --    Do not look for sources the in the system default directory.
4882
 
4883
   S_Make_Nostlib : aliased constant S := "/NOSTD_LIBRARIES "              &
4884
                                            "-nostdlib";
4885
   --        /NOSTD_LIBRARIES
4886
   --
4887
   --    Do not look for library files in the system default directory.
4888
 
4889
   S_Make_Object  : aliased constant S := "/OBJECT_SEARCH=*"               &
4890
                                            "-aO*";
4891
   --        /OBJECT_SEARCH=(directory[,...])
4892
   --
4893
   --   When looking for library and object files look also in the specified
4894
   --   directories.
4895
 
4896
   S_Make_Proc    : aliased constant S := "/PROCESSES=#"                   &
4897
                                            "-j#";
4898
   --        /NOPROCESSES (D)
4899
   --        /PROCESSES=NNN
4900
   --
4901
   --   Use NNN processes to carry out the (re)compilations. If you have a
4902
   --   multiprocessor machine, compilations will occur in parallel.  In the
4903
   --   event of compilation errors, messages from various compilations might
4904
   --   get interspersed (but GNAT MAKE will give you the full ordered list of
4905
   --   failing compiles at the end). This can at times be annoying.  To get a
4906
   --   clean list of error messages don't use this qualifier.
4907
 
4908
   S_Make_Nojobs  : aliased constant S := "/NOPROCESSES "                  &
4909
                                            "-j1";
4910
   --  NODOC (see /PROCESS)
4911
 
4912
   S_Make_Project : aliased constant S := "/PROJECT_FILE=<"                &
4913
                                            "-P>";
4914
   --        /PROJECT_FILE=filename
4915
   --
4916
   --   Specifies the main project file to be used. The project files rooted
4917
   --   at the main project file will be parsed before any other processing to
4918
   --   set the building environment.
4919
 
4920
   S_Make_Quiet   : aliased constant S := "/QUIET "                        &
4921
                                            "-q";
4922
   --        /NOQUIET (D)
4923
   --        /QUIET
4924
   --
4925
   --   When this qualifiers is specified, the commands carried out by GNAT
4926
   --   MAKE are not displayed.
4927
 
4928
   S_Make_Reason  : aliased constant S := "/REASONS "                      &
4929
                                            "-v";
4930
   --        /NOREASONS (D)
4931
   --        /REASONS
4932
   --
4933
   --   Displays the reason for all recompilations GNAT MAKE decides are
4934
   --   necessary.
4935
 
4936
   S_Make_RTS     : aliased constant S := "/RUNTIME_SYSTEM=|"              &
4937
                                            "--RTS=|";
4938
   --        /RUNTIME_SYSTEM=xxx
4939
   --
4940
   --    Build against an alternate runtime system named xxx or RTS-xxx.
4941
 
4942
   S_Make_Search  : aliased constant S := "/SEARCH=*"                      &
4943
                                            "-I*";
4944
   --        /SEARCH=(directory[,...])
4945
   --
4946
   --   Search the specified directories for both source and object files.
4947
 
4948
   S_Make_Single  : aliased constant S := "/SINGLE_COMPILE_PER_OBJ_DIR "   &
4949
                                            "--single-compile-per-obj-dir";
4950
   --        /NOSINGLE_COMPILE_PER_OBJ_DIR (D)
4951
   --        /SINGLE_COMPILE_PER_OBJ_DIR
4952
   --
4953
   --    When project files are used, do not allow simultaneous compilations
4954
   --    for the same object directory.
4955
 
4956
   S_Make_Skip    : aliased constant S := "/SKIP_MISSING=*"                &
4957
                                            "-aL*";
4958
   --        /SKIP_MISSING=(directory[,...])
4959
   --
4960
   --   Skip missing library sources if ALI in 'directory'.
4961
 
4962
   S_Make_Source  : aliased constant S := "/SOURCE_SEARCH=*"               &
4963
                                            "-aI*";
4964
   --        /SOURCE_SEARCH=(directory[,...])
4965
   --
4966
   --   When looking for source files also look in the specified directories.
4967
 
4968
   S_Make_Src_Info : aliased constant S := "/SRC_INFO=<"                   &
4969
                                             "--source-info=>";
4970
   --        /SRC_INFO=source-info-file
4971
   --
4972
   --   Specify a source info file to be read or written by the Project
4973
   --   Manager when project files are used.
4974
 
4975
   S_Make_Stand   : aliased constant S := "/STANDARD_OUTPUT_FOR_COMMANDS " &
4976
                                            "-eS";
4977
   --        /NOSTANDARD_OUTPUT_FOR_COMMANDS (D)
4978
   --        /STANDARD_OUTPUT_FOR_COMMANDS
4979
   --
4980
   --   Output the commands for the compiler, the binder and the linker
4981
   --   on SYS$OUTPUT, instead of SYS$ERROR.
4982
 
4983
   S_Make_Subdirs : aliased constant S := "/SUBDIRS=<"                     &
4984
                                             "--subdirs=>";
4985
   --        /SUBDIRS=dir
4986
   --
4987
   --   The actual directories (object, exec, library, ...) are subdirectories
4988
   --   of the directory specified in the project file. If the subdirectory
4989
   --   does not exist, it is created automatically.
4990
 
4991
   S_Make_Switch  : aliased constant S := "/SWITCH_CHECK "                 &
4992
                                            "-s";
4993
   --        /NOSWITCH_CHECK (D)
4994
   --        /SWITCH_CHECK
4995
   --
4996
   --   Recompile if compiler switches have changed since last compilation.
4997
   --   All compiler switches but -I and -o are taken into account in the
4998
   --   following way: orders between different "first letter" switches are
4999
   --   ignored, but orders between same switches are taken into account.
5000
   --   For example, -O -O2 is different than -O2 -O, but -g -O is equivalent
5001
   --   to -O -g.
5002
 
5003
   S_Make_USL : aliased constant S := "/UNCHECKED_SHARED_LIB_IMPORTS " &
5004
                                         "--unchecked-shared-lib-imports";
5005
   --        /NOUNCHECKED_SHARED_LIB_IMPORTS (D)
5006
   --        /UNCHECKED_SHARED_LIB_IMPORTS
5007
   --
5008
   --   Allow shared library projects to import static library projects
5009
 
5010
   S_Make_Unique  : aliased constant S := "/UNIQUE "                       &
5011
                                            "-u";
5012
   --        /NOUNIQUE (D)
5013
   --        /UNIQUE
5014
   --
5015
   --  Recompile at most the main file. It implies /ACTIONS=COMPILE.
5016
   --  Combined with /FORCE_COMPILE, it is equivalent to calling the compiler
5017
   --  directly.
5018
 
5019
   S_Make_Use_Map : aliased constant S := "/USE_MAPPING_File=@"            &
5020
                                            "-C=@";
5021
   --        /USE_MAPPING_FILE=file_name
5022
   --
5023
   --   Use a specific mapping file. The file 'file_name', specified as a path
5024
   --   name (absolute or relative) by this qualifier, should already exist,
5025
   --   otherwise the qualifier is ineffective. The specified mapping file
5026
   --   will be communicated to the compiler. This switch is not compatible
5027
   --   with a project file (/PROJECT_FILE=) or with multiple compiling
5028
   --   processes (/PROCESSES=nnn, when nnn is greater than 1).
5029
 
5030
   S_Make_Verbose : aliased constant S := "/VERBOSE "                      &
5031
                                            "-v";
5032
   --        /NOVERBOSE (D)
5033
   --        /VERBOSE
5034
   --
5035
   --   Displays the reason for all recompilations GNAT MAKE decides are
5036
   --   necessary.
5037
 
5038
   Make_Switches : aliased constant Switches :=
5039
                     (S_Make_Add     'Access,
5040
                      S_Make_Actions 'Access,
5041
                      S_Make_All     'Access,
5042
                      S_Make_Allproj 'Access,
5043
                      S_Make_Bind    'Access,
5044
                      S_Make_Comp    'Access,
5045
                      S_Make_Cond    'Access,
5046
                      S_Make_Cont    'Access,
5047
                      S_Make_Current 'Access,
5048
                      S_Make_Dep     'Access,
5049
                      S_Make_Dirobj  'Access,
5050
                      S_Make_Disprog 'Access,
5051
                      S_Make_Doobj   'Access,
5052
                      S_Make_Execut  'Access,
5053
                      S_Make_Ext     'Access,
5054
                      S_Make_Follow  'Access,
5055
                      S_Make_Force   'Access,
5056
                      S_Make_Full    'Access,
5057
                      S_Make_Hi_Verb 'Access,
5058
                      S_Make_Inplace 'Access,
5059
                      S_Make_Index   'Access,
5060
                      S_Make_Library 'Access,
5061
                      S_Make_Link    'Access,
5062
                      S_Make_Low_Verb'Access,
5063
                      S_Make_Make    'Access,
5064
                      S_Make_Mapping 'Access,
5065
                      S_Make_Med_Verb'Access,
5066
                      S_Make_Mess    'Access,
5067
                      S_Make_Minimal 'Access,
5068
                      S_Make_Missing 'Access,
5069
                      S_Make_Nolink  'Access,
5070
                      S_Make_Nomain  'Access,
5071
                      S_Make_Nonpro  'Access,
5072
                      S_Make_Nostinc 'Access,
5073
                      S_Make_Nostlib 'Access,
5074
                      S_Make_Object  'Access,
5075
                      S_Make_Proc    'Access,
5076
                      S_Make_Nojobs  'Access,
5077
                      S_Make_Project 'Access,
5078
                      S_Make_Quiet   'Access,
5079
                      S_Make_Reason  'Access,
5080
                      S_Make_RTS     'Access,
5081
                      S_Make_Search  'Access,
5082
                      S_Make_Single  'Access,
5083
                      S_Make_Skip    'Access,
5084
                      S_Make_Source  'Access,
5085
                      S_Make_Src_Info'Access,
5086
                      S_Make_Stand   'Access,
5087
                      S_Make_Subdirs 'Access,
5088
                      S_Make_Switch  'Access,
5089
                      S_Make_USL     'Access,
5090
                      S_Make_Unique  'Access,
5091
                      S_Make_Use_Map 'Access,
5092
                      S_Make_Verbose 'Access);
5093
 
5094
   ------------------------------
5095
   -- Switches for GNAT METRIC --
5096
   ------------------------------
5097
 
5098
   S_Metric_Add     : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*"    &
5099
                                              "-aP*";
5100
   --        /ADD_PROJECT_SEARCH_PATH=(directory[,...])
5101
   --
5102
   --   Add directories to the project search path.
5103
 
5104
   S_Metric_All_Prjs : aliased constant S := "/ALL_PROJECTS "              &
5105
                                               "-U";
5106
   --        /NOALL_PROJECTS (D)
5107
   --        /ALL_PROJECTS
5108
   --   When GNAT METRIC is used with a Project File and no source is
5109
   --   specified, the underlying tool gnatmetric is called for all the
5110
   --   sources of all the Project Files in the project tree.
5111
 
5112
   S_Metric_Debug    : aliased constant S := "/DEBUG_OUTPUT "              &
5113
                                             "-dv";
5114
   --      /DEBUG_OUTPUT
5115
   --
5116
   --   Generate the debug information
5117
 
5118
   S_Metric_Direct   : aliased constant S := "/DIRECTORY=@"                &
5119
                                             "-d=@";
5120
   --      /DIRECTORY=pathname
5121
   --
5122
   --   Put the files with detailed metric information into the specified
5123
   --   directory
5124
 
5125
   S_Metric_Element : aliased constant S := "/ELEMENT_METRICS="            &
5126
                                             "ALL "                        &
5127
                                              "!-ed,!-es,!-enl,!-eps,"     &
5128
                                              "!-eas,!-ept,!-eat,!-enu,"   &
5129
                                              "!-ec "                      &
5130
                                             "DECLARATION_TOTAL "          &
5131
                                              "-ed "                       &
5132
                                             "STATEMENT_TOTAL "            &
5133
                                              "-es "                       &
5134
                                             "LOOP_NESTING_MAX "           &
5135
                                              "-enl "                      &
5136
                                             "INT_SUBPROGRAMS "            &
5137
                                              "-eps "                      &
5138
                                             "SUBPROGRAMS_ALL "            &
5139
                                              "-eas "                      &
5140
                                             "INT_TYPES "                  &
5141
                                              "-ept "                      &
5142
                                             "TYPES_ALL "                  &
5143
                                              "-eat "                      &
5144
                                             "PROGRAM_NESTING_MAX "        &
5145
                                              "-enu "                      &
5146
                                             "CONSTRUCT_NESTING_MAX "      &
5147
                                              "-ec";
5148
   --  NODOC  (see /SYNTAX_METRICS)
5149
 
5150
   S_Metric_Syntax : aliased constant S := "/SYNTAX_METRICS="              &
5151
                                             "ALL "                        &
5152
                                             "--syntax-all "               &
5153
                                             "NONE "                       &
5154
                                             "--no-syntax-all "            &
5155
                                             "DECLARATIONS "               &
5156
                                             "--declarations "             &
5157
                                             "NODECLARATIONS "             &
5158
                                             "--no-declarations "          &
5159
                                             "STATEMENTS "                 &
5160
                                             "--statements "               &
5161
                                             "NOSTATEMENTS "               &
5162
                                             "--no-statements "            &
5163
                                             "PUBLIC_SUBPROGRAMS "         &
5164
                                             "--public-subprograms "       &
5165
                                             "NOPUBLIC_SUBPROGRAMS "       &
5166
                                             "--no-public-subprograms "    &
5167
                                             "ALL_SUBPROGRAMS "            &
5168
                                             "--all-subprograms "          &
5169
                                             "NOALL_SUBPROGRAMS "          &
5170
                                             "--no-all-subprograms "       &
5171
                                             "PUBLIC_TYPES "               &
5172
                                             "--public-types "             &
5173
                                             "NOPUBLIC_TYPES "             &
5174
                                             "--no-public-types "          &
5175
                                             "ALL_TYPES "                  &
5176
                                             "--all-types "                &
5177
                                             "NOALL_TYPES "                &
5178
                                             "--no-all-types "             &
5179
                                             "UNIT_NESTING "               &
5180
                                             "--unit-nesting "             &
5181
                                             "NOUNIT_NESTING "             &
5182
                                             "--no-unit-nesting "          &
5183
                                             "CONSTRUCT_NESTING "          &
5184
                                             "--construct-nesting "        &
5185
                                             "NOCONSTRUCT_NESTING "        &
5186
                                             "--no-construct-nesting";
5187
   --       /SYNTAX_METRICS(option, option ...)
5188
   --
5189
   --   Specifies the syntax element metrics to be computed (if at least one
5190
   --   positive syntax element metric, line metric, complexity or coupling
5191
   --   metric is specified then only explicitly specified syntax element
5192
   --   metrics are computed and reported)
5193
   --
5194
   --   option may be one of the following:
5195
   --
5196
   --     ALL (D)               All the syntax element metrics are computed
5197
   --     NONE                  None of syntax element metrics is computed
5198
   --     DECLARATIONS          Compute the total number of declarations
5199
   --     NODECLARATIONS        Do not compute the total number of declarations
5200
   --     STATEMENTS            Compute the total number of statements
5201
   --     NOSTATEMENTS          Do not compute the total number of statements
5202
   --     PUBLIC_SUBPROGRAMS    Compute the number of public subprograms
5203
   --     NOPUBLIC_SUBPROGRAMS  Do not compute the number of public subprograms
5204
   --     ALL_SUBPROGRAMS       Compute the number of all the subprograms
5205
   --     NOALL_SUBPROGRAMS     Do not compute the number of all the
5206
   --                           subprograms
5207
   --     PUBLIC_TYPES          Compute the number of public types
5208
   --     NOPUBLIC_TYPES        Do not compute the number of public types
5209
   --     ALL_TYPES             Compute the number of all the types
5210
   --     NOALL_TYPES           Do not compute the number of all the types
5211
   --     UNIT_NESTING          Compute the maximal program unit nesting
5212
   --                           level
5213
   --     NOUNIT_NESTING        Do not compute the maximal program unit
5214
   --                           nesting level
5215
   --     CONSTRUCT_NESTING     Compute the maximal construct nesting level
5216
   --     NOCONSTRUCT_NESTING   Do not compute the maximal construct nesting
5217
   --                           level
5218
   --
5219
   --   All combinations of syntax element metrics options are allowed.
5220
 
5221
   S_Metric_Ext     : aliased constant S := "/EXTERNAL_REFERENCE=" & '"'   &
5222
                                             "-X" & '"';
5223
   --       /EXTERNAL_REFERENCE="name=val"
5224
   --
5225
   --   Specifies an external reference to the project manager. Useful only if
5226
   --   /PROJECT_FILE is used.
5227
   --
5228
   --   Example:
5229
   --      /EXTERNAL_REFERENCE="DEBUG=TRUE"
5230
 
5231
   S_Metric_Files   : aliased constant S := "/FILES=@"                     &
5232
                                             "-files=@";
5233
   --      /FILES=filename
5234
   --
5235
   --   Take as arguments the files that are listed in the specified
5236
   --   text file.
5237
 
5238
   S_Metric_Format  : aliased constant S := "/FORMAT_OUTPUT="              &
5239
                                             "DEFAULT "                    &
5240
                                              "!-x,!-nt,!-sfn "            &
5241
                                             "XML "                        &
5242
                                              "-x "                        &
5243
                                             "XSD "                        &
5244
                                              "-xs "                       &
5245
                                             "NO_TEXT "                    &
5246
                                              "-nt "                       &
5247
                                             "SHORT_SOURCE_FILE_NAME "     &
5248
                                              "-sfn";
5249
   --       /FORMAT_OUTPUT=(option, option ...)
5250
   --
5251
   --   Specifies the details of the tool output
5252
   --
5253
   --   option may be one of the following:
5254
   --
5255
   --     DEFAULT (D)             Generate the text output only, use full
5256
   --                             argument source names in global information
5257
   --     XML                     Generate the output in XML format
5258
   --     XSD                     Generate the output in XML format, and
5259
   --                             generate an XML schema file that describes
5260
   --                             the structure of XML metrics report
5261
   --     NO_TEXT                 Do not generate the text output (implies XML)
5262
   --     SHORT_SOURCE_FILE_NAME  Use short argument source names in output
5263
 
5264
   S_Metric_Globout : aliased constant S := "/GLOBAL_OUTPUT=@"             &
5265
                                             "-og@";
5266
   --        /GLOBAL_OUTPUT=filename
5267
   --
5268
   --   Put the textual global metric information into the specified file
5269
 
5270
   S_Metric_Line     : aliased constant S := "/LINE_METRICS="              &
5271
                                                "ALL "                     &
5272
                                                 "!-la,!-lcode,!-lcomm,"   &
5273
                                                 "!-leol,!-lb "            &
5274
                                                "LINES_ALL "               &
5275
                                                 "-la "                    &
5276
                                                "CODE_LINES "              &
5277
                                                 "-lcode "                 &
5278
                                                "COMENT_LINES "            &
5279
                                                 "-lcomm "                 &
5280
                                                "MIXED_CODE_COMMENTS "     &
5281
                                                 "-leol "                  &
5282
                                                "COMMENT_PERCENTAGE "      &
5283
                                                 "-lratio "                &
5284
                                                "BLANK_LINES "             &
5285
                                                 "-lb "                    &
5286
                                                "AVERAGE_LINES_IN_BODIES " &
5287
                                                 "-lav ";
5288
   --  NODOC  (see /LINE_COUNT_METRICS)
5289
 
5290
   S_Metric_Lines : aliased constant S := "/LINE_COUNT_METRICS="           &
5291
                                           "ALL "                          &
5292
                                           "--lines-all "                  &
5293
                                           "NONE "                         &
5294
                                           "--no-lines-all "               &
5295
                                           "ALL_LINES "                    &
5296
                                           "--lines "                      &
5297
                                           "NOALL_LINES "                  &
5298
                                           "--no-lines "                   &
5299
                                           "CODE_LINES "                   &
5300
                                           "--lines-code "                 &
5301
                                           "NOCODE_LINES "                 &
5302
                                           "--no-lines-code "              &
5303
                                           "COMMENT_LINES "                &
5304
                                           "--lines-comment "              &
5305
                                           "NOCOMMENT_LINES "              &
5306
                                           "--no-lines-comment "           &
5307
                                           "CODE_COMMENT_LINES "           &
5308
                                           "--lines-eol-comment "          &
5309
                                           "NOCODE_COMMENT_LINES "         &
5310
                                           "--no-lines-eol-comment "       &
5311
                                           "COMMENT_PERCENTAGE "           &
5312
                                           "--lines-ratio "                &
5313
                                           "NOCOMMENT_PERCENTAGE "         &
5314
                                           "--no-lines-ratio "             &
5315
                                           "BLANK_LINES "                  &
5316
                                           "--lines-blank "                &
5317
                                           "NOBLANK_LINES "                &
5318
                                           "--no-lines-blank "             &
5319
                                           "AVERAGE_BODY_LINES "           &
5320
                                           "--lines-average "              &
5321
                                           "NOAVERAGE_BODY_LINES "         &
5322
                                           "--no-lines-average";
5323
   --      /LINE_COUNT_METRICS=(option, option ...)
5324
 
5325
   --   Specifies the line metrics to be computed (if at least one positive
5326
   --   syntax element metric, line metric, complexity or coupling metric is
5327
   --   specified then only explicitly specified line metrics are computed
5328
   --   and reported)
5329
   --
5330
   --   option may be one of the following:
5331
   --
5332
   --     ALL (D)               All the line metrics are computed
5333
   --     NONE                  None of line metrics is computed
5334
   --     ALL_LINES             All lines are computed
5335
   --     NOALL_LINES           All lines are not computed
5336
   --     CODE_LINES            Lines with Ada code are computed
5337
   --     NOCODE_LINES          Lines with Ada code are not computed
5338
   --     COMMENT_LINES         Comment lines are computed
5339
   --     NOCOMMENT_LINES       Comment lines are not computed
5340
   --     CODE_COMMENT_LINES    Lines containing both code and comment parts
5341
   --                           are computed
5342
   --     NOCODE_COMMENT_LINES  Lines containing both code and comment parts
5343
   --                           are not computed
5344
   --     COMMENT_PERCENTAGE    Ratio between comment lines and all the lines
5345
   --                           containing comments and program code is
5346
   --                           computed
5347
   --     NOCOMMENT_PERCENTAGE  Ratio between comment lines and all the lines
5348
   --                           containing comments and program code is not
5349
   --                           computed
5350
   --     BLANK_LINES           Blank lines are computed
5351
   --     NOBLANK_LINES         Blank lines are not computed
5352
   --     AVERAGE_BODY_LINES    Average number of code lines in subprogram,
5353
   --                           task and entry bodies and statement sequences
5354
   --                           of package bodies is computed
5355
   --     NOAVERAGE_BODY_LINES  Average number of code lines in subprogram,
5356
   --                           task and entry bodies and statement sequences
5357
   --                           of package bodies is not computed
5358
   --
5359
   --   All combinations of line metrics options are allowed.
5360
 
5361
   S_Metric_Complexity : aliased constant S := "/COMPLEXITY_METRICS="      &
5362
                                               "ALL "                      &
5363
                                               "--complexity-all "         &
5364
                                              "NONE "                      &
5365
                                              "--no-complexity-all "       &
5366
                                              "CYCLOMATIC "                &
5367
                                              "--complexity-cyclomatic "   &
5368
                                              "NOCYCLOMATIC "              &
5369
                                              "--no-complexity-cyclomatic "&
5370
                                              "ESSENTIAL "                 &
5371
                                              "--complexity-essential "    &
5372
                                              "NOESSENTIAL "               &
5373
                                              "--no-complexity-essential " &
5374
                                              "LOOP_NESTING "              &
5375
                                              "--loop-nesting "            &
5376
                                              "NOLOOP_NESTING "            &
5377
                                              "--no-loop-nesting "         &
5378
                                              "AVERAGE_COMPLEXITY "        &
5379
                                              "--complexity-average "      &
5380
                                              "NOAVERAGE_COMPLEXITY "      &
5381
                                              "--no-complexity-average "   &
5382
                                              "EXTRA_EXIT_POINTS "         &
5383
                                              "--extra-exit-points "       &
5384
                                              "NOEXTRA_EXIT_POINTS "       &
5385
                                              "--no-extra-exit-points";
5386
   --      /COMPLEXITY_METRICS=(option, option ...)
5387
 
5388
   --   Specifies the complexity metrics to be computed (if at least one
5389
   --   positive syntax element metric, line metric, complexity or coupling
5390
   --   metric is specified then only explicitly specified complexity metrics
5391
   --   are computed and reported)
5392
   --
5393
   --   option may be one of the following:
5394
   --
5395
   --     ALL (D)               All the complexity metrics are computed
5396
   --     NONE                  None of complexity metrics is computed
5397
   --     CYCLOMATIC            Compute the McCabe Cyclomatic Complexity
5398
   --     NOCYCLOMATIC          Do not compute the McCabe Cyclomatic Complexity
5399
   --     ESSENTIAL             Compute the Essential Complexity
5400
   --     NOESSENTIAL           Do not compute the Essential Complexity
5401
   --     LOOP_NESTING          Compute the maximal loop nesting
5402
   --     NOLOOP_NESTING        Do not compute the maximal loop nesting
5403
   --     AVERAGE_COMPLEXITY    Compute the average complexity for executable
5404
   --                           bodies
5405
   --     NOAVERAGE_COMPLEXITY  Do not compute the average complexity for
5406
   --                           executable bodies
5407
   --     EXTRA_EXIT_POINTS     Compute extra exit points metric
5408
   --     NOEXTRA_EXIT_POINTS   Do not compute extra exit points metric
5409
   --
5410
   --   All combinations of line metrics options are allowed.
5411
 
5412
   S_Metric_Coupling : aliased constant S := "/COUPLING_METRICS="             &
5413
                                           "ALL "                             &
5414
                                           "--coupling-all "                  &
5415
                                           "TAGGED_OUT "                      &
5416
                                           "--tagged-coupling-out "           &
5417
                                           "TAGGED_IN "                       &
5418
                                           "--tagged-coupling-in "            &
5419
                                           "HIERARCHY_OUT "                   &
5420
                                           "--hierarchy-coupling-out "        &
5421
                                           "HIERARCHY_IN "                    &
5422
                                           "--hierarchy-coupling-in "         &
5423
                                           "UNIT_OUT "                        &
5424
                                           "--unit-coupling-out "             &
5425
                                           "UNIT_IN "                         &
5426
                                           "--unit-coupling-in "              &
5427
                                           "CONTROL_OUT "                     &
5428
                                           "--control-coupling-out "          &
5429
                                           "CONTROL_IN "                      &
5430
                                           "--control-coupling-in";
5431
 
5432
   --      /COUPLING_METRICS=(option, option ...)
5433
 
5434
   --   Specifies the coupling metrics to be computed.
5435
   --
5436
   --   option may be one of the following:
5437
   --
5438
   --     ALL            All the coupling metrics are computed
5439
   --     NOALL (D)      None of coupling metrics is computed
5440
   --     TAGGED_OUT     Compute tagged (class) far-out coupling
5441
   --     TAGGED_IN      Compute tagged (class) far-in coupling
5442
   --     HIERARCHY_OUT  Compute hieraqrchy (category) far-out coupling
5443
   --     HIERARCHY_IN   Compute hieraqrchy (category) far-in coupling
5444
   --     UNIT_OUT       Compute unit far-out coupling
5445
   --     UNIT_IN        Compute unit far-in coupling
5446
   --     CONTROL_OUT    Compute control far-out coupling
5447
   --     CONTROL_IN     Compute control far-in coupling
5448
 
5449
   --
5450
   --   All combinations of coupling metrics options are allowed.
5451
 
5452
   S_Metric_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES "      &
5453
                                             "-eL";
5454
   --        /NOFOLLOW_LINKS_FOR_FILES (D)
5455
   --        /FOLLOW_LINKS_FOR_FILES
5456
   --
5457
   --    Follow links when parsing project files
5458
 
5459
   S_Metric_No_Local : aliased constant S := "/NO_LOCAL_DETAILS "          &
5460
                                             "-nolocal";
5461
   --        /LOCAL_DETAILS (D)
5462
   --        /NO_LOCAL_DETAILS
5463
   --
5464
   --   Do not compute the detailed metrics for local program units.
5465
 
5466
   S_Metric_No_Exits_As_Gotos : aliased constant S := "/NO_EXITS_AS_GOTOS " &
5467
                                                      "-ne";
5468
   --        /EXITS_AS_GOTOS (D)
5469
   --        /NO_EXITS_AS_GOTOS
5470
   --
5471
   --   Do not count EXIT statements as GOTOs when computing the Essential
5472
   --   Complexity.
5473
 
5474
   S_Metric_No_Static_Loop : aliased constant S := "/NO_STATIC_LOOP " &
5475
                                                   "--no-static-loop";
5476
   --        /STATIC_LOOP (D)
5477
   --        /NO_STATIC_LOOP
5478
   --
5479
   --   Do not count static FOR loop statements when computing the Cyclomatic
5480
   --   Complexity.
5481
 
5482
   S_Metric_Mess    : aliased constant S := "/MESSAGES_PROJECT_FILE="      &
5483
                                             "DEFAULT "                    &
5484
                                                "-vP0 "                    &
5485
                                             "MEDIUM "                     &
5486
                                                "-vP1 "                    &
5487
                                             "HIGH "                       &
5488
                                                "-vP2";
5489
   --        /MESSAGES_PROJECT_FILE[=messages-option]
5490
   --
5491
   --   Specifies the "verbosity" of the parsing of project files.
5492
   --   messages-option may be one of the following:
5493
   --
5494
   --      DEFAULT (D)  No messages are output if there is no error or warning.
5495
   --
5496
   --      MEDIUM       A small number of messages are output.
5497
   --
5498
   --      HIGH         A great number of messages are output, most of them not
5499
   --                   being useful for the user.
5500
 
5501
   S_Metric_Project : aliased constant S := "/PROJECT_FILE=<"              &
5502
                                             "-P>";
5503
   --        /PROJECT_FILE=filename
5504
   --
5505
   --   Specifies the main project file to be used. The project files rooted
5506
   --   at the main project file will be parsed before the invocation of the
5507
   --   binder.
5508
 
5509
   S_Metric_Quiet    : aliased constant S := "/QUIET "                     &
5510
                                             "-q";
5511
   --        /NOQUIET (D)
5512
   --        /QUIET
5513
   --
5514
   --   Quiet mode: by default GNAT METRIC outputs to the standard error stream
5515
   --   the number of program units left to be processed. This option turns
5516
   --   this trace off.
5517
 
5518
   S_Metric_Subdirs : aliased constant S := "/SUBDIRS=<"                   &
5519
                                               "--subdirs=>";
5520
   --        /SUBDIRS=dir
5521
   --
5522
   --   The actual directories (object, exec, library, ...) are subdirectories
5523
   --   of the directory specified in the project file. If the subdirectory
5524
   --   does not exist, it is created automatically.
5525
 
5526
   S_Metric_Suffix  : aliased constant S := "/SUFFIX_DETAILS=" & '"'       &
5527
                                             "-o" & '"';
5528
   --        /SUFFIX_DETAILS=suffix
5529
   --
5530
   --   Use the given suffix as the suffix for the name of the file to place
5531
   --   the detailed metrics into.
5532
 
5533
   S_Metric_Suppress : aliased constant S :=  "/SUPPRESS="                 &
5534
                                               "NOTHING "                  &
5535
                                                "!-nocc,!-noec,!-nonl,"    &
5536
                                                "!-ne,!-nolocal "          &
5537
                                               "CYCLOMATIC_COMPLEXITY "    &
5538
                                                "-nocc "                   &
5539
                                               "ESSENTIAL_COMPLEXITY "     &
5540
                                                "-noec "                   &
5541
                                               "MAXIMAL_LOOP_NESTING "     &
5542
                                                "-nonl "                   &
5543
                                               "EXITS_AS_GOTOS "           &
5544
                                                "-ne "                     &
5545
                                               "LOCAL_DETAILS "            &
5546
                                                "-nolocal ";
5547
   --  NODOC  (see /COMPLEXITY_METRICS /NO_LOCAL_DETAILS /NO_EXITS_AS_GOTOS)
5548
 
5549
   S_Metric_Verbose  : aliased constant S := "/VERBOSE "                   &
5550
                                             "-v";
5551
   --        /NOVERBOSE (D)
5552
   --        /VERBOSE
5553
   --
5554
   --   Verbose mode.
5555
 
5556
   S_Metric_XMLout  : aliased constant S := "/XML_OUTPUT=@"                &
5557
                                             "-ox@";
5558
   --        /XML_OUTPUT=filename
5559
   --
5560
   --   Place the XML output into the specified file
5561
 
5562
   Metric_Switches : aliased constant Switches :=
5563
                       (S_Metric_Add              'Access,
5564
                        S_Metric_All_Prjs         'Access,
5565
                        S_Metric_Complexity       'Access,
5566
                        S_Metric_Coupling         'Access,
5567
                        S_Metric_Debug            'Access,
5568
                        S_Metric_Direct           'Access,
5569
                        S_Metric_Element          'Access,
5570
                        S_Metric_Ext              'Access,
5571
                        S_Metric_Files            'Access,
5572
                        S_Metric_Follow           'Access,
5573
                        S_Metric_Format           'Access,
5574
                        S_Metric_Globout          'Access,
5575
                        S_Metric_Line             'Access,
5576
                        S_Metric_Lines            'Access,
5577
                        S_Metric_Mess             'Access,
5578
                        S_Metric_No_Exits_As_Gotos'Access,
5579
                        S_Metric_No_Local         'Access,
5580
                        S_Metric_No_Static_Loop   'Access,
5581
                        S_Metric_Project          'Access,
5582
                        S_Metric_Quiet            'Access,
5583
                        S_Metric_Suffix           'Access,
5584
                        S_Metric_Subdirs          'Access,
5585
                        S_Metric_Syntax           'Access,
5586
                        S_Metric_Suppress         'Access,
5587
                        S_Metric_Verbose          'Access,
5588
                        S_Metric_XMLout           'Access);
5589
 
5590
   ----------------------------
5591
   -- Switches for GNAT NAME --
5592
   ----------------------------
5593
 
5594
   S_Name_Conf    : aliased constant S := "/CONFIG_FILE=<"                 &
5595
                                            "-c>";
5596
   --        /CONFIG_FILE=path_name
5597
   --
5598
   --   Create a configuration pragmas file 'path_name' (instead of the default
5599
   --   'gnat.adc'). 'path_name' may include directory information. 'path_name'
5600
   --   must be writable. There may be only one qualifier /CONFIG_FILE.
5601
   --   This qualifier is not compatible with qualifier /PROJECT_FILE.
5602
 
5603
   S_Name_Dirs    : aliased constant S := "/SOURCE_DIRS=*"                 &
5604
                                            "-d*";
5605
   --        /SOURCE_DIRS=(directory, ...)
5606
   --
5607
   --   Look for source files in the specified directories. When this qualifier
5608
   --   is specified, the current working directory will not be searched for
5609
   --   source files, unless it is explicitly specified with a qualifier
5610
   --   /SOURCE_DIRS or /DIRS_FILE. Several qualifiers /SOURCE_DIRS may be
5611
   --   specified. If a directory is specified as a relative path, it is
5612
   --   relative to the directory of the configuration pragmas file specified
5613
   --   with qualifier /CONFIG_FILE, or to the directory of the project file
5614
   --   specified with qualifier /PROJECT_FILE or, if neither qualifier
5615
   --   /CONFIG_FILE nor qualifier /PROJECT_FILE are specified, it is relative
5616
   --   to the current working directory. The directories specified with
5617
   --   qualifiers /SOURCE_DIRS must exist and be readable.
5618
 
5619
   S_Name_Dfile   : aliased constant S := "/DIRS_FILE=<"                   &
5620
                                            "-D>";
5621
   --        /DIRS_FILE=file_name
5622
   --
5623
   --   Look for source files in all directories listed in text file
5624
   --   'file_name'. 'file_name' must be an existing, readable text file.
5625
   --   Each non empty line in the specified file must be a directory.
5626
   --   Specifying qualifier /DIRS_FILE is equivalent to specifying as many
5627
   --   qualifiers /SOURCE_DIRS as there are non empty lines in the specified
5628
   --   text file.
5629
 
5630
   S_Name_Follow  : aliased constant S := "/FOLLOW_LINKS_FOR_FILES "       &
5631
                                            "-eL";
5632
   --        /NOFOLLOW_LINKS_FOR_FILES (D)
5633
   --        /FOLLOW_LINKS_FOR_FILES
5634
   --
5635
   --    Follow links when parsing project files
5636
 
5637
   S_Name_Frng    : aliased constant S := "/FOREIGN_PATTERN=" & '"'        &
5638
                                            "-f" & '"';
5639
   --        /FOREIGN_PATTERN=<string>
5640
   --
5641
   --   Specify a foreign pattern.
5642
   --   Using this qualifier, it is possible to add sources of languages other
5643
   --   than Ada to the list of sources of a project file. It is only useful
5644
   --   if a qualifier /PROJECT_FILE is used. For example,
5645
   --
5646
   --   GNAT NAME /PROJECT_FILE=PRJ /FOREIGN_PATTERN="*.C" "*.ADA"
5647
   --
5648
   --   will look for Ada units in all files with the '.ADA' extension, and
5649
   --   will add to the list of file for project PRJ.GPR the C files with
5650
   --   extension ".C".
5651
 
5652
   S_Name_Help    : aliased constant S := "/HELP "                         &
5653
                                            "-h";
5654
   --        /NOHELP (D)
5655
   --        /HELP
5656
   --
5657
   --   Output usage information to the standard output stream.
5658
 
5659
   S_Name_Proj    : aliased constant S := "/PROJECT_FILE=<"                &
5660
                                            "-P>";
5661
   --        /PROJECT_FILE=file_name
5662
   --
5663
   --   Create or update a project file. 'file_name' may include directory
5664
   --   information. The specified file must be writable. There may be only
5665
   --   one qualifier /PROJECT_FILE. When a qualifier /PROJECT_FILE is
5666
   --   specified, no qualifier /CONFIG_FILE may be specified.
5667
 
5668
   S_Name_Subdirs : aliased constant S := "/SUBDIRS=<"                     &
5669
                                             "--subdirs=>";
5670
   --        /SUBDIRS=dir
5671
   --
5672
   --   The actual directories (object, exec, library, ...) are subdirectories
5673
   --   of the directory specified in the project file. If the subdirectory
5674
   --   does not exist, it is created automatically.
5675
 
5676
   S_Name_Verbose : aliased constant S := "/VERBOSE "                      &
5677
                                            "-v";
5678
   --        /NOVERBOSE (D)
5679
   --        /VERBOSE
5680
   --
5681
   --   Verbose mode. Output detailed explanation of behavior to the standard
5682
   --   output stream. This includes name of the file written, the name of the
5683
   --   directories to search and, for each file in those directories whose
5684
   --   name matches at least one of the Naming Patterns, an indication of
5685
   --   whether the file contains a unit, and if so the name of the unit.
5686
 
5687
   S_Name_Excl    : aliased constant S := "/EXCLUDED_PATTERN=" & '"'       &
5688
                                            "-x" & '"';
5689
   --      /EXCLUDED_PATTERN=<string>
5690
   --
5691
   --   Specify an excluded pattern.
5692
   --   Using this qualifier, it is possible to exclude some files that would
5693
   --   match the Naming patterns. For example,
5694
   --
5695
   --   GNAT NAME /EXCLUDED_PATTERN="*_NT.ADA" "*.ADA"
5696
   --
5697
   --   will look for Ada units in all files with the '.ADA' extension, except
5698
   --   those whose names end with '_NT.ADA'.
5699
 
5700
   Name_Switches : aliased constant Switches :=
5701
                     (S_Name_Conf    'Access,
5702
                      S_Name_Dirs    'Access,
5703
                      S_Name_Dfile   'Access,
5704
                      S_Name_Follow  'Access,
5705
                      S_Name_Frng    'Access,
5706
                      S_Name_Help    'Access,
5707
                      S_Name_Proj    'Access,
5708
                      S_Name_Subdirs 'Access,
5709
                      S_Name_Verbose 'Access,
5710
                      S_Name_Excl    'Access);
5711
 
5712
   ----------------------------------
5713
   -- Switches for GNAT PREPROCESS --
5714
   ----------------------------------
5715
 
5716
   S_Prep_Assoc   : aliased constant S := "/ASSOCIATE=" & '"'              &
5717
                                            "-D" & '"';
5718
   --        /ASSOCIATE="name=val"
5719
   --
5720
   --   Defines a new symbol, associated with value. If no value is given
5721
   --   on the command line, then symbol is considered to be True.
5722
   --   This qualifier can be used in place of a definition file.
5723
 
5724
   S_Prep_Blank   : aliased constant S := "/BLANK_LINES "                  &
5725
                                            "-b";
5726
   --        /NOBLANK_LINES (D)
5727
   --        /BLANK_LINES
5728
   --
5729
   --   Causes both preprocessor lines and the lines deleted by preprocessing
5730
   --   to be replaced by blank lines in the output source file, thus
5731
   --   preserving line numbers in the output file.
5732
 
5733
   S_Prep_Com     : aliased constant S := "/COMMENTS "                     &
5734
                                            "-c";
5735
   --        /NOCOMMENTS (D)
5736
   --        /COMMENTS
5737
   --
5738
   --   /COMMENTS causes both preprocessor lines and the lines deleted
5739
   --   by preprocessing to be retained in the output source as comments marked
5740
   --   with the special string "--! ". This option will result in line numbers
5741
   --   being preserved in the output file.
5742
   --
5743
   --   /NOCOMMENTS causes both preprocessor lines and the lines deleted by
5744
   --   preprocessing to be replaced by blank lines in the output source file,
5745
   --   thus preserving line numbers in the output file.
5746
 
5747
   S_Prep_Ref     : aliased constant S := "/REFERENCE "                    &
5748
                                            "-r";
5749
   --        /NOREFERENCE (D)
5750
   --        /REFERENCE
5751
   --
5752
   --   Causes a "Source_Reference" pragma to be generated that references the
5753
   --   original input file, so that error messages will use the file name of
5754
   --   this original file.  Also implies /BLANK_LINES if /COMMENTS is not
5755
   --   specified.
5756
 
5757
   S_Prep_Remove  : aliased constant S := "/REMOVE "                       &
5758
                                            "!-b,!-c";
5759
   --        /REMOVE (D)
5760
   --        /NOREMOVE
5761
   --
5762
   --   Preprocessor lines and deleted lines are completely removed from the
5763
   --   output.
5764
 
5765
   S_Prep_Replace : aliased constant S := "/REPLACE_IN_COMMENTS "          &
5766
                                            "-C";
5767
   --        /NOREPLACE_IN_COMMENTS (D)
5768
   --        /REPLACE_IN_COMMENTS
5769
   --
5770
   --   Causes preprocessor to scan comments and perform replacements on
5771
   --   any $symbol occurrences within the comment text.
5772
 
5773
   S_Prep_Symbols : aliased constant S := "/SYMBOLS "                      &
5774
                                            "-s";
5775
   --        /NOSYMBOLS (D)
5776
   --        /SYMBOLS
5777
   --
5778
   --   Causes a sorted list of symbol names and values to be listed on
5779
   --   SYS$OUTPUT.
5780
 
5781
   S_Prep_Undef   : aliased constant S := "/UNDEFINED "                    &
5782
                                            "-u";
5783
   --        /NOUNDEFINED (D)
5784
   --        /UNDEFINED
5785
 
5786
   Prep_Switches : aliased constant Switches :=
5787
                     (S_Prep_Assoc   'Access,
5788
                      S_Prep_Blank   'Access,
5789
                      S_Prep_Com     'Access,
5790
                      S_Prep_Ref     'Access,
5791
                      S_Prep_Remove  'Access,
5792
                      S_Prep_Replace 'Access,
5793
                      S_Prep_Symbols 'Access,
5794
                      S_Prep_Undef   'Access);
5795
 
5796
   ------------------------------
5797
   -- Switches for GNAT PRETTY --
5798
   ------------------------------
5799
 
5800
   S_Pretty_Add    : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*"     &
5801
                                             "-aP*";
5802
   --        /ADD_PROJECT_SEARCH_PATH=(directory[,...])
5803
   --
5804
   --   Add directories to the project search path.
5805
 
5806
   S_Pretty_Align  : aliased constant S := "/ALIGN="                       &
5807
                                           "DEFAULT "                      &
5808
                                               "-A12345 "                  &
5809
                                           "OFF "                          &
5810
                                               "-A0 "                      &
5811
                                           "COLONS "                       &
5812
                                               "-A1 "                      &
5813
                                           "DECLARATIONS "                 &
5814
                                               "-A2 "                      &
5815
                                           "STATEMENTS "                   &
5816
                                               "-A3 "                      &
5817
                                           "ARROWS "                       &
5818
                                               "-A4 "                      &
5819
                                           "COMPONENT_CLAUSES "            &
5820
                                               "-A5";
5821
   --        /ALIGN[=align-option, align-option, ...]
5822
   --
5823
   --   Set alignments. By default, all alignments (colons in declarations,
5824
   --   initialisations in declarations, assignments and arrow delimiters) are
5825
   --   ON.
5826
   --
5827
   --   align-option may be one of the following:
5828
   --
5829
   --      OFF (D)           Set all alignments to OFF
5830
   --      COLONS            Set alignments of colons in declarations to ON
5831
   --      DECLARATIONS      Set alignments of initialisations in declarations
5832
   --                        to ON
5833
   --      STATEMENTS        Set alignments of assignments statements to ON
5834
   --      ARROWS            Set alignments of arrow delimiters to ON.
5835
   --      COMPONENT_CLAUSES Set alignments of AT keywords in component
5836
   --                        clauses ON
5837
   --
5838
   --   Specifying one of the ON options without first specifying the OFF
5839
   --   option has no effect, because by default all alignments are set to ON.
5840
 
5841
   S_Pretty_All_Prjs : aliased constant S := "/ALL_PROJECTS "              &
5842
                                              "-U";
5843
   --        /NOALL_PROJECTS (D)
5844
   --        /ALL_PROJECTS
5845
   --   When GNAT PRETTY is used with a Project File and no source is
5846
   --   specified, the underlying tool gnatpp is called for all the
5847
   --   sources of all the Project Files in the project tree.
5848
 
5849
   S_Pretty_Attrib : aliased constant S := "/ATTRIBUTE_CASING="            &
5850
                                           "MIXED_CASE "                   &
5851
                                               "-aM "                      &
5852
                                           "LOWER_CASE "                   &
5853
                                               "-aL "                      &
5854
                                           "UPPER_CASE "                   &
5855
                                               "-aU";
5856
   --        /ATTRIBUTE_CASING[=casing-option]
5857
   --
5858
   --   Set the case of the attributes. By default the attributes are in mixed
5859
   --   case.
5860
   --   casing-option may be one of the following:
5861
   --
5862
   --      MIXED_CASE (D)
5863
   --      LOWER_CASE
5864
   --      UPPER_CASE
5865
 
5866
   S_Pretty_Comments  : aliased constant S := "/COMMENTS_LAYOUT="          &
5867
                                              "UNTOUCHED "                 &
5868
                                                 "-c0 "                    &
5869
                                              "DEFAULT "                   &
5870
                                                 "-c1 "                    &
5871
                                              "STANDARD_INDENT "           &
5872
                                                 "-c2 "                    &
5873
                                              "GNAT_BEGINNING "            &
5874
                                                 "-c3 "                    &
5875
                                              "REFORMAT "                  &
5876
                                                 "-c4 "                    &
5877
                                              "KEEP_SPECIAL "              &
5878
                                                 "-c5";
5879
   --        /COMMENTS_LAYOUT[=layout-option, layout-option, ...]
5880
   --
5881
   --   Set the comment layout. By default, comments use the GNAT style
5882
   --   comment line indentation.
5883
   --
5884
   --   layout-option may be one of the following:
5885
   --
5886
   --     UNTOUCHED           All the comments remain unchanged
5887
   --     DEFAULT (D)         GNAT style comment line indentation
5888
   --     STANDARD_INDENT     Standard comment line indentation
5889
   --     GNAT_BEGINNING      GNAT style comment beginning
5890
   --     REFORMAT            Reformat comment blocks
5891
   --     KEEP_SPECIAL        Keep unchanged special form comments
5892
   --
5893
   --     All combinations of layout options are allowed, except for DEFAULT
5894
   --     and STANDARD_INDENT which are mutually exclusive, and also if
5895
   --     UNTOUCHED is specified, this must be the only option.
5896
   --
5897
   --     The difference between "GNAT style comment line indentation" and
5898
   --     "standard comment line indentation" is the following: for standard
5899
   --     comment indentation, any comment line is indented as if it were
5900
   --     a declaration or statement at the same place.
5901
   --     For GNAT style comment indentation, comment lines which are
5902
   --     immediately followed by if or case statement alternative, record
5903
   --     variant or 'begin' keyword are indented as the keyword that follows
5904
   --     them.:
5905
   --
5906
   --     Standard indentation:
5907
   --
5908
   --        if A then
5909
   --           null;
5910
   --           -- some comment
5911
   --        else
5912
   --           null;
5913
   --        end if;
5914
   --
5915
   --     GNAT style indentation:
5916
   --
5917
   --        if A then
5918
   --           null;
5919
   --        -- some comment
5920
   --        else
5921
   --           null;
5922
   --        end if;
5923
   --
5924
   --     Option "GNAT style comment beginning" means that for each comment
5925
   --     which is not considered as non-formattable separator (that is, the
5926
   --     comment line contains only dashes, or a comment line ends with two
5927
   --     dashes), there will be at least two spaces between starting "--" and
5928
   --     the first non-blank character of the comment.
5929
 
5930
   S_Pretty_Config    : aliased constant S := "/CONFIGURATION_PRAGMAS_FILE=<" &
5931
                                              "-gnatec>";
5932
   --        /CONFIGURATION_PRAGMAS_FILE=file
5933
   --
5934
   --   Specify a configuration pragmas file that need to be passed to the
5935
   --   compiler.
5936
 
5937
   S_Pretty_Constr    : aliased constant S := "/CONSTRUCT_LAYOUT="         &
5938
                                               "GNAT "                     &
5939
                                                  "-l1 "                   &
5940
                                               "COMPACT "                  &
5941
                                                  "-l2 "                   &
5942
                                               "UNCOMPACT "                &
5943
                                                   "-l3";
5944
   --        /CONSTRUCT_LAYOUT[=construct-option]
5945
   --
5946
   --   Set construct layout. Default is GNAT style layout.
5947
   --   construct-option may be one of the following:
5948
   --
5949
   --      GNAT (D)
5950
   --      COMPACT
5951
   --      UNCOMPACT
5952
   --
5953
   --   The difference between GNAT style and Compact layout on one hand
5954
   --   and Uncompact layout on the other hand can be illustrated by the
5955
   --   following examples:
5956
   --
5957
   --       GNAT style and                          Uncompact layout
5958
   --       Compact layout
5959
   --
5960
   --       type q is record                        type q is
5961
   --          a : integer;                            record
5962
   --          b : integer;                               a : integer;
5963
   --       end record;                                   b : integer;
5964
   --                                                  end record;
5965
   --
5966
   --
5967
   --       Block : declare                         Block :
5968
   --          A : Integer := 3;                       declare
5969
   --       begin                                         A : Integer := 3;
5970
   --          Proc (A, A);                            begin
5971
   --       end Block;                                    Proc (A, A);
5972
   --                                                  end Block;
5973
   --
5974
   --       Clear : for J in 1 .. 10 loop           Clear :
5975
   --          A (J) := 0;                             for J in 1 .. 10 loop
5976
   --       end loop Clear;                               A (J) := 0;
5977
   --                                                  end loop Clear;
5978
   --
5979
   --
5980
   --   A further difference between GNAT style layout and compact layout is
5981
   --   that in GNAT style layout compound statements, return statements and
5982
   --   bodies are always separated by empty lines.
5983
 
5984
   S_Pretty_Comind    : aliased constant S := "/CONTINUATION_INDENT=#"     &
5985
                                                 "-cl#";
5986
   --        /CONTINUATION_INDENT=nnn
5987
   --
5988
   --   Indentation level for continuation lines, nnn from 1 .. 9.
5989
   --   The default value is one less then the (normal) indentation level,
5990
   --   unless the indentation is set to 1: in that case the default value for
5991
   --   continuation line indentation is also 1.
5992
 
5993
   S_Pretty_Compact_Is : aliased constant S := "/NO_SEPARATE_IS "          &
5994
                                                 "--no-separate-is";
5995
   --        /NO_SEPARATE_IS
5996
   --
5997
   --   Do not place the IS keyword on a separate line in a subprogram body in
5998
   --   case if the specification occupies more then one line.
5999
 
6000
   S_Pretty_Sep_Label : aliased constant S := "/SEPARATE_LABEL "           &
6001
                                                    "--separate-label";
6002
   --        /SEPARATE_LABEL
6003
   --
6004
   --   Place statement label(s) and the statement itself on separate lines.
6005
 
6006
   S_Pretty_Sep_Loop_Then : aliased constant S := "/SEPARATE_LOOP_THEN "   &
6007
                                                    "--separate-loop-then";
6008
   --        /SEPARATE_LOOP_THEN
6009
   --
6010
   --   Place the THEN keyword in IF statement and the LOOP keyword in for-
6011
   --   and while-loops on a separate line.
6012
 
6013
   S_Pretty_N_Sep_Loop_Then : aliased constant S := "/NO_SEPARATE_LOOP_THEN " &
6014
                                                    "--no-separate-loop-then";
6015
   --        /NO_SEPARATE_LOOP_THEN
6016
   --
6017
   --   Do not place the THEN keyword in IF statement and the LOOP keyword in
6018
   --   for- and while-loops on a separate line.
6019
 
6020
   S_Pretty_Use_On_New_Line : aliased constant S := "/USE_ON_NEW_LINE "    &
6021
                                                      "--use-on-new-line";
6022
   --        /USE_ON_NEW_LINE
6023
   --
6024
   --   Start any USE clause that is a part of a context clause from a
6025
   --   separate line.
6026
 
6027
   S_Pretty_Stnm_On_Nw_Line : aliased constant S := "/STMT_NAME_ON_NEW_LINE " &
6028
                                                      "--separate-stmt-name";
6029
   --        /STMT_NAME_ON_NEW_LINE
6030
   --
6031
   --   For named block and loop statements use a separate line for the
6032
   --   statement name, but do not use an extra indentation level for the
6033
   --   statement itself.
6034
 
6035
   S_Pretty_Eol       : aliased constant S := "/END_OF_LINE="              &
6036
                                                "DOS "                     &
6037
                                                   "--eol=dos "            &
6038
                                                "UNIX "                    &
6039
                                                   "--eol=unix "           &
6040
                                                "CRLF "                    &
6041
                                                   "--eol=crlf "           &
6042
                                                "LF "                      &
6043
                                                   "--eol=lf";
6044
   --        /END_OF_LINE=[option]
6045
   --
6046
   --   Specifies the form of the line terminators in the produced source.
6047
   --   By default, the form of the line terminator depends on the platforms.
6048
   --   On Unix and VMS, it is a Line Feed (LF) character. On Windows (DOS),
6049
   --   It is a Carriage Return (CR) followed by a Line Feed.
6050
   --   The Options DOS and CRLF are equivalent. The options UNIX and LF are
6051
   --   also equivalent.
6052
 
6053
   S_Pretty_Ext       : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
6054
                                            "-X" & '"';
6055
   --        /EXTERNAL_REFERENCE="name=val"
6056
   --
6057
   --   Specifies an external reference to the project manager. Useful only if
6058
   --   /PROJECT_FILE is used.
6059
   --
6060
   --   Example:
6061
   --      /EXTERNAL_REFERENCE="DEBUG=TRUE"
6062
 
6063
   S_Pretty_Current   : aliased constant S := "/CURRENT_DIRECTORY "        &
6064
                                              "!-I-";
6065
   --        /CURRENT_DIRECTORY (D)
6066
   --
6067
   --   Look for source files in the current working directory.
6068
   --
6069
   --        /NOCURRENT_DIRECTORY
6070
   --   Do not look for source files in the current working directory.
6071
 
6072
   S_Pretty_Dico      : aliased constant S := "/DICTIONARY=*"              &
6073
                                              "-D*";
6074
   --        /DICTIONARY=(file_name, ...)
6075
   --
6076
   --   Use each specified file as a dictionary file that defines the casing
6077
   --   for a set of specified names, thereby overriding the effect on these
6078
   --   names by any explicit or implicit /NAME_CASING qualifier.
6079
   --
6080
   --   GNAT PRETTY implicitly uses a default dictionary file to define the
6081
   --   casing for the Ada predefined names and the names declared in the GNAT
6082
   --   libraries.
6083
   --
6084
   --   The structure of a dictionary file, and details on the conventions
6085
   --   used in the default dictionary file, are defined in the GNAT User's
6086
   --   Guide.
6087
 
6088
   S_Pretty_Encoding  : aliased constant S := "/RESULT_ENCODING="          &
6089
                                              "BRACKETS "                  &
6090
                                                 "-Wb "                    &
6091
                                              "HEX "                       &
6092
                                                 "-Wh "                    &
6093
                                              "UPPER "                     &
6094
                                                 "-Wu "                    &
6095
                                              "SHIFT_JIS "                 &
6096
                                                 "-Ws "                    &
6097
                                              "EUC "                       &
6098
                                                 "-We "                    &
6099
                                              "UTF8 "                      &
6100
                                                 "-W8";
6101
   --        /RESULT_ENCODING[=encoding-type]
6102
   --
6103
   --   Specify the wide character encoding method used when writing the
6104
   --   reformatted code in the result file. 'encoding-type' is one of the
6105
   --   following:
6106
   --
6107
   --      BRACKETS (D)      Brackets encoding.
6108
   --
6109
   --      HEX               Hex ESC encoding.
6110
   --
6111
   --      UPPER             Upper half encoding.
6112
   --
6113
   --      SHIFT_JIS         Shift-JIS encoding.
6114
   --
6115
   --      EUC               EUC Encoding.
6116
   --
6117
   --      UTF8              UTF-8 encoding.
6118
   --
6119
   --   See 'HELP GNAT COMPILE /WIDE_CHARACTER_ENCODING' for an explanation
6120
   --   about the different character encoding methods.
6121
 
6122
   S_Pretty_Enums     : aliased constant S := "/ENUM_CASING="              &
6123
                                              "AS_DECLARED "               &
6124
                                                 "-neD "                   &
6125
                                              "LOWER_CASE "                &
6126
                                                 "-neL "                   &
6127
                                              "UPPER_CASE "                &
6128
                                                 "-neU "                   &
6129
                                              "MIXED_CASE "                &
6130
                                                 "-neM";
6131
   --        /ENUM_CASING=name-option
6132
   --
6133
   --   Specify the casing of enumeration literals. If not specified, the
6134
   --   casing of enumeration literals is defined by the NAME_CASING option.
6135
   --   'name-option' may be one of:
6136
   --
6137
   --      AS_DECLARED       Literals casing for defining occurrences are
6138
   --                        as they appear in the source file.
6139
   --
6140
   --      LOWER_CASE        Literals are in lower case.
6141
   --
6142
   --      UPPER_CASE        Literals are in upper case.
6143
   --
6144
   --      MIXED_CASE        Literals are in mixed case.
6145
 
6146
   S_Pretty_Files     : aliased constant S := "/FILES=@"                   &
6147
                                                 "-files=@";
6148
   --      /FILES=filename
6149
   --
6150
   --   Take as arguments the files that are listed in the specified
6151
   --   text file.
6152
 
6153
   S_Pretty_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES "      &
6154
                                             "-eL";
6155
   --        /NOFOLLOW_LINKS_FOR_FILES (D)
6156
   --        /FOLLOW_LINKS_FOR_FILES
6157
   --
6158
   --    Follow links when parsing project files
6159
 
6160
   S_Pretty_Forced    : aliased constant S := "/FORCED_OUTPUT=@"           &
6161
                                                 "-of@";
6162
   --        /FORCED_OUTPUT=file
6163
   --
6164
   --   Write the output into the specified file, overriding any possibly
6165
   --   existing file.
6166
 
6167
   S_Pretty_Formfeed  : aliased constant S := "/FORM_FEED_AFTER_PRAGMA_PAGE " &
6168
                                              "-ff";
6169
   --        /FORM_FEED_AFTER_PRAGMA_PAGE
6170
   --
6171
   --   When there is a pragma Page in the source, insert a Form Feed
6172
   --   character immediately after the semicolon that follows the pragma
6173
   --   Page.
6174
 
6175
   S_Pretty_Indent    : aliased constant S := "/INDENTATION_LEVEL=#"       &
6176
                                                "-i#";
6177
   --        /INDENTATION_LEVEL=nnn
6178
   --
6179
   --   Specify the number of spaces to add for each indentation level.
6180
   --   nnn must be between 1 and 9. The default is 3.
6181
 
6182
   S_Pretty_Keyword   : aliased constant S := "/KEYWORD_CASING="           &
6183
                                              "LOWER_CASE "                &
6184
                                                 "-kL "                    &
6185
                                              "UPPER_CASE "                &
6186
                                                 "-kU";
6187
   --        /KEYWORD_CASING[=keyword-option]
6188
   --
6189
   --   Specify the case of Ada keywords. The default is keywords in lower
6190
   --   case.
6191
   --
6192
   --   keyword-option may be one of the following:
6193
   --
6194
   --      LOWER_CASE (D)
6195
   --      UPPER_CASE
6196
 
6197
   S_Pretty_Maxlen    : aliased constant S := "/LINE_LENGTH_MAX=#"         &
6198
                                                 "-M#";
6199
   --        /LINE_LENGTH_MAX=nnn
6200
   --
6201
   --   Set the maximum line length, nnn from 32 ..256. The default is 79.
6202
 
6203
   S_Pretty_Maxact    : aliased constant S := "/MAX_ACT=#"                 &
6204
                                                 "--call_threshold=#";
6205
   --        /MAX_ACT=nnn
6206
   --
6207
   --  If the number of parameter associations is greater than nnn and if at
6208
   --  least one association uses named notation, start each association from
6209
   --  a new line
6210
 
6211
   S_Pretty_Maxind    : aliased constant S := "/MAX_INDENT=#"              &
6212
                                                 "-T#";
6213
   --        /MAX_INDENT=nnn
6214
   --
6215
   --   Do not use an additional indentation level for case alternatives
6216
   --   and variants if their number is nnn or more. The default is 10.
6217
   --   If nnn is zero, an additional indentation level is used for any
6218
   --   number of case alternatives and variants.
6219
 
6220
   S_Pretty_Maxpar    : aliased constant S := "/MAX_PAR=#"                 &
6221
                                                 "--par_threshold=#";
6222
   --        /MAX_PAR=nnn
6223
   --
6224
   --  If the number of parameter specifications is greater than nnn (or equal
6225
   --  to nnn in case of a function), start each specification from a new line.
6226
   --  The default value is 3.
6227
 
6228
   S_Pretty_Mess      : aliased constant S := "/MESSAGES_PROJECT_FILE="    &
6229
                                            "DEFAULT "                     &
6230
                                               "-vP0 "                     &
6231
                                            "MEDIUM "                      &
6232
                                               "-vP1 "                     &
6233
                                            "HIGH "                        &
6234
                                               "-vP2";
6235
   --        /MESSAGES_PROJECT_FILE[=messages-option]
6236
   --
6237
   --   Specifies the "verbosity" of the parsing of project files.
6238
   --   messages-option may be one of the following:
6239
   --
6240
   --      DEFAULT (D)  No messages are output if there is no error or warning.
6241
   --
6242
   --      MEDIUM       A small number of messages are output.
6243
   --
6244
   --      HIGH         A great number of messages are output, most of them not
6245
   --                   being useful for the user.
6246
 
6247
   S_Pretty_Names     : aliased constant S := "/NAME_CASING="              &
6248
                                              "AS_DECLARED "               &
6249
                                                 "-nD "                    &
6250
                                              "LOWER_CASE "                &
6251
                                                 "-nL "                    &
6252
                                              "UPPER_CASE "                &
6253
                                                 "-nU "                    &
6254
                                              "MIXED_CASE "                &
6255
                                                 "-nM";
6256
   --        /NAME_CASING[=name-option]
6257
   --
6258
   --   Specify the casing of names.
6259
   --   'name-option' may be one of:
6260
   --
6261
   --      AS_DECLARED (D)   Name casing for defining occurrences are as they
6262
   --                        appear in the source file.
6263
   --
6264
   --      LOWER_CASE        Names are in lower case.
6265
   --
6266
   --      UPPER_CASE        Names are in upper case.
6267
   --
6268
   --      MIXED_CASE        Names are in mixed case.
6269
 
6270
   S_Pretty_Replace_No_Backup : aliased constant S := "/REPLACE_NO_BACKUP " &
6271
                                                 "-rnb";
6272
   --        /REPLACE_NO_BACKUP
6273
   --
6274
   --   Replace the argument source with the pretty-printed source without
6275
   --   creating any backup copy of the argument source.
6276
 
6277
   S_Pretty_No_Labels : aliased constant S := "/NO_MISSED_LABELS "         &
6278
                                                 "-e";
6279
   --        /NO_MISSED_LABELS
6280
   --
6281
   --   Do not insert missing end/exit labels. The end label is the name of
6282
   --   a construct that may optionally appear at the end of the construct.
6283
   --   This includes the names of packages and subprograms.
6284
   --   Similarly, the exit label is the name of a loop that may appear as the
6285
   --   argument of an exit statement within the loop. By default, GNAT PRETTY
6286
   --   inserts these end/exit labels when they are absent in the original
6287
   --   source. This qualifier /NO_MISSED_LABELS suppresses this insertion,
6288
   --   so that the formatted source reflects the original.
6289
 
6290
   S_Pretty_Notabs    : aliased constant S := "/NOTABS "                   &
6291
                                                 "-notabs";
6292
   --        /NOTABS
6293
   --
6294
   --   Replace all tabulations in comments with spaces.
6295
 
6296
   S_Pretty_Output    : aliased constant S := "/OUTPUT=@"                  &
6297
                                              "-o@";
6298
   --        /OUTPUT=file
6299
   --
6300
   --   Write the output to the specified file. If the file already exists,
6301
   --   an error is reported.
6302
 
6303
   S_Pretty_Override  : aliased constant S := "/OVERRIDING_REPLACE "       &
6304
                                                 "-rf";
6305
   --        /NOOVERRIDING_REPLACE (D)
6306
   --        /OVERRIDING_REPLACE
6307
   --
6308
   --   Replace the argument source with the pretty-printed source and copy the
6309
   --   argument source into filename.NPP, overriding any existing file if
6310
   --   needed.
6311
 
6312
   S_Pretty_Pragma    : aliased constant S := "/PRAGMA_CASING="            &
6313
                                              "MIXED_CASE "                &
6314
                                                 "-pM "                    &
6315
                                              "LOWER_CASE "                &
6316
                                                 "-pL "                    &
6317
                                              "UPPER_CASE "                &
6318
                                                 "-pU";
6319
   --        /PRAGMA_CASING[=pragma-option]
6320
   --
6321
   --   Set the case of pragma identifiers. The default is Mixed case.
6322
   --   pragma-option may be one of the following:
6323
   --
6324
   --      MIXED_CASE (D)
6325
   --      LOWER_CASE
6326
   --      UPPER_CASE
6327
 
6328
   S_Pretty_Project   : aliased constant S := "/PROJECT_FILE=<"            &
6329
                                                "-P>";
6330
   --        /PROJECT_FILE=filename
6331
   --
6332
   --   Specifies the main project file to be used. The project files rooted
6333
   --   at the main project file will be parsed before any other processing to
6334
   --   set the building environment.
6335
 
6336
   S_Pretty_Replace   : aliased constant S := "/REPLACE "                  &
6337
                                                 "-r";
6338
   --        /NOREPLACE (D)
6339
   --        /REPLACE
6340
   --
6341
   --   Replace the argument source with the pretty-printed source and copy the
6342
   --   argument source into filename.NPP. If filename.NPP already exists,
6343
   --   report an error and exit.
6344
 
6345
   S_Pretty_RTS       : aliased constant S := "/RUNTIME_SYSTEM=|"          &
6346
                                               "--RTS=|";
6347
   --        /RUNTIME_SYSTEM=xxx
6348
   --
6349
   --    Compile against an alternate runtime system named xxx or RTS-xxx.
6350
 
6351
   S_Pretty_Search    : aliased constant S := "/SEARCH=*"                  &
6352
                                              "-I*";
6353
   --        /SEARCH=(directory[,...])
6354
   --
6355
   --    When looking for source files also look in directories specified.
6356
 
6357
   S_Pretty_Specific  : aliased constant S := "/SPECIFIC_CASING "          &
6358
                                              "-D-";
6359
   --        /SPECIFIC_CASING
6360
   --
6361
   --   Do not use the default dictionary file; instead, use the casing
6362
   --   defined by a qualifier /NAME_CASING and/or any explicit dictionary
6363
   --   file specified by a qualifier /DICTIONARY.
6364
 
6365
   S_Pretty_Standard  : aliased constant S := "/STANDARD_OUTPUT "          &
6366
                                              "-pipe";
6367
   --        /NOSTANDARD_OUTPUT (D)
6368
   --        /STANDARD_OUTPUT
6369
   --
6370
   --   Redirect the output to the standard output.
6371
 
6372
   S_Pretty_Subdirs : aliased constant S := "/SUBDIRS=<"                   &
6373
                                               "--subdirs=>";
6374
   --        /SUBDIRS=dir
6375
   --
6376
   --   The actual directories (object, exec, library, ...) are subdirectories
6377
   --   of the directory specified in the project file. If the subdirectory
6378
   --   does not exist, it is created automatically.
6379
 
6380
   S_Pretty_Types     : aliased constant S := "/TYPE_CASING="              &
6381
                                              "AS_DECLARED "               &
6382
                                                 "-ntD "                   &
6383
                                              "LOWER_CASE "                &
6384
                                                 "-ntL "                   &
6385
                                              "UPPER_CASE "                &
6386
                                                 "-ntU "                   &
6387
                                              "MIXED_CASE "                &
6388
                                                 "-ntM";
6389
   --        /TYPE_CASING=name-option
6390
   --
6391
   --   Specify the casing of subtype names (including first subtypes from
6392
   --   type declarations). If not specified, the casing of these names is
6393
   --   defined by the NAME_CASING option. 'name-option' is one of:
6394
   --
6395
   --      AS_DECLARED       Names are cased as they appear in the declaration
6396
   --                        in the source file.
6397
   --
6398
   --      LOWER_CASE        Names are in lower case.
6399
   --
6400
   --      UPPER_CASE        Names are in upper case.
6401
   --
6402
   --      MIXED_CASE        Names are in mixed case.
6403
 
6404
   S_Pretty_Verbose   : aliased constant S := "/VERBOSE "                  &
6405
                                              "-v";
6406
   --        /NOVERBOSE (D)
6407
   --        /VERBOSE
6408
   --
6409
   --   Verbose mode; GNAT PRETTY generates version information and then a
6410
   --   trace of the actions it takes to produce or obtain the ASIS tree.
6411
 
6412
   S_Pretty_Warnings  : aliased constant S := "/WARNINGS "                 &
6413
                                              "-w";
6414
   --        /NOWARNINGS (D)
6415
   --        /WARNINGS
6416
   --
6417
   --   Issue a warning to the standard error stream if it is not possible
6418
   --   to provide the required layout in the result source.
6419
   --   By default such warnings are not activated.
6420
 
6421
   Pretty_Switches : aliased constant Switches :=
6422
                       (S_Pretty_Add              'Access,
6423
                        S_Pretty_Align            'Access,
6424
                        S_Pretty_All_Prjs         'Access,
6425
                        S_Pretty_Attrib           'Access,
6426
                        S_Pretty_Comments         'Access,
6427
                        S_Pretty_Compact_Is       'Access,
6428
                        S_Pretty_Config           'Access,
6429
                        S_Pretty_Constr           'Access,
6430
                        S_Pretty_Comind           'Access,
6431
                        S_Pretty_Current          'Access,
6432
                        S_Pretty_Dico             'Access,
6433
                        S_Pretty_Eol              'Access,
6434
                        S_Pretty_Ext              'Access,
6435
                        S_Pretty_Encoding         'Access,
6436
                        S_Pretty_Enums            'Access,
6437
                        S_Pretty_Files            'Access,
6438
                        S_Pretty_Follow           'Access,
6439
                        S_Pretty_Forced           'Access,
6440
                        S_Pretty_Formfeed         'Access,
6441
                        S_Pretty_Indent           'Access,
6442
                        S_Pretty_Keyword          'Access,
6443
                        S_Pretty_Maxlen           'Access,
6444
                        S_Pretty_Maxact           'Access,
6445
                        S_Pretty_Maxind           'Access,
6446
                        S_Pretty_Maxpar           'Access,
6447
                        S_Pretty_Mess             'Access,
6448
                        S_Pretty_Names            'Access,
6449
                        S_Pretty_No_Labels        'Access,
6450
                        S_Pretty_Notabs           'Access,
6451
                        S_Pretty_Output           'Access,
6452
                        S_Pretty_Override         'Access,
6453
                        S_Pretty_Pragma           'Access,
6454
                        S_Pretty_Replace          'Access,
6455
                        S_Pretty_Replace_No_Backup'Access,
6456
                        S_Pretty_Project          'Access,
6457
                        S_Pretty_RTS              'Access,
6458
                        S_Pretty_Search           'Access,
6459
                        S_Pretty_Sep_Label        'Access,
6460
                        S_Pretty_Sep_Loop_Then    'Access,
6461
                        S_Pretty_N_Sep_Loop_Then  'Access,
6462
                        S_Pretty_Subdirs          'Access,
6463
                        S_Pretty_Use_On_New_Line  'Access,
6464
                        S_Pretty_Stnm_On_Nw_Line  'Access,
6465
                        S_Pretty_Specific         'Access,
6466
                        S_Pretty_Standard         'Access,
6467
                        S_Pretty_Types            'Access,
6468
                        S_Pretty_Verbose          'Access,
6469
                        S_Pretty_Warnings         'Access);
6470
 
6471
   ------------------------------
6472
   -- Switches for GNAT SHARED --
6473
   ------------------------------
6474
 
6475
   S_Shared_Debug   : aliased constant S := "/DEBUG="                      &
6476
                                            "ALL "                         &
6477
                                               "-g3 "                      &
6478
                                            "NONE "                        &
6479
                                               "-g0 "                      &
6480
                                            "TRACEBACK "                   &
6481
                                               "-g1 "                      &
6482
                                            "NOTRACEBACK "                 &
6483
                                               "-g0";
6484
   --        /DEBUG[=debug-option]
6485
   --        /NODEBUG
6486
   --
6487
   --   Specifies the amount of debugging information included. 'debug-option'
6488
   --   is one of the following:
6489
   --
6490
   --        ALL (D)      Include full debugging information.
6491
   --
6492
   --        NONE         Provide no debugging information. Same as /NODEBUG.
6493
   --
6494
   --        TRACEBACK    Provide sufficient debug information for a traceback.
6495
   --
6496
   --        NOTRACEBACK  Same as NONE.
6497
 
6498
   S_Shared_Image  : aliased constant S := "/IMAGE=@"                      &
6499
                                            "-o@";
6500
   --        /IMAGE=image-name
6501
   --
6502
   --   'image-name' specifies the name for the generated shared library.
6503
 
6504
   S_Shared_Ident   : aliased constant S := "/IDENTIFICATION=" & '"'       &
6505
                                            "--for-linker=IDENT="          &
6506
                                            '"';
6507
   --        /IDENTIFICATION="<string>"
6508
   --
6509
   --   "<string>" specifies the string to be stored in the image file ident-
6510
   --   ification field in the image header. It overrides any pragma Ident
6511
   --   specified string.
6512
 
6513
   S_Shared_Nofiles : aliased constant S := "/NOSTART_FILES "              &
6514
                                            "-nostartfiles";
6515
   --        /NOSTART_FILES
6516
   --
6517
   --   Link in default image initialization and startup functions.
6518
 
6519
   S_Shared_Noinhib : aliased constant S := "/NOINHIBIT-IMAGE "            &
6520
                                            "--for-linker=--noinhibit-exec";
6521
   --        /NOINHIBIT-IMAGE
6522
   --
6523
   --   Delete image if there are errors or warnings.
6524
 
6525
   S_Shared_Verb    : aliased constant S := "/VERBOSE "                    &
6526
                                            "-v";
6527
   --        /NOVERBOSE (D)
6528
   --        /VERBOSE
6529
   --
6530
   --   Causes additional information to be output, including a full list of
6531
   --   the included object files. This switch option is most useful when you
6532
   --   want to see what set of object files are being used in the link step.
6533
 
6534
   S_Shared_ZZZZZ   : aliased constant S := "/<other> "                    &
6535
                                            "--for-linker=";
6536
   --        /<other>
6537
   --
6538
   --   Any other switch transmitted to the underlying linker.
6539
 
6540
   Shared_Switches : aliased constant Switches :=
6541
                       (S_Shared_Debug   'Access,
6542
                        S_Shared_Image   'Access,
6543
                        S_Shared_Ident   'Access,
6544
                        S_Shared_Nofiles 'Access,
6545
                        S_Shared_Noinhib 'Access,
6546
                        S_Shared_Verb    'Access,
6547
                        S_Shared_ZZZZZ   'Access);
6548
 
6549
   -----------------------------
6550
   -- Switches for GNAT STACK --
6551
   -----------------------------
6552
 
6553
   S_Stack_Add        : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*"  &
6554
                                                "-aP*";
6555
   --        /ADD_PROJECT_SEARCH_PATH=(directory[,...])
6556
   --
6557
   --   Add directories to the project search path.
6558
 
6559
   S_Stack_All        : aliased constant S := "/ALL_SUBPROGRAMS "          &
6560
                                                "-a";
6561
   --        /NOALL_SUBPROGRAMS (D)
6562
   --        /ALL_SUBPROGRAMS
6563
   --
6564
   --   Consider all subprograms as entry points.
6565
 
6566
   S_Stack_All_Cycles : aliased constant S := "/ALL_CYCLES "               &
6567
                                                "-ca";
6568
   --        /NOALL_CYCLES (D)
6569
   --        /ALL_CYCLES
6570
   --
6571
   --   Extract all possible cycles in the call graph.
6572
 
6573
   S_Stack_All_Prjs   : aliased constant S := "/ALL_PROJECTS "             &
6574
                                                "-U";
6575
   --        /NOALL_PROJECTS (D)
6576
   --        /ALL_PROJECTS
6577
   --
6578
   --   When GNAT STACK is used with a Project File and no source is
6579
   --   specified, the underlying tool gnatstack is called for all the
6580
   --   units of all the Project Files in the project tree.
6581
 
6582
   S_Stack_Debug      : aliased constant S := "/DEBUG "                    &
6583
                                                "-g";
6584
   --        /NODEBUG (D)
6585
   --        /DEBUG
6586
   --
6587
   --   Generate internal debug information.
6588
 
6589
   S_Stack_Directory  : aliased constant S := "/DIRECTORY=*"               &
6590
                                                "-aO*";
6591
   --        /DIRECTORY=(direc[,...])
6592
   --
6593
   --   When looking for .ci files look also in directories specified.
6594
 
6595
   S_Stack_Entries    : aliased constant S := "/ENTRIES=*"                 &
6596
                                                "-e*";
6597
   --
6598
   --        /ENTRY=(entry_point[,...])
6599
   --
6600
   --   Name of symbol to be used as entry point for the analysis.
6601
 
6602
   S_Stack_Files      : aliased constant S := "/FILES=@"                   &
6603
                                                "-files=@";
6604
   --      /FILES=filename
6605
   --
6606
   --   Take as arguments the files that are listed in the specified
6607
   --   text file.
6608
 
6609
   S_Stack_Follow : aliased constant S := "/FOLLOW_LINKS_FOR_FILES "       &
6610
                                            "-eL";
6611
   --        /NOFOLLOW_LINKS_FOR_FILES (D)
6612
   --        /FOLLOW_LINKS_FOR_FILES
6613
   --
6614
   --    Follow links when parsing project files
6615
 
6616
   S_Stack_Help       : aliased constant S := "/HELP "                     &
6617
                                                "-h";
6618
   --        /NOHELP (D)
6619
   --        /HELP
6620
   --
6621
   --   Output a message explaining the usage of gnatstack.
6622
 
6623
   S_Stack_List       : aliased constant S := "/LIST=#"                    &
6624
                                                "-l#";
6625
   --        /LIST=nnn
6626
   --
6627
   --   Print the nnn subprograms requiring the biggest local stack usage. By
6628
   --   default none will be displayed.
6629
 
6630
   S_Stack_Order      : aliased constant S := "/ORDER="                    &
6631
                                              "STACK "                     &
6632
                                                 "-os "                    &
6633
                                              "ALPHABETICAL "              &
6634
                                                 "-oa";
6635
   --        /ORDER[=order-option]
6636
   --
6637
   --   Specifies the order for displaying the different call graphs.
6638
   --   order-option may be one of the following:
6639
   --
6640
   --      STACK (D)    Select stack usage order
6641
   --
6642
   --      ALPHABETICAL Select alphabetical order
6643
 
6644
   S_Stack_Path       : aliased constant S := "/PATH "                     &
6645
                                                "-p";
6646
   --        /NOPATH (D)
6647
   --        /PATH
6648
   --
6649
   --   Print all the subprograms that make up the worst-case path for every
6650
   --   entry point.
6651
 
6652
   S_Stack_Project    : aliased constant S := "/PROJECT_FILE=<"            &
6653
                                                "-P>";
6654
   --        /PROJECT_FILE=filename
6655
   --
6656
   --   Specifies the main project file to be used. The project files rooted
6657
   --   at the main project file will be parsed before the invocation of
6658
   --   gnatstack.
6659
 
6660
   S_Stack_Output     : aliased constant S := "/OUTPUT=@"                  &
6661
                                                "-f@";
6662
   --        /OUTPUT=filename
6663
   --
6664
   --   Name of the file containing the generated graph (VCG format).
6665
 
6666
   S_Stack_Regexp     : aliased constant S := "/EXPRESSION=|"              &
6667
                                                "-r|";
6668
   --
6669
   --        /EXPRESSION=regular-expression
6670
   --
6671
   --   Any symbol matching the regular expression will be considered as a
6672
   --   potential entry point for the analysis.
6673
 
6674
   S_Stack_Subdirs : aliased constant S := "/SUBDIRS=<"                    &
6675
                                              "--subdirs=>";
6676
   --        /SUBDIRS=dir
6677
   --
6678
   --   The actual directories (object, exec, library, ...) are subdirectories
6679
   --   of the directory specified in the project file. If the subdirectory
6680
   --   does not exist, it is created automatically.
6681
 
6682
   S_Stack_Unbounded  : aliased constant S := "/UNBOUNDED=#"               &
6683
                                                "-d#";
6684
   --        /UNBOUNDED=nnn
6685
   --
6686
   --   Default stack size to be used for unbounded (dynamic) frames.
6687
 
6688
   S_Stack_Unknown    : aliased constant S := "/UNKNOWN=#"                 &
6689
                                                "-u#";
6690
   --        /UNKNOWN=nnn
6691
   --
6692
   --   Default stack size to be used for unknown (external) calls.
6693
 
6694
   S_Stack_Verbose    : aliased constant S := "/VERBOSE "                  &
6695
                                                "-v";
6696
   --        /NOVERBOSE (D)
6697
   --        /VERBOSE
6698
   --
6699
   --   Specifies the amount of information to be displayed about the
6700
   --   different subprograms. In verbose mode the full location of the
6701
   --   subprogram will be part of the output, as well as detailed information
6702
   --   about inaccurate data.
6703
 
6704
   S_Stack_Warnings   : aliased constant S := "/WARNINGS="                 &
6705
                                              "ALL "                       &
6706
                                                 "-Wa "                    &
6707
                                              "CYCLES "                    &
6708
                                                 "-Wc "                    &
6709
                                              "UNBOUNDED "                 &
6710
                                                 "-Wu "                    &
6711
                                              "EXTERNAL "                  &
6712
                                                 "-We "                    &
6713
                                              "INDIRECT "                  &
6714
                                                 "-Wi";
6715
   --        /WARNINGS[=(keyword[,...])]
6716
   --
6717
   --    The following keywords are supported:
6718
   --
6719
   --        ALL        Turn on all optional warnings
6720
   --
6721
   --        CYCLES     Turn on warnings for cycles
6722
   --
6723
   --        UNBOUNDED  Turn on warnings for unbounded frames
6724
   --
6725
   --        EXTERNAL   Turn on warnings for external calls
6726
   --
6727
   --        INDIRECT   Turn on warnings for indirect calls
6728
 
6729
   Stack_Switches : aliased constant Switches :=
6730
                      (S_Stack_Add        'Access,
6731
                       S_Stack_All        'Access,
6732
                       S_Stack_All_Cycles 'Access,
6733
                       S_Stack_All_Prjs   'Access,
6734
                       S_Stack_Debug      'Access,
6735
                       S_Stack_Directory  'Access,
6736
                       S_Stack_Entries    'Access,
6737
                       S_Stack_Files      'Access,
6738
                       S_Stack_Follow     'Access,
6739
                       S_Stack_Help       'Access,
6740
                       S_Stack_List       'Access,
6741
                       S_Stack_Order      'Access,
6742
                       S_Stack_Path       'Access,
6743
                       S_Stack_Project    'Access,
6744
                       S_Stack_Output     'Access,
6745
                       S_Stack_Regexp     'Access,
6746
                       S_Stack_Subdirs    'Access,
6747
                       S_Stack_Unbounded  'Access,
6748
                       S_Stack_Unknown    'Access,
6749
                       S_Stack_Verbose    'Access,
6750
                       S_Stack_Warnings   'Access);
6751
 
6752
   ----------------------------
6753
   -- Switches for GNAT STUB --
6754
   ----------------------------
6755
 
6756
   S_Stub_Add     : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*"      &
6757
                                            "-aP*";
6758
   --        /ADD_PROJECT_SEARCH_PATH=(directory[,...])
6759
   --
6760
   --   Add directories to the project search path.
6761
 
6762
   S_Stub_Config  : aliased constant S := "/CONFIGURATION_PRAGMAS_FILE=<"  &
6763
                                            "-gnatec>";
6764
   --        /CONFIGURATION_PRAGMAS_FILE=filespec
6765
   --
6766
   --   Specifies a configuration pragmas file that must be taken into account
6767
   --   when compiling.
6768
 
6769
   S_Stub_Current : aliased constant S := "/CURRENT_DIRECTORY "            &
6770
                                            "!-I-";
6771
   --        /CURRENT_DIRECTORY (D)
6772
   --        /NOCURRENT_DIRECTORY
6773
   --
6774
   --   Look for source, library or object files in the default directory.
6775
 
6776
   S_Stub_Ext     : aliased constant S := "/EXTERNAL_REFERENCE=" & '"'     &
6777
                                            "-X" & '"';
6778
   --        /EXTERNAL_REFERENCE="name=val"
6779
   --
6780
   --   Specifies an external reference to the project manager. Useful only if
6781
   --   /PROJECT_FILE is used.
6782
   --
6783
   --   Example:
6784
   --      /EXTERNAL_REFERENCE="DEBUG=TRUE"
6785
 
6786
   S_Stub_Follow  : aliased constant S := "/FOLLOW_LINKS_FOR_FILES "       &
6787
                                            "-eL";
6788
   --        /NOFOLLOW_LINKS_FOR_FILES (D)
6789
   --        /FOLLOW_LINKS_FOR_FILES
6790
   --
6791
   --    Follow links when parsing project files
6792
 
6793
   S_Stub_Full    : aliased constant S := "/FULL "                         &
6794
                                            "-f";
6795
   --        /NOFULL (D)
6796
   --        /FULL
6797
   --
6798
   --   If the destination directory already contains a file with the name of
6799
   --   the body file for the argument file spec, replace it with the generated
6800
   --   body stub. If /FULL is not used and there is already a body file, this
6801
   --   existing body file is not replaced.
6802
 
6803
   S_Stub_Header  : aliased constant S := "/HEADER="                       &
6804
                                            "GENERAL "                     &
6805
                                               "-hg "                      &
6806
                                            "SPEC "                        &
6807
                                               "-hs";
6808
   --        /HEADER[=header-option]
6809
   --
6810
   --   Specifies the form of the comment header above the generated body stub.
6811
   --   If no /HEADER qualifier is specified, there is no comment header.
6812
   --   header-option is one of the following:
6813
   --
6814
   --
6815
   --      GENERAL (D)  Put a sample comment header into the body stub.
6816
   --
6817
   --      SPEC         Put the comment header (i.e., all the comments
6818
   --                   preceding the compilation unit) from the source of the
6819
   --                   library unit declaration into the body stub.
6820
 
6821
   S_Stub_Header_File : aliased constant S := "/FROM_HEADER_FILE=<" &
6822
                                                "--header-file=>";
6823
 
6824
   --        /FROM_HEADER_FILE==filename
6825
   --
6826
   --   Use the content of the file as the comment header for a generated body
6827
   --   stub.
6828
 
6829
   S_Stub_Indent  : aliased constant S := "/INDENTATION=#"                 &
6830
                                            "-i#";
6831
   --        /INDENTATION=nnn
6832
   --
6833
   --   (nnn is a non-negative integer). Set the indentation level in the
6834
   --   generated body stub to nnn. nnn=0 means "no indentation".
6835
   --   Default indentation is 3.
6836
 
6837
   S_Stub_Keep    : aliased constant S := "/KEEP "                         &
6838
                                            "-k";
6839
   --        /NOKEEP (D)
6840
   --        /KEEP
6841
   --
6842
   --   Do not delete the tree file (i.e., the snapshot of the compiler
6843
   --   internal structures used by gnatstub) after creating the body stub.
6844
 
6845
   S_Stub_Length  : aliased constant S := "/LINE_LENGTH=#"                 &
6846
                                            "-l#";
6847
   --        /LINE_LENGTH=nnn
6848
   --
6849
   --   (n is a non-negative integer). Set the maximum line length in the body
6850
   --   stub to nnn. Default is 78.
6851
 
6852
   S_Stub_Mess    : aliased constant S := "/MESSAGES_PROJECT_FILE="        &
6853
                                            "DEFAULT "                     &
6854
                                               "-vP0 "                     &
6855
                                            "MEDIUM "                      &
6856
                                               "-vP1 "                     &
6857
                                            "HIGH "                        &
6858
                                               "-vP2";
6859
   --        /MESSAGES_PROJECT_FILE[=messages-option]
6860
   --
6861
   --   Specifies the "verbosity" of the parsing of project files.
6862
   --   messages-option may be one of the following:
6863
   --
6864
   --      DEFAULT (D)  No messages are output if there is no error or warning.
6865
   --
6866
   --      MEDIUM       A small number of messages are output.
6867
   --
6868
   --      HIGH         A great number of messages are output, most of them not
6869
   --                   being useful for the user.
6870
 
6871
   S_Stub_No_Exc  : aliased constant S := "/NO_EXCEPTION "                 &
6872
                                          "--no-exception";
6873
   --        /NONO_EXCEPTION (D)
6874
   --        /NO_EXCEPTION
6875
   --
6876
   --  Avoid raising PROGRAM_ERROR in the generated program unit stubs.
6877
 
6878
   S_Stub_No_Head : aliased constant S := "/NO_LOCAL_HEADER "             &
6879
                                          "--no-local-header";
6880
   --        /NONO_LOCAL_HEADER (D)
6881
   --        /NO_LOCAL_HEADER
6882
   --
6883
   --  Do not put local comment header before body stub for local program unit.
6884
 
6885
   S_Stub_Output  : aliased constant S := "/OUTPUT=@"                      &
6886
                                            "-o@";
6887
   --        /OUTPUT=filespec
6888
   --
6889
   --   Body file name. This should be set if the argument file name does not
6890
   --   follow the GNAT file naming conventions. If this switch is omitted,
6891
   --   the default name for the body will be obtained from the argument file
6892
   --   name according to the GNAT file naming conventions.
6893
 
6894
   S_Stub_Project : aliased constant S := "/PROJECT_FILE=<"                &
6895
                                            "-P>";
6896
   --        /PROJECT_FILE=filename
6897
   --
6898
   --   Specifies the main project file to be used. The project files rooted
6899
   --   at the main project file will be parsed before any other processing.
6900
   --   The source and object directories to be searched will be communicated
6901
   --   to gnatstub through logical names ADA_PRJ_INCLUDE_FILE and
6902
   --   ADA_PRJ_OBJECTS_FILE.
6903
 
6904
   S_Stub_Quiet   : aliased constant S := "/QUIET "                        &
6905
                                            "-q";
6906
   --        /NOQUIET (D)
6907
   --        /QUIET
6908
   --
6909
   --   Quiet mode: do not generate a confirmation when a body is successfully
6910
   --   created, and do not generate a message when a body is not required for
6911
   --   an argument unit.
6912
 
6913
   S_Stub_Search  : aliased constant S := "/SEARCH=*"                      &
6914
                                            "-I*";
6915
   --        /SEARCH=(directory[,...])
6916
   --
6917
   --    When looking for source files also look in directories specified.
6918
 
6919
   S_Stub_Subdirs : aliased constant S := "/SUBDIRS=<"                     &
6920
                                             "--subdirs=>";
6921
   --        /SUBDIRS=dir
6922
   --
6923
   --   The actual directories (object, exec, library, ...) are subdirectories
6924
   --   of the directory specified in the project file. If the subdirectory
6925
   --   does not exist, it is created automatically.
6926
 
6927
   S_Stub_Tree    : aliased constant S := "/TREE_FILE="                    &
6928
                                            "OVERWRITE "                   &
6929
                                               "-t "                       &
6930
                                            "SAVE "                        &
6931
                                               "-k "                       &
6932
                                            "REUSE "                       &
6933
                                               "-r";
6934
   --        /TREE_FILE[=treefile-option]
6935
   --
6936
   --   Specify what to do with the tree file.
6937
   --   treefile-option is one of the following:
6938
   --
6939
   --      OVERWRITE (D)  Overwrite the existing tree file. If the current
6940
   --                     directory already contains the file which, according
6941
   --                     to the GNAT file naming rules should be considered
6942
   --                     as a tree file for the argument source file, gnatstub
6943
   --                     will refuse to create the tree file needed to create
6944
   --                     a sample body unless this option is chosen.
6945
   --
6946
   --      SAVE           Do not remove the tree file (i.e., the snapshot
6947
   --                     of the compiler internal structures used by gnatstub)
6948
   --                     after creating the body stub.
6949
   --
6950
   --      REUSE          Reuse the tree file (if it exists) instead of
6951
   --                     creating it.
6952
   --                     Instead of creating the tree file for the library
6953
   --                     unit declaration, gnatstub tries to find it in the
6954
   --                     current directory and use it for creating a body.
6955
   --                     If the tree file is not found, no body is created.
6956
   --                     This option also implies `SAVE', whether or not the
6957
   --                     latter is set explicitly.
6958
 
6959
   S_Stub_Verbose : aliased constant S := "/VERBOSE "                      &
6960
                                            "-v";
6961
   --        /NOVERBOSE (D)
6962
   --        /VERBOSE
6963
   --
6964
   --   Verbose mode: generate version information.
6965
 
6966
   Stub_Switches : aliased constant Switches :=
6967
                     (S_Stub_Add        'Access,
6968
                      S_Stub_Config     'Access,
6969
                      S_Stub_Current    'Access,
6970
                      S_Stub_Ext        'Access,
6971
                      S_Stub_Follow     'Access,
6972
                      S_Stub_Full       'Access,
6973
                      S_Stub_Header     'Access,
6974
                      S_Stub_Header_File'Access,
6975
                      S_Stub_Indent     'Access,
6976
                      S_Stub_Keep       'Access,
6977
                      S_Stub_Length     'Access,
6978
                      S_Stub_Mess       'Access,
6979
                      S_Stub_Output     'Access,
6980
                      S_Stub_Project    'Access,
6981
                      S_Stub_No_Exc     'Access,
6982
                      S_Stub_No_Head    'Access,
6983
                      S_Stub_Quiet      'Access,
6984
                      S_Stub_Search     'Access,
6985
                      S_Stub_Subdirs    'Access,
6986
                      S_Stub_Tree       'Access,
6987
                      S_Stub_Verbose    'Access);
6988
 
6989
   ----------------------------
6990
   -- Switches for GNAT SYNC --
6991
   ----------------------------
6992
 
6993
   S_Sync_Add    : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*"       &
6994
                                            "-aP*";
6995
   --        /ADD_PROJECT_SEARCH_PATH=(directory[,...])
6996
   --
6997
   --   Add directories to the project search path.
6998
 
6999
   S_Sync_All    : aliased constant S := "/ALL "                           &
7000
                                            "-a";
7001
   --        /NOALL (D)
7002
   --        /ALL
7003
   --
7004
   --   Also check the components of the GNAT run time and process the needed
7005
   --  components of the GNAT RTL when building and analyzing the global
7006
   --  structure for checking the global rules.
7007
 
7008
   S_Sync_Allproj : aliased constant S := "/ALL_PROJECTS "                 &
7009
                                            "-U";
7010
   --        /NOALL_PROJECTS (D)
7011
   --        /ALL_PROJECTS
7012
   --
7013
   --   When GNAT SYNC is used with a Project File and no source is
7014
   --   specified, the underlying tool gnatsync is called for all the
7015
   --   sources of all the Project Files in the project tree.
7016
 
7017
   S_Sync_Ext     : aliased constant S := "/EXTERNAL_REFERENCE=" & '"'     &
7018
                                             "-X" & '"';
7019
   --       /EXTERNAL_REFERENCE="name=val"
7020
   --
7021
   --   Specifies an external reference to the project manager. Useful only if
7022
   --   /PROJECT_FILE is used.
7023
   --
7024
   --   Example:
7025
   --      /EXTERNAL_REFERENCE="DEBUG=TRUE"
7026
 
7027
   S_Sync_Files  : aliased constant S := "/FILES=@"                        &
7028
                                             "-files=@";
7029
   --      /FILES=filename
7030
   --
7031
   --   Take as arguments the files that are listed in the specified
7032
   --   text file.
7033
 
7034
   S_Sync_Follow  : aliased constant S := "/FOLLOW_LINKS_FOR_FILES "       &
7035
                                            "-eL";
7036
   --        /NOFOLLOW_LINKS_FOR_FILES (D)
7037
   --        /FOLLOW_LINKS_FOR_FILES
7038
   --
7039
   --    Follow links when parsing project files
7040
 
7041
   S_Sync_Main    : aliased constant S := "/MAIN_SUBPROGRAM=@"             &
7042
                                            "-main=@";
7043
   --        /MAIN_SUBPROGRAM=filename
7044
   --
7045
   --   Specify the name of the file containing the main subprogram
7046
 
7047
   S_Sync_Mess    : aliased constant S := "/MESSAGES_PROJECT_FILE="        &
7048
                                             "DEFAULT "                    &
7049
                                                "-vP0 "                    &
7050
                                             "MEDIUM "                     &
7051
                                                "-vP1 "                    &
7052
                                             "HIGH "                       &
7053
                                                "-vP2";
7054
   --        /MESSAGES_PROJECT_FILE[=messages-option]
7055
   --
7056
   --   Specifies the "verbosity" of the parsing of project files.
7057
   --   messages-option may be one of the following:
7058
   --
7059
   --      DEFAULT (D)  No messages are output if there is no error or warning.
7060
   --
7061
   --      MEDIUM       A small number of messages are output.
7062
   --
7063
   --      HIGH         A great number of messages are output, most of them not
7064
   --                   being useful for the user.
7065
 
7066
   S_Sync_Project : aliased constant S := "/PROJECT_FILE=<"                &
7067
                                             "-P>";
7068
   --        /PROJECT_FILE=filename
7069
   --
7070
   --   Specifies the main project file to be used. The project files rooted
7071
   --   at the main project file will be parsed before the invocation of the
7072
   --   gnatcheck. The source directories to be searched will be communicated
7073
   --   to gnatcheck through logical name ADA_PRJ_INCLUDE_FILE.
7074
 
7075
   S_Sync_Quiet  : aliased constant S := "/QUIET "                         &
7076
                                            "-q";
7077
   --        /NOQUIET (D)
7078
   --        /QUIET
7079
   --
7080
   --   Work quietly, only output warnings and errors.
7081
 
7082
   S_Sync_Subdirs : aliased constant S := "/SUBDIRS=<"                     &
7083
                                             "--subdirs=>";
7084
   --        /SUBDIRS=dir
7085
   --
7086
   --   The actual directories (object, exec, library, ...) are subdirectories
7087
   --   of the directory specified in the project file. If the subdirectory
7088
   --   does not exist, it is created automatically.
7089
 
7090
   S_Sync_Verb   : aliased constant S := "/VERBOSE "                       &
7091
                                            "-v";
7092
   --        /NOVERBOSE (D)
7093
   --        /VERBOSE
7094
   --
7095
   --   The version number and copyright notice are output, as well as exact
7096
   --   copies of the gnat1 commands spawned to obtain the chop control
7097
   --   information.
7098
 
7099
   S_Sync_Exec   : aliased constant S := "/EXECUTION_TIME "                &
7100
                                            "-t";
7101
   --        /NOEXECUTION_TIME (D)
7102
   --        /EXECUTION_TIME
7103
   --
7104
   --   Output the execution time
7105
 
7106
   S_Sync_Details : aliased constant S := "/DETAILS="                      &
7107
                                             "MEDIUM "                     &
7108
                                               "-om "                      &
7109
                                             "SHORT "                      &
7110
                                               "-os "                      &
7111
                                             "FULL "                       &
7112
                                               "-of";
7113
   --         /DETAILS[=options]
7114
   --
7115
   --   Specifies the details of the output.
7116
   --   Options may be one of the following:
7117
   --
7118
   --       MEDIUM (D)
7119
   --       SHORT
7120
   --       FULL
7121
 
7122
   S_Sync_Warnoff : aliased constant S := "/WARNINGS_OFF "                 &
7123
                                             "-wq";
7124
   --
7125
   --         /WARNINGS_OFF
7126
   --
7127
   --   Turn warnings off
7128
 
7129
   S_Sync_Output  : aliased constant S := "/OUTPUT_FILE=<"                 &
7130
                                             "-out_file=>";
7131
   --
7132
   --        /OUTPUT_FILE=filename
7133
   --
7134
   --   Redirect output to a text file
7135
 
7136
   Sync_Switches : aliased constant Switches :=
7137
                      (S_Sync_Add      'Access,
7138
                       S_Sync_All      'Access,
7139
                       S_Sync_Allproj  'Access,
7140
                       S_Sync_Ext      'Access,
7141
                       S_Sync_Follow   'Access,
7142
                       S_Sync_Files    'Access,
7143
                       S_Sync_Main     'Access,
7144
                       S_Sync_Mess     'Access,
7145
                       S_Sync_Project  'Access,
7146
                       S_Sync_Quiet    'Access,
7147
                       S_Sync_Subdirs  'Access,
7148
                       S_Sync_Verb     'Access,
7149
                       S_Sync_Exec     'Access,
7150
                       S_Sync_Details  'Access,
7151
                       S_Sync_Warnoff  'Access,
7152
                       S_Sync_Output   'Access);
7153
 
7154
   ----------------------------
7155
   -- Switches for GNAT XREF --
7156
   ----------------------------
7157
 
7158
   S_Xref_Add     : aliased constant S := "/ADD_PROJECT_SEARCH_DIR=*"      &
7159
                                            "-aP*";
7160
   --        /ADD_PROJECT_SEARCH_PATH=(directory[,...])
7161
   --
7162
   --   Add directories to the project search path.
7163
 
7164
   S_Xref_All     : aliased constant S := "/ALL_FILES "                    &
7165
                                            "-a";
7166
   --        /NOALL_FILES (D)
7167
   --        /ALL_FILES
7168
   --
7169
   --   If this switch is present, FIND and XREF will parse the read-only
7170
   --   files found in the library search path. Otherwise, these files will
7171
   --   be ignored. This option can be used to protect Gnat sources or your
7172
   --   own libraries from being parsed, thus making FIND and XREF much
7173
   --   faster, and their output much smaller.
7174
 
7175
   S_Xref_Deriv   : aliased constant S := "/DERIVED_TYPES "                &
7176
                                            "-d";
7177
   --        /NODERIVED_TYPES (D)
7178
   --        /DERIVED_TYPES
7179
   --
7180
   --   Output the parent type reference for each matching derived types.
7181
 
7182
   S_Xref_Ext     : aliased constant S := "/EXTERNAL_REFERENCE=" & '"'     &
7183
                                            "-X" & '"';
7184
   --        /EXTERNAL_REFERENCE="name=val"
7185
   --
7186
   --   Specifies an external reference to the project manager. Useful only if
7187
   --   /PROJECT_FILE is used.
7188
   --
7189
   --   Example:
7190
   --      /EXTERNAL_REFERENCE="DEBUG=TRUE"
7191
 
7192
   S_Xref_Follow  : aliased constant S := "/FOLLOW_LINKS_FOR_FILES "       &
7193
                                            "-eL";
7194
   --        /NOFOLLOW_LINKS_FOR_FILES (D)
7195
   --        /FOLLOW_LINKS_FOR_FILES
7196
   --
7197
   --    Follow links when parsing project files
7198
 
7199
   S_Xref_Full    : aliased constant S := "/FULL_PATHNAME "                &
7200
                                            "-f";
7201
   --        /NOFULL_PATHNAME (D)
7202
   --        /FULL_PATHNAME
7203
   --
7204
   --   If this switch is set, the output file names will be preceded by their
7205
   --   directory (if the file was found in the search path). If this switch
7206
   --   is not set, the directory will not be printed.
7207
 
7208
   S_Xref_Global  : aliased constant S := "/IGNORE_LOCALS "                &
7209
                                            "-g";
7210
   --        /NOIGNORE_LOCALS (D)
7211
   --        /IGNORE_LOCALS
7212
   --
7213
   --   If this switch is set, information is output only for library-level
7214
   --   entities, ignoring local entities. The use of this switch may
7215
   --   accelerate FIND and XREF.
7216
 
7217
   S_Xref_Mess    : aliased constant S := "/MESSAGES_PROJECT_FILE="        &
7218
                                            "DEFAULT "                     &
7219
                                               "-vP0 "                     &
7220
                                            "MEDIUM "                      &
7221
                                               "-vP1 "                     &
7222
                                            "HIGH "                        &
7223
                                               "-vP2";
7224
   --        /MESSAGES_PROJECT_FILE[=messages-option]
7225
   --
7226
   --   Specifies the "verbosity" of the parsing of project files.
7227
   --   messages-option may be one of the following:
7228
   --
7229
   --      DEFAULT (D)  No messages are output if there is no error or warning.
7230
   --
7231
   --      MEDIUM       A small number of messages are output.
7232
   --
7233
   --      HIGH         A great number of messages are output, most of them not
7234
   --                   being useful for the user.
7235
 
7236
   S_Xref_Nostinc : aliased constant S := "/NOSTD_INCLUDES "               &
7237
                                            "-nostdinc";
7238
   --        /NOSTD_INCLUDES
7239
   --
7240
   --   Do not look for sources in the system default directory.
7241
 
7242
   S_Xref_Nostlib : aliased constant S := "/NOSTD_LIBRARIES "              &
7243
                                            "-nostdlib";
7244
   --        /NOSTD_LIBRARIES
7245
   --
7246
   --   Do not look for library files in the system default directory.
7247
 
7248
   S_Xref_Object  : aliased constant S := "/OBJECT_SEARCH=*"               &
7249
                                            "-aO*";
7250
   --        /OBJECT_SEARCH=(directory,...)
7251
   --
7252
   --   When searching for library and object files, look in the specified
7253
   --   directories. The order in which library files are searched is the same
7254
   --   as for MAKE.
7255
 
7256
   S_Xref_Project : aliased constant S := "/PROJECT=@"                     &
7257
                                            "-p@";
7258
   --        /PROJECT=file
7259
   --
7260
   --   Specify a project file to use. By default, FIND and XREF will try to
7261
   --   locate a project file in the current directory.
7262
   --
7263
   --   If a project file is either specified or found by the tools, then the
7264
   --   content of the source directory and object directory lines are added
7265
   --   as if they had been specified respectively by /SOURCE_SEARCH and
7266
   --   /OBJECT_SEARCH.
7267
 
7268
   S_Xref_Prj     : aliased constant S := "/PROJECT_FILE=<"                &
7269
                                            "-P>";
7270
   --        /PROJECT_FILE=filename
7271
   --
7272
   --   Specifies the main project file to be used. The project files rooted
7273
   --   at the main project file will be parsed before doing any processing.
7274
   --   The source and object directories to be searched will be communicated
7275
   --   to gnatxref through logical names ADA_PRJ_INCLUDE_FILE and
7276
   --   ADA_PRJ_OBJECTS_FILE.
7277
 
7278
   S_Xref_Search  : aliased constant S := "/SEARCH=*"                      &
7279
                                            "-I*";
7280
   --        /SEARCH=(directory,...)
7281
   --
7282
   --   Equivalent to:
7283
   --           /OBJECT_SEARCH=(directory,...) /SOURCE_SEARCH=(directory,...)
7284
 
7285
   S_Xref_Source  : aliased constant S := "/SOURCE_SEARCH=*"               &
7286
                                            "-aI*";
7287
   --        /SOURCE_SEARCH=(directory,...)
7288
   --
7289
   --   When looking for source files also look in the specified directories.
7290
   --   The order in which source file search is undertaken is the same as for
7291
   --   MAKE.
7292
 
7293
   S_Xref_Subdirs : aliased constant S := "/SUBDIRS=<"                     &
7294
                                             "--subdirs=>";
7295
   --        /SUBDIRS=dir
7296
   --
7297
   --   The actual directories (object, exec, library, ...) are subdirectories
7298
   --   of the directory specified in the project file. If the subdirectory
7299
   --   does not exist, it is created automatically.
7300
 
7301
   S_Xref_Output  : aliased constant S := "/UNUSED "                       &
7302
                                            "-u";
7303
   --        /SOURCE_SEARCH=(directory,...)
7304
   --
7305
   --   When looking for source files also look in the specified directories.
7306
   --   The order in which source file search is undertaken is the same as for
7307
   --   MAKE.
7308
 
7309
   S_Xref_Tags    : aliased constant S := "/TAGS "                         &
7310
                                            "-v";
7311
   --        /NOTAGS (D)
7312
   --        /TAGS
7313
   --
7314
   --   Print a 'tags' file for vi.
7315
 
7316
   Xref_Switches : aliased constant Switches :=
7317
                     (S_Xref_Add     'Access,
7318
                      S_Xref_All     'Access,
7319
                      S_Xref_Deriv   'Access,
7320
                      S_Xref_Ext     'Access,
7321
                      S_Xref_Follow  'Access,
7322
                      S_Xref_Full    'Access,
7323
                      S_Xref_Global  'Access,
7324
                      S_Xref_Mess    'Access,
7325
                      S_Xref_Nostinc 'Access,
7326
                      S_Xref_Nostlib 'Access,
7327
                      S_Xref_Object  'Access,
7328
                      S_Xref_Project 'Access,
7329
                      S_Xref_Prj     'Access,
7330
                      S_Xref_Search  'Access,
7331
                      S_Xref_Source  'Access,
7332
                      S_Xref_Subdirs 'Access,
7333
                      S_Xref_Output  'Access,
7334
                      S_Xref_Tags    'Access);
7335
 
7336
end VMS_Data;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.