Only install docs if they exist

Sometimes someone may build only a subset of the documentation. The
logic has to be conditional upon whether it exists, not whether it is
built, since we pull pre-built docs in for CI installation.
This commit is contained in:
Jay Berkenbilt 2022-02-08 13:52:01 -05:00
parent 48ca63e957
commit acc24ba494
1 changed files with 9 additions and 3 deletions

View File

@ -50,6 +50,12 @@ doc-dist: build_manual
else \
mkdir -p $(DOC_DEST); \
fi
cp -r $(DOC_OUT)/html $(DOC_DEST)
cp -r $(DOC_OUT)/singlehtml $(DOC_DEST)
cp $(PDF_TARGET) $(DOC_DEST)/qpdf-manual.pdf
if [ -d $(DOC_OUT)/html ]; then \
cp -r $(DOC_OUT)/html $(DOC_DEST); \
fi
if [ -d $(DOC_OUT)/singlehtml ]; then \
cp -r $(DOC_OUT)/singlehtml $(DOC_DEST); \
fi
if [ -f $(PDF_TARGET) ]; then \
cp $(PDF_TARGET) $(DOC_DEST)/qpdf-manual.pdf; \
fi