texinfo-commits
[Top][All Lists]
Advanced

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

[6450] move XSParagraph.pm up a level


From: Gavin D. Smith
Subject: [6450] move XSParagraph.pm up a level
Date: Wed, 22 Jul 2015 15:20:37 +0000

Revision: 6450
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6450
Author:   gavin
Date:     2015-07-22 15:20:35 +0000 (Wed, 22 Jul 2015)
Log Message:
-----------
move XSParagraph.pm up a level

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/doc/Makefile.am
    trunk/man/Makefile.am
    trunk/tp/Makefile.am
    trunk/tp/Texinfo/Convert/XSParagraph/Makefile.am
    trunk/tp/t/test_utils.pl
    trunk/tp/texi2any.pl

Added Paths:
-----------
    trunk/tp/Texinfo/Convert/XSParagraph/XSParagraph.pm

Removed Paths:
-------------
    trunk/tp/Texinfo/Convert/XSParagraph/lib/XSParagraph.pm

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2015-07-22 13:09:59 UTC (rev 6449)
+++ trunk/ChangeLog     2015-07-22 15:20:35 UTC (rev 6450)
@@ -2,6 +2,9 @@
        
        * tp/Texinfo/Convert/XSParagraph/mylib: Move all files up a 
        level.
+       * tp/Texinfo/Convert/XSParagraph/lib/XSParagraph.pm: Move up a 
+       level.
+       * tp/t/test_utils.pl: Include builddir for XSParagraph in @INC.
 
 2015-07-22  Gavin Smith  <address@hidden>
 

Modified: trunk/doc/Makefile.am
===================================================================
--- trunk/doc/Makefile.am       2015-07-22 13:09:59 UTC (rev 6449)
+++ trunk/doc/Makefile.am       2015-07-22 15:20:35 UTC (rev 6450)
@@ -22,7 +22,7 @@
 # cross-compiling.
 tpdir = $(top_srcdir)/tp
 tplibdir = $(tpdir)/maintain/lib
-MAKEINFO = $(PERL) -I "$(tpdir)" -I "$(tplibdir)/libintl-perl/lib" -I 
"$(tpdir)/Texinfo/Convert/XSParagraph/lib" -I 
"../tp/Texinfo/Convert/XSParagraph" -I "$(tplibdir)/Unicode-EastAsianWidth/lib" 
-I "$(tplibdir)/Text-Unidecode/lib" $(top_builddir)/tp/texi2any
+MAKEINFO = $(PERL) -I "$(tpdir)" -I "$(tplibdir)/libintl-perl/lib" -I 
"$(tpdir)/Texinfo/Convert/XSParagraph" -I "../tp/Texinfo/Convert/XSParagraph" 
-I "$(tplibdir)/Unicode-EastAsianWidth/lib" -I "$(tplibdir)/Text-Unidecode/lib" 
$(top_builddir)/tp/texi2any
 
 # We'd also like to use something like this, but Automake calls
 # "install-info" directly.

Modified: trunk/man/Makefile.am
===================================================================
--- trunk/man/Makefile.am       2015-07-22 13:09:59 UTC (rev 6449)
+++ trunk/man/Makefile.am       2015-07-22 15:20:35 UTC (rev 6450)
@@ -42,7 +42,7 @@
 MAKEINFO = $(PERL) -I "$(tpdir)" "$(tpdir)"/texi2any.pl
 #
 tplibdir = $(tpdir)/maintain/lib
-mi_perl5lib_path = 
"$(tpdir):$(tplibdir)/libintl-perl/lib:$(tplibdir)/Unicode-EastAsianWidth/lib:$(tplibdir)/Text-Unidecode/lib:../tp/Texinfo/Convert/XSParagraph:$(tpdir)/Texinfo/Convert/XSParagraph/lib"
+mi_perl5lib_path = 
"$(tpdir):$(tplibdir)/libintl-perl/lib:$(tplibdir)/Unicode-EastAsianWidth/lib:$(tplibdir)/Text-Unidecode/lib:../tp/Texinfo/Convert/XSParagraph:$(tpdir)/Texinfo/Convert/XSParagraph"
 mi_perl5lib = PERL5LIB=$(mi_perl5lib_path); export PERL5LIB
 
 # Set up the variables.  makeinfo, texindex are no longer a .exe(cutable).

Modified: trunk/tp/Makefile.am
===================================================================
--- trunk/tp/Makefile.am        2015-07-22 13:09:59 UTC (rev 6449)
+++ trunk/tp/Makefile.am        2015-07-22 15:20:35 UTC (rev 6450)
@@ -179,9 +179,9 @@
 T_LOG_COMPILER = $(PERL)
 AM_T_LOG_FLAGS = -w
 AM_T_LOG_FLAGS += -ITexinfo/Convert/XSParagraph
-AM_T_LOG_FLAGS += -I$(srcdir)/Texinfo/Convert/XSParagraph/lib
+AM_T_LOG_FLAGS += -I$(srcdir)/Texinfo/Convert/XSParagraph
 
-AM_TESTS_ENVIRONMENT = srcdir="$(srcdir)"; export srcdir; 
top_srcdir="$(top_srcdir)"; export top_srcdir;
+AM_TESTS_ENVIRONMENT = srcdir="$(srcdir)"; export srcdir; 
top_srcdir="$(top_srcdir)"; export top_srcdir; builddir="$(srcdir)"; export 
buildir;
 
 # just a convenience for running these additional tests.
 long-checks:

Modified: trunk/tp/Texinfo/Convert/XSParagraph/Makefile.am
===================================================================
--- trunk/tp/Texinfo/Convert/XSParagraph/Makefile.am    2015-07-22 13:09:59 UTC 
(rev 6449)
+++ trunk/tp/Texinfo/Convert/XSParagraph/Makefile.am    2015-07-22 15:20:35 UTC 
(rev 6450)
@@ -37,7 +37,7 @@
 ################### End Gnulib section #########################
 
 modulesdir = $(pkglibexecdir)/Texinfo
-dist_modules_DATA = lib/XSParagraph.pm
+dist_modules_DATA = XSParagraph.pm
 
 EXTRA_DIST += fetch_conf.pl
 

Copied: trunk/tp/Texinfo/Convert/XSParagraph/XSParagraph.pm (from rev 6391, 
trunk/tp/Texinfo/Convert/XSParagraph/lib/XSParagraph.pm)
===================================================================
--- trunk/tp/Texinfo/Convert/XSParagraph/XSParagraph.pm                         
(rev 0)
+++ trunk/tp/Texinfo/Convert/XSParagraph/XSParagraph.pm 2015-07-22 15:20:35 UTC 
(rev 6450)
@@ -0,0 +1,146 @@
+# Copyright 2010, 2011, 2012, 2014 Free Software Foundation, Inc.
+
+package XSParagraph;
+require DynaLoader;
+
+use DynaLoader;
+
+# same as texi2any.pl, although I don't know what the real requirement
+# is for this module.
+use 5.00405;
+use strict;
+use warnings;
+
+require Exporter;
+
+our @ISA = qw(Exporter DynaLoader);
+
+# Items to export into callers namespace by default. Note: do not export
+# names by default without a very good reason. Use EXPORT_OK instead.
+# Do not simply export all your public functions/methods/constants.
+
+# This allows declaration      use XSParagraph ':all';
+# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
+# will save memory.
+our %EXPORT_TAGS = ( 'all' => [ qw(
+    add_next
+    add_text
+       
+) ] );
+
+our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
+
+our @EXPORT = qw(
+       
+);
+
+our $VERSION = '6.0';
+#bootstrap XSParagraph $VERSION;
+
+# We get this from XSParagraph.la
+# my $dlpath = "Texinfo/Convert/XSParagraph/.libs/XSParagraph.so.0";
+
+# The following uses the module built by the ExtUtils::MakeMaker makefile.
+# my $dlname = 
"Texinfo/Convert/XSParagraph/blib/arch/auto/XSParagraph/XSParagraph.so";
+
+
+# We look for the .la and .so files in @INC because this allows us to override
+# which modules are used using -I flags to "perl".
+sub _find_file($) {
+  my $file = shift;
+  for my $dir (@INC) {
+    #print "checking $dir/$file\n";
+    if (-f "$dir/$file") {
+      #print "found $dir/$file\n";
+      return ($dir, "$dir/$file");
+    }
+  }
+  return undef;
+}
+
+my ($libtool_dir, $libtool_archive) = _find_file("XSParagraph.la");
+if (!$libtool_archive) {
+  die "XSParagraph: couldn't find Libtool archive file\n";
+}
+
+my $fh;
+open $fh, $libtool_archive;
+if (!$fh) {
+  die "XSParagraph: couldn't open Libtool archive file\n";
+}
+
+# Look for the line in XSParagraph.la giving the name of the loadable object.
+my $dlname = undef;
+while (my $line = <$fh>) {
+  if ($line =~ /^\s*dlname\s*=\s*'([^']+)'\s$/) {
+    $dlname = $1;
+    last;
+  }
+}
+if (!$dlname) {
+  die "XSParagraph: couldn't find name of shared object\n";
+}
+
+# The *.so file is under .libs in the source directory.
+push @DynaLoader::dl_library_path, $libtool_dir;
+push @DynaLoader::dl_library_path, "$libtool_dir/.libs";
+
+my $dlpath = DynaLoader::dl_findfile($dlname);
+if (!$dlpath) {
+  die "XSParagraph: couldn't find $dlname\n";
+}
+
+#print STDERR "loadable object is at $dlpath\n";
+
+my $module = "XSParagraph";
+
+# Following steps under "bootstrap" in "man DynaLoader".
+
+# TODO: Execute blib/arch/auto/XSParagraph/XSParagraph.bs ?
+# That file is empty.
+
+#my $flags = dl_load_flags $module; # This is 0 in DynaLoader
+my $flags = 0;
+my $libref = DynaLoader::dl_load_file($dlpath, $flags);
+if (!$libref) {
+  die "XSParagraph: couldn't load file $dlpath\n";
+}
+my @undefined_symbols = DynaLoader::dl_undef_symbols();
+if ($#undefined_symbols+1 != 0) {
+  warn "XSParagraph: still have undefined symbols after dl_load_file\n";
+}
+my $symref = DynaLoader::dl_find_symbol($libref, "boot_$module");
+if (!$symref) {
+  die "XSParagraph: couldn't find boot_$module symbol\n";
+}
+my $boot_fn = DynaLoader::dl_install_xsub("${module}::bootstrap",
+                                                $symref, $dlname);
+
+if (!$boot_fn) {
+  die "XSParagraph: couldn't bootstrap\n";
+}
+
+push @DynaLoader::dl_shared_objects, $dlpath; # record files loaded
+
+# This is the module bootstrap function, which causes all the other
+# functions (XSUB's) provided by the module to become available to
+# be called from Perl code.
+&$boot_fn($module, $VERSION);
+
+# Preloaded methods go here.
+
+#########################################################################
+
+# Used for debugging.  Not implemented.
+sub dump($)
+{
+  return "\n";
+}
+
+# Will not be implemented.
+sub add_underlying_text($$)
+{
+}
+
+1;
+__END__

Deleted: trunk/tp/Texinfo/Convert/XSParagraph/lib/XSParagraph.pm
===================================================================
--- trunk/tp/Texinfo/Convert/XSParagraph/lib/XSParagraph.pm     2015-07-22 
13:09:59 UTC (rev 6449)
+++ trunk/tp/Texinfo/Convert/XSParagraph/lib/XSParagraph.pm     2015-07-22 
15:20:35 UTC (rev 6450)
@@ -1,146 +0,0 @@
-# Copyright 2010, 2011, 2012, 2014 Free Software Foundation, Inc.
-
-package XSParagraph;
-require DynaLoader;
-
-use DynaLoader;
-
-# same as texi2any.pl, although I don't know what the real requirement
-# is for this module.
-use 5.00405;
-use strict;
-use warnings;
-
-require Exporter;
-
-our @ISA = qw(Exporter DynaLoader);
-
-# Items to export into callers namespace by default. Note: do not export
-# names by default without a very good reason. Use EXPORT_OK instead.
-# Do not simply export all your public functions/methods/constants.
-
-# This allows declaration      use XSParagraph ':all';
-# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
-# will save memory.
-our %EXPORT_TAGS = ( 'all' => [ qw(
-    add_next
-    add_text
-       
-) ] );
-
-our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
-
-our @EXPORT = qw(
-       
-);
-
-our $VERSION = '6.0';
-#bootstrap XSParagraph $VERSION;
-
-# We get this from XSParagraph.la
-# my $dlpath = "Texinfo/Convert/XSParagraph/.libs/XSParagraph.so.0";
-
-# The following uses the module built by the ExtUtils::MakeMaker makefile.
-# my $dlname = 
"Texinfo/Convert/XSParagraph/blib/arch/auto/XSParagraph/XSParagraph.so";
-
-
-# We look for the .la and .so files in @INC because this allows us to override
-# which modules are used using -I flags to "perl".
-sub _find_file($) {
-  my $file = shift;
-  for my $dir (@INC) {
-    #print "checking $dir/$file\n";
-    if (-f "$dir/$file") {
-      #print "found $dir/$file\n";
-      return ($dir, "$dir/$file");
-    }
-  }
-  return undef;
-}
-
-my ($libtool_dir, $libtool_archive) = _find_file("XSParagraph.la");
-if (!$libtool_archive) {
-  die "XSParagraph: couldn't find Libtool archive file\n";
-}
-
-my $fh;
-open $fh, $libtool_archive;
-if (!$fh) {
-  die "XSParagraph: couldn't open Libtool archive file\n";
-}
-
-# Look for the line in XSParagraph.la giving the name of the loadable object.
-my $dlname = undef;
-while (my $line = <$fh>) {
-  if ($line =~ /^\s*dlname\s*=\s*'([^']+)'\s$/) {
-    $dlname = $1;
-    last;
-  }
-}
-if (!$dlname) {
-  die "XSParagraph: couldn't find name of shared object\n";
-}
-
-# The *.so file is under .libs in the source directory.
-push @DynaLoader::dl_library_path, $libtool_dir;
-push @DynaLoader::dl_library_path, "$libtool_dir/.libs";
-
-my $dlpath = DynaLoader::dl_findfile($dlname);
-if (!$dlpath) {
-  die "XSParagraph: couldn't find $dlname\n";
-}
-
-#print STDERR "loadable object is at $dlpath\n";
-
-my $module = "XSParagraph";
-
-# Following steps under "bootstrap" in "man DynaLoader".
-
-# TODO: Execute blib/arch/auto/XSParagraph/XSParagraph.bs ?
-# That file is empty.
-
-#my $flags = dl_load_flags $module; # This is 0 in DynaLoader
-my $flags = 0;
-my $libref = DynaLoader::dl_load_file($dlpath, $flags);
-if (!$libref) {
-  die "XSParagraph: couldn't load file $dlpath\n";
-}
-my @undefined_symbols = DynaLoader::dl_undef_symbols();
-if ($#undefined_symbols+1 != 0) {
-  warn "XSParagraph: still have undefined symbols after dl_load_file\n";
-}
-my $symref = DynaLoader::dl_find_symbol($libref, "boot_$module");
-if (!$symref) {
-  die "XSParagraph: couldn't find boot_$module symbol\n";
-}
-my $boot_fn = DynaLoader::dl_install_xsub("${module}::bootstrap",
-                                                $symref, $dlname);
-
-if (!$boot_fn) {
-  die "XSParagraph: couldn't bootstrap\n";
-}
-
-push @DynaLoader::dl_shared_objects, $dlpath; # record files loaded
-
-# This is the module bootstrap function, which causes all the other
-# functions (XSUB's) provided by the module to become available to
-# be called from Perl code.
-&$boot_fn($module, $VERSION);
-
-# Preloaded methods go here.
-
-#########################################################################
-
-# Used for debugging.  Not implemented.
-sub dump($)
-{
-  return "\n";
-}
-
-# Will not be implemented.
-sub add_underlying_text($$)
-{
-}
-
-1;
-__END__

Modified: trunk/tp/t/test_utils.pl
===================================================================
--- trunk/tp/t/test_utils.pl    2015-07-22 13:09:59 UTC (rev 6449)
+++ trunk/tp/t/test_utils.pl    2015-07-22 15:20:35 UTC (rev 6450)
@@ -25,19 +25,25 @@
 
 use Test::More;
 use File::Spec;
-BEGIN { if (defined($ENV{'top_srcdir'})) {
-          my $lib_dir = File::Spec->catdir($ENV{'top_srcdir'}, 'tp', 
'maintain');
-          unshift @INC, (File::Spec->catdir($lib_dir, 'lib', 'libintl-perl', 
'lib'),
-                         File::Spec->catdir($lib_dir, 'lib', 
'Unicode-EastAsianWidth', 'lib'),
-                         File::Spec->catdir($lib_dir, 'lib', 'Text-Unidecode', 
'lib'),
-                         File::Spec->catdir($ENV{'top_srcdir'}, 'tp', 
'Texinfo', 'Convert', 'XSParagraph', 'lib'),
-                         File::Spec->catdir($ENV{'top_srcdir'}, 'tp', 
'Texinfo', 'Convert', 'XSParagraph'));
-      }};
+BEGIN {
+  if (defined($ENV{'top_srcdir'})) {
+    my $lib_dir = File::Spec->catdir($ENV{'top_srcdir'}, 'tp', 'maintain');
+    unshift @INC,
+      (File::Spec->catdir($lib_dir, 'lib', 'libintl-perl', 'lib'),
+       File::Spec->catdir($lib_dir, 'lib', 'Unicode-EastAsianWidth', 'lib'),
+       File::Spec->catdir($lib_dir, 'lib', 'Text-Unidecode', 'lib'),
+       File::Spec->catdir($ENV{'top_srcdir'}, 'tp',
+                                        'Texinfo', 'Convert', 'XSParagraph'));
+  }
+  if (defined($ENV{'top_builddir'})) {
+    unshift @INC, (File::Spec->catdir($ENV{'top_builddir'}, 'tp',
+                                         'Texinfo', 'Convert', 'XSParagraph'));
+  }
+}
 
 use lib 'maintain/lib/Unicode-EastAsianWidth/lib/';
 use lib 'maintain/lib/libintl-perl/lib/';
 use lib 'maintain/lib/Text-Unidecode/lib/';
-use lib 'Texinfo/Convert/XSParagraph/lib';
 use lib 'Texinfo/Convert/XSParagraph';
 use Texinfo::Parser;
 use Texinfo::Convert::Text;

Modified: trunk/tp/texi2any.pl
===================================================================
--- trunk/tp/texi2any.pl        2015-07-22 13:09:59 UTC (rev 6449)
+++ trunk/tp/texi2any.pl        2015-07-22 15:20:35 UTC (rev 6450)
@@ -72,7 +72,6 @@
     unshift @INC, $texinfolibdir;
 
     # For XSParagraph.pm, XSParagraph.la, and XSParagraph.so.
-    push @INC, "${texinfolibdir}Texinfo/Convert/XSParagraph/lib";
     push @INC, "${texinfolibdir}Texinfo/Convert/XSParagraph";
   } elsif ($datadir ne '@' .'datadir@' and $package ne '@' . 'PACKAGE@'
            and $packagedir ne '@' .'pkglibexecdir@/Texinfo'




reply via email to

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