@@ -41,7 +41,7 @@ ALLSPHINXOPTS = -q -d $(branch-output)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPT
41
41
POSPHINXOPTS = -q -d $(branch-output ) /doctrees-gettext $(PAPEROPT_$(PAPER ) ) $(SPHINXOPTS ) source
42
42
DRAFTSPHINXOPTS = -q -d $(branch-output ) /draft-doctrees $(PAPEROPT_$(PAPER ) ) $(SPHINXOPTS ) draft
43
43
44
- .PHONY : publish help clean push-dc1 push-dc2
44
+ .PHONY : help
45
45
help :
46
46
@echo " Please use \` make <target>' where <target> is one of"
47
47
@echo " html to make standalone HTML files"
@@ -81,26 +81,19 @@ include bin/makefile.compatibility
81
81
$(output ) /makefile.% :bin/makefile-builder/% .py bin/makefile_builder.py bin/builder_data.py
82
82
@$(PYTHONBIN ) bin/makefile-builder/$(subst .,,$(suffix $@ ) ) .py $@
83
83
84
- #
85
84
# Meta targets that control the build and publication process.
86
- #
87
-
88
- .PHONY : push publish-if-up-to-date
89
-
85
+ .PHONY : publish push publish-if-up-to-date push-all
90
86
push :publish-if-up-to-date
91
87
@echo [build]: copying the new $(current-branch ) build to the web servers.
92
88
@$(MAKE ) MODE=' push' push-dc1 push-dc2
93
89
@echo [build]: deployed a new build of the $(current-branch ) branch of the Manual.
94
-
95
90
push-all :publish
96
91
@echo [build]: copying the full docs site to the web servers.
97
92
@$(MAKE ) MODE=' push' push-all-dc1 push-all-dc2
98
93
@echo [build]: deployed a new build of the full Manual.
99
-
100
94
publish-if-up-to-date :
101
95
@bin/published-build-check $(current-branch ) $(last-commit )
102
96
@$(MAKE ) publish
103
-
104
97
publish :initial-dependencies pre-build-dependencies
105
98
@echo [build]: starting build of sphinx components built at ` date`
106
99
@$(MAKE ) sphinx-components
@@ -110,16 +103,13 @@ publish:initial-dependencies pre-build-dependencies
110
103
@echo [build]: all static components built at ` date`
111
104
@echo [build]: $(manual-branch ) branch is succeessfully deployed to ' $(public-output)' .
112
105
113
- #
114
106
# Targets for pushing the new build to the web servers.
115
- #
116
-
117
107
ifeq ($(MODE ) ,push)
108
+ .PHONY : push-dc1 push-dc2 push-dc1-all push-dc2-all
118
109
push-dc1 :
119
110
rsync -arz
$(public-output ) /
$(current-branch ) /
[email protected] :/data/sites/docs/
$(current-branch )
120
111
push-dc2 :
121
112
rsync -arz
$(public-output ) /
$(current-branch ) /
[email protected] :/data/sites/docs/
$(current-branch )
122
-
123
113
push-all-dc1 :
124
114
rsync -arz
$(public-output ) /
[email protected] :/data/sites/docs
125
115
push-all-dc2 :
@@ -147,10 +137,6 @@ post-processing:error-pages links
147
137
sphinx-components :manual-pdfs $(public-branch-output ) /single $(public-branch-output ) /single/index.html $(public-branch-output ) $(public-branch-output ) /sitemap.xml.gz
148
138
@echo [build]: completed $@ buildstep.
149
139
150
- #
151
- # Build the HTML components of the build.
152
- #
153
-
154
140
# Initial build steps, exporting the current commit to the build.
155
141
.PHONY :source/about.txt source/includes/hash.rst setup $(public-branch-output ) /release.txt
156
142
setup :source/includes/hash.rst
@@ -181,10 +167,7 @@ $(branch-output)/singlehtml/contents.html:$(branch-output)/singlehtml
181
167
$(branch-output ) /epub/MongoDB.epub :epub
182
168
$(public-branch-output ) /MongoDB-Manual.epub :$(public-branch-output ) /MongoDB-Manual-$(current-branch ) .epub
183
169
184
- #
185
170
# Migrating and processing the dirhtml and singlehtml as needed.
186
- #
187
-
188
171
$(public-branch-output ) :$(branch-output ) /dirhtml
189
172
@cp -R $< /* $@
190
173
@rm -rf $@ /meta/reference $@ /meta/use-cases
@@ -222,13 +205,11 @@ clean-all:
222
205
# #####################################################################
223
206
224
207
.PHONY : sitemap
225
-
226
- SITEMAPBUILD = $(PYTHONBIN ) bin/sitemap_gen.py
227
208
sitemap :$(branch-output ) /sitemap.xml.gz
228
- $(branch-output ) /sitemap.xml.gz :$(branch-output ) /dirhtml
209
+ $(branch-output ) /sitemap.xml.gz :$(public-output ) /manual $( branch-output ) /dirhtml
229
210
@echo [sitemap]: starting sitemap build at ` date` .
230
211
@echo [sitemap]: build time\: ` date` >> $(branch-output ) /sitemap-build.log
231
- @$(SITEMAPBUILD ) --testing --config=conf-sitemap.xml 2>&1 >> $(branch-output ) /sitemap-build.log
212
+ @$(PYTHONBIN ) bin/sitemap_gen.py --testing --config=conf-sitemap.xml 2>&1 >> $(branch-output ) /sitemap-build.log
232
213
@mv build/sitemap.xml.gz $@
233
214
@echo [sitemap]: sitemap built at ` date` .
234
215
@@ -242,9 +223,8 @@ $(branch-output)/sitemap.xml.gz:$(branch-output)/dirhtml
242
223
UNCOMPRESSED_MAN := $(wildcard $(branch-output ) /man/* .1)
243
224
COMPRESSED_MAN := $(subst .1,.1.gz,$(UNCOMPRESSED_MAN ) )
244
225
245
- # Targets to build compressed man pages.
246
- build-man : man $(COMPRESSED_MAN )
247
- compress-man : $(COMPRESSED_MAN )
226
+ build-man :man $(COMPRESSED_MAN )
227
+ compress-man :$(COMPRESSED_MAN )
248
228
$(branch-output ) /man/% .1.gz : $(branch-output ) /man/% .1
249
229
gzip $< -c > $@
250
230
@@ -258,7 +238,6 @@ $(branch-output)/man/%.1.gz: $(branch-output)/man/%.1
258
238
aspiration :draft-html
259
239
aspirational :draft-html
260
240
draft :draft-html
261
-
262
241
draft-pdf :$(subst .tex,.pdf,$(wildcard $(branch-output ) /draft-latex/* .tex) )
263
242
draft-pdfs :draft-latex draft-pdf
264
243
@@ -270,19 +249,17 @@ draft-pdfs:draft-latex draft-pdf
270
249
271
250
LATEX_CORRECTION = "s/(index|bfcode)\{(.*!*)*--(.*)\}/\1\{\2-\{-\}\3\}/g"
272
251
LATEX_LINK_CORRECTION = "s%\\\code\{/%\\\code\{http://docs.mongodb.org/$(current-if-not-manual ) /%g"
252
+ PDFLATEXCOMMAND = TEXINPUTS=".:$(branch-output ) /latex/:" pdflatex --interaction batchmode --output-directory $(branch-output ) /latex/
273
253
274
- .PHONY :pdfs
275
-
276
- # Uses 'latex' target in the production build section.
254
+ # Uses 'latex' target to generate latex files.
277
255
256
+ .PHONY :pdfs
278
257
$(branch-output ) /latex/% .tex :
279
258
@sed $(SED_ARGS_FILE ) -e $(LATEX_CORRECTION ) -e $(LATEX_CORRECTION ) -e $(LATEX_LINK_CORRECTION ) $@
280
259
@echo [latex]: fixing the Sphinx ouput of ' $@' .
281
260
282
261
pdfs :$(subst .tex,.pdf,$(wildcard $(branch-output ) /latex/* .tex) )
283
262
284
- PDFLATEXCOMMAND = TEXINPUTS=".:$(branch-output ) /latex/:" pdflatex --interaction batchmode --output-directory $(branch-output ) /latex/
285
-
286
263
% .pdf :% .tex
287
264
@echo [pdf]: pdf compilation of $@ , started at ` date` .
288
265
@touch $(basename $@ ) -pdflatex.log
@@ -297,13 +274,13 @@ PDFLATEXCOMMAND = TEXINPUTS=".:$(branch-output)/latex/:" pdflatex --interaction
297
274
@echo [pdf]: see ' $(basename $@)-pdflatex.log' for a full report of the pdf build process.
298
275
@echo [pdf]: pdf compilation of $@ , complete at ` date` .
299
276
300
- # #########################################################################
277
+ # ##########################################################################
301
278
#
302
- # Archiving $(public-output) for cleaner full rebuilds
279
+ # Archiving $(public-output) for more sane testing, and risk free cleaning.
303
280
#
304
- # #########################################################################
281
+ # ##########################################################################
305
282
306
283
archive :$(public-output ) .$(timestamp ) .tar.gz
307
284
@echo [archive]: created $< archive.
308
- $(public-output ) .$( ARCHIVE_DATE ) .tar.gz :$(public-output )
285
+ $(public-output ) .% .tar.gz :$(public-output )
309
286
tar -czvf $@ $<
0 commit comments