mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
bin/build-binary-dist.sh: include the RGL in binary distributions
TODO: the corresponding changes in debian/rules
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user