From c99dcdbfef0f4993df7f1b17f90ec2d9b360d5ee Mon Sep 17 00:00:00 2001 From: Reini Urban Date: Mon, 24 Oct 2011 15:21:30 -0500 Subject: [PATCH] treat .git as .svn (author, bla...) --- ByteLoader/Makefile.PL | 4 ++-- Changes | 4 +++- MANIFEST | 1 - Makefile.PL | 7 ++++--- README | 14 +++++++------- README.alpha | 1 - perloptree.pod | 5 ++++- t/bytecode.t | 2 +- t/c_o2.t | 4 ++-- t/c_o3.t | 4 ++-- t/c_o4.t | 4 ++-- t/cc_o1.t | 4 ++-- t/cc_o2.t | 4 ++-- t/modules.pm | 2 +- t/modules.t | 7 +++++++ t/test.pl | 2 +- 16 files changed, 40 insertions(+), 29 deletions(-) diff --git a/ByteLoader/Makefile.PL b/ByteLoader/Makefile.PL index f34c8c9fd..92141135e 100755 --- a/ByteLoader/Makefile.PL +++ b/ByteLoader/Makefile.PL @@ -4,8 +4,8 @@ my $core = grep { $_ eq 'PERL_CORE=1' } @ARGV; my $ccflags = $Config{ccflags}; my $lddlflags = $Config{lddlflags}; -if ( -d ".svn" ) { - $ccflags .= " -ansi -Wall -Wextra" if $Config{cc} =~ /gcc/; +if ( -d '.svn' or -d '.git' ) { + $ccflags .= ' -ansi -Wall -Wextra' if $Config{cc} =~ /gcc/; } if ($] < 5.007) { # We are not called by ../Makefile.PL, but be sure about that for now. diff --git a/Changes b/Changes index 539f974e3..505192d32 100755 --- a/Changes +++ b/Changes @@ -4,12 +4,14 @@ and worked quite fine with Perl 5.6 and 5.8 1.37 2011-xx-xx rurban - Save %main:: stashes + Save %main:: stashes. Switched to git, added github mirror * C: issue79: save stashes also, but only directly under %main:: and values which are also stashes to avoid a second walker besides savecv, and thus unneeded territory; B::STASHGV (46) New -fno-stash with -O2 to omit stashes, which are rarely needed * CC (1.12) allow overriding of -f B::C flags + * META.yml: remove from MANIFEST and repo, let make dist + autogenerate it * t/TESTS: changed test 46 (Exporter:: and other stashes in %main:: stash) to cover issue 79. use Exporter; print q(ok) if %main::Exporter:: diff --git a/MANIFEST b/MANIFEST index d79fba20c..8d9aeb69c 100755 --- a/MANIFEST +++ b/MANIFEST @@ -37,7 +37,6 @@ C.xs Changes Copying MANIFEST -META.yml Makefile.PL NOTES README diff --git a/Makefile.PL b/Makefile.PL index 096b5ae0f..2762cd5e9 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -100,7 +100,8 @@ sub headerpath { } # Check for Doug Lea's dlmalloc version, or ptmalloc2 included in glibc -# or an extra ptmalloc3. +# or the best: ptmalloc3 with independent_comalloc(). +# http://www.malloc.de/malloc/ptmalloc3-current.tar.gz # This improves -fav-init startup speed dramatically (18% tested). # ptmalloc3 needs #include , but we don't want to clash # with an existing malloc.h from perl.h, so we declare it by ourselves. @@ -165,7 +166,7 @@ package MY; sub libscan { # Ignore temp testing files - return 0 if $_[1] =~ /^(.svn|jit.*|i386|.*\.orig|bytecode.*\.pl|c?ccode.*|regen_lib\.pl)$/; + return 0 if $_[1] =~ /^(\.git|\.svn|jit.*|i386|.*\.orig|bytecode.*\.pl|c?ccode.*|regen_lib\.pl)$/; return 0 if $_[1] =~ /\.svn|~/; # needed for msys perl5.6 # Ignore Bytecode on 5.6 for now. The 5.6 CORE module produces better code (until fixed :) # Not even the Byteloader works for 5.6 assembled code. The Disassembler does not stop at ret. @@ -195,7 +196,7 @@ sub ccflags { my $ccflags = shift->SUPER::ccflags(@_); $ccflags .= " -DHAVE_INDEPENDENT_COMALLOC" if $have_independent_comalloc; $ccflags .= $extra_cflags if $extra_cflags; - return $ccflags unless -d ".svn"; + return $ccflags unless -d ".svn" or -d ".git"; # Recommended by http://www.network-theory.co.uk/docs/gccintro/gccintro_32.html # -ansi -pedantic -Wall -W -Wconversion -Wshadow -Wcast-qual -Wwrite-strings (-W => -WExtra) $ccflags .= " -ansi -pedantic -Wall -Wextra -Wconversion -Wshadow -Wcast-qual -Wwrite-strings" diff --git a/README b/README index c647ad9f2..bffa9e374 100644 --- a/README +++ b/README @@ -6,6 +6,8 @@ Homepage: http://www.perl-compiler.org/ Releases: http://search.cpan.org/dist/B-C/ Code: http://code.google.com/p/perl-compiler/ + git clone https://code.google.com/p/perl-compiler/ +was previously: svn checkout http://perl-compiler.googlecode.com/svn/trunk/ perl-compiler INSTALL @@ -94,13 +96,11 @@ fail in mysterious ways and give wrong answers rather than just crash in boring ways. CC is still on the experimental level. Please use your test suite. -If your program uses classes which define methods (or other -subs which are not exported and not apparently used until -runtime) then you'll need to use -u compile-time options -(see the NOTES file) to force the subs to be -compiled. Future releases will probably default the other -way, do more auto-detection and provide more fine-grained -control. +If your program uses classes which define methods (or other subs which +are not exported and not apparently used until runtime) then you'll +need to use -u compile-time options (see the NOTES file) to force the +subs to be compiled. Future releases will probably default the other +way, do more auto-detection and provide more fine-grained control. Since compiled executables need linking with libperl, you may want to turn libperl.a into a shared library if your diff --git a/README.alpha b/README.alpha index d9e0e69ad..d44f97756 100644 --- a/README.alpha +++ b/README.alpha @@ -26,7 +26,6 @@ Releases are at http://search.cpan.org/dist/B-C/ Code is now at http://code.google.com/p/perl-compiler/ - svn checkout http://perl-compiler.googlecode.com/svn/trunk/ perl-compiler-read-only CHANGES diff --git a/perloptree.pod b/perloptree.pod index 6d180c834..bc239f798 100644 --- a/perloptree.pod +++ b/perloptree.pod @@ -1370,6 +1370,9 @@ is working on L. The best source of information is the source. It is very well documented. +There are some pod files from talks and workshops in F. +From YAPC EU 2010 there is a good screencast at L. + Simon Cozens has posted the course material to NetThink's L training course. This is the currently best available description on @@ -1392,7 +1395,7 @@ pdf L This text was created in this wiki article: L -The svn version should be more actual. +The with B::C released version should be more actual. =head1 Conclusion diff --git a/t/bytecode.t b/t/bytecode.t index f9f51baf4..5921de2f6 100755 --- a/t/bytecode.t +++ b/t/bytecode.t @@ -34,7 +34,7 @@ my $PERL56 = ( $] < 5.008001 ); my $DEBUGGING = ($Config{ccflags} =~ m/-DDEBUGGING/); my $ITHREADS = $Config{useithreads}; my $MULTI = $Config{usemultiplicity}; -my $AUTHOR = -d ".svn"; +my $AUTHOR = -d '.svn' or -d '.git'; my @tests = tests(); my $numtests = $#tests+1; diff --git a/t/c_o2.t b/t/c_o2.t index 17707389c..e169d1202 100644 --- a/t/c_o2.t +++ b/t/c_o2.t @@ -1,8 +1,8 @@ #! /usr/bin/env perl # better use testc.sh -O2 for debugging BEGIN { - #unless (-d ".svn") { - # print "1..0 #SKIP Only if -d .svn\n"; + #unless (-d ".svn" or -d '.git') { + # print "1..0 #SKIP Only if -d .svn|.git\n"; # exit; #} if ($ENV{PERL_CORE}){ diff --git a/t/c_o3.t b/t/c_o3.t index a73b8739b..77b907e7b 100755 --- a/t/c_o3.t +++ b/t/c_o3.t @@ -1,8 +1,8 @@ #! /usr/bin/env perl # better use testc.sh -O3 for debugging BEGIN { - unless (-d ".svn") { - print "1..0 #SKIP Only if -d .svn\n"; + unless (-d ".svn" or -d '.git') { + print "1..0 #SKIP Only if -d .svn|.git\n"; exit; } if ($ENV{PERL_CORE}){ diff --git a/t/c_o4.t b/t/c_o4.t index 523c04861..c260d8985 100755 --- a/t/c_o4.t +++ b/t/c_o4.t @@ -1,8 +1,8 @@ #! /usr/bin/env perl # better use testc.sh -O4 for debugging BEGIN { - unless (-d ".svn") { - print "1..0 #SKIP Only if -d .svn\n"; + unless (-d ".svn" or -d '.git') { + print "1..0 #SKIP Only if -d .svn|.git\n"; exit; } if ($ENV{PERL_CORE}){ diff --git a/t/cc_o1.t b/t/cc_o1.t index f3659fa4f..d14fbeff4 100644 --- a/t/cc_o1.t +++ b/t/cc_o1.t @@ -1,8 +1,8 @@ #! /usr/bin/env perl # better use testcc.sh -O1 for debugging BEGIN { - unless (-d ".svn") { - print "1..0 #SKIP Only if -d .svn\n"; + unless (-d ".svn" or -d '.git') { + print "1..0 #SKIP Only if -d .svn|.git\n"; exit; } if ($ENV{PERL_CORE}){ diff --git a/t/cc_o2.t b/t/cc_o2.t index 3f294cda5..74d27b689 100644 --- a/t/cc_o2.t +++ b/t/cc_o2.t @@ -1,8 +1,8 @@ #! /usr/bin/env perl # better use testcc.sh -O2 for debugging BEGIN { - unless (-d ".svn") { - print "1..0 #SKIP Only if -d .svn\n"; + unless (-d ".svn" or -d '.git') { + print "1..0 #SKIP Only if -d .svn|.git\n"; exit; } if ($ENV{PERL_CORE}){ diff --git a/t/modules.pm b/t/modules.pm index 83e1d6df8..e05e667d0 100644 --- a/t/modules.pm +++ b/t/modules.pm @@ -84,7 +84,7 @@ sub log_err { sub is_subset { return 0 if grep /^-no-subset$/, @ARGV; - return ! -d '.svn' || grep /^-subset$/, @ARGV; + return ! (-d '.svn' or -d'.git') || grep /^-subset$/, @ARGV; } sub get_module_list { diff --git a/t/modules.t b/t/modules.t index dd25823cd..90f8ced6f 100644 --- a/t/modules.t +++ b/t/modules.t @@ -110,6 +110,13 @@ unless (is_subset) { my $svnstat = `svn status lib/B/C.pm t/test.pl t/*.t`; chomp $svnstat; $svnrev .= " M" if $svnstat; + } elsif (-d '.git') { + local $ENV{LC_MESSAGES} = "C"; + $svnrev = `git log -1 --pretty=format:"%h %ad | %s" --date=short`; + chomp $svnrev; + my $gitdiff = `git diff lib/B/C.pm t/test.pl t/*.t`; + chomp $gitdiff; + $svnrev .= " M" if $gitdiff; } log_diag("B::C::VERSION = $B::C::VERSION $svnrev"); log_diag("perlversion = $perlversion"); diff --git a/t/test.pl b/t/test.pl index 3a1c31a1b..cd01d570f 100755 --- a/t/test.pl +++ b/t/test.pl @@ -544,7 +544,7 @@ sub run_c_tests { my @skip = @{$_[2]}; use Config; - my $AUTHOR = -d ".svn"; + my $AUTHOR = -d ".svn" or -d ".git"; my $keep_c = 0; # set it to keep the pl, c and exe files my $keep_c_fail = 1; # keep on failures