[an error occurred while processing this directive]
[an error occurred while processing this directive][an error occurred while processing this directive]
[an error occurred while processing this directive]
[an error occurred while processing this directive]
[an error occurred while processing this directive] (none)
[an error occurred while processing this directive]
[an error occurred while processing this directive]
[an error occurred while processing this directive]
[an error occurred while processing this directive]
[an error occurred while processing this directive][an error occurred while processing this directive]
[an error occurred while processing this directive][an error occurred while processing this directive]
[an error occurred while processing this directive][an error occurred while processing this directive]
[an error occurred while processing this directive]
[an error occurred while processing this directive]
[an error occurred while processing this directive] (none)
[an error occurred while processing this directive]
[an error occurred while processing this directive]
[an error occurred while processing this directive][an error occurred while processing this directive]
[an error occurred while processing this directive]
[an error occurred while processing this directive]
Re: [CPROG] Makefile dokumentation / hjælp
To : sslug@sslug
Subject : Re: [CPROG] Makefile dokumentation / hjælp
From : "Marc Cromme" <sslug@sslug>
Date : Mon, 17 Mar 2003 21:31:56 +0100
Newsgroups : sslug.cprog
Organization : SSLUG
References : <b4nj4t$bj$1@www.sslug.dk >
User-agent : Pan/0.13.0 (The whole remains beautiful (Debian GNU/Linux))
On Wed, 12 Mar 2003 16:18:53 +0100, Andrass Ziska Davidsen wrote:
> men til mit pdf-dokument, der
> bliver lavet med pdflatex. Der er diverse afhængigheder (bibtex, makeindex,
> mm), så det er oplagt at bruge en Makefile (hvilket andre også gør).
Som inspiration - dog uden brug af bibtex og makeindex endnu - vedhæftet
en Makefil der duer til latex-only dokumenter. Bemærk while - krøllen
med grep-betingelsen, der sørger for at latex dokumentet bliver
re-kompileret indtil alle Labels passer.
post den bare tilbage på listen, når du har lavetnoget der også tager
højde for bibtex og makeindex.
Bemærk også at billedkonverteringen bruger imagemagick´s convert
program, et ret nifty stykke værktøj. Disse gar dog ingen targets,
og skal kaldes i hånden, som for eksempel
make picture.png
hilsen, Marc
--- snip ---
# Makefile for LaTeX documents
# written by Marc Cromme
###########################################################
# Variables for file names
###########################################################
SOURCES_LATEX = $(wildcard *.tex)
DERIVED_DVI = $(patsubst %.tex, %.dvi, $(SOURCES_LATEX))
DERIVED_PS = $(patsubst %.tex, %.ps, $(SOURCES_LATEX))
DERIVED_PDF = $(patsubst %.tex, %.pdf, $(SOURCES_LATEX))
DERIVED_RTF = $(patsubst %.tex, %.rtf, $(SOURCES_LATEX))
DERIVED_LOG = $(patsubst %.tex, %.log, $(SOURCES_LATEX))
DERIVED_AUX = $(patsubst %.tex, %.aux, $(SOURCES_LATEX))
DERIVED_TOC = $(patsubst %.tex, %.toc, $(SOURCES_LATEX))
DERIVED_OUT = $(patsubst %.tex, %.out, $(SOURCES_LATEX))
SOURCES_XFIG = $(wildcard *.fig)
DERIVED_EPS = $(patsubst %.fig, %.eps, $(SOURCES_XFIG))
DERIVED = $(DERIVED_LOG) $(DERIVED_AUX) $(DERIVED_TOC) $(DERIVED_OUT) \
$(DERIVED_DVI) $(DERIVED_PS) $(DERIVED_PDF) $(DERIVED_RTF) $(DERIVED_EPS)
PICTURES_EPS = $(wildcard *.eps)
PICTURES_GIF = $(wildcard *.gif)
PICTURES_JPEG = $(wildcard *.jpeg *.jpg)
PICTURES_TIFF = $(wildcard *.tiff *.tif)
PICTURES_PNG = $(wildcard *.png)
###########################################################
# Pattern rules for latex compilation
###########################################################
# suffix rules - first cancel, then add
.SUFFIXES:
.SUFFIXES: .tex .log .aux .toc .dvi .ps .pdf .html .rtf .fig .eps \
.jpg .jpeg .png .gif .tif .tiff
# pattern compile LaTeX to DVI - repeat until labels correct
%.dvi : %.tex
while latex $< | grep 'LaTeX Warning: Label(s)'; do true; done;
@echo "LaTeX: Compilation finished"
@echo " "
# pattern compile DVI to PS
%.ps : %.dvi
dvips $< -o $@
@echo " "
# pattern compile LaTeX to PDF - repeat until labels correct
%.pdf : %.tex
while pdflatex $< | grep 'LaTeX Warning: Label(s)'; do true; done;
@echo "LaTeX: Compilation finished"
@echo " "
# while pdflatex $< |tee | grep 'LaTeX Warning: Label(s)'; do true; done
# pattern compile LaTeX to RTF
%.rtf : %.tex
latex2rtf $<
@echo " "
# pattern compile LaTeX to HTML
#%.html : %.tex
# latex2html $<
# @echo " "
# pattern compile LaTeX to PNG
#%.png : %.tex
# latex2png $<
# @echo " "
# pattern compile FIG to EPS
#%.eps : %.fig
# latex2png $<
# @echo " "
###########################################################
# Pattern rules for picture conversion
###########################################################
# pattern compile JPG to PNG
%.png : %.jpg
convert $< $@
@echo " "
# pattern compile JPG to PNG
%.png : %.jpeg
convert $< $@
@echo " "
# pattern compile TIFF to PNG
%.png : %.tif
convert $< $@
@echo " "
# pattern compile TIFF to PNG
%.png : %.tiff
convert $< $@
@echo " "
# pattern compile GIF to PNG
%.png : %.gif
convert $< $@
@echo " "
###########################################################
# Targets
###########################################################
# main target
.PHONY: all
all: dvi
# compile all LaTeX files to DVI
.PHONY: dvi
dvi: $(DERIVED_DVI)
@true
@echo " "
# compile all LaTeX files to PS
.PHONY: ps
ps: $(DERIVED_PS)
@true
@echo " "
# compile all LaTeX files to PDF
.PHONY: pdf
pdf: $(DERIVED_PDF)
@true
@echo " "
# compile all LaTeX files to RTF
.PHONY: rtf
rtf: $(DERIVED_RTF)
@true
@echo " "
# compile all FIG files to EPS
.PHONY: eps
eps: $(DERIVED_EPS)
@true
@echo " "
# remove intermediate files
.PHONY : clean
clean:
rm -f $(DERIVED)
@echo " "
Questions about the web-pages to <www_admin >.
Last modified
2005-08-10, 20:09 CEST
[an error occurred while processing this directive] This page is maintained by
[an error occurred while processing this directive]MHonArc
[an error occurred while processing this directive] #
[an error occurred while processing this directive] *