develooper Front page | perl.perl5.porters | Postings from January 2009

Re: Minimal Perl git repostory

Thread Previous | Thread Next
From:
Jerry D. Hedden
Date:
January 7, 2009 14:02
Subject:
Re: Minimal Perl git repostory
Message ID:
1ff86f510901071401s11152846xb362f2c41a2876e4@mail.gmail.com
On Wed, Jan 7, 2009 at 4:17 PM, Jerry D. Hedden <jdhedden@cpan.org> wrote:
> demerphq wrote:
>> git pull # whatever, update git.
>> perl make_patchnum.pl
>> git archive --format=zip HEAD > $zips/perl.zip
>> zip $zips/perl.zip lib/Config_git.pl git_version.h
>>
>> and $zips/perl.zip will contain a minimal archive that is buildable
>> with full details. If for some reason git_version.h is overwritten by
>> stock_git_version.h you can touch them before running make to ensure
>> they are more recent than perl.c. This is done using the zip format
>> becuase its easy to add files to it, I tried something similar with
>> tar -A and it didnt work. YMMV.
>
> This does not work.  Makefile does not respect git_version.h
> and lib/Config_git.pl.  They are overwritten regardless of
> their timestamps.

I used the following patch to get this to work:

--- perl-current/make_patchnum.pl
+++ perl-current/make_patchnum.pl
@@ -99,6 +99,9 @@
     return 0;
 }

+# Don't overwrite existing files
+exit(0) if (-f 'git_version.h' && -f 'lib/Config_git.pl');
+
 my $unpushed_commits = '/*no-op*/';
 my ($read, $branch, $snapshot_created, $commit_id, $describe)= ("") x 5;
 my ($changed, $extra_info, $commit_title, $new_patchnum, $status)= ("") x 5;

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About