@@ -6,6 +6,12 @@ SPHINXOPTS =
66SPHINXBUILD = sphinx-build
77PAPER =
88BUILDDIR = build
9+ BASENAME = $(subst .,,$(subst $() $() ,,diffpy.srreal) )
10+
11+ # User-friendly check for sphinx-build
12+ ifeq ($(shell which $(SPHINXBUILD ) >/dev/null 2>&1; echo $$? ) , 1)
13+ $(error The '$(SPHINXBUILD ) ' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD ) ' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http ://sphinx-doc.org/)
14+ endif
915
1016# Internal variables.
1117PAPEROPT_a4 = -D latex_paper_size=a4
@@ -14,7 +20,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sou
1420# the i18n builder cannot share the environment and doctrees with the others
1521I18NSPHINXOPTS = $(PAPEROPT_$(PAPER ) ) $(SPHINXOPTS ) source
1622
17- .PHONY : help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext publish
23+ .PHONY : help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
1824
1925help :
2026 @echo " Please use \` make <target>' where <target> is one of"
@@ -29,17 +35,20 @@ help:
2935 @echo " epub to make an epub"
3036 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
3137 @echo " latexpdf to make LaTeX files and run them through pdflatex"
38+ @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
3239 @echo " text to make text files"
3340 @echo " man to make manual pages"
3441 @echo " texinfo to make Texinfo files"
3542 @echo " info to make Texinfo files and run them through makeinfo"
3643 @echo " gettext to make PO message catalogs"
3744 @echo " changes to make an overview of all changed/added/deprecated items"
45+ @echo " xml to make Docutils-native XML files"
46+ @echo " pseudoxml to make pseudoxml-XML files for display purposes"
3847 @echo " linkcheck to check all external links for integrity"
3948 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
4049
4150clean :
42- - rm -rf $(BUILDDIR ) /*
51+ rm -rf $(BUILDDIR ) /*
4352
4453html :
4554 $(SPHINXBUILD ) -b html $(ALLSPHINXOPTS ) $(BUILDDIR ) /html
@@ -77,17 +86,17 @@ qthelp:
7786 @echo
7887 @echo " Build finished; now you can run " qcollectiongenerator" with the" \
7988 " .qhcp project file in $( BUILDDIR) /qthelp, like this:"
80- @echo " # qcollectiongenerator $( BUILDDIR) /qthelp/SrReal .qhcp"
89+ @echo " # qcollectiongenerator $( BUILDDIR) /qthelp/$( BASENAME ) .qhcp"
8190 @echo " To view the help file:"
82- @echo " # assistant -collectionFile $( BUILDDIR) /qthelp/SrReal .qhc"
91+ @echo " # assistant -collectionFile $( BUILDDIR) /qthelp/$( BASENAME ) .qhc"
8392
8493devhelp :
8594 $(SPHINXBUILD ) -b devhelp $(ALLSPHINXOPTS ) $(BUILDDIR ) /devhelp
8695 @echo
8796 @echo " Build finished."
8897 @echo " To view the help file:"
89- @echo " # mkdir -p $$ HOME/.local/share/devhelp/SrReal "
90- @echo " # ln -s $( BUILDDIR) /devhelp $$ HOME/.local/share/devhelp/SrReal "
98+ @echo " # mkdir -p $$ HOME/.local/share/devhelp/$( BASENAME ) "
99+ @echo " # ln -s $( BUILDDIR) /devhelp $$ HOME/.local/share/devhelp/$( BASENAME ) "
91100 @echo " # devhelp"
92101
93102epub :
@@ -108,6 +117,12 @@ latexpdf:
108117 $(MAKE ) -C $(BUILDDIR ) /latex all-pdf
109118 @echo " pdflatex finished; the PDF files are in $( BUILDDIR) /latex."
110119
120+ latexpdfja :
121+ $(SPHINXBUILD ) -b latex $(ALLSPHINXOPTS ) $(BUILDDIR ) /latex
122+ @echo " Running LaTeX files through platex and dvipdfmx..."
123+ $(MAKE ) -C $(BUILDDIR ) /latex all-pdf-ja
124+ @echo " pdflatex finished; the PDF files are in $( BUILDDIR) /latex."
125+
111126text :
112127 $(SPHINXBUILD ) -b text $(ALLSPHINXOPTS ) $(BUILDDIR ) /text
113128 @echo
0 commit comments