When compiling git from source, I often run into this problem:
% make prefix=$HOME all doc info
SUBDIR git-gui
SUBDIR gitk-git
SUBDIR templates
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C Documentation all
GEN doc.dep
SUBDIR ../
make[2]: `GIT-VERSION-FILE' is up to date.
SUBDIR ../
make[2]: `GIT-VERSION-FILE' is up to date.
XMLTO git-add.1
xmlto: /Users/tmartin/src/git-2.19.2/Documentation/git-add.xml does not validate (status 3)
xmlto: Fix document syntax or use --skip-validation option
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
/Users/tmartin/src/git-2.19.2/Documentation/git-add.xml:2: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
D DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
^
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
Document /Users/tmartin/src/git-2.19.2/Documentation/git-add.xml does not validate
make[1]: *** [git-add.1] Error 13
make: *** [doc] Error 2
As mentioned by https://stackoverflow.com/a/18028336/235992, do the following:
brew install asciidoc
brew install xmlto
brew install docbook
brew install docbook-xsl
export XML_CATALOG_FILES=/usr/local/etc/xml/catalog
make prefix=$HOME all doc info # resume your command...