###########################################################################
##                                                                       ##
##                Centre for Speech Technology Research                  ##
##                     University of Edinburgh, UK                       ##
##                       Copyright (c) 1996,1997                         ##
##                        All Rights Reserved.                           ##
##                                                                       ##
##  Permission is hereby granted, free of charge, to use and distribute  ##
##  this software and its documentation without restriction, including   ##
##  without limitation the rights to use, copy, modify, merge, publish,  ##
##  distribute, sublicense, and/or sell copies of this work, and to      ##
##  permit persons to whom this work is furnished to do so, subject to   ##
##  the following conditions:                                            ##
##   1. The code must retain the above copyright notice, this list of    ##
##      conditions and the following disclaimer.                         ##
##   2. Any modifications must be clearly marked as such.                ##
##   3. Original authors' names are not deleted.                         ##
##   4. The authors' names are not used to endorse or promote products   ##
##      derived from this software without specific prior written        ##
##      permission.                                                      ##
##                                                                       ##
##  THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK        ##
##  DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING      ##
##  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT   ##
##  SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE     ##
##  FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES    ##
##  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN   ##
##  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,          ##
##  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF       ##
##  THIS SOFTWARE.                                                       ##
##                                                                       ##
###########################################################################
#                                                                         #
#  Makefile for lib directory                                             #
#                                                                         #
###########################################################################
TOP=..
DIRNAME=lib
BUILD_DIRS=etc multisyn
ALL_DIRS=$(BUILD_DIRS)

PHONESETS = mrpa_phones.scm mrpa_allophones.scm radio_phones.scm \
            holmes_phones.scm darpa_phones.scm phoneset.scm \
            cmusphinx2_phones.scm unilex_phones.scm
DURSTATS = mrpa_durs.scm klatt_durs.scm gswdurtreeZ.scm f2bdurtreeZ.scm
INTSTATS = tobi.scm f2bf0lr.scm tobi_rules.scm \
           tilt.scm apml.scm apml_f2bf0lr.scm apml_kaldurtreeZ.scm
DBS = 
LTSRULES = engmorph.scm engmorphsyn.scm lts.scm lts_build.scm
BRKMODELS = sec.ts20.quad.ngrambin sec.B.hept.ngrambin
MODES = email-mode.scm ogimarkup-mode.scm sable-mode.scm soleml-mode.scm \
        singing-mode.scm
GENERAL =  init.scm synthesis.scm module_description.scm \
          lexicons.scm \
	  festival.scm intonation.scm duration.scm pos.scm phrase.scm \
          voices.scm tts.scm festdoc.scm languages.scm token.scm \
          mbrola.scm display.scm postlex.scm tokenpos.scm \
          festtest.scm cslush.scm cart_aux.scm pauses.scm \
          scfg.scm mettree.scm java.scm clunits.scm clunits_build.scm \
          hts.scm siteinit.scm
OTHERS = Sable.v0_2.dtd sable-latin.ent festival.el scfg_wsj_wp20.gram \
	speech.properties Singing.v0_1.dtd

SIOD =  siod.scm web.scm cstr.scm fringe.scm

FILES=Makefile VCLocalRules $(PHONESETS) $(DURSTATS) $(INTSTATS) $(DBS) \
      $(BRKMODELS) $(GENERAL) $(LTSRULES) $(OTHERS) $(MODES)

LOCAL_CLEAN=$(SIOD)

ALL=.copy_from_est .sub_directories

include $(TOP)/config/common_make_rules

.copy_from_est: $(SIOD)
	@:

$(SIOD) : % : $(EST)/lib/siod/%
	@echo 'Copy $* from EST/lib/siod'
	@$(RM) -f $*
	@{ \
	echo '' ;\
	echo '' ;\
	echo '' ;\
	echo '' ;\
	echo ' ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;' ;\
	echo ' ;;; DO NOT EDIT THIS FILE ON PAIN OF MORE PAIN.' ;\
	echo ' ;;; ' ;\
	echo ' ;;; The master copy of this file is in $(EST)/lib/siod/$*' ;\
	echo ' ;;; and is copied here at build time.' ;\
	echo ' ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;' ;\
	echo '' ;\
	echo '' ;\
	echo '' ;\
	echo '' ;\
	echo '' ;\
	echo '' ;\
	echo '' ;\
	echo '' ;\
	echo '' ;\
	echo '' ;\
	echo '' ;\
	echo '' ;\
	} | cat - $(EST)/lib/siod/$* |sed -e '/mode: *scheme/s//mode: view/' > $*
	@chmod a-w $*

