summaryrefslogtreecommitdiff
path: root/make_patchnum.pl
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2009-01-04 23:55:58 +0100
committerYves Orton <demerphq@gmail.com>2009-01-04 23:55:58 +0100
commit505afc734ed453559bc43362154a2694b59ece9e (patch)
tree96e4893486f45054f564f92f10e64c9dbb726d1b /make_patchnum.pl
parenteb5c076f82ef750418ce94e05feaaccc9df9696e (diff)
downloadperl-505afc734ed453559bc43362154a2694b59ece9e.tar.gz
add better pod and headers, and clean up some whitespace issues in the previous patches
Diffstat (limited to 'make_patchnum.pl')
-rw-r--r--make_patchnum.pl34
1 files changed, 23 insertions, 11 deletions
diff --git a/make_patchnum.pl b/make_patchnum.pl
index 95b8db6137..ad2e0f2f40 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<unpushed.h> and C<lib/Config_git.pl>.
+files are C<git_version.h> and C<lib/Config_git.pl>.
+
+=item C<lib/Config_git.pl>
+
+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<git_version.h> 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<lib/Config_git.pl> contains the configuration of git for
-this branch.
+=head1 AUTHOR
-C<unpushed.h> contains the local changes that haven't been
-synchronized with the remote repository as configured with
-C<< git configure branch.<current 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");
}