# ---------- # Makefile for the OSCON_2004 Presentation # # Copyright (c) 2003-2004, PostgreSQL Global Development Group # Author: Jan Wieck, Afilias USA INC. # # $Id: Makefile,v 1.4 2004/03/18 19:32:21 wieck Exp $ # ---------- # subdir = doc/implementation # top_builddir = ../.. # include $(top_builddir)/Makefile.global GROFF = groff GOPTS = -U -s -p -t -mpspic -P-l PS2PDF = ps2pdf DJPEG = djpeg PNMTOPS = pnmtops # IMG_WID = 1799 # IMG_HT = 1440 IMG_WID = 900 IMG_HT = 720 SRC_CONCEPT = OSCON_2004.nr \ Makefile \ Slon.eps \ Slon_wm.eps \ Afilias.eps \ Afilias_nt.eps PDF = OSCON_2004.pdf PS = OSCON_2004.ps TXT = OSCON_2004.txt DISTFILES = Makefile $(wildcard *.pic) Slon_900x720.jpg OSCON_2004.nr all: all-ps allall: all-ps all-pdf all-ps: $(PS) all-pdf: $(PDF) all-txt: $(TXT) install installdirs: all clean distclean maintainer-clean: rm -f $(PS) $(PDF) $(TXT) tmp.* Slon.eps OSCON_2004.ps: $(SRC_CONCEPT) OSCON_2004.pdf: $(SRC_CONCEPT) OSCON_2004.txt: $(SRC_CONCEPT) Slon.eps: Slon_$(IMG_WID)x$(IMG_HT).jpg djpeg $< | pnmtops -rle -noturn >$@ Slon_wm.eps: Slon_$(IMG_WID)x$(IMG_HT)_watermark.jpg djpeg $< | pnmtops -rle -noturn >$@ Afilias.eps: 538x270_afilias.gif giftoppm $< | pnmtops -rle -noturn >$@ Afilias_nt.eps: 531x200_afilias_nt.gif giftoppm $< | pnmtops -rle -noturn >$@ %.ps: %.nr @echo ".XS 1" > tmp.idx @echo "dummy" >>tmp.idx @echo ".XE" >>tmp.idx @echo "" > tmp.old -$(GROFF) $(GOPTS) $< >$@ 2>/dev/null @n=0 ; \ while ! cmp tmp.idx tmp.old >/dev/null ; do \ cp tmp.idx tmp.old ; \ n=`expr $$n + 1` ; \ if [ $$n -gt 10 ] ; then break ; fi ; \ echo "$(GROFF) $(GOPTS) $< >$@" ; \ $(GROFF) $(GOPTS) $< >$@ ; \ done @rm -f tmp.* %.txt: %.nr @echo ".XS 1" > tmp.idx @echo "dummy" >>tmp.idx @echo ".XE" >>tmp.idx @echo "" > tmp.old -$(GROFF) -Tlatin1 $(GOPTS) $< >$@ 2>/dev/null @n=0 ; \ while ! cmp tmp.idx tmp.old >/dev/null ; do \ cp tmp.idx tmp.old ; \ n=`expr $$n + 1` ; \ if [ $$n -gt 10 ] ; then break ; fi ; \ echo "$(GROFF) -Tlatin1 $(GOPTS) $< >$@" ; \ $(GROFF) -Tlatin1 $(GOPTS) $< >$@ ; \ done @rm -f tmp.* %.pdf: %.ps $(PS2PDF) $< distdir: $(DISTFILES) mkdir $(distdir)/$(subdir) -chmod 777 $(distdir)/$(subdir) for file in $(DISTFILES) ; do \ cp $$file $(distdir)/$(subdir)/$$file ; \ done