Author: jrieks
Date: Thu Apr 14 03:43:05 2005
New Revision: 7829
Modified:
trunk/config/gen/makefiles/root.in
trunk/config/gen/revision.pl
trunk/imcc/main.c
trunk/lib/Parrot/Revision.pm
Log:
fixed #34974: .svn/entries missing in snapshot
Modified: trunk/config/gen/makefiles/root.in
==============================================================================
--- trunk/config/gen/makefiles/root.in (original)
+++ trunk/config/gen/makefiles/root.in Thu Apr 14 03:43:05 2005
@@ -58,6 +58,9 @@
# source directory
SRC_DIR = src
+# revision control
+#CONDITIONED_LINE(SVN_ENTRIES):SVN_ENTRIES=${SVN_ENTRIES}
+#INVERSE_CONDITIONED_LINE(SVN_ENTRIES):SVN_ENTRIES=
###############################################################################
#
@@ -714,7 +717,7 @@
$(SRC_DIR)/parrot_config.h : $(BUILD_TOOLS_DIR)/parrot_config_c.pl
config_lib.pasm
$(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl >
$(SRC_DIR)/parrot_config.h
-$(SRC_DIR)/revision.c : .svn/entries $(BUILD_TOOLS_DIR)/revision_c.pl
$(SRC_DIR)/parrot_config.h
+$(SRC_DIR)/revision.c : $(SVN_ENTRIES) $(BUILD_TOOLS_DIR)/revision_c.pl
$(SRC_DIR)/parrot_config.h
$(PERL) -Ilib $(BUILD_TOOLS_DIR)/revision_c.pl > $(SRC_DIR)/revision.c
###############################################################################
Modified: trunk/config/gen/revision.pl
==============================================================================
--- trunk/config/gen/revision.pl (original)
+++ trunk/config/gen/revision.pl Thu Apr 14 03:43:05 2005
@@ -21,11 +21,18 @@
sub runstep {
my $revision = $Parrot::Revision::current;
+ my $entries = $Parrot::Revision::svn_entries;
Configure::Data->set(
revision => $revision,
+ SVN_ENTRIES => $entries
);
- $Configure::Step::result = "r$revision";
+
+ if ($revision >= 1) {
+ $Configure::Step::result = "r$revision";
+ } else {
+ $Configure::Step::result = "failed";
+ }
}
1;
Modified: trunk/imcc/main.c
==============================================================================
--- trunk/imcc/main.c (original)
+++ trunk/imcc/main.c Thu Apr 14 03:43:05 2005
@@ -96,14 +96,16 @@
imcc_version(void)
{
int rev = PARROT_REVISION;
- printf("This is parrot version " PARROT_VERSION " (r%d) built for "
- PARROT_ARCHNAME ".\n", rev);
+ printf("This is parrot version " PARROT_VERSION);
+ if (rev != 0)
+ printf(" (r%d)", rev);
+ printf(" built for " PARROT_ARCHNAME ".\n");
rev = Parrot_revision();
- if( PARROT_REVISION != rev ) {
+ if (PARROT_REVISION != rev) {
printf( "Warning: runtime has revision %d!\n", rev );
}
rev = Parrot_config_revision();
- if( PARROT_REVISION != rev ) {
+ if (PARROT_REVISION != rev) {
printf( "Warning: used Configure.pl revision %d!\n", rev );
}
printf("Copyright (C) 2001-2005 The Perl Foundation. All Rights
Reserved.\n\
Modified: trunk/lib/Parrot/Revision.pm
==============================================================================
--- trunk/lib/Parrot/Revision.pm (original)
+++ trunk/lib/Parrot/Revision.pm Thu Apr 14 03:43:05 2005
@@ -21,10 +21,18 @@
package Parrot::Revision;
use strict;
+our $svn_entries = undef;
+
sub __get_revision {
+ foreach my $entry ( qw[.svn/entries .svk/entries] ) {
+ if (-e $entry) {
+ $svn_entries = $entry;
+ last;
+ }
+ }
+ return 0 unless defined $svn_entries;
+
# code taken from pugs/util/version_h.pl rev 859
- my $svn_entries = ".svn/entries";
-
if (-r $svn_entries) {
open FH, $svn_entries or die $!;
while (<FH>) {