#  -*- makefile -*-
# makefile for easy generation of a LOT of fonts. =)
#
# this unfortunately breaks with some versions of make; works with gmake.

# MF = /usr/athena/bin/mf
CMMF = /usr/athena/bin/cmmf
MF = $(CMMF)
GFTOPK = /usr/athena/bin/gftopk

RM = rm -f
MV = mv -f
INSTALL = /usr/athena/bin/install -c -m 644

MODE = laserjetIV

TFMS = /usr/athena/lib/tex/fonts/tfm
PKS = /usr/athena/lib/tex/fonts/pk

### font lists...

FOO = cmr'\''.600pk

### rules

default:
	@echo
	@echo 'If you *really* want to make all fonts, type "$(MAKE) all".'
	@echo

.PRECIOUS:	%pk %gf %tfm

%.all: %.1493pk %.1244pk %.1037pk %.864pk %.720pk %.657pk %.600pk ;

all: files clean

files: $(FOO)

%.600gf:
	$(MF) '\mode=$(MODE); mag=magstep(0); input $*'
%.657gf:
	$(MF) '\mode=$(MODE); mag=magstep(0.5); input $*'
%.720gf:
	$(MF) '\mode=$(MODE); mag=magstep(1); input $*'
%.864gf:
	$(MF) '\mode=$(MODE); mag=magstep(2); input $*'
%.1037gf:
	$(MF) '\mode=$(MODE); mag=magstep(3); input $*'
%.1244gf:
	$(MF) '\mode=$(MODE); mag=magstep(4); input $*'
%.1493gf:
	$(MF) '\mode=$(MODE); mag=magstep(5); input $*'

%pk: %gf
	$(GFTOPK) './$<'
	$(RM) '$<'

clean:
	-$(RM) *gf *.log
