1
1
# Makefile for MongoDB Sphinx documentation
2
+ include bin/makefile.compatibility
2
3
MAKEFLAGS += -j -r --no-print-directory
3
4
4
5
# Build directory tweaking.
29
30
@echo " pdfs generates pdfs."
30
31
31
32
# ############ makefile includes #############
32
- include bin/makefile.compatibility
33
- include bin/makefile.content
34
- include bin/makefile.push
35
-
36
33
# Included, dynamically generated makefile sections, to build: sphinx
37
34
# targets, LaTeX/PDFs, tables, the installation guides, and sym links.
38
35
@@ -54,13 +51,17 @@ $(output)/makefile.intersphinx:bin/makefile-builder/intersphinx.py bin/makefile_
54
51
@mkdir -p $(output )
55
52
@$(PYTHONBIN ) $< $@
56
53
54
+ include bin/makefile.clean
55
+ include bin/makefile.content
56
+ include bin/makefile.push
57
+
57
58
# ############ Meta targets that control the build and publication process. #############
58
59
.PHONY : publish publish-if-up-to-date
59
60
60
61
publish-if-up-to-date :
61
62
@bin/published-build-check $(current-branch ) $(last-commit )
62
63
@$(MAKE ) publish
63
- publish :$(sphinx-content ) $(static-content )
64
+ publish :$(sphinx-content ) $(static-content )
64
65
@echo [build]: $(manual-branch ) branch is succeessfully deployed to ' $(public-output)' .
65
66
66
67
# ############ Targets that define the production build process #############
@@ -88,6 +89,7 @@ $(public-branch-output)/ $(public-output)/:
88
89
@mkdir -p $@
89
90
@echo [build]: created $@
90
91
$(public-branch-output ) :$(branch-output ) /dirhtml
92
+ @mkdir -p $@
91
93
@cp -R $< /* $@
92
94
@rm -rf $@ /meta/reference $@ /meta/use-cases
93
95
@touch $@
@@ -96,7 +98,8 @@ $(public-branch-output)/single:$(branch-output)/singlehtml
96
98
@mkdir -p $@
97
99
@cp -R $< /* $@
98
100
@rm -f $@ /contents.html
99
- @echo [single]: migrated singlehtml files ' $@'
101
+ @touch $@
102
+ @echo [build]: migrated ' $</*' to ' $@'
100
103
$(public-branch-output ) /single/index.html :$(branch-output ) /singlehtml/contents.html
101
104
@cp $< $@
102
105
@sed $(SED_ARGS_FILE ) -e ' s/href="contents.html/href="index.html/g' \
@@ -113,7 +116,6 @@ $(output)/sitemap.xml.gz:$(public-branch-output) $(public-output)/manual
113
116
@echo [sitemap]: sitemap built at ` date` .
114
117
115
118
# ############ PDF generation infrastructure. #############
116
-
117
119
LATEX_CORRECTION = "s/(index|bfcode)\{(.*!*)*--(.*)\}/\1\{\2-\{-\}\3\}/g"
118
120
LATEX_LINK_CORRECTION = "s%\\\code\{/%\\\code\{http://docs.mongodb.org/$(current-if-not-manual ) /%g"
119
121
pdflatex-command = TEXINPUTS=".:$(branch-output ) /latex/:" pdflatex --interaction batchmode --output-directory $(branch-output ) /latex/ $(LATEXOPTS )
@@ -144,21 +146,7 @@ $(branch-output)/latex/%.tex:
144
146
@echo [pdf]: pdf compilation of $@ , complete at ` date` .
145
147
146
148
# ############ General purpose targets. Not used (directly) in the production build #############
147
- build-ephemera = $(output-tables ) $(output ) /makefile.* $(output ) /*.inv
148
- clean :
149
- -rm -rf $(build-ephemera )
150
- clean-branch :
151
- -rm -rf $(build-ephemera ) $(branch-output ) /*
152
- clean-public :
153
- -rm -rf $(build-ephemera ) $(public-output ) /*
154
- clean-all :
155
- -rm -rf $(build-ephemera ) $(output ) /*
156
149
draft :draft-html
157
- archive :$(public-output ) .$(timestamp ) .tar.gz
158
- @echo [$@ ]: created $< $@ .
159
- $(public-output ) .% .tar.gz :$(public-output )
160
- tar -czvf $@ $<
161
-
162
150
# man page support, uses sphinx `man` builder output.
163
151
.PHONY :$(manpages )
164
152
manpages := $(wildcard $(branch-output ) /man/* .1)
0 commit comments