User:Timothee Flutre/Notebook/Postdoc/2011/11/10

From OpenWetWare

(Difference between revisions)
Jump to: navigation, search
m (Entry title: add link)
(Entry title: add groff)
Line 8: Line 8:
==Entry title==
==Entry title==
-
* generate a [http://en.wikipedia.org/wiki/Man_page man page] from the "--help" and "--version" options of a custom program using [http://www.gnu.org/s/help2man/ help2man]:
+
* generate a [http://en.wikipedia.org/wiki/Man_page man page] from the "--help" and "--version" options of a custom program using [http://www.gnu.org/s/help2man/ help2man] and [http://www.gnu.org/s/groff/ groff]:
  gcc -Wall -o myprogram myprogram.c
  gcc -Wall -o myprogram myprogram.c
-
  help2man -o man_myprogram ./myprogram
+
  help2man -o myprogram.man ./myprogram
-
  man ./man_myprogram
+
  man ./myprogram.man
 +
groff -mandoc myprogram.man > myprogram.ps
 +
ps2pdf myprogram.ps myprogram.pdf
<!-- ##### DO NOT edit below this line unless you know what you are doing. ##### -->
<!-- ##### DO NOT edit below this line unless you know what you are doing. ##### -->

Revision as of 01:13, 11 November 2011

Project name Main project page
Previous entry      Next entry

Entry title

  • generate a man page from the "--help" and "--version" options of a custom program using help2man and groff:
gcc -Wall -o myprogram myprogram.c
help2man -o myprogram.man ./myprogram
man ./myprogram.man
groff -mandoc myprogram.man > myprogram.ps
ps2pdf myprogram.ps myprogram.pdf


Personal tools