###############################################################################
#                                                                             #
#  Make file for installing Latin2 formatting in Lout (Version 2.0)           #
#                                                                             #
#  Jeffrey H. Kingston                                                        #
#  2 April 1996                                                               #
#                                                                             #
#     make install      Install the Latin2 files.                             #
#     make uninstall    Undo the effect of make install                       #
#                                                                             #
#  Most installations of Lout.Latin2 should require only the following        #
#  steps.  If something goes wrong, start again with "make uninstall";        #
#  but be aware that it tries to write empty placeholder files into the       #
#  Lout system directories.                                                   #
#                                                                             #
#  (1) Make sure that Lout is installed, Version 3.07 or later.               #
#                                                                             #
#  (2) Set the following macro defined below to an appropriate value:         #
#                                                                             #
#      LIBDIR  Directory where Lout's libraries go (this directory is         #
#              assumed to exist, since Lout should be already installed).     #
#                                                                             #
#      This macro should be set to the same value as the LIBDIR macro         #
#      in the Lout makefile.                                                  #
#                                                                             #
#  (3) Execute "make install".  This will do the following things:            #
#                                                                             #
#      (a) Copy file latin2.fd into directory $(LIBDIR)/include, overwriting  #
#          an existing placeholder file with the same name.                   #
#                                                                             #
#      (b) Copy files czech.lh and slovenia.lh into directory $(LIBDIR)/hyph, #
#          overwriting existing placeholder files with the same names.        #
#                                                                             #
#      (c) Copy file LtLatin2.LCM into directory $(LIBDIR)/maps.              #
#                                                                             #
#      (d) Execute "lout -x init" which checks the installation and builds    #
#          the compressed hyphenation files czech.lp and slovenia.lp.         #
#                                                                             #
#  You don't have to worry about language definitions or definitions of the   #
#  standard words (files langdefs and standard.ld), because the basic Lout    #
#  distribution already contains Czech and Slovenian entries in those files.  #
#                                                                             #
#  Mail jeff@cs.su.oz.au if you have any problems.                            #
#                                                                             #
###############################################################################

LIBDIR	= /u12/staff/jeff/lout.lib

install:
	@echo ""
	@echo "(a) Copying font defs file latin2.fd into $(LIBDIR)/include"
	cp latin2.fd $(LIBDIR)/include/latin2.fd
	chmod 644 $(LIBDIR)/include/latin2.fd
	@echo ""
	@echo "(b) Copying hyphenation files into $(LIBDIR)/hyph"
	cp czech.lh $(LIBDIR)/hyph/czech.lh
	chmod 644 $(LIBDIR)/hyph/czech.lh
	cp slovenia.lh $(LIBDIR)/hyph/slovenia.lh
	chmod 644 $(LIBDIR)/hyph/slovenia.lh
	@echo ""
	@echo "(c) Copying Lout Character Mapping file LtLatin2.LCM"
	@echo "    into $(LIBDIR)/maps"
	cp LtLatin2.LCM $(LIBDIR)/maps
	chmod 644 $(LIBDIR)/maps/LtLatin2.LCM
	@echo ""
	@echo "(d) Executing lout -x $(LIBDIR)/include/init"
	lout -x $(LIBDIR)/include/init

uninstall:
	@echo ""
	@echo "(a) Replacing placeholder file $(LIBDIR)/include/latin2.fd"
	cp latin2.fx $(LIBDIR)/include/latin2.fd
	chmod 644 $(LIBDIR)/include/latin2.fd
	@echo ""
	@echo "(b) Replacing placeholder files $(LIBDIR)/hyph/slovenia.lh etc"
	cp czech.lx $(LIBDIR)/hyph/czech.lh
	chmod 644 $(LIBDIR)/hyph/czech.lh
	cp slovenia.lx $(LIBDIR)/hyph/slovenia.lh
	chmod 644 $(LIBDIR)/hyph/slovenia.lh
	@echo ""
	@echo "(c) Removing mapping file $(LIBDIR)/maps/LtLatin2.LCM"
	rm -f $(LIBDIR)/maps/LtLatin2.LCM
	@echo ""
	@echo "(d) Removing compressed hyph files"
	rm -f $(LIBDIR)/hyph/czech.lp
	rm -f $(LIBDIR)/hyph/slovenia.lp
