diff options
author | Philippe Gil <gil@adacore.com> | 2020-02-03 14:56:23 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-06-08 03:51:00 -0400 |
commit | 591bdee0fa1087daeab3c0f901d5139c6776469d (patch) | |
tree | 8ae1f5be8a2a80dcd57e7cdb80dad3ba4b2ed601 | |
parent | fccf77d504b72a749b6aba877454b9d846c0b568 (diff) | |
download | gcc-591bdee0fa1087daeab3c0f901d5139c6776469d.zip gcc-591bdee0fa1087daeab3c0f901d5139c6776469d.tar.gz gcc-591bdee0fa1087daeab3c0f901d5139c6776469d.tar.bz2 |
[Ada] Add gnatname use for multiple units files support
2020-06-08 Philippe Gil <gil@adacore.com>
gcc/ada/
* doc/gnat_ugn/the_gnat_compilation_model.rst: in "Handling
Files with Multiple Units" part documents gnatname use for
unmodified files handling and gnatchop use for files
refactoring.
* gnat_ugn.texi: Regenerate.
-rw-r--r-- | gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst | 27 | ||||
-rw-r--r-- | gcc/ada/gnat_ugn.texi | 27 |
2 files changed, 22 insertions, 32 deletions
diff --git a/gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst b/gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst index 0b587ef..69fc95d 100644 --- a/gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst +++ b/gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst @@ -1067,23 +1067,18 @@ The basic compilation model of GNAT requires that a file submitted to the compiler have only one unit and there be a strict correspondence between the file name and the unit name. -The ``gnatchop`` utility allows both of these rules to be relaxed, -allowing GNAT to process files which contain multiple compilation units -and files with arbitrary file names. ``gnatchop`` -reads the specified file and generates one or more output files, -containing one unit per file. The unit and the file name correspond, -as required by GNAT. - -If you want to permanently restructure a set of 'foreign' files so that -they match the GNAT rules, and do the remaining development using the -GNAT structure, you can simply use ``gnatchop`` once, generate the -new set of files and work with them from that point on. +If you want to keep your files with multiple units, +perhaps to maintain compatibility with some other Ada compilation system, +you can use ``gnatname`` to generate or update your project files. +Generated or modified project files can be processed by GNAT. + +See :ref:`Handling_Arbitrary_File_Naming_Conventions_with_gnatname` +for more details on how to use `gnatname`. -Alternatively, if you want to keep your files in the 'foreign' format, -perhaps to maintain compatibility with some other Ada compilation -system, you can set up a procedure where you use ``gnatchop`` each -time you compile, regarding the source files that it writes as temporary -files that you throw away. +Alternatively, if you want to permanently restructure a set of 'foreign' +files so that they match the GNAT rules, and do the remaining development +using the GNAT structure, you can simply use ``gnatchop`` once, generate the +new set of files and work with them from that point on. Note that if your file containing multiple units starts with a byte order mark (BOM) specifying UTF-8 encoding, then the files generated by gnatchop diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 703b737..1cbaf2f 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -21,7 +21,7 @@ @copying @quotation -GNAT User's Guide for Native Platforms , May 04, 2020 +GNAT User's Guide for Native Platforms , May 05, 2020 AdaCore @@ -2632,23 +2632,18 @@ The basic compilation model of GNAT requires that a file submitted to the compiler have only one unit and there be a strict correspondence between the file name and the unit name. -The @code{gnatchop} utility allows both of these rules to be relaxed, -allowing GNAT to process files which contain multiple compilation units -and files with arbitrary file names. @code{gnatchop} -reads the specified file and generates one or more output files, -containing one unit per file. The unit and the file name correspond, -as required by GNAT. +If you want to keep your files with multiple units, +perhaps to maintain compatibility with some other Ada compilation system, +you can use @code{gnatname} to generate or update your project files. +Generated or modified project files can be processed by GNAT. -If you want to permanently restructure a set of 'foreign' files so that -they match the GNAT rules, and do the remaining development using the -GNAT structure, you can simply use @code{gnatchop} once, generate the -new set of files and work with them from that point on. +See @ref{59,,Handling Arbitrary File Naming Conventions with gnatname} +for more details on how to use @cite{gnatname}. -Alternatively, if you want to keep your files in the 'foreign' format, -perhaps to maintain compatibility with some other Ada compilation -system, you can set up a procedure where you use @code{gnatchop} each -time you compile, regarding the source files that it writes as temporary -files that you throw away. +Alternatively, if you want to permanently restructure a set of 'foreign' +files so that they match the GNAT rules, and do the remaining development +using the GNAT structure, you can simply use @code{gnatchop} once, generate the +new set of files and work with them from that point on. Note that if your file containing multiple units starts with a byte order mark (BOM) specifying UTF-8 encoding, then the files generated by gnatchop |