summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-02-08 19:52:01 +0100
committerJay Berkenbilt <ejb@ql.org>2022-02-08 19:52:01 +0100
commitacc24ba49469e7f82554b5078085f138c0e5c991 (patch)
tree637e9f8e376daecc7d9a4fc36f4643e93779c378
parent48ca63e95781b789daeac6dd7c7292ef48175c8b (diff)
downloadqpdf-acc24ba49469e7f82554b5078085f138c0e5c991.tar.zst
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.
-rw-r--r--manual/build.mk12
1 files changed, 9 insertions, 3 deletions
diff --git a/manual/build.mk b/manual/build.mk
index 730df937..97ca94a3 100644
--- a/manual/build.mk
+++ b/manual/build.mk
@@ -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