gnatmake, gnatprep, gprbuild: add page (#8557)

pull/1/head
Daniil Baturin 2022-10-09 23:04:52 +01:00 committed by GitHub
parent 8e47337714
commit d37879cb3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 0 deletions

16
pages/common/gnatmake.md Normal file
View File

@ -0,0 +1,16 @@
# gnatmake
> A low-level build tool for Ada programs (part of the GNAT toolchain).
> More information: <https://gcc.gnu.org/onlinedocs/gnat_ugn/Building-with-gnatmake.html>.
- Compile an executable:
`gnatmake {{source_file1.adb source_file2.adb ...}}`
- Set a custom executable name:
`gnatmake -o {{executable_name}} {{source_file.adb}}`
- [f]orce recompilation:
`gnatmake -f {{source_file.adb}}`

12
pages/common/gnatprep.md Normal file
View File

@ -0,0 +1,12 @@
# gnatprep
> Preprocessor for Ada source code files (part of the GNAT toolchain).
> More information: <https://gcc.gnu.org/onlinedocs/gnat_ugn/Preprocessing-with-gnatprep.html>.
- Use symbol definitions from a file:
`gnatprep {{source_file}} {{target_file}} {{definitions_file}}`
- Specify symbol values in the command line:
`gnatprep -D{{name}}={{value}} {{source_file}} {{target_file}}`

20
pages/common/gprbuild.md Normal file
View File

@ -0,0 +1,20 @@
# gprbuild
> A high-level build tool for projects written in Ada and other languages (C/C++/Fortran).
> More information: <https://docs.adacore.com/gprbuild-docs/html/gprbuild_ug.html>.
- Build a project (assuming only one `*.gpr` file exists in the current directory):
`gprbuild`
- Build a specific [P]roject file:
`gprbuild -P{{project_name}}`
- Clean up the build workspace:
`gprclean`
- Install compiled binaries:
`gprinstall --prefix {{path/to/installation/dir}}`