texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo/tp texi2any.pl


From: Patrice Dumas
Subject: texinfo/tp texi2any.pl
Date: Mon, 10 Dec 2012 23:52:36 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        12/12/10 23:52:36

Modified files:
        tp             : texi2any.pl 

Log message:
        Use top_srcdir instead of srcdir to find the directories and files
        even from the tp/tests directory and subdirectories.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/texi2any.pl?cvsroot=texinfo&r1=1.152&r2=1.153

Patches:
Index: texi2any.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/texi2any.pl,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -b -r1.152 -r1.153
--- texi2any.pl 10 Dec 2012 01:34:13 -0000      1.152
+++ texi2any.pl 10 Dec 2012 23:52:35 -0000      1.153
@@ -58,7 +58,11 @@
   # in-source run
   if (($command_suffix eq '.pl' and !(defined($ENV{'TEXINFO_DEV_SOURCE'})
        and $ENV{'TEXINFO_DEV_SOURCE'} eq 0)) or $ENV{'TEXINFO_DEV_SOURCE'}) {
-    $texinfolibdir = defined $ENV{'srcdir'} ? $ENV{'srcdir'} : 
$command_directory;
+    if (defined($ENV{'top_srcdir'})) {
+      $texinfolibdir = File::Spec->catdir($ENV{'top_srcdir'}, 'tp');
+    } else {
+      $texinfolibdir = $command_directory;
+    }
     $lib_dir = File::Spec->catdir($texinfolibdir, 'maintain');
     unshift @INC, $texinfolibdir;
   } elsif ($datadir ne '@' .'datadir@' and $package ne '@' . 'PACKAGE@'
@@ -183,7 +187,12 @@
   return Locale::Messages::dpgettext($messages_textdomain, $context, $msgid);
 }
 
-my $srcdir = defined $ENV{'srcdir'} ? $ENV{'srcdir'} : $command_directory;
+my $srcdir;
+if (defined($ENV{'top_srcdir'})) {
+  $srcdir = File::Spec->catdir($ENV{'top_srcdir'}, 'tp');
+} else {
+  $srcdir = $command_directory;
+}
 
 my $libsrcdir = File::Spec->catdir($srcdir, 'maintain');
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]