diff --git a/lib/ChangeLog b/lib/ChangeLog index 98c01c5134..d48078576b 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,12 @@ +2001-08-31 José Matos + * reLyX/reLyX.in: added debug statement. + Moved the insertion in @maybe_dir to push. + + * reLyX/MakePreamble.pm (translate_preamble): Fix syntax only understood + by recent versions of Perl. Allow compatability with perl 5.002. + + * reLyX/reLyXmain.pl: Escape forgoten slash. Thanks to Yves Bastide. + 2001-08-28 José Matos * reLyX/reLyX.in: allow reLyX to be run from the source directory. diff --git a/lib/reLyX/MakePreamble.pm b/lib/reLyX/MakePreamble.pm index 666dff2e05..a71cb92f66 100644 --- a/lib/reLyX/MakePreamble.pm +++ b/lib/reLyX/MakePreamble.pm @@ -307,7 +307,7 @@ sub translate_preamble { my $op; foreach $op (keys %Geometry_Options) { $geom_options =~ s/$op// && do { - $LyX_Preamble .= $Geometry_Options{$op}(); + $LyX_Preamble .= &{$Geometry_Options{$op}}(); print "Geometry option $op\n" if $debug_on; } } diff --git a/lib/reLyX/reLyX.in b/lib/reLyX/reLyX.in index d20b78590c..2a4773f225 100644 --- a/lib/reLyX/reLyX.in +++ b/lib/reLyX/reLyX.in @@ -33,17 +33,17 @@ 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"; +push @maybe_dir, "$dir"; # case 2: ran make but not make install. -$maybe_dir[$i++] = "$dir/$srcdir"; +push @maybe_dir, "$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"}; +if (exists $ENV{LYX_DIR_11x}) { push @maybe_dir, "$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 +push @maybe_dir, "$dir/../share/$lyxname/reLyX"; # case 4 # case 5: configure figured out where $mainscript is -$maybe_dir[$i++] = "$lyxdir/reLyX"; +push @maybe_dir, "$lyxdir/reLyX"; # Decide which one is the real directory, based on the existence of # "$dir/$mainscript" @@ -55,12 +55,14 @@ foreach $dir (@maybe_dir) { $found = 1; last; } - } +} if(!$found) { print "reLyX directory not found.\n"; exit(1); - } +} else { ##just for debug purpose, remove for stable version + print "reLyX directory is: $relyxdir\n"; +} } # end BEGIN block diff --git a/lib/reLyX/reLyXmain.pl b/lib/reLyX/reLyXmain.pl index 0766aee67f..4db42ceb65 100644 --- a/lib/reLyX/reLyXmain.pl +++ b/lib/reLyX/reLyXmain.pl @@ -8,7 +8,7 @@ # # This code usually gets called by the reLyX wrapper executable # -# $Id: reLyXmain.pl,v 1.3 2000/06/06 10:32:10 lasgouttes Exp $ +# $Id: reLyXmain.pl,v 1.4 2001/08/31 07:54:05 jamatos Exp $ # require 5.002; # Perl 5.001 doesn't work. Perl 4 REALLY doesn't work. @@ -65,7 +65,7 @@ BEGIN{$Success = 0} # # Print welcome message including version info -my $version_info = '$Date: 2000/06/06 10:32:10 $'; # RCS puts checkin date here +my $version_info = '$Date: 2001/08/31 07:54:05 $'; # RCS puts checkin date here $version_info =~ s&.*?(\d+/\d+/\d+).*&$1&; # take out just the date info warn "reLyX, the LaTeX to LyX translator. Revision date $version_info\n\n"; @@ -94,7 +94,7 @@ my $Usage_Long = $Usage_Short . <<"ENDLONGUSAGE"; -o output all LyX files to directory "outputdir" Otherwise, LyX file is created in directory the LaTeX file is in -p translate LaTeX fragments or include files (requires -c) - I.e., files without \documentclass commands + I.e., files without \\documentclass commands -r give reLyX a (list of) regular environment(s) -s give reLyX a (list of) additional syntax file(s) to read