Quantcast

How can I generate a man page for a command?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How can I generate a man page for a command?

Mark
I tried putting the following in the .cpp file of the command.

//! @~English
//! @mainpage toktx
//!
//! @section name NAME
//!
//! toktx - create a KTX file from netpbm  (.pam, .pgm, .ppm) format files.
//!
//! @section synopsis SYNOPSIS
//!
//! @section description DESCRIPTION
//!
//! @section exitstatus EXIT STATUS
//!
//! @section history HISTORY
//!
//! @section author AUTHOR
//!
//! @version 1.1
//! $Date: Sun Dec 25 07:02:41 2016 -0200 $

Nothing was created in the man output directory except 2 more of those useless files I mentioned in a previous mail

_path_to_my_tools_.1 and _path_to_my_tools_toktx.1

If I put

//! @file

at the beginning of the above comment block then a file called toktx.cpp.1 is generated. It’s content is:

tools/toktx/toktx.cpp(1)                                                                                                         tools/toktx/toktx.cpp(1)

NAME
       tools/toktx/toktx.cpp

SYNOPSIS
       #include 'stdafx.h'
       #include 'GL/glcorearb.h'
       #include 'ktx.h'
       #include 'image.h'
       #include <cstdlib>

Author
       Generated automatically by Doxygen for Khronos Texture Tools from the source code.

Khronos Texture Tools                                                Sat Apr 29 2017                                             tools/toktx/toktx.cpp(1)


The generated HTML has a page called toktx with the desired sections. How can I get the man page to have this content?

I am sure I can’t be the first person trying to generated end-user documentation with Doxygen. What am I missing?

Regards

    -Mark


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I generate a man page for a command?

Mark

On Apr 29, 2017, at 11:48, Mark <[hidden email]> wrote:

How can I get the man page to have this content?

I have found an answer. If I change @mainpage to @page then a toktx.1 file is created.

I still need to get rid of those 2 useless files named after the full paths to source files.

Regards

    -Mark


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I generate a man page for a command?

Mark

On Apr 29, 2017, at 12:43, Mark <[hidden email]> wrote:

I have found an answer.

Now I’m trying to think of a way to share text between the usage message printed by the app and this man page. Anyone got any bright ideas?

Regards

    -Mark


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Loading...