How to build PDF from libusb doxygen documentation

Packages

On Ubuntu You will need: doxygen texlive-latex-extra texlive-latex-base

Pull the repo

Simply pull https://github.com/libusb/libusb.git repo and cd to it.

Patch doc/doxygen.cfg.in

41c41
< PROJECT_NUMBER         = 1.0
---
> PROJECT_NUMBER         = @PACKAGE_VERSION@
54c54
< PROJECT_LOGO           = ../doc/libusb.png
---
> PROJECT_LOGO           = @top_srcdir@/doc/libusb.png
857c857
< INPUT                  = ../libusb
---
> INPUT                  = @top_srcdir@/libusb
902,906c902,906
< EXCLUDE                = ../libusb/hotplug.h \
<                          ../libusb/libusbi.h \
<                          ../libusb/version.h \
<                          ../libusb/version_nano.h \
<                          ../libusb/os
---
> EXCLUDE                = @top_srcdir@/libusb/hotplug.h \
>                          @top_srcdir@/libusb/libusbi.h \
>                          @top_srcdir@/libusb/version.h \
>                          @top_srcdir@/libusb/version_nano.h \
>                          @top_srcdir@/libusb/os
1706c1706
< GENERATE_LATEX         = YES
---
> GENERATE_LATEX         = NO
1830c1830
< PDF_HYPERLINKS         = YES
---
> PDF_HYPERLINKS         = NO
1840c1840
< USE_PDFLATEX           = YES
---
> USE_PDFLATEX           = NO
  

Run doxygen and build pdf

cd doc; doxygen doxygen.cfg.in
cd latex; make
cp refman.pdf $HOME/