Since I’ve learned how to compile programs, I started to not make install them onto system directory or my home directory. I often run the compiled program from its source directory. The reason I do this way is because the Makefile may not be good or not even include uninstall action. I haven’t seen any couldn’t be run from its compiling directory.

However, there is always one thing bothering me, the manual if they provide. I don’t install, therefore no manual pages installed in man page searching path. I just figured out this way to get around:

% cd /path/to/source/mandir
% ln -s . man1 # Fake a section
% man -M . name_of_manpage

At first, I was proud of myself for being able to fool man. But the joy didn’t last long, because I found it’s silly after I read the man(1)‘s “SEARCH PATH FOR MANUAL PAGES”. To man a local man file, you only need to give a path with the manpage filename:

% cd /path/to/source/mandir
% man ./name_of_manpage.1

Because

First of all, when the name argument to man contains a slash (/), man assumes it is a file specification itself, and there is no searching involved.

I just learned after years. Once again, there is a reason for saying RTFM!