[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GT] Makefile for TeX conversion
Here is a Makefile, to add to at: /GT/Docs/ which will build a
fresh PDF from the TeX. I added a License clause, which
probably needs to make it into the .tex file as well.
Usage is:
cd into the /GT/Docs directory
make clean
make all
The Makefile will clean up after itself to a VCS's
satisfaction, and not 'touch' content it should not (i.e., no
gratutious alterations of timestamps.)
Then a person with commits may then 'ci' the new PDF.
When a patch comes in:
A local author can do a 'co, and edit a bit; they can 'test
out' their local .tex file changes along the way, and review
the PDF to make sure it is as intended.
Once happy, they can 'rm' the local test PDF, and send a
'diff' for just the .tex file, and any side content like
images.
The person with commits can review locally, and commit just
that new .tex; then the upstream turn around, and do a 'co'
locally; then, rebuild locally with that 'make' sequence, and
similarly 'ci' just the new result PDF, as above.
As I said earlier, it is unusual to carry what is essentially
a 'binary' file PDF around in the VCS, but I understand the
convenience factor for helping people without the LaTeX
toolchain installed read the content in a platform neutral
format.
- Russ herrold
#
# Makefile for GT documentation (GT/Docs)
#
# We support building an index in the future, although not yet
# in the early versions
#
# Copyright (c) 2008 R P Herrold <info
AT
owlriver.com>
# This file is distributed under the terms of the General Public License
# version 2 or (at your option) any later version.
LATEX = Writing_an_Indicator_Cookbook
RM = rm
TOUCH = touch
DEBUG =
# comment out the next line to debug errors
DEBUG = > /dev/null 2>&1
all: ;
make clean ; make docs ; make vcs
clean: ;
make vcs ;
@$(RM) -f *.pdf
#
# we have to build it twice to get page numbers right for an index
docs: ;
@$(TOUCH) $(LATEX).ind $(LATEX).idx
latex -interaction=batchmode $(LATEX) $(DEBUG)
makeindex $(LATEX)
latex -interaction=batchmode $(LATEX) $(DEBUG)
dvips $(LATEX).dvi -o $(LATEX).ps
ps2pdf $(LATEX).ps $(LATEX).pdf
make vcs
# comment out the 'make vcs' line above to see intermediate build files
#
# we leave the .pdf in the VCS as a courtesy
vcs: ;
@$(RM) -f *.aux *.dvi *.log *.out *.ps *.ind *.ilg *.idx
### EOF