1
0
forked from GitHub/gf-core

Setup.hs now builds RGL. the code is borrowed from Make.hs

This commit is contained in:
krasimir
2009-05-11 06:55:11 +00:00
parent 85d0324a9b
commit 6f8b601629
4 changed files with 279 additions and 558 deletions

537
GF.cabal
View File

@@ -5,543 +5,6 @@ build-type: Simple
license: GPL
license-file: LICENSE
synopsis: Grammatical Framework
data-files:
lib/prelude/Coordination.gf
lib/prelude/Formal.gf
lib/prelude/HTML.gf
lib/prelude/Latex.gf
lib/prelude/Precedence.gf
lib/prelude/Predef.gf
lib/prelude/PredefAbs.gf
lib/prelude/PredefCnc.gf
lib/prelude/Prelude.gf
lib/resource/abstract/Adjective.gf
lib/resource/abstract/Adverb.gf
lib/resource/abstract/Backward.gf
lib/resource/abstract/Cat.gf
lib/resource/abstract/Common.gf
lib/resource/abstract/Conjunction.gf
lib/resource/abstract/Extra.gf
lib/resource/abstract/Grammar.gf
lib/resource/abstract/Idiom.gf
lib/resource/abstract/Lang.gf
lib/resource/abstract/Lexicon.gf
lib/resource/abstract/Noun.gf
lib/resource/abstract/Numeral.gf
lib/resource/abstract/Phrase.gf
lib/resource/abstract/Question.gf
lib/resource/abstract/Relative.gf
lib/resource/abstract/Sentence.gf
lib/resource/abstract/Structural.gf
lib/resource/abstract/Text.gf
lib/resource/abstract/Verb.gf
lib/resource/api/Constructors.gf
lib/resource/api/ConstructorsBul.gf
lib/resource/api/ConstructorsCat.gf
lib/resource/api/ConstructorsDan.gf
lib/resource/api/ConstructorsEng.gf
lib/resource/api/ConstructorsFin.gf
lib/resource/api/ConstructorsFre.gf
lib/resource/api/ConstructorsGer.gf
lib/resource/api/ConstructorsIta.gf
lib/resource/api/ConstructorsNor.gf
lib/resource/api/ConstructorsRus.gf
lib/resource/api/ConstructorsSpa.gf
lib/resource/api/ConstructorsSwe.gf
lib/resource/api/Syntax.gf
lib/resource/api/SyntaxBul.gf
lib/resource/api/SyntaxCat.gf
lib/resource/api/SyntaxDan.gf
lib/resource/api/SyntaxEng.gf
lib/resource/api/SyntaxFin.gf
lib/resource/api/SyntaxFre.gf
lib/resource/api/SyntaxGer.gf
lib/resource/api/SyntaxIta.gf
lib/resource/api/SyntaxNor.gf
lib/resource/api/SyntaxRus.gf
lib/resource/api/SyntaxSpa.gf
lib/resource/api/SyntaxSwe.gf
lib/resource/api/TryBul.gf
lib/resource/api/TryCat.gf
lib/resource/api/TryDan.gf
lib/resource/api/TryEng.gf
lib/resource/api/TryFin.gf
lib/resource/api/TryFre.gf
lib/resource/api/TryGer.gf
lib/resource/api/TryIta.gf
lib/resource/api/TryNor.gf
lib/resource/api/TryRus.gf
lib/resource/api/TrySpa.gf
lib/resource/api/TrySwe.gf
lib/resource/arabic/AdjectiveAra.gf
lib/resource/arabic/AdverbAra.gf
lib/resource/arabic/AllAra.gf
lib/resource/arabic/AllAraAbs.gf
lib/resource/arabic/CatAra.gf
lib/resource/arabic/ConjunctionAra.gf
lib/resource/arabic/ExtAra.gf
lib/resource/arabic/GrammarAra.gf
lib/resource/arabic/IdiomAra.gf
lib/resource/arabic/IrregAra.gf
lib/resource/arabic/LangAra.gf
lib/resource/arabic/LexiconAra.gf
lib/resource/arabic/MorphoAra.gf
lib/resource/arabic/NounAra.gf
lib/resource/arabic/NumeralAra.gf
lib/resource/arabic/OrthoAra.gf
lib/resource/arabic/ParadigmsAra.gf
lib/resource/arabic/PatternsAra.gf
lib/resource/arabic/PhraseAra.gf
lib/resource/arabic/QuestionAra.gf
lib/resource/arabic/RelativeAra.gf
lib/resource/arabic/ResAra.gf
lib/resource/arabic/SentenceAra.gf
lib/resource/arabic/StructuralAra.gf
lib/resource/arabic/VerbAra.gf
lib/resource/bulgarian/AdjectiveBul.gf
lib/resource/bulgarian/AdverbBul.gf
lib/resource/bulgarian/AllBul.gf
lib/resource/bulgarian/AllBulAbs.gf
lib/resource/bulgarian/CatBul.gf
lib/resource/bulgarian/ConjunctionBul.gf
lib/resource/bulgarian/ExtraBul.gf
lib/resource/bulgarian/ExtraBulAbs.gf
lib/resource/bulgarian/GrammarBul.gf
lib/resource/bulgarian/IdiomBul.gf
lib/resource/bulgarian/LangBul.gf
lib/resource/bulgarian/LexiconBul.gf
lib/resource/bulgarian/MorphoBul.gf
lib/resource/bulgarian/MorphoFunsBul.gf
lib/resource/bulgarian/NounBul.gf
lib/resource/bulgarian/NumeralBul.gf
lib/resource/bulgarian/ParadigmsBul.gf
lib/resource/bulgarian/PhraseBul.gf
lib/resource/bulgarian/QuestionBul.gf
lib/resource/bulgarian/RelativeBul.gf
lib/resource/bulgarian/ResBul.gf
lib/resource/bulgarian/SentenceBul.gf
lib/resource/bulgarian/StructuralBul.gf
lib/resource/bulgarian/TextBul.gf
lib/resource/bulgarian/VerbBul.gf
lib/resource/catalan/AdjectiveCat.gf
lib/resource/catalan/AdverbCat.gf
lib/resource/catalan/AllCat.gf
lib/resource/catalan/AllCatAbs.gf
lib/resource/catalan/BeschCat.gf
lib/resource/catalan/CatCat.gf
lib/resource/catalan/ConjunctionCat.gf
lib/resource/catalan/DiffCat.gf
lib/resource/catalan/ExtraCat.gf
lib/resource/catalan/ExtraCatAbs.gf
lib/resource/catalan/ExtraRomanceCat.gf
lib/resource/catalan/GrammarCat.gf
lib/resource/catalan/IdiomCat.gf
lib/resource/catalan/IrregCat.gf
lib/resource/catalan/IrregCatAbs.gf
lib/resource/catalan/LangCat.gf
lib/resource/catalan/LexiconCat.gf
lib/resource/catalan/MorphoCat.gf
lib/resource/catalan/NounCat.gf
lib/resource/catalan/NumeralCat.gf
lib/resource/catalan/ParadigmsCat.gf
lib/resource/catalan/PhonoCat.gf
lib/resource/catalan/PhraseCat.gf
lib/resource/catalan/QuestionCat.gf
lib/resource/catalan/RelativeCat.gf
lib/resource/catalan/ResCat.gf
lib/resource/catalan/SentenceCat.gf
lib/resource/catalan/StructuralCat.gf
lib/resource/catalan/VerbCat.gf
lib/resource/common/CommonX.gf
lib/resource/common/ConstructX.gf
lib/resource/common/ParamX.gf
lib/resource/common/TenseX.gf
lib/resource/common/TextX.gf
lib/resource/danish/AdjectiveDan.gf
lib/resource/danish/AdverbDan.gf
lib/resource/danish/AllDan.gf
lib/resource/danish/AllDanAbs.gf
lib/resource/danish/CatDan.gf
lib/resource/danish/ConjunctionDan.gf
lib/resource/danish/DiffDan.gf
lib/resource/danish/ExtraDan.gf
lib/resource/danish/ExtraDanAbs.gf
lib/resource/danish/ExtraScandDan.gf
lib/resource/danish/GrammarDan.gf
lib/resource/danish/IdiomDan.gf
lib/resource/danish/IrregDan.gf
lib/resource/danish/IrregDanAbs.gf
lib/resource/danish/LangDan.gf
lib/resource/danish/LexiconDan.gf
lib/resource/danish/MathDan.gf
lib/resource/danish/MorphoDan.gf
lib/resource/danish/NounDan.gf
lib/resource/danish/NumeralDan.gf
lib/resource/danish/ParadigmsDan.gf
lib/resource/danish/PhraseDan.gf
lib/resource/danish/QuestionDan.gf
lib/resource/danish/RelativeDan.gf
lib/resource/danish/ResDan.gf
lib/resource/danish/SentenceDan.gf
lib/resource/danish/StructuralDan.gf
lib/resource/danish/VerbDan.gf
lib/resource/demo/Clause.gf
lib/resource/demo/ClauseEng.gf
lib/resource/demo/ClauseFin.gf
lib/resource/demo/ClauseFre.gf
lib/resource/demo/ClauseGer.gf
lib/resource/demo/ClauseI.gf
lib/resource/demo/Demo.gf
lib/resource/demo/DemoEng.gf
lib/resource/demo/DemoFin.gf
lib/resource/demo/DemoFre.gf
lib/resource/demo/DemoGer.gf
lib/resource/english/AdjectiveEng.gf
lib/resource/english/AdverbEng.gf
lib/resource/english/AllEng.gf
lib/resource/english/AllEngAbs.gf
lib/resource/english/BackwardEng.gf
lib/resource/english/CatEng.gf
lib/resource/english/ConjunctionEng.gf
lib/resource/english/ExtraEng.gf
lib/resource/english/ExtraEngAbs.gf
lib/resource/english/GrammarEng.gf
lib/resource/english/IdiomEng.gf
lib/resource/english/IrregEng.gf
lib/resource/english/IrregEngAbs.gf
lib/resource/english/LangEng.gf
lib/resource/english/LexiconEng.gf
lib/resource/english/MorphoEng.gf
lib/resource/english/NounEng.gf
lib/resource/english/NumeralEng.gf
lib/resource/english/ParadigmsEng.gf
lib/resource/english/PhraseEng.gf
lib/resource/english/QuestionEng.gf
lib/resource/english/RelativeEng.gf
lib/resource/english/ResEng.gf
lib/resource/english/SentenceEng.gf
lib/resource/english/StructuralEng.gf
lib/resource/english/VerbEng.gf
lib/resource/finnish/AdjectiveFin.gf
lib/resource/finnish/AdverbFin.gf
lib/resource/finnish/AllFin.gf
lib/resource/finnish/AllFinAbs.gf
lib/resource/finnish/CatFin.gf
lib/resource/finnish/ConjunctionFin.gf
lib/resource/finnish/ExtraFin.gf
lib/resource/finnish/ExtraFinAbs.gf
lib/resource/finnish/GrammarFin.gf
lib/resource/finnish/IdiomFin.gf
lib/resource/finnish/LangFin.gf
lib/resource/finnish/LexiconFin.gf
lib/resource/finnish/MorphoFin.gf
lib/resource/finnish/NounFin.gf
lib/resource/finnish/NumeralFin.gf
lib/resource/finnish/ParadigmsFin.gf
lib/resource/finnish/PhraseFin.gf
lib/resource/finnish/QuestionFin.gf
lib/resource/finnish/RelativeFin.gf
lib/resource/finnish/ResFin.gf
lib/resource/finnish/SentenceFin.gf
lib/resource/finnish/StructuralFin.gf
lib/resource/finnish/VerbFin.gf
lib/resource/french/AdjectiveFre.gf
lib/resource/french/AdverbFre.gf
lib/resource/french/AllFre.gf
lib/resource/french/AllFreAbs.gf
lib/resource/french/BeschFre.gf
lib/resource/french/CatFre.gf
lib/resource/french/ConjunctionFre.gf
lib/resource/french/DiffFre.gf
lib/resource/french/ExtraFre.gf
lib/resource/french/ExtraFreAbs.gf
lib/resource/french/ExtraRomanceFre.gf
lib/resource/french/GrammarFre.gf
lib/resource/french/IdiomFre.gf
lib/resource/french/IrregFre.gf
lib/resource/french/IrregFreAbs.gf
lib/resource/french/LangFre.gf
lib/resource/french/LexiconFre.gf
lib/resource/french/MorphoFre.gf
lib/resource/french/NounFre.gf
lib/resource/french/NumeralFre.gf
lib/resource/french/ParadigmsFre.gf
lib/resource/french/PhonoFre.gf
lib/resource/french/PhraseFre.gf
lib/resource/french/QuestionFre.gf
lib/resource/french/RelativeFre.gf
lib/resource/french/ResFre.gf
lib/resource/french/SentenceFre.gf
lib/resource/french/StructuralFre.gf
lib/resource/french/VerbFre.gf
lib/resource/german/AdjectiveGer.gf
lib/resource/german/AdverbGer.gf
lib/resource/german/AllGer.gf
lib/resource/german/AllGerAbs.gf
lib/resource/german/CatGer.gf
lib/resource/german/ConjunctionGer.gf
lib/resource/german/ExtGer.gf
lib/resource/german/ExtraGer.gf
lib/resource/german/ExtraGerAbs.gf
lib/resource/german/GrammarGer.gf
lib/resource/german/IdiomGer.gf
lib/resource/german/IrregGer.gf
lib/resource/german/IrregGerAbs.gf
lib/resource/german/LangGer.gf
lib/resource/german/LexiconGer.gf
lib/resource/german/MorphoGer.gf
lib/resource/german/NounGer.gf
lib/resource/german/NumeralGer.gf
lib/resource/german/ParadigmsGer.gf
lib/resource/german/PhraseGer.gf
lib/resource/german/QuestionGer.gf
lib/resource/german/RelativeGer.gf
lib/resource/german/ResGer.gf
lib/resource/german/SentenceGer.gf
lib/resource/german/StructuralGer.gf
lib/resource/german/VerbGer.gf
lib/resource/hindi/AdjectiveHin.gf
lib/resource/hindi/AdverbHin.gf
lib/resource/hindi/AllHin.gf
lib/resource/hindi/AllHinAbs.gf
lib/resource/hindi/BackwardHin.gf
lib/resource/hindi/CatHin.gf
lib/resource/hindi/ConjunctionHin.gf
lib/resource/hindi/GrammarHin.gf
lib/resource/hindi/IdiomHin.gf
lib/resource/hindi/IrregHin.gf
lib/resource/hindi/LangHin.gf
lib/resource/hindi/LexiconHin.gf
lib/resource/hindi/MorphoHin.gf
lib/resource/hindi/NounHin.gf
lib/resource/hindi/NumeralHin.gf
lib/resource/hindi/ParadigmsHin.gf
lib/resource/hindi/PhraseHin.gf
lib/resource/hindi/QuestionHin.gf
lib/resource/hindi/RelativeHin.gf
lib/resource/hindi/ResHin.gf
lib/resource/hindi/SentenceHin.gf
lib/resource/hindi/StructuralHin.gf
lib/resource/hindi/utf8/ParadigmsHin.gf
lib/resource/hindi/VerbHin.gf
lib/resource/interlingua/AdjectiveIna.gf
lib/resource/interlingua/AdverbIna.gf
lib/resource/interlingua/AllIna.gf
lib/resource/interlingua/AllInaAbs.gf
lib/resource/interlingua/CatIna.gf
lib/resource/interlingua/ConjunctionIna.gf
lib/resource/interlingua/ExtraIna.gf
lib/resource/interlingua/GrammarIna.gf
lib/resource/interlingua/IdiomIna.gf
lib/resource/interlingua/IrregIna.gf
lib/resource/interlingua/IrregInaAbs.gf
lib/resource/interlingua/LangIna.gf
lib/resource/interlingua/LexiconIna.gf
lib/resource/interlingua/MorphoIna.gf
lib/resource/interlingua/NounIna.gf
lib/resource/interlingua/NumeralIna.gf
lib/resource/interlingua/ParadigmsIna.gf
lib/resource/interlingua/PhraseIna.gf
lib/resource/interlingua/QuestionIna.gf
lib/resource/interlingua/RelativeIna.gf
lib/resource/interlingua/ResIna.gf
lib/resource/interlingua/ResIna2.gf
lib/resource/interlingua/SentenceIna.gf
lib/resource/interlingua/StructuralIna.gf
lib/resource/interlingua/VerbIna.gf
lib/resource/italian/AdjectiveIta.gf
lib/resource/italian/AdverbIta.gf
lib/resource/italian/AllIta.gf
lib/resource/italian/AllItaAbs.gf
lib/resource/italian/BeschIta.gf
lib/resource/italian/CatIta.gf
lib/resource/italian/ConjunctionIta.gf
lib/resource/italian/DiffIta.gf
lib/resource/italian/ExtraIta.gf
lib/resource/italian/ExtraItaAbs.gf
lib/resource/italian/ExtraRomanceIta.gf
lib/resource/italian/GrammarIta.gf
lib/resource/italian/IdiomIta.gf
lib/resource/italian/LangIta.gf
lib/resource/italian/LexiconIta.gf
lib/resource/italian/MorphoIta.gf
lib/resource/italian/NounIta.gf
lib/resource/italian/NumeralIta.gf
lib/resource/italian/ParadigmsIta.gf
lib/resource/italian/PhonoIta.gf
lib/resource/italian/PhraseIta.gf
lib/resource/italian/QuestionIta.gf
lib/resource/italian/RelativeIta.gf
lib/resource/italian/ResIta.gf
lib/resource/italian/SentenceIta.gf
lib/resource/italian/StructuralIta.gf
lib/resource/italian/VerbIta.gf
lib/resource/norwegian/AdjectiveNor.gf
lib/resource/norwegian/AdverbNor.gf
lib/resource/norwegian/AllNor.gf
lib/resource/norwegian/AllNorAbs.gf
lib/resource/norwegian/CatNor.gf
lib/resource/norwegian/ConjunctionNor.gf
lib/resource/norwegian/DiffNor.gf
lib/resource/norwegian/ExtraNor.gf
lib/resource/norwegian/ExtraNorAbs.gf
lib/resource/norwegian/ExtraScandNor.gf
lib/resource/norwegian/GrammarNor.gf
lib/resource/norwegian/IdiomNor.gf
lib/resource/norwegian/IrregNor.gf
lib/resource/norwegian/IrregNorAbs.gf
lib/resource/norwegian/LangNor.gf
lib/resource/norwegian/LexiconNor.gf
lib/resource/norwegian/MathNor.gf
lib/resource/norwegian/MorphoNor.gf
lib/resource/norwegian/NounNor.gf
lib/resource/norwegian/NumeralNor.gf
lib/resource/norwegian/ParadigmsNor.gf
lib/resource/norwegian/PhraseNor.gf
lib/resource/norwegian/QuestionNor.gf
lib/resource/norwegian/RelativeNor.gf
lib/resource/norwegian/ResNor.gf
lib/resource/norwegian/SentenceNor.gf
lib/resource/norwegian/StructuralNor.gf
lib/resource/norwegian/VerbNor.gf
lib/resource/romance/AdjectiveRomance.gf
lib/resource/romance/AdverbRomance.gf
lib/resource/romance/CatRomance.gf
lib/resource/romance/CommonRomance.gf
lib/resource/romance/ConjunctionRomance.gf
lib/resource/romance/DiffRomance.gf
lib/resource/romance/ExtraRomance.gf
lib/resource/romance/ExtraRomanceAbs.gf
lib/resource/romance/ExtRomance.gf
lib/resource/romance/NounRomance.gf
lib/resource/romance/PhraseRomance.gf
lib/resource/romance/QuestionRomance.gf
lib/resource/romance/RelativeRomance.gf
lib/resource/romance/ResRomance.gf
lib/resource/romance/SentenceRomance.gf
lib/resource/romance/VerbRomance.gf
lib/resource/russian/AdjectiveRus.gf
lib/resource/russian/AdverbRus.gf
lib/resource/russian/AllRus.gf
lib/resource/russian/AllRusAbs.gf
lib/resource/russian/CatRus.gf
lib/resource/russian/ConjunctionRus.gf
lib/resource/russian/ExtraRus.gf
lib/resource/russian/ExtraRusAbs.gf
lib/resource/russian/GrammarRus.gf
lib/resource/russian/IdiomRus.gf
lib/resource/russian/IrregRus.gf
lib/resource/russian/LangRus.gf
lib/resource/russian/LexiconRus.gf
lib/resource/russian/MorphoRus.gf
lib/resource/russian/NounRus.gf
lib/resource/russian/NumeralRus.gf
lib/resource/russian/ParadigmsRus.gf
lib/resource/russian/PhraseRus.gf
lib/resource/russian/QuestionRus.gf
lib/resource/russian/RelativeRus.gf
lib/resource/russian/ResRus.gf
lib/resource/russian/SentenceRus.gf
lib/resource/russian/StructuralRus.gf
lib/resource/russian/VerbRus.gf
lib/resource/scandinavian/AdjectiveScand.gf
lib/resource/scandinavian/AdverbScand.gf
lib/resource/scandinavian/CatScand.gf
lib/resource/scandinavian/CommonScand.gf
lib/resource/scandinavian/ConjunctionScand.gf
lib/resource/scandinavian/DiffScand.gf
lib/resource/scandinavian/ExtEngAbs.gf
lib/resource/scandinavian/ExtraScand.gf
lib/resource/scandinavian/ExtraScandAbs.gf
lib/resource/scandinavian/NounScand.gf
lib/resource/scandinavian/PhraseScand.gf
lib/resource/scandinavian/QuestionScand.gf
lib/resource/scandinavian/RelativeScand.gf
lib/resource/scandinavian/ResScand.gf
lib/resource/scandinavian/SentenceScand.gf
lib/resource/scandinavian/VerbScand.gf
lib/resource/spanish/AdjectiveSpa.gf
lib/resource/spanish/AdverbSpa.gf
lib/resource/spanish/AllSpa.gf
lib/resource/spanish/AllSpaAbs.gf
lib/resource/spanish/BeschSpa.gf
lib/resource/spanish/CatSpa.gf
lib/resource/spanish/ConjunctionSpa.gf
lib/resource/spanish/DiffSpa.gf
lib/resource/spanish/ExtraRomanceSpa.gf
lib/resource/spanish/ExtraSpa.gf
lib/resource/spanish/ExtraSpaAbs.gf
lib/resource/spanish/GrammarSpa.gf
lib/resource/spanish/IdiomSpa.gf
lib/resource/spanish/IrregSpa.gf
lib/resource/spanish/IrregSpaAbs.gf
lib/resource/spanish/LangSpa.gf
lib/resource/spanish/LexiconSpa.gf
lib/resource/spanish/MorphoSpa.gf
lib/resource/spanish/NounSpa.gf
lib/resource/spanish/NumeralSpa.gf
lib/resource/spanish/ParadigmsSpa.gf
lib/resource/spanish/PhonoSpa.gf
lib/resource/spanish/PhraseSpa.gf
lib/resource/spanish/QuestionSpa.gf
lib/resource/spanish/RelativeSpa.gf
lib/resource/spanish/ResSpa.gf
lib/resource/spanish/SentenceSpa.gf
lib/resource/spanish/StructuralSpa.gf
lib/resource/spanish/TextSpa.gf
lib/resource/spanish/VerbSpa.gf
lib/resource/swedish/AdjectiveSwe.gf
lib/resource/swedish/AdverbSwe.gf
lib/resource/swedish/AllSwe.gf
lib/resource/swedish/AllSweAbs.gf
lib/resource/swedish/CatSwe.gf
lib/resource/swedish/ConjunctionSwe.gf
lib/resource/swedish/DiffSwe.gf
lib/resource/swedish/ExtraScandSwe.gf
lib/resource/swedish/ExtraSwe.gf
lib/resource/swedish/ExtraSweAbs.gf
lib/resource/swedish/GrammarSwe.gf
lib/resource/swedish/IdiomSwe.gf
lib/resource/swedish/IrregSwe.gf
lib/resource/swedish/IrregSweAbs.gf
lib/resource/swedish/LangSwe.gf
lib/resource/swedish/LexiconSwe.gf
lib/resource/swedish/MorphoSwe.gf
lib/resource/swedish/NounSwe.gf
lib/resource/swedish/NumeralSwe.gf
lib/resource/swedish/ParadigmsSwe.gf
lib/resource/swedish/PhraseSwe.gf
lib/resource/swedish/QuestionSwe.gf
lib/resource/swedish/RelativeSwe.gf
lib/resource/swedish/ResSwe.gf
lib/resource/swedish/SentenceSwe.gf
lib/resource/swedish/StructuralSwe.gf
lib/resource/swedish/VerbSwe.gf
lib/resource/thai/AdjectiveTha.gf
lib/resource/thai/AdverbTha.gf
lib/resource/thai/AllTha.gf
lib/resource/thai/AllThaAbs.gf
lib/resource/thai/CatTha.gf
lib/resource/thai/ConjunctionTha.gf
lib/resource/thai/ExtraTha.gf
lib/resource/thai/GrammarTha.gf
lib/resource/thai/IdiomTha.gf
lib/resource/thai/IrregTha.gf
lib/resource/thai/LangTha.gf
lib/resource/thai/LexiconTha.gf
lib/resource/thai/MorphoTha.gf
lib/resource/thai/NounTha.gf
lib/resource/thai/NumeralTha.gf
lib/resource/thai/ParadigmsTha.gf
lib/resource/thai/PhraseTha.gf
lib/resource/thai/QuestionTha.gf
lib/resource/thai/RelativeTha.gf
lib/resource/thai/ResTha.gf
lib/resource/thai/SentenceTha.gf
lib/resource/thai/StringsTha.gf
lib/resource/thai/StructuralTha.gf
lib/resource/thai/VerbTha.gf
lib/LICENSE
flag haskeline
Description: Enable Haskeline in the shell

View File

@@ -1,24 +1,23 @@
.PHONY: all gf install doc clean sdist lib
.PHONY: all build install doc clean sdist
all: gf lib
all: build
dist/setup-config:
runghc Setup.lhs configure
dist/setup-config: GF.cabal
chmod u+x next-lib/src/mkPresent
chmod u+x next-lib/src/mkMinimal
runghc Setup.hs configure
gf: dist/setup-config
runghc Setup.lhs build
build: dist/setup-config
runghc Setup.hs build
install:
runghc Setup.lhs install
runghc Setup.hs install
doc:
runghc Setup.lhs haddock
runghc Setup.hs haddock
clean:
runghc Setup.lhs clean
runghc Setup.hs clean
sdist:
runghc Setup.lhs sdist
lib:
$(MAKE) -C lib/resource clean all
runghc Setup.hs sdist

267
Setup.hs Normal file
View File

@@ -0,0 +1,267 @@
module Main where
import Distribution.Simple
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.BuildPaths
import Distribution.Simple.Utils
import Distribution.Simple.Setup
import Distribution.PackageDescription
import Control.Monad
import Data.Maybe
import System.Cmd
import System.FilePath
import System.Directory
import System.Environment
import System.Exit
main :: IO ()
main = defaultMainWithHooks simpleUserHooks{ preBuild =checkRGLArgs
, postBuild=buildRGL
, preInst =checkRGLArgs
, postInst =installRGL
, sDistHook=sdistRGL
}
--------------------------------------------------------
-- Commands for building the Resource Grammar Library
--------------------------------------------------------
data Mode
= AllTenses
| Present
| Minimal
deriving Show
data RGLCommand
= RGLCommand
{ cmdName :: String
, cmdIsDef :: Bool
, cmdAction :: Mode -> [String] -> PackageDescription -> LocalBuildInfo -> IO ()
}
rglCommands =
[ RGLCommand "lang" True $ \mode args pkg lbi -> do
mapM_ (gfc mode pkg lbi . lang) (optl langsLang args)
mapM_ (gfc mode pkg lbi . symbol) (optl langsAPI args)
, RGLCommand "compat" True $ \mode args pkg lbi -> do
mapM_ (gfc mode pkg lbi . compat) (optl langsCompat args)
, RGLCommand "api" True $ \mode args pkg lbi -> do
mapM_ (gfc mode pkg lbi . try) (optl langsAPI args)
mapM_ (gfc mode pkg lbi . symbolic) (optl langsAPI args)
-- , RGLCommand "minimal" True $ \pres args lbi -> do
-- mapM_ (gfcmin lbi . syntax) (optl langsMinimal args)
, RGLCommand "pgf" False $ \mode args pkg lbi -> do
let dir = getRGLBuildDir lbi mode
createDirectoryIfMissing True dir
run_gfc pkg lbi $ ["-s","--make","--name=langs","--parser=off",
"--output-dir=" ++ dir]
++ [dir ++ "/Lang" ++ la ++ ".gfo" | (_,la) <- optl langsPGF args]
, RGLCommand "test" False $ \mode args pkg lbi -> do
let dir = getRGLBuildDir lbi mode
let ls = optl langsTest args
createDirectoryIfMissing True dir
gf (treeb "Lang" ls) $ unwords [dir ++ "/Lang" ++ la ++ ".gfo" | (_,la) <- ls]
return ()
, RGLCommand "demo" False $ \mode args pkg lbi -> do
let ls = optl langsDemo args
gf (demos "Demo" ls) $ unwords ["demo/Demo" ++ la ++ ".gf" | (_,la) <- ls]
return ()
, RGLCommand "parse" False $ \mode args pkg lbi -> do
mapM_ (gfc mode pkg lbi . parse) (optl langsParse args)
]
where
optl ls args = fromMaybe ls $ getOptLangs args
--------------------------------------------------------
checkRGLArgs args flags = do
let args' = filter (\arg -> not (arg == "present" ||
arg == "minimal" ||
take (length rgl_prefix) arg == rgl_prefix ||
take (length langs_prefix) arg == langs_prefix)) args
if null args'
then return emptyHookedBuildInfo
else die $ "Unrecognised flags: " ++ intercalate ", " args'
buildRGL args flags pkg lbi = do
let cmds = getRGLCommands args
let mode = getOptMode args
mapM_ (\cmd -> cmdAction cmd mode args pkg lbi) cmds
installRGL args flags pkg lbi = do
let mode = getOptMode args
let inst_gf_lib_dir = datadir (absoluteInstallDirs pkg lbi NoCopyDest) </> "lib"
copyAll mode (getRGLBuildDir lbi mode) (inst_gf_lib_dir </> getRGLBuildSubDir lbi mode)
where
copyAll mode from to = do
putStrLn $ "Installing [" ++ show mode ++ "] " ++ to
createDirectoryIfMissing True to
files <- fmap (drop 2) $ getDirectoryContents from
mapM_ (\file -> copyFile (from </> file) (to </> file)) files
sdistRGL pkg mb_lbi hooks flags = do
paths <- getRGLFiles rgl_dir []
let pkg' = pkg{dataFiles=paths}
sDistHook simpleUserHooks pkg' mb_lbi hooks flags
where
getRGLFiles dir paths = do
files <- getDirectoryContents dir
foldM (processFile dir) paths [file | file <- files, file /= "." && file /= ".."]
processFile dir paths file = do
let path = dir </> file
print path
isFile <- doesFileExist path
if isFile
then if takeExtension file == ".gf" || file == "LICENSE"
then return (path : paths)
else return paths
else getRGLFiles path paths
rgl_dir = "next-lib" </> "src"
-- the languages have long directory names and short ISO codes (3 letters)
-- we also give the decodings for postprocessing linearizations, as long as grammars
-- don't support all flags needed; they are used in tests
langsCoding = [
(("arabic", "Ara"),""),
(("bulgarian","Bul"),""),
(("catalan", "Cat"),""),
(("danish", "Dan"),""),
(("english", "Eng"),""),
(("finnish", "Fin"),""),
(("french", "Fre"),""),
(("hindi", "Hin"),"to_devanagari"),
(("german", "Ger"),""),
-- (("interlingua","Ina"),""),
(("italian", "Ita"),""),
(("latin", "Lat"),""),
(("norwegian","Nor"),""),
(("polish", "Pol"),""),
(("romanian", "Ron"),""),
(("russian", "Rus"),""),
(("spanish", "Spa"),""),
(("swedish", "Swe"),""),
(("thai", "Tha"),"to_thai"),
(("turkish", "Tur"),"")
]
langs = map fst langsCoding
-- languagues for which to compile Lang
langsLang = langs `except` ["Ara","Lat","Pol","Ron","Tur"]
-- languages for which to compile Try
langsAPI = langsLang `except` ["Bul","Hin","Ina","Rus","Tha"]
-- languages for which to run treebank test
langsTest = langsLang `except` ["Ara","Bul","Cat","Hin","Rus","Spa","Tha"]
-- languages for which to run demo test
langsDemo = langsLang `except` ["Ara","Hin","Ina","Tha"]
-- languages for which to compile parsing grammars
langsParse = langs `only` ["Eng"]
-- languages for which langs.pgf is built
langsPGF = langsTest `only` ["Eng","Fre","Swe"]
-- languages for which Compatibility exists (to be extended)
langsCompat = langsLang `only` ["Cat","Eng","Fin","Fre","Ita","Spa","Swe"]
treebankExx = "exx-resource.gft"
treebankResults = "exx-resource.gftb"
gfc mode pkg lbi file = do
let dir = getRGLBuildDir lbi mode
preproc = case mode of
AllTenses -> ""
Present -> "-preproc="++(rgl_dir </> "mkPresent")
Minimal -> "-preproc="++(rgl_dir </> "mkMinimal")
createDirectoryIfMissing True dir
putStrLn $ "Compiling [" ++ show mode ++ "] " ++ file
run_gfc pkg lbi ["-s", preproc, "--gfo-dir="++dir, file]
gf comm file = do
putStrLn $ "Reading " ++ file
let cmd = "echo \"" ++ comm ++ "\" | gf -s " ++ file
putStrLn cmd
system cmd
treeb abstr ls = "rf -lines -tree -file=" ++ treebankExx ++
" | l -treebank " ++ unlexer abstr ls ++ " | wf -file=" ++ treebankResults
demos abstr ls = "gr -number=100 | l -treebank " ++ unlexer abstr ls ++
" | ps -to_html | wf -file=resdemo.html"
lang (lla,la) = rgl_dir </> lla </> ("All" ++ la ++ ".gf")
compat (lla,la) = rgl_dir </> lla </> ("Compatibility" ++ la ++ ".gf")
symbol (lla,la) = rgl_dir </> lla </> ("Symbol" ++ la ++ ".gf")
try (lla,la) = rgl_dir </> "api" </> ("Try" ++ la ++ ".gf")
syntax (lla,la) = rgl_dir </> "api" </> ("Syntax" ++ la ++ ".gf")
symbolic (lla,la) = rgl_dir </> "api" </> ("Symbolic" ++ la ++ ".gf")
parse (lla,la) = rgl_dir </> "parse" </> ("Parse" ++ la ++ ".gf")
except ls es = filter (flip notElem es . snd) ls
only ls es = filter (flip elem es . snd) ls
getOptMode args
| elem "present" args = Present
| elem "minimal" args = Minimal
| otherwise = AllTenses
-- list of languages overriding the definitions above
getOptLangs args = case [ls | arg <- args, let (f,ls) = splitAt (length langs_prefix) arg, f==langs_prefix] of
ls:_ -> return $ findLangs $ seps ls
_ -> Nothing
where
seps = words . map (\c -> if c==',' then ' ' else c)
findLangs ls = [lang | lang@(_,la) <- langs, elem la ls]
getRGLBuildSubDir lbi mode =
case mode of
AllTenses -> "alltenses"
Present -> "present"
Minimal -> "minimal"
getRGLBuildDir lbi mode = buildDir lbi </> "rgl" </> getRGLBuildSubDir lbi mode
getRGLCommands args =
let cmds0 = [cmd | arg <- args,
let (prefix,name) = splitAt (length rgl_prefix) arg,
prefix == rgl_prefix,
cmd <- rglCommands,
cmdName cmd == name]
in if null cmds0
then [cmd | cmd <- rglCommands, cmdIsDef cmd]
else cmds0
langs_prefix = "langs="
rgl_prefix = "rgl-"
unlexer abstr ls =
"-unlexer=\\\"" ++ unwords
[abstr ++ la ++ "=" ++ unl |
lla@(_,la) <- ls, let unl = unlex lla, not (null unl)] ++
"\\\""
where
unlex lla = maybe "" id $ lookup lla langsCoding
-- | Runs the gf executable in compile mode with the given arguments.
run_gfc :: PackageDescription -> LocalBuildInfo -> [String] -> IO ()
run_gfc pkg lbi args =
do let args' = ["-batch","-gf-lib-path="++rgl_dir] ++ filter (not . null) args ++ ["+RTS"] ++ rts_flags ++ ["-RTS"]
let exeName' = (exeName . head . executables) pkg
exeNameReal = exeName' <.> (if null $ takeExtension exeName' then exeExtension else "")
default_gf = buildDir lbi </> exeName' </> exeNameReal
putStrLn $ "Running: " ++ default_gf ++ " " ++ unwords (map showArg args')
e <- rawSystem default_gf args'
case e of
ExitSuccess -> return ()
ExitFailure i -> die $ "gf exited with exit code: " ++ show i
where rts_flags = ["-K100M"]
showArg arg = "'" ++ arg ++ "'"

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env runghc
> module Main where
> import Distribution.Simple
> main :: IO ()
> main = defaultMain