Skip to content

Commit 4573224

Browse files
committed
Makefile: Add install targets per type
This adds separate install targets for the different types of documentation built. The existing `install` target builds all types of documentation, which is rarely useful outside of a release build. For #31.
1 parent 8e6a0bb commit 4573224

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

Makefile

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ DISTFILES= \
6767
preprocess_qch.py \
6868
test.sh \
6969
xml_utils.py \
70+
requirements.txt \
71+
requirements-ci.txt \
7072
Makefile \
73+
LICENSE \
7174
README.md
7275

7376
CLEANFILES= \
@@ -92,27 +95,30 @@ dist: clean
9295
tar c$(TAR_OPTION)f "cppreference-doc-$(VERSION).tar.$(TAR_FORMAT)" "cppreference-doc-$(VERSION)"
9396
rm -rf "cppreference-doc-$(VERSION)"
9497

95-
install: all
96-
# install the HTML book
98+
install: install_html install_qch install_devhelp install_doxygen
99+
100+
install_html: doc_html
97101
pushd "output/reference" > /dev/null; \
98102
find . -type f \
99103
-exec install -DT -m 644 '{}' "$(DESTDIR)$(docdir)/html/{}" \; ; \
100104
popd > /dev/null
101105

102-
# install the devhelp documentation
106+
install_devhelp: doc_devhelp
103107
install -DT -m 644 "output/cppreference-doc-en-c.devhelp2" \
104108
"$(DESTDIR)$(bookdir)/cppreference-doc-en-c/cppreference-doc-en-c.devhelp2"
105109
install -DT -m 644 "output/cppreference-doc-en-cpp.devhelp2" \
106110
"$(DESTDIR)$(bookdir)/cppreference-doc-en-cpp/cppreference-doc-en-cpp.devhelp2"
111+
112+
install_qch: doc_qch
113+
install -DT -m 644 "output/cppreference-doc-en-cpp.qch" \
114+
"$(DESTDIR)$(docdir)/qch/cppreference-doc-en-cpp.qch"
115+
116+
install_doxygen: doc_doxygen
107117
install -DT -m 644 "output/cppreference-doxygen-local.tag.xml" \
108118
"$(DESTDIR)$(bookdir)/cppreference-doxygen-local.tag.xml"
109119
install -DT -m 644 "output/cppreference-doxygen-web.tag.xml" \
110120
"$(DESTDIR)$(bookdir)/cppreference-doxygen-web.tag.xml"
111121

112-
# install the .qch (Qt Help) documentation
113-
install -DT -m 644 "output/cppreference-doc-en-cpp.qch" \
114-
"$(DESTDIR)$(docdir)/qch/cppreference-doc-en-cpp.qch"
115-
116122
uninstall:
117123
rm -rf "$(DESTDIR)$(docdir)"
118124
rm -rf "$(DESTDIR)$(bookdir)"

0 commit comments

Comments
 (0)