[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7490] ModulePath.pm for tests
From: |
gavinsmith0123 |
Subject: |
[7490] ModulePath.pm for tests |
Date: |
Tue, 1 Nov 2016 14:18:11 +0000 (UTC) |
Revision: 7490
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7490
Author: gavin
Date: 2016-11-01 14:18:11 +0000 (Tue, 01 Nov 2016)
Log Message:
-----------
ModulePath.pm for tests
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/ModulePath.pm.in
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2016-11-01 11:50:17 UTC (rev 7489)
+++ trunk/ChangeLog 2016-11-01 14:18:11 UTC (rev 7490)
@@ -1,5 +1,11 @@
2016-11-01 Gavin Smith <address@hidden>
+ * tp/Texinfo/ModulePath.pm.in: Set $top_builddir from
+ $top_srcdir as well as the other way around. This is so that
+ XS modules can be used from tests run from the command-line.
+
+2016-11-01 Gavin Smith <address@hidden>
+
* tp/Texinfo/Convert/HTML.pm (output): Check for existence of a
string before testing equality.
Modified: trunk/tp/Texinfo/ModulePath.pm.in
===================================================================
--- trunk/tp/Texinfo/ModulePath.pm.in 2016-11-01 11:50:17 UTC (rev 7489)
+++ trunk/tp/Texinfo/ModulePath.pm.in 2016-11-01 14:18:11 UTC (rev 7490)
@@ -6,12 +6,15 @@
package Texinfo::ModulePath;
use File::Spec;
-BEGIN {
-
-} # end BEGIN
-
-# If $LIB_DIR and $LIBEXEC_DIR are given, use them to add directories
-# to @INC (likely the installation directories), otherwise use 'top_srcdir'
+# If $LIB_DIR and $LIBEXEC_DIR are given,
+# (likely the installation directories)
+# use them to add directories
+# to @INC.
+#
+# LIB_DIR is for bundled libraries.
+# LIBEXEC_DIR is for XS modules.
+#
+# otherwise use 'top_srcdir'
# and 'top_builddir' environment variables.
sub init (;$$) {
my $lib_dir = shift;
@@ -19,6 +22,8 @@
if (defined($ENV{'top_builddir'}) and !defined($ENV{'top_srcdir'})) {
$ENV{'top_srcdir'} = $ENV{'top_builddir'};
+ } elsif (defined($ENV{'top_builddir'}) and !defined($ENV{'top_srcdir'})) {
+ $ENV{'top_builddir'} = $ENV{'top_srcdir'};
}
if (!$lib_dir) {
@@ -36,7 +41,7 @@
unshift @INC, $lib_dir;
- # '@USE_EXTERNAL_LIBINTL @ and similar are substituted
+ # '@USE_EXTERNAL_LIBINTL @' and similar are substituted
if ('@USE_EXTERNAL_LIBINTL@' ne 'yes') {
unshift @INC, (File::Spec->catdir($lib_dir, 'lib', 'libintl-perl',
'lib'));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7490] ModulePath.pm for tests,
gavinsmith0123 <=