From: Yves Orton Date: Sun, 4 Jan 2009 22:55:58 +0000 (+0100) Subject: add better pod and headers, and clean up some whitespace issues in the previous patches X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=505afc734ed453559bc43362154a2694b59ece9e;p=p5sagit%2Fp5-mst-13.2.git add better pod and headers, and clean up some whitespace issues in the previous patches --- diff --git a/MANIFEST b/MANIFEST index 21770c9..579ad72 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3171,7 +3171,7 @@ makedir.SH Precursor to makedir Makefile.micro microperl Makefile Makefile.SH A script that generates Makefile make_patchnum.com DCL script to generate .patchnum file on VMS (should be replaced by make_patchnum.pl) -make_patchnum.pl Script to generate git_Version.h and lib/Config_git.pl files for all OS'es +make_patchnum.pl Script to generate git_version.h and lib/Config_git.pl files for all OS'es malloc.c A version of malloc you might not want malloc_ctl.h A version of malloc you might not want MANIFEST This list of files diff --git a/Makefile.SH b/Makefile.SH index 352e2ba..6d6ed31 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -541,7 +541,7 @@ sperl.i: perl.c $(h) .PHONY: all translators utilities make_patchnum make_patchnum: - $(LDLIBPTH) $(RUN) ./miniperl -Ilib make_patchnum.pl || $(MAKE) miniperl + $(LDLIBPTH) $(RUN) ./miniperl -Ilib make_patchnum.pl || $(MAKE) miniperl git_version.h: stock_git_version.h cp stock_git_version.h git_version.h diff --git a/configpm b/configpm index 17f02c5..1825b0d 100755 --- a/configpm +++ b/configpm @@ -548,11 +548,12 @@ foreach my $prefix (qw(libs libswanted)) { $heavy_txt .= "EOVIRTUAL\n"; $heavy_txt .= <<'ENDOFGIT'; -eval { +eval { # do not have hairy conniptions if this isnt available require 'Config_git.pl'; $Config_SH_expanded .= $Config::Git_Data; -}; + 1; +} or warn "Warning: failed to load Config_git.pl, something strange about this perl...\n"; ENDOFGIT $heavy_txt .= $fetch_string; diff --git a/make_patchnum.pl b/make_patchnum.pl index 95b8db6..ad2e0f2 100644 --- a/make_patchnum.pl +++ b/make_patchnum.pl @@ -13,18 +13,30 @@ make_patchnum.pl - make patchnum perl make_patchnum.pl +=head1 DESCRITPTION + This program creates the files holding the information about locally applied patches to the source code. The created -files are C<.patchnum>, C and C. +files are C and C. + +=item C + +Contains status information from git in a form meant to be processed +by the tied hash logic of Config.pm. It is actually optional, +although -V will look strange without it. -C<.patchnum> contains ??? +C contains similar information in a C header file +format, designed to be used by patchlevel.h. This file is obtained +from stock_git_version.h if miniperl is not available, and then +later on replaced by the version created by this script. -C contains the configuration of git for -this branch. +=head1 AUTHOR -C contains the local changes that haven't been -synchronized with the remote repository as configured with -C<< git configure branch..remote >> +Yves Orton, Kenichi Ishigaki, Max Maischein + +=head1 COPYRIGHT + +Same terms as Perl itself. =cut @@ -33,7 +45,7 @@ BEGIN { while (!-e "$root/perl.c" and length($root)<100) { if ($root eq '.') { $root=".."; - } else { + } else { $root.="/.."; } } @@ -76,12 +88,12 @@ sub write_files { my %content= map { /WARNING: '([^']+)'/ || die "Bad mojo!"; $1 => $_ } @_; my @files= sort keys %content; my $files= join " and ", map { "'$_'" } @files; - foreach my $file (@files) { + foreach my $file (@files) { if (read_file($file) ne $content{$file}) { print "Updating $files\n"; write_file($_,$content{$_}) for @files; return 1; - } + } } print "Reusing $files\n"; return 0; @@ -100,7 +112,7 @@ elsif (-d path_to('.git')) { ($branch) = map { /\* ([^(]\S*)/ ? $1 : () } backtick('git branch'); my ($remote,$merge); if (length $branch) { - $merge= backtick("git config branch.$branch.merge"); + $merge= backtick("git config branch.$branch.merge"); $merge =~ s!^refs/heads/!!; $remote= backtick("git config branch.$branch.remote"); } diff --git a/stock_git_version.h b/stock_git_version.h index e07962f..cf937de 100644 --- a/stock_git_version.h +++ b/stock_git_version.h @@ -1,6 +1,8 @@ /*************************************************************************** -* WARNING: git_version.h is automatically generated by make_patchnum.sh -* DO NOT EDIT DIRECTLY - edit make_patchnum.sh instead +This is: stock_git_config.h - temporary git_config.h file. +This file is used at the very start of the build process when we dont have +a miniperl available to make the real thing. It is copied in place during +the build process, and then later on replaced. ****************************************************************************/ #define PERL_PATCHNUM UNKOWN #define PERL_GIT_UNCOMMITTED_CHANGES ,"UNKNOWN"