5.4. Examples of gnatchop Use

gnatchop -w hello_s.ada src/files

Chops the source file hello_s.ada. The output files will be placed in the directory src/files, overwriting any files with matching names in that directory (no files in the current directory are modified).

gnatchop -s -r collect

Chops the source file collect into the current directory. A compilation script is also generated, and all output files have Source_Reference pragmas, so error messages will refer back to the file collect with proper line numbers.

gnatchop archive

Chops the source file archive into the current directory. One useful application of gnatchop is in sending sets of sources around, for example in email messages. The required sources are simply concatenated (for example, using a UNIX cat command), and then gnatchop is used at the other end to re-constitute the original file names.