Operating System - HP-UX
1752271 Members
4491 Online
108786 Solutions
New Discussion юеВ

Is there any tool that could generate a HPUX formed manpage from a linux formed manpage ?

 
chenn_1
Advisor

Is there any tool that could generate a HPUX formed manpage from a linux formed manpage ?

For example, I've got a linux format manpage file for app123, which named "app123.1". And I want to create a HPUX formed manpage based on the originla one, right after I port app123 from linux to HPUX.

Additionally, we hope the HPUX formed new manpage can show the same highlight keywords and indents as it works on linux.

Is there any tools for this ?

Thanks in advance
4 REPLIES 4
rariasn
Honored Contributor

Re: Is there any tool that could generate a HPUX formed manpage from a linux formed manpage ?

chenn_1
Advisor

Re: Is there any tool that could generate a HPUX formed manpage from a linux formed manpage ?

thanks rariasn.

I read the posts and I think I've got some basic ideas about manpage format, tools(nroff in linux). But, as a beginner in this area, I'm afraid that I still have few ideas of how to make the transition. For example, I have a scp.1 in redhat linux, and I want to translate it into a format that HPUX man can recognize. Would u please show me some more hints about this? Thanks!
Matti_Kurkela
Honored Contributor

Re: Is there any tool that could generate a HPUX formed manpage from a linux formed manpage ?

"What you need to know to write man pages:"
http://www.linux.com/archive/feed/34212

To summarize: there are two *roff macro sets that might be used in writing man pages. The traditional macro set is tmac.an, and a newer (BSD unix) set is named tmac.doc. There is also a third set which is used for auto-detecting the correct macro set, called tmac.andoc. (Yes, traditionally "tmac" was a name prefix, not a suffix.)

The strange names are related to the macro set selection option of *roff formatters, which is '-m'. So, when selecting the tmac.an macro set, a command like "nroff -man" would be used, and the macros might also be referred to as "-man macros" or "-mdoc macros".

In Linux, the default manpage formatter macro set is tmac.andoc (or rather, its GNU groff equivalent andoc.tmac). So Linux man pages might use both macro sets, as the default macro set will auto-detect the correct one.

On the other hand, HP-UX uses the traditional tmac.an macro set *only*.

The systems that have the BSD tmac.doc macro set will usually also have the traditional tmac.an macro set for compatibility. But the "traditionalist" systems will usually have the tmac.an macro set only.

So, your problem is probably porting the existing tmac.doc format man page to the universally-understood tmac.an format. I could not find any automated tools for that, but the conversion should not be very difficult to do manually. And once the man page is in traditional tmac.an format, it should be usable in both Linux and HP-UX systems as-is, with no further conversion needed.

In HP-UX, "man 5 man" command can be used to view the documentation for the tmac.an macro set.

MK
MK
chenn_1
Advisor

Re: Is there any tool that could generate a HPUX formed manpage from a linux formed manpage ?

Thanks a lot.
I think I've got the idea this time.