3

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?

5

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
0

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.

  • There is no manual page for banana, only for apple. – delete Oct 19 '10 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy