summaryrefslogtreecommitdiff
path: root/sandbox/dkuhlman/Extract/Makefile
blob: f0df1a5efc68e43c972d84d8855a1000fc043f8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Makefile to process a file LaTeX with the Python LaTeX system.
#  Optionally processes reStructuredText files.

#
# Change the following to point to your Python source code.
#
PYTHON_SRC = /w1/Python/Python-2.3b2
DOCUTILS_DIR = /w1/Python/DocUtils/docutils

#
# Change the following to point to your Docutils installation.
#
DOCUTILSTOOLS_DIR = $(DOCUTILS_DIR)/tools
TRANSFORMDOCPY = $(DOCUTILSTOOLS_DIR)/python_latex.py \
	--documentclass=howto

#
# Change these flags for your purposes.
#
#HTMLFLAGS= --image-type png --html -s 1 --favicon ../icons/pyfav.gif
#HTMLFLAGS= --iconserver ../icons --html -s 1 --favicon ../icons/pyfav.gif
HTMLFLAGS= --iconserver ../icons --html -s 1 \
           --favicon ../icons/pyfav.gif \
           --about $(PYTHON_SRC)/Doc/html/about_docutils.dat

MKHOWTO = $(PYTHON_SRC)/Doc/tools/mkhowto

PAPER = a4

#
# Change this to the name of your source file (without extension).
#
#SRC_NAME=pythonlatexsetup
ifndef SRC_NAME
$(error Must define SRC_NAME (no extension), e.g. make SRC_NAME=mysourcefile)
endif

TARGETS = $(SRC_NAME)/$(SRC_NAME).html

FIGURES = 

all:	html

html:	$(TARGETS) $(FIGURES)

$(SRC_NAME)/$(SRC_NAME).html: $(SRC_NAME).tex
	$(MKHOWTO) $(HTMLFLAGS) $(SRC_NAME).tex

#
# Remove or Comment out the following lines if your source file
#   is a LaTeX file not a reST file.
#
$(SRC_NAME).tex: $(SRC_NAME).txt
	$(TRANSFORMDOCPY) $(SRC_NAME).txt > $(SRC_NAME).tex

clean:
	rm -f *~ *.aux *.idx *.ilg *.ind *.log *.toc *.bkm *.syn \
*.pla *.eps *.pdf *.ps *.lof *.l2h *.tex2 *.dvi
	-rm -f $(SRC_NAME).tex
	-rm -f $(SRC_NAME)/*
	-rmdir $(SRC_NAME)
	-rm -f $(SRC_NAME).tex