when i build toplevel in the bin/ directory, Sdl and
others modules are
unbound, we must move bin/toplevel in the src/
directory where
objects are.
we must fix it in order to distribute a *good* toplevel
in local/bin/
case $1 in
-help)
echo "Usage: lablgtk [-thread] <options> [script-file]"
echo " -thread use the threaded version of the
toplevel"
;;
-thread)
thread=yes
shift
;;
esac
if test $thread = yes; then
toplevel="/usr/lib/ocaml/lablgtk/lablgtktop_t -I
+threads"
else
toplevel=/usr/lib/ocaml/lablgtk/lablgtktop
fi
and it installs the wrapper in bindir (/usr/bin) and the
toplevel in
$(INSTALLDIR) (that is /usr/lib/ocaml/lablgtk).
So i would say :
1) install everything in /usr/lib/ocaml/sdl, or whatever.
2) just build the toplevel with mktoplevel and the correct
options, and
install it in /usr/bin (it will be called ocamlsdl or
something such)
but most probably this will not work, because the user will
then need to add
the -I +sdl argument to this toplevel each time he uses it,
so you could write
a wrapper as above, but it in /usr/bin, and but the toplevel
in
/usr/lib/ocaml/sdl.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=3279
Sven Luther wrote some help:
A quick look at lablgtk gives :
lablgtktop: $(CLIBS) $(MLLIBS) $(INITOBJS)
$(TOPLEVEL) -o $@ $(MLLINK) -ccopt -L. $(MLLIBS)
$(INITOBJS)
to build it, (there is a wrapper on top of this too, which
does :
---------------/usr/bin/lablgtk-----------------------------------
#!/bin/sh
thread="no"
case $1 in
-help)
echo "Usage: lablgtk [-thread] <options> [script-file]"
echo " -thread use the threaded version of the
toplevel"
;;
-thread)
thread=yes
shift
;;
esac
if test $thread = yes; then
toplevel="/usr/lib/ocaml/lablgtk/lablgtktop_t -I
+threads"
else
toplevel=/usr/lib/ocaml/lablgtk/lablgtktop
fi
exec $toplevel -w s -I +lablGL \ -I /usr/lib/ocaml/lablgtk $*
---------------/usr/bin/lablgtk-----------------------------------
and it installs the wrapper in bindir (/usr/bin) and the
toplevel in
$(INSTALLDIR) (that is /usr/lib/ocaml/lablgtk).
So i would say :
1) install everything in /usr/lib/ocaml/sdl, or whatever.
2) just build the toplevel with mktoplevel and the correct
options, and
install it in /usr/bin (it will be called ocamlsdl or
something such)
but most probably this will not work, because the user will
then need to add
the -I +sdl argument to this toplevel each time he uses it,
so you could write
a wrapper as above, but it in /usr/bin, and but the toplevel
in
/usr/lib/ocaml/sdl.
Logged In: YES
user_id=3279
now the toplevel is a script in $prefix/bin/ocamlsdl
which launch $prefix/lib/ocaml/sdl/toplevel -i
$prefix/lib/ocaml/sdl