Makefile
David Jez
dave.jez at seznam.cz
Thu Dec 15 14:59:28 CET 2005
Zdravím,
možná se to bude někomu hodit, posílám Makefile pro překládání
*TeXových dokumentů. Překládá se tolikrát, kolikrát je zapotřebí,
použije se pdftex nebo tex a dvi* podle potřeby a toho, co je
nainstalované (odkomentované) v definicích.
Je to celkem jednoduché, pokud ho chce někdo rozšiřovat, směle
do toho :-).
S pozdtravem,
David Jež
--
-------------------------------------------------------
David "Dave" Jez Brno, CZ, Europe
E-mail: dave.jez at seznam.cz
PGP key: finger xjezda00 at eva.fit.vutbr.cz
---------=[ ~EOF ]=------------------------------------
-------------- next part --------------
# *TeX generic Makefile Version 1.0
#
# Copyright (C) 2005 David Jež <dave.jez at seznam.cz>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation version 2 of the License.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 675 Mass Ave, Cambridge, MA 02139, USA.
### Options
# Final files which you want to get (job.pdf, job.pdf job.dvi or job.ps, etc.)
OUT = job.pdf
# Pictures for aditional eps -> pdf conversion (e.g. my-picture.pdf)
PDFPICS = work.pdf
### Tools
# pdf(TeX format) command
PDFTEX = pdflatex
# (TeX format) command
TEX = latex
# mkindex command. Set this options only if job needs it!
#MKINDEX = mkindex
# Optional parameters for mkindex
IFLAGS = -s gind.ist
# dvips command
DVIPS = dvips
# Optional parameters for dvips
DSFLAGS = -P pdf
# dvipdf command
DVIPDF = dvipdfm
# Optional parameters for dvipdf
DPFLAGS =
# pstopdf command
PSTOPDF = ps2pdf13
# Optional parameters for pstopdf
PFLAGS =
# epstopdf command
EPSTOPDF= epstopdf
### End Options
###############
rerun = ((Warning.*bibitem.*not defined)|(Warning.*changed.*Rerun)\
|(Warning.*undefined references)|(No file.*aux))
ifdef PSTOPDF
%.pdf: %.ps
$(PSTOPDF) $(PFLAGS) $<
endif
ifdef DVIPDF
%.pdf: %.dvi
$(DVIPDF) $(DPFLAGS) $<
endif
ifdef DVIPS
%.ps: %.dvi
$(DVIPS) $(DSFLAGS) $<
endif
ifdef PDFTEX
%.pdf: %.tex
$(PDFTEX) $<
ifdef MKINDEX
$(MKINDEX) $(IFLAGS) $*
endif
(egrep -q '$(rerun)' $*.log && rm $@; make $@) || true
%.pdf: %.dtx
$(PDFTEX) $<
ifdef MKINDEX
$(MKINDEX) $(IFLAGS) $*
endif
(egrep -q '$(rerun)' $*.log && rm $@; make $@) || true
endif
ifdef TEX
%.dvi: %.tex
$(TEX) $<
ifdef MKINDEX
$(MKINDEX) $(IFLAGS) $*
endif
(egrep -q '$(rerun)' $*.log && rm $@; make $@) || true
%.dvi: %.dtx
$(TEX) $<
ifdef MKINDEX
$(MKINDEX) $(IFLAGS) $*
endif
(egrep -q '$(rerun)' $*.log && rm $@; make $@) || true
endif
ifdef EPSTOPDF
%.pdf: %.eps
$(EPSTOPDF) $<
endif
all: $(PDFPICS) $(OUT)
tmpclean:
rm -f *.aux *.log *.lot *.out *.toc *.idx *.ref *.ilg *.ind
clean: tmpclean
rm -f $(PDFPICS)
destclean: clean
rm -f $(OUT)
mrproper: destclean
rm -f *.pdf *.ps *.dvi
More information about the csTeX
mailing list