From c68ea3c992c73e9433a1d9354c4c1559d0ffffde Mon Sep 17 00:00:00 2001 From: "Jerry D. Hedden" Date: Wed, 30 Jun 2010 11:15:50 -0400 Subject: [PATCH] Reorganize dist/threads Move threads.pm to lib/threads.pm and remove Makefile.PL --- MANIFEST | 3 +- dist/threads/Makefile.PL | 111 -------------------------------------- dist/threads/{ => lib}/threads.pm | 2 +- 3 files changed, 2 insertions(+), 114 deletions(-) delete mode 100755 dist/threads/Makefile.PL rename dist/threads/{ => lib}/threads.pm (99%) diff --git a/MANIFEST b/MANIFEST index a600a0a..4065960 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2866,7 +2866,7 @@ dist/Thread-Semaphore/t/04_nonblocking.t Thread::Semaphore tests dist/Thread-Semaphore/t/05_force.t Thread::Semaphore tests dist/threads/hints/hpux.pl Hint file for HPUX dist/threads/hints/linux.pl Hint file for Linux -dist/threads/Makefile.PL ithreads +dist/threads/lib/threads.pm ithreads dist/threads-shared/hints/linux.pl thread shared variables dist/threads-shared/Makefile.PL thread shared variables dist/threads-shared/shared.pm thread shared variables @@ -2897,7 +2897,6 @@ dist/threads/t/err.t Test $thr->error() dist/threads/t/exit.t Test exit and die in threads dist/threads/t/free2.t More ithread destruction tests dist/threads/t/free.t Test ithread destruction -dist/threads/threads.pm ithreads dist/threads/threads.xs ithreads dist/threads/t/join.t Testing the join function dist/threads/t/kill.t Tests thread signalling diff --git a/dist/threads/Makefile.PL b/dist/threads/Makefile.PL deleted file mode 100755 index cc70b65..0000000 --- a/dist/threads/Makefile.PL +++ /dev/null @@ -1,111 +0,0 @@ -# Module makefile for threads (using ExtUtils::MakeMaker) - -require 5.008; - -use strict; -use warnings; - -use ExtUtils::MakeMaker; - - -# Used to check for a 'C' compiler -sub check_cc -{ - require File::Spec; - - my $cmd = $_[0]; - if (-x $cmd or MM->maybe_command($cmd)) { - return (1); # CC command found - } - for my $dir (File::Spec->path(), '.') { - my $abs = File::Spec->catfile($dir, $cmd); - if (-x $abs or MM->maybe_command($abs)) { - return (1); # CC command found - } - } - return; -} - -sub have_cc -{ - eval { require Config_m; }; # ExtUtils::FakeConfig (+ ActivePerl) - if ($@) { - eval { require Config; }; # Everyone else - } - my @chunks = split(/ /, $Config::Config{cc}); - # $Config{cc} may contain args; try to find out the program part - while (@chunks) { - if (check_cc("@chunks")) { - return (1); # CC command found - } - pop(@chunks); - } - return; -} - - -# Build options for different environments -my @conditional_params; -if (not grep { $_ eq 'PERL_CORE=1' } @ARGV) { - # CPAN - - # Verify that a 'C' compiler is available - if (! have_cc()) { - die("OS unsupported: ERROR: No 'C' compiler found to build 'threads'\n"); - } - - push(@conditional_params, 'DEFINE' => '-DHAS_PPPORT_H', - 'PREREQ_PM' => { - 'strict' => 0, - 'warnings' => 0, - 'overload' => 0, - 'Config' => 0, - 'Carp' => 0, - 'XSLoader' => 0, - - 'Test::More' => 0, - 'ExtUtils::testlib' => 0, - 'Hash::Util' => 0, - 'IO::File' => 0, - }); -} - - -# Create Makefile -WriteMakefile( - 'NAME' => 'threads', - 'AUTHOR' => 'Artur Bergman, Jerry D. Hedden ', - 'VERSION_FROM' => 'threads.pm', - 'ABSTRACT_FROM' => 'threads.pm', - 'PM' => { - 'threads.pm' => '$(INST_LIBDIR)/threads.pm', - }, - 'INSTALLDIRS' => (($] < 5.011) ? 'perl' : 'site'), - - ((ExtUtils::MakeMaker->VERSION() lt '6.25') ? - ('PL_FILES' => { }) : ()), - ((ExtUtils::MakeMaker->VERSION() gt '6.30') ? - ('LICENSE' => 'perl') : ()), - - @conditional_params -); - -# Additional 'make' targets -sub MY::postamble -{ - return <<'_EXTRAS_'; -fixfiles: - @dos2unix `cat MANIFEST` - @$(CHMOD) 644 `cat MANIFEST` - @$(CHMOD) 755 examples/*.pl - -ppport: - @( cd /tmp; perl -e 'use Devel::PPPort; Devel::PPPort::WriteFile("ppport.h");' ) - @if ! cmp -s ppport.h /tmp/ppport.h; then \ - ( tkdiff ppport.h /tmp/ppport.h & ); \ - perl /tmp/ppport.h; \ - fi -_EXTRAS_ -} - -# EOF diff --git a/dist/threads/threads.pm b/dist/threads/lib/threads.pm similarity index 99% rename from dist/threads/threads.pm rename to dist/threads/lib/threads.pm index c88c917..8654f9f 100644 --- a/dist/threads/threads.pm +++ b/dist/threads/lib/threads.pm @@ -5,7 +5,7 @@ use 5.008; use strict; use warnings; -our $VERSION = '1.77_02'; +our $VERSION = '1.77_03'; my $XS_VERSION = $VERSION; $VERSION = eval $VERSION; -- 2.7.4