forked from lijiext/lammps
Change doc folder src -> txt, rst -> src
This commit is contained in:
parent
fe91d462db
commit
74dade3ccb
23
doc/Makefile
23
doc/Makefile
|
@ -1,11 +1,12 @@
|
||||||
# Makefile for LAMMPS documentation
|
# Makefile for LAMMPS documentation
|
||||||
|
|
||||||
SHELL = /bin/bash
|
SHELL = /bin/bash
|
||||||
BUILDDIR = ${PWD}
|
BUILDDIR = ${CURDIR}
|
||||||
RSTDIR = $(BUILDDIR)/rst
|
RSTDIR = $(BUILDDIR)/src
|
||||||
|
TXTDIR = $(BUILDDIR)/txt
|
||||||
VENV = $(BUILDDIR)/docenv
|
VENV = $(BUILDDIR)/docenv
|
||||||
TXT2RST = $(VENV)/bin/txt2rst
|
TXT2RST = $(VENV)/bin/txt2rst
|
||||||
ANCHORCHECK = $(VENV)/bin/doc_anchor_check
|
ANCHORCHECK = $(VENV)/bin/rst_anchor_check
|
||||||
|
|
||||||
PYTHON = $(shell which python3)
|
PYTHON = $(shell which python3)
|
||||||
VIRTUALENV = virtualenv
|
VIRTUALENV = virtualenv
|
||||||
|
@ -27,8 +28,8 @@ 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 src/lammps_commands*.txt) src/lammps_support.txt src/lammps_tutorials.txt,$(wildcard src/*.txt))
|
SOURCES=$(filter-out $(wildcard $(TXTDIR)/lammps_commands*.txt) $(TXTDIR)/lammps_support.txt $(TXTDIR)/lammps_tutorials.txt,$(wildcard $(TXTDIR)/*.txt))
|
||||||
OBJECTS=$(SOURCES:src/%.txt=$(RSTDIR)/%.rst)
|
OBJECTS=$(SOURCES:$(TXTDIR)/%.txt=$(RSTDIR)/%.rst)
|
||||||
|
|
||||||
.PHONY: help clean-all clean epub mobi rst html pdf venv spelling anchor_check
|
.PHONY: help clean-all clean epub mobi rst html pdf venv spelling anchor_check
|
||||||
|
|
||||||
|
@ -53,7 +54,7 @@ clean-all: clean
|
||||||
rm -rf $(BUILDDIR)/docenv $(BUILDDIR)/doctrees
|
rm -rf $(BUILDDIR)/docenv $(BUILDDIR)/doctrees
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(RSTDIR)/{Eqs,JPG,*.rst} html epub latex
|
rm -rf html epub latex
|
||||||
rm -rf spelling
|
rm -rf spelling
|
||||||
|
|
||||||
clean-spelling:
|
clean-spelling:
|
||||||
|
@ -64,12 +65,10 @@ rst: clean $(OBJECTS) $(ANCHORCHECK)
|
||||||
html: $(OBJECTS) $(ANCHORCHECK)
|
html: $(OBJECTS) $(ANCHORCHECK)
|
||||||
@(\
|
@(\
|
||||||
. $(VENV)/bin/activate ;\
|
. $(VENV)/bin/activate ;\
|
||||||
cp -r src/JPG $(RSTDIR)/ ;\
|
|
||||||
cp -r src/Eqs $(RSTDIR)/ ;\
|
|
||||||
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 ;\
|
||||||
echo "############################################" ;\
|
echo "############################################" ;\
|
||||||
doc_anchor_check src/*.txt ;\
|
rst_anchor_check src/*.rst ;\
|
||||||
env LC_ALL=C grep -n '[^ -~]' src/*.txt ;\
|
env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\
|
||||||
echo "############################################" ;\
|
echo "############################################" ;\
|
||||||
deactivate ;\
|
deactivate ;\
|
||||||
)
|
)
|
||||||
|
@ -126,7 +125,7 @@ pdf: $(OBJECTS) $(ANCHORCHECK)
|
||||||
. $(VENV)/bin/activate ;\
|
. $(VENV)/bin/activate ;\
|
||||||
sphinx-build $(SPHINXEXTRA) -b latex -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) latex ;\
|
sphinx-build $(SPHINXEXTRA) -b latex -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) latex ;\
|
||||||
echo "############################################" ;\
|
echo "############################################" ;\
|
||||||
doc_anchor_check src/*.txt ;\
|
rst_anchor_check src/*.rst ;\
|
||||||
echo "############################################" ;\
|
echo "############################################" ;\
|
||||||
deactivate ;\
|
deactivate ;\
|
||||||
)
|
)
|
||||||
|
@ -163,7 +162,7 @@ fetch:
|
||||||
anchor_check : $(ANCHORCHECK)
|
anchor_check : $(ANCHORCHECK)
|
||||||
@(\
|
@(\
|
||||||
. $(VENV)/bin/activate ;\
|
. $(VENV)/bin/activate ;\
|
||||||
doc_anchor_check src/*.txt ;\
|
rst_anchor_check src/*.txt ;\
|
||||||
deactivate ;\
|
deactivate ;\
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue