[libmarpa-r2-perl] 19/32: Work on shared library support

Jonas Smedegaard dr at jones.dk
Sat May 17 21:24:13 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag Marpa-R2-2.085_004
in repository libmarpa-r2-perl.

commit eb70cdae67651baf2f4d1136041e7abaad108eea
Author: Jeffrey Kegler <JKEGL at cpan.org>
Date:   Fri Apr 25 19:55:32 2014 -0700

    Work on shared library support
---
 cpan/MANIFEST                   |  2 +-
 cpan/inc/Marpa/R2/Build_Me.pm   | 11 +----------
 cpan/libmarpa/dev/internal.texi | 10 ++++++++++
 cpan/libmarpa/dev/marpa.w       | 11 +++++++++++
 cpan/t/00-load.t                |  1 +
 cpan/xs/R2.xs                   |  8 ++++++++
 6 files changed, 32 insertions(+), 11 deletions(-)

diff --git a/cpan/MANIFEST b/cpan/MANIFEST
index 4b272b3..2004a51 100644
--- a/cpan/MANIFEST
+++ b/cpan/MANIFEST
@@ -41,7 +41,6 @@ author.t/pod.t
 author.t/spelling_exceptions.list
 author.t/tidy.t
 author.t/tidy1
-c_to_dist.sh
 cp_libmarpa.sh
 etc/.gitignore
 etc/Makefile
@@ -51,6 +50,7 @@ etc/compile_for_debug.sh
 etc/dovg.sh
 etc/my_suppressions
 etc/reserved_check.sh
+etc/work_to_dist.sh
 g/config/default.txt
 html/.gitignore
 html/lib/Marpa/R2/HTML.pm
diff --git a/cpan/inc/Marpa/R2/Build_Me.pm b/cpan/inc/Marpa/R2/Build_Me.pm
index be36077..6eb6b87 100644
--- a/cpan/inc/Marpa/R2/Build_Me.pm
+++ b/cpan/inc/Marpa/R2/Build_Me.pm
@@ -279,8 +279,6 @@ sub process_xs {
 
     my $libmarpa_archive;
     FIND_LIBRARY: {
-        $libmarpa_archive = $self->args('marpa-library');
-        last FIND_LIBRARY if defined $libmarpa_archive;
         if ($Marpa::R2::USE_PERL_AUTOCONF) {
             my $libmarpa_libs_dir =
                 File::Spec->catdir( $self->base_dir(), 'libmarpa_build',
@@ -769,11 +767,7 @@ sub ACTION_code {
             qw(pperl Marpa R2 Perl Version.pm) );
     } ## end if ( not $self->up_to_date( [ $config_pm_filename, ...]))
 
-    # If we are not overriding it, ...
-    if (not defined $self->args('marpa-library')) {
-        # ... perform the default build.
-        $self->do_libmarpa();
-    }
+    $self->do_libmarpa();
 
     return $self->SUPER::ACTION_code;
 } ## end sub ACTION_code
@@ -791,9 +785,6 @@ sub ACTION_clean {
 
 sub ACTION_test {
     my $self = shift;
-    if (defined $self->args('marpa-library')) {
-        die q{"marpa-library" option not allowed with "test" target};
-    }
     local $ENV{PERL_DL_NONLAZY} = 1;
     return $self->SUPER::ACTION_test;
 }
diff --git a/cpan/libmarpa/dev/internal.texi b/cpan/libmarpa/dev/internal.texi
index c1358ba..9781a2b 100644
--- a/cpan/libmarpa/dev/internal.texi
+++ b/cpan/libmarpa/dev/internal.texi
@@ -549,6 +549,16 @@ Return the is-predecessor bit for @var{nook_id}.
 @node Debugging methods,  , Valuator internals, Internal Interface
 @section Debugging methods
 
+ at deftypefun const char* _marpa_tag(void)
+Returns a ``tag'' value.
+This is to allow tagging the libraries with an
+completely arbitrary string identifier.
+independent even of the versioning mechanism.
+This allows debugging, for example,
+to determine which of two otherwise exactly
+identical libraries is in use.
+ at end deftypefun
+
 @deftypefun int marpa_debug_level_set ( int @var{level} )
 @end deftypefun
 
diff --git a/cpan/libmarpa/dev/marpa.w b/cpan/libmarpa/dev/marpa.w
index 587132e..3f2f722 100644
--- a/cpan/libmarpa/dev/marpa.w
+++ b/cpan/libmarpa/dev/marpa.w
@@ -660,6 +660,17 @@ Marpa_Error_Code marpa_c_error(Marpa_Config* config, const char** p_error_string
     return error_code;
 }
 
+const char* _marpa_tag(void)
+{
+#if defined(MARPA_TAG)
+  return MARPA_TAG;
+#elif defined(__GNUC__)
+  return __DATE__ " " __TIME__;
+#else
+  return "[no tag]";
+#endif
+}
+
 @** Grammar (GRAMMAR) code.
 @<Public incomplete structures@> =
 struct marpa_g;
diff --git a/cpan/t/00-load.t b/cpan/t/00-load.t
index bfbe884..8af102a 100644
--- a/cpan/t/00-load.t
+++ b/cpan/t/00-load.t
@@ -49,6 +49,7 @@ Test::More::ok( $libmarpa_version_ok, $libmarpa_version_desc );
 Test::More::diag($marpa_string_version_desc);
 Test::More::diag('Libmarpa: ' . $Marpa::R2::LIBMARPA_FILE);
 Test::More::diag($libmarpa_version_desc);
+Test::More::diag('Libmarpa tag: ' . Marpa::R2::Thin::tag());
 
 my $grammar;
 my $eval_ok = eval { $grammar = Marpa::R2::Thin::G->new( { if => 1 } ); 1 };
diff --git a/cpan/xs/R2.xs b/cpan/xs/R2.xs
index ebdb905..551777c 100644
--- a/cpan/xs/R2.xs
+++ b/cpan/xs/R2.xs
@@ -2441,6 +2441,14 @@ PPCODE:
     XPUSHs (sv_2mortal (newSViv (version[2])));
 }
 
+void
+tag()
+PPCODE:
+{
+   const char* tag = _marpa_tag();
+   XSRETURN_PV(tag);
+}
+
 MODULE = Marpa::R2        PACKAGE = Marpa::R2::Thin::G
 
 void

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmarpa-r2-perl.git



More information about the Pkg-perl-cvs-commits mailing list