This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Simplify ext/SDBM_File layout and build
authorEd J <etj@cpan.org>
Mon, 29 Dec 2014 11:59:40 +0000 (11:59 +0000)
committerTony Cook <tony@develop-help.com>
Tue, 13 Jan 2015 05:29:36 +0000 (16:29 +1100)
Tony: fix MANIFEST

29 files changed:
MANIFEST
ext/SDBM_File/.gitignore [new file with mode: 0644]
ext/SDBM_File/CHANGES [moved from ext/SDBM_File/sdbm/CHANGES with 100% similarity]
ext/SDBM_File/COMPARE [moved from ext/SDBM_File/sdbm/COMPARE with 100% similarity]
ext/SDBM_File/Makefile.PL
ext/SDBM_File/README [moved from ext/SDBM_File/sdbm/README with 100% similarity]
ext/SDBM_File/README.too [moved from ext/SDBM_File/sdbm/README.too with 100% similarity]
ext/SDBM_File/SDBM_File.pm
ext/SDBM_File/SDBM_File.xs
ext/SDBM_File/biblio [moved from ext/SDBM_File/sdbm/biblio with 100% similarity]
ext/SDBM_File/dba.c [moved from ext/SDBM_File/sdbm/dba.c with 100% similarity]
ext/SDBM_File/dbd.c [moved from ext/SDBM_File/sdbm/dbd.c with 100% similarity]
ext/SDBM_File/dbe.1 [moved from ext/SDBM_File/sdbm/dbe.1 with 100% similarity]
ext/SDBM_File/dbe.c [moved from ext/SDBM_File/sdbm/dbe.c with 100% similarity]
ext/SDBM_File/dbu.c [moved from ext/SDBM_File/sdbm/dbu.c with 100% similarity]
ext/SDBM_File/grind [moved from ext/SDBM_File/sdbm/grind with 100% similarity]
ext/SDBM_File/hash.c [moved from ext/SDBM_File/sdbm/hash.c with 100% similarity]
ext/SDBM_File/linux.patches [moved from ext/SDBM_File/sdbm/linux.patches with 100% similarity]
ext/SDBM_File/makefile.sdbm [moved from ext/SDBM_File/sdbm/makefile.sdbm with 100% similarity]
ext/SDBM_File/pair.c [moved from ext/SDBM_File/sdbm/pair.c with 100% similarity]
ext/SDBM_File/pair.h [moved from ext/SDBM_File/sdbm/pair.h with 100% similarity]
ext/SDBM_File/readme.ms [moved from ext/SDBM_File/sdbm/readme.ms with 100% similarity]
ext/SDBM_File/sdbm.3 [moved from ext/SDBM_File/sdbm/sdbm.3 with 100% similarity]
ext/SDBM_File/sdbm.c [moved from ext/SDBM_File/sdbm/sdbm.c with 100% similarity]
ext/SDBM_File/sdbm.h [moved from ext/SDBM_File/sdbm/sdbm.h with 100% similarity]
ext/SDBM_File/sdbm/.gitignore [deleted file]
ext/SDBM_File/sdbm/Makefile.PL [deleted file]
ext/SDBM_File/tune.h [moved from ext/SDBM_File/sdbm/tune.h with 100% similarity]
ext/SDBM_File/util.c [moved from ext/SDBM_File/sdbm/util.c with 100% similarity]

index 6502631..fbca8eb 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -3857,36 +3857,35 @@ ext/re/t/re_funcs_u.t           See if exportable 're' funcs in universal.c work
 ext/re/t/regop.pl              generate debug output for various patterns
 ext/re/t/regop.t               test RE optimizations by scraping debug output
 ext/re/t/re.t                  see if re pragma works
+ext/SDBM_File/biblio   SDBM kit
+ext/SDBM_File/CHANGES  SDBM kit
+ext/SDBM_File/COMPARE  SDBM kit
+ext/SDBM_File/dba.c    SDBM kit
+ext/SDBM_File/dbd.c    SDBM kit
+ext/SDBM_File/dbe.1    SDBM kit
+ext/SDBM_File/dbe.c    SDBM kit
+ext/SDBM_File/dbu.c    SDBM kit
+ext/SDBM_File/grind    SDBM kit
+ext/SDBM_File/hash.c   SDBM kit
+ext/SDBM_File/linux.patches    SDBM kit
 ext/SDBM_File/Makefile.PL      SDBM extension makefile writer
-ext/SDBM_File/sdbm/biblio      SDBM kit
-ext/SDBM_File/sdbm/CHANGES     SDBM kit
-ext/SDBM_File/sdbm/COMPARE     SDBM kit
-ext/SDBM_File/sdbm/dba.c       SDBM kit
-ext/SDBM_File/sdbm/dbd.c       SDBM kit
-ext/SDBM_File/sdbm/dbe.1       SDBM kit
-ext/SDBM_File/sdbm/dbe.c       SDBM kit
-ext/SDBM_File/sdbm/dbu.c       SDBM kit
+ext/SDBM_File/makefile.sdbm    SDBM kit
+ext/SDBM_File/pair.c   SDBM kit
+ext/SDBM_File/pair.h   SDBM kit
+ext/SDBM_File/README   SDBM kit
+ext/SDBM_File/readme.ms        SDBM kit
+ext/SDBM_File/README.too       SDBM kit
+ext/SDBM_File/sdbm.3   SDBM kit
+ext/SDBM_File/sdbm.c   SDBM kit
 ext/SDBM_File/SDBM_File.pm     SDBM extension Perl module
 ext/SDBM_File/SDBM_File.xs     SDBM extension external subroutines
-ext/SDBM_File/sdbm/grind       SDBM kit
-ext/SDBM_File/sdbm/hash.c      SDBM kit
-ext/SDBM_File/sdbm/linux.patches       SDBM kit
-ext/SDBM_File/sdbm/Makefile.PL SDBM kit
-ext/SDBM_File/sdbm/makefile.sdbm       SDBM kit
-ext/SDBM_File/sdbm/pair.c      SDBM kit
-ext/SDBM_File/sdbm/pair.h      SDBM kit
-ext/SDBM_File/sdbm/README      SDBM kit
-ext/SDBM_File/sdbm/readme.ms   SDBM kit
-ext/SDBM_File/sdbm/README.too  SDBM kit
-ext/SDBM_File/sdbm/sdbm.3      SDBM kit
-ext/SDBM_File/sdbm/sdbm.c      SDBM kit
-ext/SDBM_File/sdbm/sdbm.h      SDBM kit
-ext/SDBM_File/sdbm/tune.h      SDBM kit
-ext/SDBM_File/sdbm/util.c      SDBM kit
+ext/SDBM_File/sdbm.h   SDBM kit
 ext/SDBM_File/t/constants.t    See if SDBM_File constants work
 ext/SDBM_File/t/prep.t         See if SDBM_File with extra argument works
 ext/SDBM_File/t/sdbm.t         See if SDBM_File works
+ext/SDBM_File/tune.h   SDBM kit
 ext/SDBM_File/typemap          SDBM extension interface types
+ext/SDBM_File/util.c   SDBM kit
 ext/Sys-Hostname/Hostname.pm   Sys::Hostname extension Perl module
 ext/Sys-Hostname/Hostname.xs   Sys::Hostname extension external subroutines
 ext/Sys-Hostname/t/Hostname.t  See if Sys::Hostname works
diff --git a/ext/SDBM_File/.gitignore b/ext/SDBM_File/.gitignore
new file mode 100644 (file)
index 0000000..acccbd0
--- /dev/null
@@ -0,0 +1,2 @@
+!*.c
+SDBM_File.c
index 676708c..02f28c4 100644 (file)
@@ -1,66 +1,17 @@
+use strict; use warnings;
 use ExtUtils::MakeMaker;
-use Config;
 
-# The existence of the ./sdbm/Makefile.PL file causes MakeMaker
-# to automatically include Makefile code for the targets
-#      config, all, clean, realclean and sdbm/Makefile
-# which perform the corresponding actions in the subdirectory.
-
-# Work around: Darwin ppc64 bug ignores archive contents when building bundles
-
-$define = ($^O eq 'MSWin32') ? '-DMSDOS' : '';
-if ($^O eq 'MSWin32') { $myextlib = 'sdbm\\libsdbm$(LIB_EXT)'; }
-elsif ($^O eq 'darwin' && $Config{'ldflags'} =~/-arch ppc64/) {
-                        $myextlib = '-all_load sdbm/libsdbm$(LIB_EXT)'; }
-else                  { $myextlib = 'sdbm/libsdbm$(LIB_EXT)';  }
+my $define = '-DSDBM -DDUFF';
+# no -DMSDOS because MSDOS and WIN32 treated same in code
+$define .= ' -DWIN32 -DPERL_STATIC_SYMS' if $^O eq 'MSWin32';
 
 WriteMakefile(
-              NAME     => 'SDBM_File',
-              MYEXTLIB => $myextlib,
-              XSPROTOARG => '-noprototypes',           # XXX remove later?
-              VERSION_FROM => 'SDBM_File.pm',
-              DEFINE => $define,
-             );
-
-# We don't want the default subdir rule, as it creates a race condition with the
-# rule we add below.
-sub MY::subdir_x {
-    return '';
-}
-
-sub MY::postamble {
-  if ($^O =~ /MSWin32/ && !defined($ENV{SYSTEMROOT})) {
-       if ($Config{'make'} =~ /dmake/i) {
-           # dmake-specific
-           return <<'EOT';
-$(MYEXTLIB): sdbm/Makefile
-@[
-       cd sdbm
-       $(MAKE) all
-       cd ..
-]
-EOT
-       } elsif ($Config{'make'} =~ /nmake/i) {
-           #
-           return <<'EOT';
-$(MYEXTLIB): sdbm/Makefile
-       cd sdbm
-       $(MAKE) all
-       cd ..
-EOT
-       } 
-} elsif ($^O ne 'VMS') {
-    '
-$(MYEXTLIB): sdbm/Makefile
-       cd sdbm && $(MAKE) all
-';
-  }
-  else {
-    '   
-$(MYEXTLIB) : [.sdbm]descrip.mms
-       set def [.sdbm]
-    $(MMS) all
-    set def [-]
-';  
-  }
-}
+    NAME      => 'SDBM_File',
+    VERSION_FROM => 'SDBM_File.pm',
+    DEFINE    => $define,
+    INC       => '-I$(PERL_INC)', # force PERL_INC dir ahead of system -I's
+    OBJECT    => '$(O_FILES)',
+    clean     => {'FILES' => 'dbu dbd dba dbe x-dbu *.dir *.pag'},
+    H         => [qw(tune.h sdbm.h pair.h $(PERL_INC)/config.h)],
+    C         => [qw(SDBM_File.c sdbm.c pair.c hash.c)],
+);
index f1f85f5..707a9f8 100644 (file)
@@ -7,7 +7,7 @@ require Tie::Hash;
 require XSLoader;
 
 our @ISA = qw(Tie::Hash);
-our $VERSION = "1.12";
+our $VERSION = "1.13";
 
 our @EXPORT_OK = qw(PAGFEXT DIRFEXT PAIRMAX);
 use Exporter "import";
index bb994f7..434784a 100644 (file)
@@ -2,7 +2,7 @@
 #include "EXTERN.h"
 #include "perl.h"
 #include "XSUB.h"
-#include "sdbm/sdbm.h"
+#include "sdbm.h"
 
 #define fetch_key 0
 #define store_key 1
similarity index 100%
rename from ext/SDBM_File/sdbm/dba.c
rename to ext/SDBM_File/dba.c
similarity index 100%
rename from ext/SDBM_File/sdbm/dbd.c
rename to ext/SDBM_File/dbd.c
similarity index 100%
rename from ext/SDBM_File/sdbm/dbe.1
rename to ext/SDBM_File/dbe.1
similarity index 100%
rename from ext/SDBM_File/sdbm/dbe.c
rename to ext/SDBM_File/dbe.c
similarity index 100%
rename from ext/SDBM_File/sdbm/dbu.c
rename to ext/SDBM_File/dbu.c
similarity index 100%
rename from ext/SDBM_File/sdbm/grind
rename to ext/SDBM_File/grind
diff --git a/ext/SDBM_File/sdbm/.gitignore b/ext/SDBM_File/sdbm/.gitignore
deleted file mode 100644 (file)
index 289833e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-!*.c
-*.a
diff --git a/ext/SDBM_File/sdbm/Makefile.PL b/ext/SDBM_File/sdbm/Makefile.PL
deleted file mode 100644 (file)
index c02c75b..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-use ExtUtils::MakeMaker;
-
-my $define = '-DSDBM -DDUFF';
-$define .= ' -DWIN32 -DPERL_STATIC_SYMS' if ($^O eq 'MSWin32');
-
-WriteMakefile(
-    NAME      => 'sdbm', # (doesn't matter what the name is here) oh yes it does
-#    LINKTYPE  => 'static',
-    DEFINE    => $define,
-    INC       => '-I$(PERL_INC)', # force PERL_INC dir ahead of system -I's
-    SKIP      => [qw(dynamic dynamic_lib dlsyms)],
-    OBJECT    => '$(O_FILES)',
-    clean     => {'FILES' => 'dbu libsdbm.a dbd dba dbe x-dbu *.dir *.pag'},
-    H         => [qw(tune.h sdbm.h pair.h $(PERL_INC)/config.h)],
-    C         => [qw(sdbm.c pair.c hash.c)]
-);
-
-sub MY::constants {
-    package MY;
-    my $self = shift;
-
-    $self->{INST_STATIC} = 'libsdbm$(LIB_EXT)';
-
-    return $self->SUPER::constants();
-}
-
-sub MY::top_targets {
-    my $r = '
-all :: static
-       $(NOECHO) $(NOOP)
-
-config ::
-       $(NOECHO) $(NOOP)
-
-lint:
-       lint -abchx $(LIBSRCS)
-
-';
-    $r .= '
-# This is a workaround, the problem is that our old GNU make exports
-# variables into the environment so $(MYEXTLIB) is set in here to this
-# value which can not be built.
-sdbm/libsdbm.a:
-       $(NOECHO) $(NOOP)
-' unless $^O eq 'VMS';
-
-    return $r;
-}