summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--WebSetup.hs2
-rwxr-xr-xbin/build-binary-dist.sh17
2 files changed, 18 insertions, 1 deletions
diff --git a/WebSetup.hs b/WebSetup.hs
index fc70bb13e..f6f76107d 100644
--- a/WebSetup.hs
+++ b/WebSetup.hs
@@ -70,7 +70,7 @@ buildWeb gf flags (pkg,lbi) = do
gf_lib_path = datadir (absoluteInstallDirs pkg lbi dest) </> "lib"
args = numJobs flags++["-make","-s"] -- ,"-optimize-pgf"
++["--gfo-dir="++tmp_dir,
- "--gf-lib-path="++gf_lib_path,
+ --"--gf-lib-path="++gf_lib_path,
"--name="++dropExtension pgf,
"--output-dir="++gfo_dir]
++[dir</>file|file<-src]
diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh
index e44aaef0c..ebc72a5e1 100755
--- a/bin/build-binary-dist.sh
+++ b/bin/build-binary-dist.sh
@@ -67,10 +67,27 @@ fi
cabal install --only-dependencies -fserver -fc-runtime $extra
cabal configure --prefix="$prefix" -fserver -fc-runtime $extra
DYLD_LIBRARY_PATH="$extralib" LD_LIBRARY_PATH="$extralib" cabal build
+ # Building the example grammars will fail, because the RGL is missing
+cabal copy --destdir="$destdir" # create www directory
+
+## Build the RGL and copy it to $destdir
+PATH=$PWD/dist/build/gf:$PATH
+export GF_LIB_PATH="$(dirname $(find "$destdir" -name www))/lib" # hmm
+mkdir -p "$GF_LIB_PATH"
+pushd ../gf-rgl
+make build
+make copy
+popd
+
+# Build GF again, including example grammars that need the RGL
+DYLD_LIBRARY_PATH="$extralib" LD_LIBRARY_PATH="$extralib" cabal build
+
+## Copy GF to $destdir
cabal copy --destdir="$destdir"
libdir=$(dirname $(find "$destdir" -name PGF.hi))
cabal register --gen-pkg-config=$libdir/gf-$ver.conf
+## Create the binary distribution package
case $fmt in
tar.gz)
targz="$name-bin-$hw-$os.tar.gz" # the final tar file