Debian-Med/Tille/Makefile
< Debian-Med | Tille
#!/usr/bin/make -f
# Makefile for formating the Debian-Med FAQ
### HELP: I used a really dirty trick to get a real '&' into an url.
### See below for the line
### sed "s/\(?keywords=med-\)&\(subword=1\)/\1\&\2/"
### Anybody knows how to do this right in SGML??
text=debian-med
textde=debian-med.de
textcz=debian-med.cz
EPS=gnumed.eps \
oio.eps \
tkfp.eps \
resmed.eps \
torch.eps \
earthkeyring800.eps \
history1.eps \
history2.eps \
debian-med-schema-de.eps \
debian-med-schema-en.eps
DISTDIR=debian-med-0.1
%.eps: ../img/%.png
convert -geometry 600x500 $^ $@
%.eps: ../img/%.jpg
convert -geometry 600x500 $^ $@
%.html: %.sgml
linuxdoc --backend=html $<
@for html in `ls d*.html` ; do \
tmp=$${html}.$$ ; \
mv $${html} $${tmp} ; \
cat $${tmp} | \
sed "s?<TITLE>.*</TITLE>?&<link rel=\"stylesheet\" type=\"text/css\" href=\"med-doc.css\">?" | \
sed "s/\(?keywords=med-\)&\(subword=1\)/\1\&\2/" | \
cat > $${html} ; \
rm -f $${tmp} ; \
touch -r $< $${html} ; \
done
all: html dvi
# pdf
html: $(text).html
$(text).html: $(text).sgml
htmlde: $(textde).html
$(textde).html: $(textde).sgml
htmlcz: $(textcz).html
$(textcz).html: $(textcz).sgml
tex: $(text).tex
$(text).tex: $(text).sgml
linuxdoc --backend=latex $(text).sgml
texde: $(textde).tex
$(textde).tex: $(textde).sgml
linuxdoc --backend=latex $(textde).sgml
texcz: $(textcz).tex
$(textcz).tex: $(textcz).sgml
linuxdoc --backend=latex $(textcz).sgml
dvi: $(text).dvi
$(text).dvi: tex $(EPS)
latex $(text).tex
latex $(text).tex
# linuxdoc --backend=latex --output=dvi $(text).sgml
dvide: $(textde).dvi
$(textde).dvi: texde $(EPS)
latex $(textde).tex
latex $(textde).tex
# linuxdoc --backend=latex --output=dvi $(textde).sgml
dvicz: $(textcz).dvi
$(textcz).dvi: texde $(EPS)
latex $(textcz).tex
latex $(textcz).tex
# linuxdoc --backend=latex --output=dvi $(textcz).sgml
pdf: $(text).pdf
$(text).pdf: tex
pdflatex $(text).tex
pdflatex $(text).tex
# linuxdoc --backend=latex -o pdf $(text).sgml
## This leads to the error message:
## can not copy graphics
## Hmmpf :-(
pdfde: $(textde).pdf
$(textde).pdf: texde
pdflatex $(textde).tex
pdflatex $(textde).tex
# linuxdoc --backend=latex -o pdf $(textde).sgml
## This leads to the error message:
## can not copy graphics
## Hmmpf :-(
pdfcz: $(textcz).pdf
$(textcz).pdf: texcz
pdfcslatex $(textcz).tex
pdfcslatex $(textcz).tex
# linuxdoc --backend=latex -o pdf $(textcz).sgml
## This leads to the error message:
## can not copy graphics
## Hmmpf :-(
distclean: clean
rm -f $(text)*.html $(text).tex $(textde)*.html $(textde).tex $(textcz)*.html $(textcz).tex *.eps
rm -rf $(DISTDIR)
clean:
rm -f $(text).log $(text).aux $(text).dvi $(text).toc $(text).pdf $(text).out
rm -f $(textde).log $(textde).aux $(textde).dvi $(textde).toc $(textde).pdf $(textde).out
rm -f $(textcz).log $(textcz).aux $(textcz).dvi $(textcz).toc $(textcz).pdf $(textcz).out
dist:
mkdir -p $(DISTDIR)/paper
cp -a *.sgml *.css Makefile $(DISTDIR)/paper
mkdir -p $(DISTDIR)/img
cp -a ../img/* $(DISTDIR)/img
tar -czf $(DISTDIR).tgz $(DISTDIR)
rm -rf $(DISTDIR)
gnumed.eps: ../img/gnumed.png
oio.eps: ../img/oio.png
tkfp.eps: ../img/tkfp.png
resmed.eps: ../img/resmed.png
torch.eps: ../img/torch.png
earthkeyring800.eps: ../img/earthkeyring800.png
history1.eps: ../img/history1.jpg
history2.eps: ../img/history2.jpg
debian-med-schema-en.eps: ../img/debian-med-schema-en.png
debian-med-schema-de.eps: ../img/debian-med-schema-de.png