diff --git a/doc/Makefile b/doc/Makefile index 4dbed024f7..82c099ff70 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -3,7 +3,6 @@ SHELL = /bin/bash BUILDDIR = ${CURDIR} RSTDIR = $(BUILDDIR)/src -TXTDIR = $(BUILDDIR)/txt VENV = $(BUILDDIR)/docenv TXT2RST = $(VENV)/bin/txt2rst ANCHORCHECK = $(VENV)/bin/rst_anchor_check @@ -28,8 +27,6 @@ HAS_VIRTUALENV = YES endif 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 @@ -61,9 +58,9 @@ clean: clean-spelling: rm -rf spelling -rst: clean $(OBJECTS) $(ANCHORCHECK) +rst: clean $(ANCHORCHECK) -html: $(OBJECTS) $(ANCHORCHECK) +html: $(ANCHORCHECK) @(\ . $(VENV)/bin/activate ;\ 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]* @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 ;\ pip install sphinxcontrib-spelling ;\ @@ -96,7 +93,7 @@ spelling: $(OBJECTS) utils/sphinx-config/false_positives.txt ) @echo "Spell check finished." -epub: $(OBJECTS) +epub: @mkdir -p epub/JPG @rm -f LAMMPS.epub @cp src/JPG/lammps-logo.png epub/ @@ -115,7 +112,7 @@ mobi: epub @ebook-convert LAMMPS.epub LAMMPS.mobi @echo "Conversion finished. The MOBI manual file is created." -pdf: $(OBJECTS) $(ANCHORCHECK) +pdf: $(ANCHORCHECK) @(\ cd src/Developer; \ pdflatex developer; \ @@ -180,14 +177,6 @@ style_check : # ------------------------------------------ -$(RSTDIR)/%.rst : $(TXTDIR)/%.txt $(TXT2RST) - @(\ - mkdir -p $(RSTDIR) ; \ - . $(VENV)/bin/activate ;\ - txt2rst -v $< > $@ ;\ - deactivate ;\ - ) - $(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_VIRTUALENV)" == "NO" ] ; then echo "virtualenv was not found! Please check README.md for further instructions" 1>&2; exit 1; fi