.SUFFIXES:	.tfm	.pdr	.pfd

TFM =\
	PS-NewBaskerville-Bold.tfm\
	PS-NewBaskerville-Italic.tfm\
	PS-NewBaskerville-BoldItalic.tfm\
	PS-NewBaskerville-Roman.tfm

PFD2TFM = ../../pfd2tfm/src/pfd2tfm

# First make the pfd files, then the tfm files
all:
	make all-pfd
	make all-tfm

# Install the fonts
install:
	-mkdir	$(PS_FONT_DIR)
	-$(CP) PS-*.tfm PS-*.pdr $(PS_FONT_DIR)

all-tfm:	$(TFM)

# Generate all the pfd files (they all look very similar, and therefore
# we generate them in this Makefile). The remappings were needed
# at some point.
all-pfd:	
	make NewBaskerville

NewBaskerville:
	for font in '-Roman' '-Bold' '-Italic' '-BoldItalic' ; do\
		$(RM) -f PS-$@$$font.pfd;\
		echo "StartPfd;BaseFontName \"$@$$font\";">> PS-$@$$font.pfd;\
		echo "MapChar Yacute 254; MapChar yacute 255;" >> PS-$@$$font.pfd;\
		echo "EndPfd;"            >> PS-$@$$font.pfd;\
	done

print:
	$(ENSCRIPT) MAKEFILE

relink:
clean::
	$(RM) *.pl1 *.tfm *.pfd PS-*.tex C*.tex	macro*tex *.pfd *.pdr

# Rules to make the tfm files and the pdr files
.pfd.tfm:
	@echo	"Making: \"$*.tfm\""
	$(PFD2TFM) $*

.pfd.pdr:
	$(PFD2TFM) $*
