1
0
forked from GitHub/gf-core
Commit Graph

70 Commits

Author SHA1 Message Date
gregoire.detrez
4829dacee8 Make cabal sdist fail with an informative error message` 2014-10-15 08:51:39 +00:00
hallgren
47ebd444b3 Setup.hs: comment out sDistHook, which seems to be broken but is not used 2014-10-14 15:03:47 +00:00
hallgren
7cf87a3441 Setup.hs: don't ask darcs for the version history if _darcs is not present
This is to avoid a (harmless) error message from darcs when compiling sources
obtained e.g. from github.
2014-09-11 11:47:17 +00:00
hallgren
c0eb79b403 Experimental: parallel batch compilation of grammars
On my laptop these changes speed up the full build of the RGL and example
grammars with 'cabal build' from ~95s to ~43s and the zero build from ~18s
to ~5s.

The main change is the introduction of the module GF.CompileInParallel that
replaces GF.Compile and the function GF.Compile.ReadFiles.getAllFiles. At
present, it is activated with the new -j flag, and it is only used when
combined with --make or --batch. In addition, to get parallel computations,
you need to add GHC run-time flags, e.g., +RTS -N -A20M -RTS, to the command
line.

The Setup.hs script has been modified to pass the appropriate flags to GF
for parallel compilation when compiling the RGL and example grammars, but you
need a recent version of Cabal for this to work (probably >=1.20).

Some additonal refactoring were made during this work. A new monad is used to
avoid warnings/error messages from different modules to be intertwined when
compiling in parallel, so some functios that were hardiwred to the IO or IOE
monads have been lifted to work in arbitrary monads that are instances in
the appropriate classes.
2014-08-25 09:56:00 +00:00
hallgren
70051a375b Setup.hs: reduce zero build time by a couple of seconds
The RGL is now compile with only three calls to GF (prelude, present,
alltenses). This also makes even more parallelism available to GF for speeding
up full builds of the RGL.
2014-08-13 16:25:03 +00:00
hallgren
1ce3569c82 Setup.hs: don't build example grammars when the rgl-none argument is specified 2014-08-08 17:02:36 +00:00
hallgren
daee08f360 Setup.hs: comment out debugging code 2014-07-28 15:35:22 +00:00
hallgren
067c360ec5 Setup.hs: reduce zero build time by ~30% (from 26 to 18 seconds on my laptop)
This speedup is obtained by instead of generating 211 shell commands to compile the RGL one file at a time, generate 7 shell commands, passing a number of
related files to GF in one go.

In addition to cutting down the zero build time, this opens up for speeding up
full builds of the RGL, by adding more parallelism in GF's grammar compilation
machinery.

(Note: gf.cabal already takes advantage of GHC's parallel build option to
speed up the compilation of GF itself, if GHC>=7.8 is used.)
2014-07-28 15:11:58 +00:00
hallgren
131ef1f444 Compile example grammars during the build phase instead of the install phase
This allows more errors to be detected by the build bot.
TODO: fix the gf --output-dir flag, which does not seem to change where PGF
file are put.
2014-06-18 23:57:45 +00:00
hallgren
e783712fde Setup.hs: System.Cmd is deprecated, import System.Process instead 2014-06-17 13:27:14 +00:00
hallgren
b8f3914209 Optionally include C run-time support
If the C run-time library is compiled and installed on your system, you can now
do 'cabal configure -fc-runtime' to get the following extras:
  + The haskell binding to the C run-time library will be included in the
    PGF library (so you can import it in Haskell applications).
    Documentation on the new modules will be included when you run
    'cabal haddock'.
  + The new command 'pgf-shell', implemented on top of haskell binding to
    the C run-time system.
  + Three new commands in the web API: c-parse, c-linearize and
    c-translate. Their interfaces are similar to the corresponding commands
    without the "c-" prefix, but they should be considered preliminary.
2014-01-20 17:06:11 +00:00
hallgren
dd78657191 testsuite: Use Cabal's new test suite interface
* The old way: a user hook in Setup.hs
  * The new way: specify it in gf.cabal
  * The test suite is now called gf-tests, and it runs testsuite/run.hs.
  * You can run it manually with 'runhaskell testsuite/run.hs'. It also runs,
    together with rgl-tests, when you do 'cabal test'
  * Currently only 9 of 34 tests pass. Many failures have silly causes:
    - Error messages that look slightly different
    - Same output but in a different order
    - Absolute paths in output
2013-12-03 17:13:39 +00:00
hallgren
06ed4cc263 Setup.hs: avoid a problem with Cabal-1.18
In Cabal-1.18, the build command takes some new arguments. The Setup.hs script
should not die if these are present.
2013-11-25 20:03:57 +00:00
gregoire.detrez
78be477243 Add Estonian to Setup.hs 2013-10-29 18:17:12 +00:00
john
1366c2a53e Maltese RG: first proper release
Of course some bugs remain and more testing is needed,
but all functions are complete and Maltese now builds as part
of the normal GF install.
2013-06-10 21:37:10 +00:00
hallgren
0dbddbb9d7 Setup.hs: comment out ineffective parallelisation 2013-05-02 12:36:16 +00:00
hallgren
46546a3e93 Add greek to Setup.hs and the web apps 2013-04-26 13:42:01 +00:00
hallgren
2cc9a37db4 Setup.hs: paralell RGL module compilation experiment
For this to have any effect, Setup.hs has to be compiled with -threaded, which
cabal-install doesn't do, unfortunately...
2013-03-25 14:03:10 +00:00
Sergei Trofimovich
8e4d460c6f Setup.hs: switch to base-4 exceptions
Fixes build failure on ghc-7.6:
    $ runhaskell Setup.hs configure
    Setup.hs:394:14: Not in scope: `E.try'

base-4 is available/default since ghc-6.10.
2013-03-09 21:18:03 +00:00
hallgren
08569c6e8a Setup.hs: eliminate "minimal" mode, fix darcs version info
The reported number of recorded changes since the last tagged version was off
by one (because it counted the change that set the tag).
Also added a note that -K32M is not needed when using new-comp. But -old-comp
is still available as a configuration option, so I'm keeping -K32M for now.
2013-01-30 15:48:36 +00:00
aarne
467d5330c6 updated the lists of notPresent languages 2013-01-29 16:53:15 +00:00
aarne
064fcf4345 added Heb = Hebrew to the incomplete languages that can be compiled 2013-01-28 18:03:35 +00:00
hallgren
61323039bd Setup.hs: add some incomplete languages to the list compiled languages
To be specific: Amh, Ara, Lat, Tur and Mlt.
2013-01-28 16:07:44 +00:00
hallgren
c70c01745b Add Chinese to the list of installed RGL languages and support it in the web apps
Aarne says the Chinese resource grammar is complete, but not yet completely
correct.
2012-10-22 10:16:10 +00:00
hallgren
1d6cbf8189 Use NOINLINE for build info and darcs version info
... to avoid unnecessary recompilation of other modules.
2012-10-18 20:01:22 +00:00
hallgren
3c66e95176 Setup.hs: add Maltese to the list of known RGL languages, but don't compile it by default 2012-09-27 14:28:59 +00:00
hallgren
da0dcab111 Setup.hs: Persian does not support mkPresent 2012-09-26 15:21:34 +00:00
hallgren
2546a841dd Add Persian to the list of installed RGL langauges 2012-09-26 13:04:18 +00:00
aarne
2951361732 tried to change Jap to Jpn everywhere 2012-06-11 20:08:14 +00:00
gregoire.detrez
8412792d66 Small Setup.hs bug fix
Setup.hs failed to generate DarcsVersion_gf if dist/build/autogen does not exists.g
Added a line to create the directory if absent.
2012-06-09 12:49:01 +00:00
hallgren
2e4aedd211 Setup.hs: fix two problems with querying darcs 2012-05-30 16:15:59 +00:00
hallgren
25c5ad2bf0 More detailed version info in the startup message
The Setup.hs script now queries darcs to create more detailed version info
to include in the startup message.

Note thought that with distributed version control systems like darcs,
the only way to uniquely identify a version is by the set of patches included.
Since the patches are not totally ordered, just looking at the last patch is
not enough.

For official releases, we tag the current set of patches so we can refer to
it by name (e.g. RELEASE-3.3.3).
2012-05-30 15:45:45 +00:00
hallgren
d13f71a27e Integrate Japanese
* Update Setup.hs to build Japanese by default.
* News item about Japanese on the home page.
* Add Japanese to the supported RGL imports in the grammar editor (gfse).
2012-05-15 13:11:32 +00:00
hallgren
9260797e6b Setup.hs: include Hindi and Thai by default in RGL builds 2012-03-01 14:25:41 +00:00
virk.shafqat
14e0237950 sindhipatch 2012-02-21 09:02:42 +00:00
normundsg
1966ce5eb6 Latvian: 1) added some extra things that are used by the Attempto grammar; 2) added notpresent tags; 3) compiles with Setup.hs and lib/src/Make.hs 2012-02-20 02:42:07 +00:00
Nick Frolov
31e1a657f9 Symbolic and Nound fixes for Russian 2011-11-24 16:13:08 +00:00
kr.angelov
f1cacffc98 now if some module is compiled with -no-pmcfg then the PMCFG code is generated at the end during the linking phase. Now the default compilation of the libraries with cabal is with -no-pmcfg. 2011-11-24 14:23:04 +00:00
hallgren
ae8dfb381c Setup.hs: less verbose output during the compilation of the RGL
Only show the full gf command line if an error occurs.
2011-10-20 13:36:42 +00:00
hallgren
6d0c06a365 Bug fix in setup for gf -server mode
Use the command "dist/build/gf/gf" instead of "gf" to compile the sample
grammars for the minibar, to avoid failing if gf is installed in a directory
which is not in the $PATH.
2011-10-14 19:34:55 +00:00
hallgren
50605036dd Bug fixes for gf -server mode and setup 2011-10-12 18:27:46 +00:00
hallgren
fa4af3d043 Improvements of "gf -server" mode and related setup
"gf -server" mode now contains everything needed to run the minibar and
the grammar editor (including example-based grammar writing).

The Setup.hs script installs the required files where gf -server can find them.
These files have been moved to a new directory: src/www.

The separate server program pgf-http is now obsolete.
2011-10-12 17:03:54 +00:00
hallgren
15d7a6ed74 test suite: Don't fail because of the Win32/Unix text file incompatibility. 2011-09-19 13:14:01 +00:00
virk.shafqat
458675a8e8 refinements-Pnb-2011-04-30 2011-04-30 18:11:48 +00:00
hallgren
b2b6def050 Include Urd in the default set of languages to compile 2010-12-23 11:44:40 +00:00
hallgren
d47da82d00 Setup.hs: build both alltenses and present by default
Now you can specify more than one mode when building and installing the RGL.
For example to build all modes, run

        runhaskell Setup.hs build alltenses present minimal

The default is to build alltenses and present, which means that a single
command,

        cabal install

is enough to obtain a normal installation of GF. Without this change, additional
build and install commands would be required before you can compile example
grammars, like Foods and Phrasebook.

The build-binary-dist.sh script has been simplified accordingly.
2010-12-22 21:18:47 +00:00
aarne
1ae49d8eb6 refined synopsis 2010-12-22 09:57:16 +00:00
aarne
4f244b6eec remove -src from Setup; simplified str2numeral; bug fix in Finnish ordinal inflection 2010-12-21 09:58:12 +00:00
hallgren
bef7f8b053 Setup.hs: improved langs=... option
Instead of just giving an explicit list of languages to compile, you can
now also add and remove languages from the default list by using langs=+...
or langs=-...

Examples:

	cabal build langs=Eng,Swe,Ger   -- as before, compile the given 3 langs
	cabal build langs=-Fin          -- use default languages, but omit Fin 
	cabal build langs=+Urd		-- use default languages + Urd

("cabal build ..." is the same as "runhaskell Setup.hs build ...")
2010-11-30 16:49:15 +00:00
hallgren
7669828212 Setup.hs: omit urdu when compiling the rgl, for now. 2010-11-30 16:29:36 +00:00