Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I have a C library, let's say "apple", and "apple" contains functions "banana" and "carrot", how do I write the "install" line in the makefile so that "man banana" brings up the manual page for the "apple" library?

share|improve this question

Make the banana.3 man page a symbolic link to the apple.3 page:

install-man: apple.3
    install ... apple.3 $(mandir)/man3/apple.3
    ln -s apple.3 $(mandir)/man3/banana.3
    ln -s apple.3 $(mandir)/man3/carrot.3
share|improve this answer

You want to copy banana.3 to /usr/share/man/man3/ or perhaps /usr/local/share/man/man3. Details on which directory to use depend on your build system and your users' configurations. You might want to consider Automake.

share|improve this answer
    
There is no manual page for banana, only for apple. – delete Oct 19 '10 at 10:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.