diff options
| author | John J. Camilleri <john@digitalgrammars.com> | 2018-07-04 10:09:58 +0200 |
|---|---|---|
| committer | John J. Camilleri <john@digitalgrammars.com> | 2018-07-04 10:09:58 +0200 |
| commit | c6f4edaea5f1074ba682fac5d711016f0136998f (patch) | |
| tree | bb49b8bac2e3cafd3c1f997115bf5bb841554eab /examples/phrasebook/Compile.hs | |
| parent | 00476ae38687fb7d33081130822cbd4e8f34cfd3 (diff) | |
Remove examples directory; these now live in gf-contrib
All changes have been reflected in the gf-contrib repository:
https://github.com/GrammaticalFramework/gf-contrib
Now, for WebSetup to build the example grammars, one must have gf-contrib
cloned in the same top-level directory as GF. When this isn't the case,
WebSetup displays a notice without failing.
Diffstat (limited to 'examples/phrasebook/Compile.hs')
| -rw-r--r-- | examples/phrasebook/Compile.hs | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/examples/phrasebook/Compile.hs b/examples/phrasebook/Compile.hs deleted file mode 100644 index bc64a6f30..000000000 --- a/examples/phrasebook/Compile.hs +++ /dev/null @@ -1,47 +0,0 @@ -import Data.List(partition) -import Control.Monad(when) -import System.Cmd(system) -import System.Environment(getArgs) - --- (c) Aarne Ranta 2010 under GNU LGPL - --- Compile files into pgf, in chosen combinations. - --- Usage: runghc Compile (-make | -link)? Eng Fre Fin ... --- The -make option links all pgf files to one in the end --- The -link option only links, without first compiling --- Arguments whose length are 3 characters are prefixed with mainmodu. --- Other arguments are passed literally. - --- Thus, for instance, to produce an English-Swedish-Romanian phrasebook with English --- disambiguation, the command is --- --- runghc Compile -link Eng Swe Ron DisambPhrasebookEng - - --- change this to apply to another project; alternatively, just use full file names -mainmodu = "Phrasebook" - -main = do - (opts,langs) <- partition ((=='-') . head) `fmap` getArgs - let modus = [mkFile la | la <- langs] - let opt = elem "-opt" opts - putStrLn $ unwords modus - when (notElem "-link" opts) $ mapM_ (compileOne opt) modus - case opts of - _ | elem "-make" opts || elem "-link" opts -> do - let comm = "gf -make -s " ++ unwords (map (++ ".pgf") modus) - putStrLn comm - system comm - return () - _ -> return () - -compileOne opt modu = do - let optim = if opt then " -optimize-pgf" else "" - comm = "gf -make -s" ++ optim ++ " -name=" ++ - modu ++ " " ++ modu ++ ".gf" ++ - " +RTS -K32M" - putStrLn comm - system comm - -mkFile la = if length la == 3 then mainmodu ++ la else la |
