###############################################################################
#                                                                             #
#  Make file for installing equation formatting with TeX fonts (Version 2.4)  #
#                                                                             #
#  Jeffrey H. Kingston                                                        #
#  8 October 2000                                                             #
#                                                                             #
#     make install      Install all files                                     #
#     make uninstall    Undo the effect of make install                       #
#                                                                             #
#  Installation of equation formatting with TeX fonts requires only that      #
#  some files be copied, and one initializing Lout run to create one          #
#  database index file; no compilation.  Just follow the following steps.     #
#                                                                             #
#  (1) Make sure that Lout Version 3.24 or later is installed properly.       #
#      This makefile assumes that the command "lout" will execute Lout; if    #
#      not, change macro LOUT_BINARY below to the command that executes Lout. #
#                                                                             #
#  (2) Set macro LIBDIR defined below to be the directory where Lout's        #
#      libraries go.  This should be the same as the value of LIBDIR in the   #
#      Lout makefile, and so the directory should already exist.              #
#                                                                             #
#  (3) Execute "make install".  This will                                     #
#                                                                             #
#      (a) copy the five font files into directory $(LIBDIR)/font             #
#                                                                             #
#      (b) copy the five Lout Character Mapping files into $(LIBDIR)/maps     #
#                                                                             #
#      (c) copy files teq and teq.lpg into directory $(LIBDIR)/include        #
#                                                                             #
#      (d) copy font database file texfonts.ld into directory $(LIBDIR)/data  #
#                                                                             #
#      (e) perform one initializing run of Lout to create the database        #
#          index file texfonts.li in directory $(LIBDIR)/data.                #
#                                                                             #
#  You will need write permission in the four directories for this to work.   #
#  That's all there is.  Mail jeff@cs.usyd.edu.au if you have any problems.   #
#                                                                             #
###############################################################################

LOUT_BINARY	= lout
LIBDIR	= /usr/staff/jeff/lout.lib

install:
	@echo ""
	@echo "(a) Installing font files into $(LIBDIR)/font"
	cp font/cm* $(LIBDIR)/font
	chmod 644 $(LIBDIR)/font/cm*
	@echo ""
	@echo "(b) Installing Lout Character Mapping files into $(LIBDIR)/maps"
	cp maps/cm* $(LIBDIR)/maps
	chmod 644 $(LIBDIR)/maps/cm*
	@echo ""
	@echo "(c) Installing teq and teq.lpg into $(LIBDIR)/include"
	cp teq* $(LIBDIR)/include
	chmod 644 $(LIBDIR)/include/teq*
	@echo ""
	@echo "(d) Installing texfonts.ld into $(LIBDIR)/data"
	cp texfonts.ld $(LIBDIR)/data
	chmod 644 $(LIBDIR)/data/texfonts.ld
	@echo ""
	@echo "(e) Initializing run (should be silent, no errors expected)"
	$(LOUT_BINARY) -x -s teq.init
	chmod 644 $(LIBDIR)/data/texfonts.li

uninstall:
	-rm -f  $(LIBDIR)/font/cm*
	-rm -f  $(LIBDIR)/maps/cm*
	-rm -f  $(LIBDIR)/include/teq*
	-rm -f  $(LIBDIR)/data/texfonts*
