GNATSTUB(1)
π GNATSTUB β ASIS Tools π
okay bestie, welcome to the group chat where we talk about gnatstub, one of the ASIS Tools. this is the manual page for the GNATSTUB(1) era, and she is iconic. let's get into it π«Ά
β¨ NAME β¨
gnatstub β Generate skeletons for Ada package bodies πβ¨
π¦ SYNOPSIS π¦
gnatstub [OPTION]... filename [directory]
πΈ DESCRIPTION πΈ
so gnatstub is literally an Ada library unit body sample generator. she takes a source file that has the source of an Ada library unit declaration, and she generates the sample body for that unit in another source file. what even is a sample body? it's giving "minimal" but compilable β like a body for a given unit declaration that actually builds. lowkey a whole serve π
gnatstub is an ASIS application, developed on top of the ASIS implementation for GNAT. the important thing to know about her (no cap, this is the plot twist) is that to create a body, gnatstub first compiles the spec to create in your current directory the tree output file β or, simply, a tree file. then after creating a body, gnatstub deletes this tree file. (you can keep the tree file by setting the corresponding option, iykyk.)
so therefore, bestie, if you have some other ASIS-based tools built on top of ASIS-for-GNAT working on the tree files located in your current directory β be aware of possible changes in the set of tree files as a result of using gnatstub. not me accidentally moving your tree files around π
π OPTIONS π
-fβ Replace an existing body file (if any) with a body sample. if the destination directory contains a file which should be considered as the body for filename according to the GNAT file name conventions,gnatstubtreats this file as a body for filename, and it does not create a sample body if'-f'option is not set. so like, no-f, no new body, periodt.-hsβ Put in body sample the comment header from the source of the library unit declaration contained in filename. ("comment header" = all the comments preceding the compilation unit. so you're literally stealing her header and putting it in the body, slay π)-hgβ Put in body sample a sample comment header. cute, generic, homegrown.-Idirβ π-I-β these options have just the same meaning as in calls tognatgccorgnatmake. they're used to define the source search path in the call tognatgccissued bygnatstubto create the tree file. note that to create a body,gnatstubneeds a legal Ada unit, therefore if filename depends on some unit located in another directory,'-I'should be used to provide the path to this unit. give her the map so she can find her friends πΊοΈ-inβ (n is a decimal natural number) Sets the indentation level in a body sample to n.'-i0'means "no indentation", and the default indentation is3. the way that indentation is customizableβ¦ obsessed β¨-kβ Do not remove the tree file. as default,gnatstubremoves from the current directory the tree file created for filename after creating the body sampler.'-k'prevents deleting the tree file. she keeps it. she's a collector π-lnβ (n is a decimal positive number) Sets maximum line length in a body sample to n, the default line length is78. keep it tidy bestie π-qβ Quiet mode:gnatstubdoes not generate a confirmation when a body is successfully created, or a message when a body is not required for an argument unit. she's silent, she's mysterious, she's lowkey π-tβ Overwrite the existing tree file: if the current directory already contains the file which, according to the GNAT file name rules, should be considered as a tree file for filename,gnatstubwill refuse to create the tree file needed to create a body sampler β unless'-t'option is set. consent matters even for tree files fr fr π-vβ Verbose mode:gnatstubgenerates version information. she's yapping and honestly? valid π
π SEE ALSO π
gnat(1), asistant(1), gnat2xml(1), gnatcheck(1), gnatelim(1), gnatmetric(1), gnatpp(1), gnattest(1) β the whole squad, the friend group, the ensemble cast π«Ά
Documentation about the ASIS tools may be found in /usr/share/doc/asis-doc/ if the asis-doc package is installed. the reference documentation about ASIS is excluded due to license problems π but may be found in various formats at http://libre.adacore.com/developers/documentation. go get your reading done, main character πβ¨
and that's the whole page bestie!! this one shipped from Debian GNU/Linux, dated 2014-08-09, and yes she is a GNATSTUB(1) classic through and through. drink water, read your manpages, and go generate some bodies ππ¦πΈ periodt β¨
π¦ where this page comes from
- ubuntu jammy: asis-programs 2019-5 Β· GPL-3.0-or-later
- Copyright (C) 1996 Erick Branderhorst <branderh@debian.org>
- Copyright (C) 2006 Ludovic Brenta <ludovic@ludovic-brenta.org>
- Copyright (C) 2014 Nicolas Boulenguez <nicolas@debian.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms