[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

18. Cleaning Up Using gnatclean

gnatclean is a tool that allows the deletion of files produced by the compiler, binder and linker, including ALI files, object files, tree files, expanded source files, library files, interface copy source files, binder generated files and executable files.

18.1 Running gnatclean  
18.2 Switches for gnatclean  
18.3 Examples of gnatclean Usage  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

18.1 Running gnatclean

The gnatclean command has the form:

 
$ gnatclean switches names

names is a list of source file names. Suffixes .ads and adb may be omitted. If a project file is specified using switch -P, then names may be completely omitted.

In normal mode, gnatclean delete the files produced by the compiler and, if switch -c is not specified, by the binder and the linker. In informative-only mode, specified by switch -n, the list of files that would have been deleted in normal mode is listed, but no file is actually deleted.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

18.2 Switches for gnatclean

gnatclean recognizes the following switches:

`-c'
Only attempt to delete the files produced by the compiler, not those produced by the binder or the linker. The files that are not to be deleted are library files, interface copy files, binder generated files and executable files.

`-D dir'
Indicate that ALI and object files should normally be found in directory dir.

`-F'
When using project files, if some errors or warnings are detected during parsing and verbose mode is not in effect (no use of switch -v), then error lines start with the full path name of the project file, rather than its simple file name.

`-h'
Output a message explaining the usage of gnatclean.

`-n'
Informative-only mode. Do not delete any files. Output the list of the files that would have been deleted if this switch was not specified.

`-Pproject'
Use project file project. Only one such switch can be used. When cleaning a project file, the files produced by the compilation of the immediate sources or inherited sources of the project files are to be deleted. This is not depending on the presence or not of executable names on the command line.

`-q'
Quiet output. If there are no error, do not ouuput anything, except in verbose mode (switch -v) or in informative-only mode (switch -n).

`-r'
When a project file is specified (using switch -P), clean all imported and extended project files, recursively. If this switch is not specified, only the files related to the main project file are to be deleted. This switch has no effect if no project file is specified.

`-v'
Verbose mode.

`-vPx'
Indicates the verbosity of the parsing of GNAT project files. See section 11.14 Switches Related to Project Files.

`-Xname=value'
Indicates that external variable name has the value value. The Project Manager will use this value for occurrences of external(name) when parsing the project file. See section 11.14 Switches Related to Project Files.

`-aOdir'
When searching for ALI and object files, look in directory dir.

`-Idir'
Equivalent to `-aOdir'.

`-I-'
Do not look for ALI or object files in the directory where gnatclean was invoked.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

18.3 Examples of gnatclean Usage


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Mail Server on June, 15 2005 using texi2html