.SUFFIXES:	.afm	.tfm	.pfd

# Define it so all initialization data is read in from the local directory.
# pfd2tfm therefore can execute without any files being installed
# (with the exception of the .afm files).

#if (COND_PLTOTF == 0)
PFD2TFM = ../../pfd2tfm/src/pfd2tfm -P../../pltotf -p ../../pfd2tfm/evs
#else
PFD2TFM = ../../pfd2tfm/src/pfd2tfm                -p ../../pfd2tfm/evs
#endif

# Tfm files, standard Postscript fonts for the old Laser Writer.
# 13 fonts all together.
COURIER_TFM =\
	PS-Courier.tfm\
	PS-Courier-Bold.tfm\
	PS-Courier-Oblique.tfm\
	PS-Courier-BoldOblique.tfm
HELVETICA_TFM =\
	PS-Helvetica.tfm\
	PS-Helvetica-Bold.tfm\
	PS-Helvetica-Oblique.tfm\
	PS-Helvetica-BoldOblique.tfm
SYMBOL_TFM =\
	PS-Symbol.tfm
TIMES_TFM =\
	PS-Times-Roman.tfm\
	PS-Times-Bold.tfm\
	PS-Times-Italic.tfm\
	PS-Times-BoldItalic.tfm

TFM_ALL =\
	$(COURIER_TFM)\
	$(HELVETICA_TFM)\
	$(TIMES_TFM)\
	$(SYMBOL_TFM)

all:
	make all-tfm

# All the standard tfm files.
all-tfm:	$(TFM_ALL)

# "make prepare" in the main MAKEFILE executes the following code
# in effect adding the rules to make all the tfm and pdr files to
# "Makefile".
prepare:
	echo '' >> Makefile
	for file in $(TFM_ALL) ; do\
		echo -n 'x';\
		echo "$$file:"		>> Makefile;\
		echo "	\$$(PFD2TFM) $$file" |\
			sed -e 's/PS-//' -e s'/\.tfm/.afm/' >> Makefile;\
	done
	@echo ''

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

print:
	$(PRINT_COMMAND) 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\" and \"$*.tfm\""
	$(PFD2TFM) $*
