1- # Copyright (C) 2011, 2012 Povilas Kanapickas <tir5c3@yahoo.co.uk >
1+ # Copyright (C) 2011-2014 Povilas Kanapickas <povilas@radix.lt >
22#
33# This file is part of cppreference-doc
44#
@@ -58,20 +58,10 @@ DISTFILES= \
5858 README
5959
6060CLEANFILES = \
61- output \
62- images/output \
63- cppreference-doc-en-c.devhelp2 \
64- cppreference-doc-en-cpp.devhelp2 \
65- cppreference-doc-en-c.qch \
66- cppreference-doc-en-cpp.qch \
67- qch-help-project-cpp.xml \
68- qch-files.xml \
69- devhelp-index-c.xml \
70- devhelp-index-cpp.xml \
71- link-map.xml
61+ output
7262
7363clean :
74- rm -rf $(CLEANFILES )
64+ rm -rf $(CLEANFILES )
7565
7666check :
7767
@@ -83,73 +73,85 @@ dist: clean
8373
8474install :
8575 # install the devhelp documentation
86- pushd " output" > /dev/null; \
76+ pushd " output/reference " > /dev/null; \
8777 find . -type f \
8878 -exec install -DT -m 644 ' {}' " $( DESTDIR) $( docdir) /html/{}" \; ; \
8979 popd > /dev/null
9080
91- install -DT -m 644 cppreference-doc-en-c.devhelp2 \
81+ install -DT -m 644 "output/ cppreference-doc-en-c.devhelp2" \
9282 "$(DESTDIR)$(bookdir)/cppreference-doc-en-c/cppreference-doc-en-c.devhelp2"
93- install -DT -m 644 cppreference-doc-en-cpp.devhelp2 \
83+ install -DT -m 644 "output/ cppreference-doc-en-cpp.devhelp2" \
9484 "$(DESTDIR)$(bookdir)/cppreference-doc-en-cpp/cppreference-doc-en-cpp.devhelp2"
9585
9686 # install the .qch (Qt Help) documentation
97- install -DT -m 644 cppreference-doc-en-cpp.qch $(DESTDIR)$(docdir)/qch/cppreference-doc-en-cpp.qch
87+ install -DT -m 644 "output/cppreference-doc-en-cpp.qch" \
88+ "$(DESTDIR)$(docdir)/qch/cppreference-doc-en-cpp.qch"
9889
9990uninstall :
10091 rm -rf " $( DESTDIR) $( docdir) "
10192 rm -rf " $( DESTDIR) $( bookdir) "
10293
10394# WORKER RULES
95+ doc_html : output/reference
10496
105- doc_devhelp : cppreference-doc-en-c.devhelp2 cppreference-doc-en-cpp.devhelp2
97+ doc_devhelp : output/ cppreference-doc-en-c.devhelp2 output/ cppreference-doc-en-cpp.devhelp2
10698
107- doc_qch : cppreference-doc-en-cpp.qch
99+ doc_qch : output/ cppreference-doc-en-cpp.qch
108100
109101# builds the title<->location map
110- link-map.xml : output
102+ output/ link-map.xml : output/reference
111103 ./build_link_map.py
112104
113105# build the .devhelp2 index
114- cppreference-doc-en-c.devhelp2 : output link-map.xml
115- ./index2devhelp.py $(docdir ) /html index-chapters-c.xml \
106+ output/cppreference-doc-en-c.devhelp2 : \
107+ output/reference \
108+ output/link-map.xml
109+ ./index2devhelp.py $(docdir ) /html index-chapters-c.xml \
116110 " C Standard Library reference" " cppreference-doc-en-c" " c" \
117111 index-functions-c.xml devhelp-index-c.xml
118- ./fix_devhelp-links.py devhelp-index-c.xml cppreference-doc-en-c.devhelp2
112+ ./fix_devhelp-links.py " output/devhelp-index-c.xml" \
113+ " output/cppreference-doc-en-c.devhelp2"
119114
120- cppreference-doc-en-cpp.devhelp2 : output link-map.xml
121- ./index2devhelp.py $(docdir ) /html index-chapters-cpp.xml \
115+ output/cppreference-doc-en-cpp.devhelp2 : \
116+ output/reference \
117+ output/link-map.xml
118+ ./index2devhelp.py $(docdir ) /html index-chapters-cpp.xml \
122119 " C++ Standard Library reference" " cppreference-doc-en-cpp" " cpp" \
123- index-functions-cpp.xml devhelp-index-cpp.xml
124- ./fix_devhelp-links.py devhelp-index-cpp.xml cppreference-doc-en-cpp.devhelp2
120+ index-functions-cpp.xml " output/devhelp-index-cpp.xml"
121+ ./fix_devhelp-links.py " output/devhelp-index-cpp.xml" \
122+ " output/cppreference-doc-en-cpp.devhelp2"
125123
126124# build the .qch (QT help) file
127- cppreference-doc-en-cpp.qch : qch-help-project-cpp.xml
125+ output/ cppreference-doc-en-cpp.qch : output/ qch-help-project-cpp.xml
128126 # qhelpgenerator only works if the project file is in the same directory as the documentation
129- cp qch-help-project-cpp.xml output/qch.xml
127+ cp " output/ qch-help-project-cpp.xml" " output/reference/ qch.xml"
130128
131- pushd "output" > /dev/null; \
132- qhelpgenerator qch.xml -o "../cppreference-doc-en-cpp.qch"; \
129+ pushd "output/reference " > /dev/null; \
130+ qhelpgenerator " qch.xml" -o "../cppreference-doc-en-cpp.qch"; \
133131 popd > /dev/null
134132
135- rm -f output/qch.xml
133+ rm -f " output/reference/ qch.xml"
136134
137- qch-help-project-cpp.xml : cppreference-doc-en-cpp.devhelp2
135+ output/ qch-help-project-cpp.xml : output/ cppreference-doc-en-cpp.devhelp2
138136 # build the file list
139- echo " <?xml version=\" 1.0\" encoding=\" UTF-8\" ?><files>" > " qch-files.xml"
137+ echo " <?xml version=\" 1.0\" encoding=\" UTF-8\" ?><files>" > " output/ qch-files.xml"
140138
141- pushd "output" > /dev/null; \
139+ pushd "output/reference " > /dev/null; \
142140 find . -type f -not -iname "*.ttf" \
143141 -exec echo "<file>"'{}'"</file>" >> "../qch-files.xml" \; ; \
144142 popd > /dev/null
145143
146- echo "</files>" >> "qch-files.xml"
144+ echo "</files>" >> "output/ qch-files.xml"
147145
148146 # create the project (copies the file list)
149- xsltproc devhelp2qch.xsl cppreference-doc-en-cpp.devhelp2 > "qch-help-project-cpp.xml"
147+ xsltproc devhelp2qch.xsl "output/cppreference-doc-en-cpp.devhelp2" > \
148+ "output/qch-help-project-cpp.xml"
150149
151- # create preprocessed archive
152150output :
151+ mkdir -p output
152+
153+ # create preprocessed archive
154+ output/reference : output
153155 ./preprocess.py
154156
155157# redownloads the source documentation directly from en.cppreference.com
0 commit comments