On Wed, 29 Aug 2001, Jose Abilio Oliveira Matos wrote:

> > Can't locate reLyXmain.pl in @INC (@INC contains:
> > /home/schmitt/Programme/lyx-1.2.0cvs-sol/bin
> > /opt/local/perl5.004/lib/5.00502/sun4-solaris
> > /opt/local/perl5.004/lib/5.00502
> > /opt/local/perl5.004/lib/site_perl/5.005/sun4-solaris
> > /opt/local/perl5.004/lib/site_perl/5.005 .) at /opt/local/bin/reLyX line
> > 72.
>
>   Does it work from the build directory?

Yes - and no. I get the following message directly:

syntax error at /home/schmitt/LyX/lyx-devel/lib/reLyX/MakePreamble.pm line
310, near "}("
BEGIN failed--compilation aborted at
/home/schmitt/LyX/lyx-devel/lib/reLyX/reLyXmain.pl line 42.

> > The requested file is in fact placed in
> > ./Programme/lyx-1.2.0cvs-sol/share/lyx/reLyX/reLyXmain.pl.
>
>   here you mean ~/... right?

Yes.

>   Could you please send me the first 20 lines of /opt/local/bin/reLyX?

I think I better send you a few more:

#!/opt/local/bin/perl
# This file is part of reLyX
# Copyright (c) 1998-9 Amir Karger [EMAIL PROTECTED]
# You are free to use and modify this code under the terms of
# the GNU General Public Licence version 2 or later.

############################# reLyX wrapper
use strict;
use File::Basename;
use Cwd 'abs_path';
$^W = 1; # same as 'perl -w'

# Variables to make global, so subroutines can use them
use vars qw($lyxdir $lyxname);

my (@maybe_dir);
my $mainscript = "reLyXmain.pl";
my $relyxdir;

# Do this in a BEGIN block so it's done before the 'use lib' below
BEGIN{
# This points to LyX library dir, e.g. /usr/local/share/lyx
$lyxdir = "/home/schmitt/Programme/lyx-1.2.0cvs-sol/share/lyx";
# This is just "." if you compiled from the source directory
my $srcdir = ".";
# This is the name of the program, usually just "lyx"
$lyxname = "lyx";
# The name under which reLyX was invoked
my $name = $0;
# resolve any links to dirname
while (defined (readlink($name))) {$name = readlink($name)};
my $dir = &dirname($name);

# Create a list of possible directories to look in. Non-existent
directories
#    are OK, but empty or undefined values will make 'use lib' complain
my $i = 0;
# case 1: for developers, e.g. - reLyX and $mainscript in same directory
$maybe_dir[$i++] = "$dir";
# case 2: ran make but not make install.
$maybe_dir[$i++] = "$dir/$srcdir";
# case 3: environment variable LYX_DIR_11x has been set
if (exists $ENV{LYX_DIR_11x}) { $maybe_dir[$i++] =
"$ENV{LYX_DIR_11x}/reLyX"};
# case 4: e.g., reLyX in /opt/bin, $mainscript in /opt/share/lyx/reLyX
$maybe_dir[$i++] = "$dir/../share/$lyxname/reLyX"; # case 4
# case 5: configure figured out where $mainscript is
$maybe_dir[$i++] = "$lyxdir/reLyX";



/Michael

-- 
======================================================================
Michael Schmitt                            phone:     +49 451 500 3725
Institute for Telematics                   secretary: +49 451 500 3721
Medical University of Luebeck              fax:       +49 451 500 3722
Ratzeburger Allee 160              eMail: [EMAIL PROTECTED]
D-23538 Luebeck, Germany           WWW:   http://www.itm.mu-luebeck.de
======================================================================

Reply via email to