Browse Source

Created Makefile for converting between ReST and HTML/PDF.

master
Svend Sorensen 20 years ago
parent
commit
660b7b104b
1 changed files with 29 additions and 0 deletions
  1. +29
    -0
      docs/Makefile

+ 29
- 0
docs/Makefile View File

@@ -0,0 +1,29 @@
# ReStructuredText Makefile

RST2HTML= rst2html.py
RST2LATEX= rst2latex.py
LATEX2PDF= pdflatex

RSTFILES= $(wildcard *.rst)
HTMLFILES= $(RSTFILES:.rst=.html)
LATEXFILES= $(RSTFILES:.rst=.tex)
PDFFILES= $(RSTFILES:.rst=.pdf)

all: html pdf

html: $(HTMLFILES)
latex: $(LATEXFILES)
pdf: $(PDFFILES)

%.html: %.rst
$(RST2HTML) $< > $@

%.tex: %.rst
$(RST2LATEX) $< > $@

%.pdf: %.tex
$(LATEX2PDF) $<

clean:
rm -f $(HTMLFILES) $(LATEXFILES) $(PDFFILES)
rm -f *.aux *.log *.out

Loading…
Cancel
Save