remove automatic translation of .txt to .rst and references to txt folder
This commit is contained in:
21
doc/Makefile
21
doc/Makefile
@ -3,7 +3,6 @@
|
|||||||
SHELL = /bin/bash
|
SHELL = /bin/bash
|
||||||
BUILDDIR = ${CURDIR}
|
BUILDDIR = ${CURDIR}
|
||||||
RSTDIR = $(BUILDDIR)/src
|
RSTDIR = $(BUILDDIR)/src
|
||||||
TXTDIR = $(BUILDDIR)/txt
|
|
||||||
VENV = $(BUILDDIR)/docenv
|
VENV = $(BUILDDIR)/docenv
|
||||||
TXT2RST = $(VENV)/bin/txt2rst
|
TXT2RST = $(VENV)/bin/txt2rst
|
||||||
ANCHORCHECK = $(VENV)/bin/rst_anchor_check
|
ANCHORCHECK = $(VENV)/bin/rst_anchor_check
|
||||||
@ -28,8 +27,6 @@ HAS_VIRTUALENV = YES
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
SPHINXEXTRA = -j $(shell $(PYTHON) -c 'import multiprocessing;print(multiprocessing.cpu_count())')
|
SPHINXEXTRA = -j $(shell $(PYTHON) -c 'import multiprocessing;print(multiprocessing.cpu_count())')
|
||||||
SOURCES=$(filter-out $(wildcard $(TXTDIR)/lammps_commands*.txt) $(TXTDIR)/lammps_support.txt $(TXTDIR)/lammps_tutorials.txt,$(wildcard $(TXTDIR)/*.txt))
|
|
||||||
OBJECTS=$(SOURCES:$(TXTDIR)/%.txt=$(RSTDIR)/%.rst)
|
|
||||||
|
|
||||||
.PHONY: help clean-all clean epub mobi rst html pdf venv spelling anchor_check style_check
|
.PHONY: help clean-all clean epub mobi rst html pdf venv spelling anchor_check style_check
|
||||||
|
|
||||||
@ -61,9 +58,9 @@ clean:
|
|||||||
clean-spelling:
|
clean-spelling:
|
||||||
rm -rf spelling
|
rm -rf spelling
|
||||||
|
|
||||||
rst: clean $(OBJECTS) $(ANCHORCHECK)
|
rst: clean $(ANCHORCHECK)
|
||||||
|
|
||||||
html: $(OBJECTS) $(ANCHORCHECK)
|
html: $(ANCHORCHECK)
|
||||||
@(\
|
@(\
|
||||||
. $(VENV)/bin/activate ;\
|
. $(VENV)/bin/activate ;\
|
||||||
sphinx-build $(SPHINXEXTRA) -b html -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) html ;\
|
sphinx-build $(SPHINXEXTRA) -b html -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) html ;\
|
||||||
@ -86,7 +83,7 @@ html: $(OBJECTS) $(ANCHORCHECK)
|
|||||||
@rm -rf html/USER/*/*.[sg]*
|
@rm -rf html/USER/*/*.[sg]*
|
||||||
@echo "Build finished. The HTML pages are in doc/html."
|
@echo "Build finished. The HTML pages are in doc/html."
|
||||||
|
|
||||||
spelling: $(OBJECTS) utils/sphinx-config/false_positives.txt
|
spelling: utils/sphinx-config/false_positives.txt
|
||||||
@(\
|
@(\
|
||||||
. $(VENV)/bin/activate ;\
|
. $(VENV)/bin/activate ;\
|
||||||
pip install sphinxcontrib-spelling ;\
|
pip install sphinxcontrib-spelling ;\
|
||||||
@ -96,7 +93,7 @@ spelling: $(OBJECTS) utils/sphinx-config/false_positives.txt
|
|||||||
)
|
)
|
||||||
@echo "Spell check finished."
|
@echo "Spell check finished."
|
||||||
|
|
||||||
epub: $(OBJECTS)
|
epub:
|
||||||
@mkdir -p epub/JPG
|
@mkdir -p epub/JPG
|
||||||
@rm -f LAMMPS.epub
|
@rm -f LAMMPS.epub
|
||||||
@cp src/JPG/lammps-logo.png epub/
|
@cp src/JPG/lammps-logo.png epub/
|
||||||
@ -115,7 +112,7 @@ mobi: epub
|
|||||||
@ebook-convert LAMMPS.epub LAMMPS.mobi
|
@ebook-convert LAMMPS.epub LAMMPS.mobi
|
||||||
@echo "Conversion finished. The MOBI manual file is created."
|
@echo "Conversion finished. The MOBI manual file is created."
|
||||||
|
|
||||||
pdf: $(OBJECTS) $(ANCHORCHECK)
|
pdf: $(ANCHORCHECK)
|
||||||
@(\
|
@(\
|
||||||
cd src/Developer; \
|
cd src/Developer; \
|
||||||
pdflatex developer; \
|
pdflatex developer; \
|
||||||
@ -180,14 +177,6 @@ style_check :
|
|||||||
|
|
||||||
# ------------------------------------------
|
# ------------------------------------------
|
||||||
|
|
||||||
$(RSTDIR)/%.rst : $(TXTDIR)/%.txt $(TXT2RST)
|
|
||||||
@(\
|
|
||||||
mkdir -p $(RSTDIR) ; \
|
|
||||||
. $(VENV)/bin/activate ;\
|
|
||||||
txt2rst -v $< > $@ ;\
|
|
||||||
deactivate ;\
|
|
||||||
)
|
|
||||||
|
|
||||||
$(VENV):
|
$(VENV):
|
||||||
@if [ "$(HAS_PYTHON3)" == "NO" ] ; then echo "Python3 was not found! Please check README.md for further instructions" 1>&2; exit 1; fi
|
@if [ "$(HAS_PYTHON3)" == "NO" ] ; then echo "Python3 was not found! Please check README.md for further instructions" 1>&2; exit 1; fi
|
||||||
@if [ "$(HAS_VIRTUALENV)" == "NO" ] ; then echo "virtualenv was not found! Please check README.md for further instructions" 1>&2; exit 1; fi
|
@if [ "$(HAS_VIRTUALENV)" == "NO" ] ; then echo "virtualenv was not found! Please check README.md for further instructions" 1>&2; exit 1; fi
|
||||||
|
|||||||
Reference in New Issue
Block a user