GNATSTUB(1)

πŸ“¦ version 2019, in ubuntu jammy

πŸ’… 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, gnatstub treats 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 to gnatgcc or gnatmake. they're used to define the source search path in the call to gnatgcc issued by gnatstub to create the tree file. note that to create a body, gnatstub needs 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 is 3. the way that indentation is customizable… obsessed ✨
  • -k β€” Do not remove the tree file. as default, gnatstub removes 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 is 78. keep it tidy bestie πŸ’…
  • -q β€” Quiet mode: gnatstub does 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, gnatstub will 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: gnatstub generates 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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms