Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

src2man(1) [debian man page]

src2man(1)																src2man(1)

src2man - extract man pages from source files. SYNOPSIS
src2man [-n][-d date][-v volume][-r release] [srcfile ...] DESCRIPTION
src2man scans source file srcfile. Only C source files are supported for now. Comments blocks starting by "/** num", where num is a section number, are converted into a man file, using txt2man(1). The first line of the comment block must contain the name of the manpage, usually the function name, followed by a "-" and a short description. The following lines are the "DESCRIPTION" section content, except if they are in upper case, in which case they define a new sec- tion. If the next line after a comment block is empty, Then no "SYNOPSIS" section will be generated. Otherwise, src2man will look in the follow- ing source lines for a function prototype or a type definion (struct, union, typedef, ...) matching the manpage name, and include it in a "SYNOPSIS" section. This avoids to duplicate the type or function prototype in the comment block. The best place for code documentation is in the source file, where the body is implemented, not the header file which only contains the prototype. src2man automatically searches for the presence of a prototype in the corresponding header file, and if found, will print a "#include" statement in the synopsis. OPTIONS
-d date Set the date of the man pages. Defaults to current date. -n No man page is created. The name of the manpages that would be created are printed. -v volume Specify the name of the volume to be printed in center header of generated manpages. -r release Specify the project name and release number for the generated manpage. EXAMPLE
The following example displays C code and comments to generate a manpage foobar.3: /** 3 * foobar - a sample dummy function * This line is now the first of the description section. * Note that function parameters parm1 and parm2 are highlighted * in the generated man page. */ int foobar(char *parm1, int parm2) { ... return 0; } SEE ALSO
txt2man(1), bookman(1). AUTHOR
Marc Vertes <> txt2man-1.5.5 11 April 2011 src2man(1)

Check Out this Related Man Page

DH_INSTALLMAN(1)						     Debhelper							  DH_INSTALLMAN(1)

dh_installman - install man pages into package build directories SYNOPSIS
dh_installman [debhelperoptions] [manpage...] DESCRIPTION
dh_installman is a debhelper program that handles installing man pages into the correct locations in package build directories. In compat 10 and earlier, this program was primarily for when upstream's build system does not properly install them as a part of its install step (or it does not have an install step). In compat 11 and later, it supports the same features of dh_install(1) and has the advantage that it respects the nodoc build profile (unlike dh_install(1)). Even if you prefer to use dh_install(1) for installing the manpages, dh_installman can still be useful for converting the manpage encoding to UTF-8 and for converting .so links (as described below). However, that part happens automatically without any explicit configuration. You tell dh_installman what man pages go in your packages, and it figures out where to install them based on the section field in their .TH or .Dt line. If you have a properly formatted .TH or .Dt line, your man page will be installed into the right directory, with the right name (this includes proper handling of pages with a subsection, like 3perl, which are placed in man3, and given an extension of .3perl). If your .TH or .Dt line is incorrect or missing, the program may guess wrong based on the file extension. It also supports translated man pages, by looking for extensions like .ll.8 and .ll_LL.8, or by use of the --language switch. If dh_installman seems to install a man page into the wrong section or with the wrong extension, this is because the man page has the wrong section listed in its .TH or .Dt line. Edit the man page and correct the section, and dh_installman will follow suit. See man(7) for details about the .TH section, and mdoc(7) for the .Dt section. If dh_installman seems to install a man page into a directory like /usr/share/man/pl/man1/, that is because your program has a name like, and dh_installman assumes that means it is translated into Polish. Use --language=C to avoid this. After the man page installation step, dh_installman will check to see if any of the man pages in the temporary directories of any of the packages it is acting on contain .so links. If so, it changes them to symlinks. Also, dh_installman will use man to guess the character encoding of each manual page and convert it to UTF-8. If the guesswork fails for some reason, you can override it using an encoding declaration. See manconv(1) for details. From debhelper compatibility level 11 on, dh_install will fall back to looking in debian/tmp for files, if it does not find them in the current directory (or wherever you've told it to look using --sourcedir). FILES
debian/package.manpages Lists man pages to be installed. OPTIONS
-A, --all Install all files specified by command line parameters in ALL packages acted on. --language=ll Use this to specify that the man pages being acted on are written in the specified language. --sourcedir=dir Look in the specified directory for files to be installed. This option requires compat 11 or later (it is silently ignored in compat 10 or earlier). Note that this is not the same as the --sourcedirectory option used by the dh_auto_* commands. You rarely need to use this option, since dh_installman automatically looks for files in debian/tmp in debhelper compatibility level 11 and above. manpage ... Install these man pages into the first package acted on. (Or in all packages if -A is specified). EXAMPLES
An example debian/manpages file could look like this: doc/man/foo.1 # Translations doc/man/foo.da.1 doc/man/ doc/man/ # NB: The following line is considered a polish translation # of "foo.1" (and not a manpage written in perl called "") doc/man/ # ... NOTES
An older version of this program, dh_installmanpages(1), is still used by some packages, and so is still included in debhelper. It is, however, deprecated, due to its counterintuitive and inconsistent interface. Use this program instead. SEE ALSO
debhelper(7) This program is a part of debhelper. AUTHOR
Joey Hess <> 11.1.6ubuntu2 2018-05-10 DH_INSTALLMAN(1)
Man Page