How do I install just the documentation and man pages of Clang and LLVM? I compiled the current version from source, based on the source from the LLVM website and it works fine but since it is a local self-contained repository (it can run from your home directory assuming you have it's bin subdirectory in your path) it does not install the man pages or documentation.
I uninstalled the Ubuntu package of Clang/LLVM to avoid any possible conflicts but this also removed the Clang man pages. How do I install just the man pages and documentation. I am OK if the man pages are technically from a couple of versions back compared to the installed compiler if necessary.
Thanks.
sudo apt-get clean
sudo apt-get install -d clang llvm
find /var/cache/apt/archives/ -name "*.deb" -exec dpkg-deb -x {} work \;
sudo cp -a work/usr/share/{doc,man} /usr/share/
You can remove the work directory now:
rm -rf work
.I noticed that there's lots of llvm related packages. Add all the packages you want to step 2, specially the -doc (llvm-2.8-doc, llvm-2.9, llvm-3.0).
Debian packages don't 'know' which of the files inside the package are documentation files. So your only resort is to cheat, by downloading the package manually and extracting just the man pages from there.
download the package, but do not install it yet:
The challenge here is to figure which package actually is containing the man page you are looking for. For example, the clang-3.8 package has no own man page for clang, you need to install clang-3.6 for that...
install just the man pages
Warning: the package manager now believes that you have correctly installed clang. So the system may misbehave. For example
sudo apt install clang-3.6
will tell you that the package is installed in it's newest version, and it will do nothing. You'd have tosudo apt remove clang-3.6
first before really installing it. Also any package upgrade will override the stripped down manual install with the full version of the package.You have been warned. Use at your own risk.
That said, there may be a value in doing such weird things, e.g. when creating extra small docker images.