root/tags/lgt2212/scripts/make_qplgt.sh

Revision 1540, 1.3 KB (checked in by pmoura, 4 years ago)

Updated release number to 2.21.2.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#! /bin/sh
2
3## =================================================================
4## Logtalk - Object oriented extension to Prolog
5## Release 2.21.2
6##
7## Copyright (c) 1998-2004 Paulo Moura.  All Rights Reserved.
8## =================================================================
9
10echo
11echo "Creating a script named qplgt for running Logtalk with Qu-Prolog..."
12
13if ! [ $LOGTALKHOME ]
14then
15    echo "The environment variable LOGTALKHOME must be defined first!"
16else
17    cd $LOGTALKHOME
18    if [ -z "$1" ]; then
19        prefix=/usr/local
20    else
21        prefix="$1"
22    fi
23    if ! [ -d bin ]
24    then
25        mkdir bin
26    fi
27    find . -name "*.lgt" -exec perl -pi -e "s/version is (\d)\.(\d)/version is '\1\.\2'/" {} \;
28    cd configs
29    cp qu.config qu.ql
30    echo "fcompile('qu.ql', [assemble_only(true)]), load(qu). \
31chdir('../compiler/'), fcompile('logtalk.pl', [assemble_only(true), string_table(256)]), load(logtalk)." | qp -s 2048 -d 1024 -h 2000
32    qc -c qphook.ql
33    cd ../bin
34    qc -s 2048 -d 1024 -h 2000 -o qplgt ../configs/qphook.qo ../configs/qu.qo ../compiler/logtalk.qo
35    chmod a+x qplgt
36    ln -sf $LOGTALKHOME/bin/qplgt $prefix/bin/qplgt
37    rm ../configs/qu.ql
38    rm ../configs/qphook.qo
39    rm ../configs/qu.qo
40    rm ../compiler/logtalk.qo
41    echo "Done. A link to the script was been created in $prefix/bin."
42    echo "Users should define the environment variable LOGTALKHOME in"
43    echo "order to use the script."
44    echo
45fi
Note: See TracBrowser for help on using the browser.