Commits

Anonymous committed c763926

both OMake and Make work.

Comments (0)

Files changed (2)

 # Internal variables.
 PAPEROPT_a4     = -D latex_paper_size=a4
 PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ./src
 
 .PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
 
 	@echo "  changes   to make an overview of all changed/added/deprecated items"
 	@echo "  linkcheck to check all external links for integrity"
 	@echo "  doctest   to run all doctests embedded in the documentation (if enabled)"
+	@echo "You can also use OMake as same."
 
 clean:
 	-rm -rf $(BUILDDIR)/*
 .SUBDIRS: src
 
 # .DEFAULT: $(OCamlProgram $(PROGRAM), $(FILES))
+.DEFAULT: help
 
 # for Sphinx
 
 
 .PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
 
-help_message =  $'''
+help_message =  $"""
 Please use `make <target>' where <target> is one of
   html      to make standalone HTML files
   dirhtml   to make HTML files named index.html in directories
   latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter
   changes   to make an overview of all changed/added/deprecated items
   linkcheck to check all external links for integrity
-  doctest   to run all doctests embedded in the documentation (if enabled) '''
+  doctest   to run all doctests embedded in the documentation (if enabled) 
+"""
 
 help:
 	eprintln( $(help_message) )
 	-rm -rf $(builddir)/*
 
 html: $(sources)
- 	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(builddir)/html
- 	@echo
- 	@echo "Build finished. The HTML pages are in $(builddir)/html."
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(builddir)/html
+	eprintln( $''''
+	Build finished. The HTML pages are in $(builddir)/html.  
+	'''')
 
-# dirhtml:
-# 	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(builddir)/dirhtml
-# 	@echo
-# 	@echo "Build finished. The HTML pages are in $(builddir)/dirhtml."
+dirhtml: $(sources)
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(builddir)/dirhtml
+	eprintln( $''''
+	Build finished. The HTML pages are in $(builddir)/dirhtml.
+	'''')
 
-# pickle:
-# 	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(builddir)/pickle
-# 	@echo
-# 	@echo "Build finished; now you can process the pickle files."
+pickle: $(sources)
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(builddir)/pickle
+	eprintln( $''''
+	Build finished; now you can process the pickle files.
+	'''')
 
-# json:
-# 	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(builddir)/json
-# 	@echo
-# 	@echo "Build finished; now you can process the JSON files."
+json: $(sources)
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(builddir)/json
+	eprintln( $''''
+	Build finished; now you can process the JSON files.
+	'''')
 
-# htmlhelp:
-# 	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(builddir)/htmlhelp
-# 	@echo
-# 	@echo "Build finished; now you can run HTML Help Workshop with the" \
-# 	      ".hhp project file in $(builddir)/htmlhelp."
+htmlhelp: $(sources)
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(builddir)/htmlhelp
+	eprintln( $''''
+	Build finished; now you can run HTML Help Workshop with the
+	.hhp project file in $(builddir)/htmlhelp.
+	'''')
 
-# qthelp:
-# 	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(builddir)/qthelp
-# 	@echo
-# 	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
-# 	      ".qhcp project file in $(builddir)/qthelp, like this:"
-# 	@echo "# qcollectiongenerator $(builddir)/qthelp/CouchDBtheDefinitiveGuideTranslationtoJapanese.qhcp"
-# 	@echo "To view the help file:"
-# 	@echo "# assistant -collectionFile $(builddir)/qthelp/CouchDBtheDefinitiveGuideTranslationtoJapanese.qhc"
+qthelp:  $(sources)
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(builddir)/qthelp
+	eprintln( $''''
+	Build finished; now you can run "qcollectiongenerator" with the
+	.qhcp project file in $(builddir)/qthelp, like this:
+	> qcollectiongenerator $(builddir)/qthelp/CouchDBtheDefinitiveGuideTranslationtoJapanese.qhcp
+	To view the help file:
+	> assistant -collectionFile $(builddir)/qthelp/CouchDBtheDefinitiveGuideTranslationtoJapanese.qhc
+	'''')
 
-# latex:
-# 	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(builddir)/latex
-# 	@echo
-# 	@echo "Build finished; the LaTeX files are in $(builddir)/latex."
-# 	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
-# 	      "run these through (pdf)latex."
+latex: $(sources)
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(builddir)/latex
+	eprintln( $''''
+	Build finished; the LaTeX files are in $(builddir)/latex.
+	Run 'make all-pdf' or 'make all-ps' in that directory to
+	run these through (pdf)latex.
+	'''')
 
-# changes:
-# 	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(builddir)/changes
-# 	@echo
-# 	@echo "The overview file is in $(builddir)/changes."
+changes: $(sources)
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(builddir)/changes
+	eprintln( $''''
+	The overview file is in $(builddir)/changes.
+	'''')
 
-# linkcheck:
-# 	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(builddir)/linkcheck
-# 	@echo
-# 	@echo "Link check complete; look for any errors in the above output " \
-# 	      "or in $(builddir)/linkcheck/output.txt."
+linkcheck: $(sources)
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(builddir)/linkcheck
+	eprintln( $''''
+	Link check complete; look for any errors in the above output
+	or in $(builddir)/linkcheck/output.txt.
+	'''')
 
-# doctest:
-# 	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(builddir)/doctest
-# 	@echo "Testing of doctests in the sources finished, look at the " \
-# 	      "results in $(builddir)/doctest/output.txt."
+doctest: $(sources)
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(builddir)/doctest
+	eprintln( $''''
+	Testing of doctests in the sources finished, look at the
+	results in $(builddir)/doctest/output.txt.
+	'''')