#
# Makefile for HLaTeX fonts
# -------------------------
#
# created by koaunghi.un@student.uni-tuebingen.de <1994/08/12>.
#	modified for version 0.93 <1995/11/22>.
#	modified with help of Wonkoo Kim <wkim+@pitt.edu> <1995/04/10>.
#	updated for version 0.96 <1997/03/04>
#	completely new for version 0.98 <1998/06/07>
#	adapted for UHC fonts <2000/01/24>
#
# To make PK fonts, you must first install UHC fonts, which can be
# found in your nearest CTAN site.
#	~ftp/tex-archive/fonts/korean/HLaTeX
# You don't need to make PK fonts, if you are using xdvik-t1 and dvips.
# The basic font sets for HLaTeX:
#	uhc-myoungjo.tar.gz
#	uhc-gothic.tar.gz
#	uhc-taza.tar.gz
# Additional font sets for HLaTeX:
#	uhc-graphic.tar.gz
#	uhc-gungseo.tar.gz
#	uhc-pen.tar.gz
#	uhc-pilgi.tar.gz
#	uhc-shinmun.tar.gz
#	uhc-yetgul.tar.gz
#	uhc-bom.tar.gz
#	uhc-jamo.tar.gz
#
# Moonhwa TrueType fonts for HLaTeX:
#	moonttf.tar.gz
#
# "make" or "make default" will create myoungjo, gothic, taza fonts.
#
# If you want to make additional fonts, you should do "make extra"
# for graphic, gungseo, pen, pilgi, shinmun, yetgul, bom,
# jamomyoungjo, jamogothic, jamonovel, jamosora fonts.
#
# "make moonttf" will make pk fonts for Moonhwa TrueType fonts.
#
# "make all" creates all the above fonts.
#

SHELL=/bin/sh

series=c m x ux

# If you intend to use pre-made bfseries fonts uncomment following line.
# In this case, you may use option "hardbold" in your \HLaTeX document.
# Please note, \HLaTeX is capable of making bfseries fonts on the fly
# via TeX macro.

#series=c m x ux bc b bx bux

all:    default extra moonttf

.SILENT:

default: mkhfonts.tex
	for font in mj gt tz ; do \
	for series in $(series) ; do \
	for shape in n sl it ; do \
	   (  echo "$${font}" > .in ; echo "$${series}" >> .in ; \
	      echo "$${shape}" >> .in ; latex mkhfonts.tex < .in && \
	      dvips -o /dev/null mkhfonts.dvi ) || \
           exit 1 ; \
	   rm -fr .in; \
	done ; \
	done ; \
	done ;
	rm -f mkhfonts.dvi mkhfonts.log mkhfonts.aux

extra: mkhfonts.tex
	for font in gs gr yt bm pn ph pg sh jmj jgt jnv jsr ; do \
	for series in $(series) ; do \
	for shape in n sl it ; do \
	   (  echo "$${font}" > .in ; echo "$${series}" >> .in ; \
	      echo "$${shape}" >> .in ; latex mkhfonts.tex < .in && \
	      dvips -o /dev/null mkhfonts.dvi ) || \
           exit 1 ; \
	   rm -fr .in; \
	done ; \
	done ; \
	done ;
	rm -f mkhfonts.dvi mkhfonts.log mkhfonts.aux

moonttf: mkhfonts.tex
	for font in mj gt gs gh mg pn ph ; do \
	for series in $(series) ; do \
	for shape in n sl it ; do \
	   (  echo "$${font}" > .in ; echo "$${series}" >> .in ; \
	      echo "$${shape}" >> .in ; \
	      latex '\let\moonttf\relax\input mkhfonts.tex' < .in && \
	      dvips -o /dev/null mkhfonts.dvi ) || \
           exit 1 ; \
	   rm -fr .in; \
	done ; \
	done ; \
	done ;
	rm -f mkhfonts.dvi mkhfonts.log mkhfonts.aux
