[rtems commit] preinstall: Regenerated files differ from the repo.

Chris Johns chrisj at rtems.org
Fri Aug 29 01:45:59 UTC 2014


On 29/08/2014 12:30 am, Hesham Moustafa wrote:
> On Thu, Aug 28, 2014 at 4:25 PM, Joel Sherrill
> <joel.sherrill at oarcorp.com> wrote:
>>
>> On 8/28/2014 9:20 AM, Hesham Moustafa wrote:
>>> On Thu, Aug 28, 2014 at 4:12 PM, Joel Sherrill
>>> <joel.sherrill at oarcorp.com> wrote:
>>>> Chris should be on a Mac. I am on Fedora 20.
>>>>
>>> I am on Fedora 20 too
>>>
>>> $ autoconf --version
>>> autoconf (GNU Autoconf) 2.69
>>>
>> The RSB version? 32 or 64 bit?
> RTEMS Source Builder - Set Builder, v0.4.0
> Python: 2.7.5 (default, Jun 25 2014, 10:19:55) [GCC 4.8.2 20131212
> (Red Hat 4.8.2-7)]
>
> Fedora 20 - 64 bit

Does the attached patch fix the problem ?

For me this patch gives the same output before Joel's patch (which may 
need to be reverted).

Chris
-------------- next part --------------
From 93d0ddd41b6eec7e250eaad1f799cab6cdfb27f8 Mon Sep 17 00:00:00 2001
From: Chris Johns <chrisj at rtems.org>
Date: Fri, 29 Aug 2014 11:39:29 +1000
Subject: [PATCH] bootstrap: Sort the various hash keys used in generating
 preinstall.am.

Something must have changed in perl to change the way the keys are
ordered by default.
---
 ampolish3 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ampolish3 b/ampolish3
index 69bbf7b..aaa9757 100755
--- a/ampolish3
+++ b/ampolish3
@@ -9,7 +9,7 @@
 #
 # Usage: ampolish3 Makefile.am > preinstall.am
 #
-# Reads a Makefile.am from stdin and writes corresponding 
+# Reads a Makefile.am from stdin and writes corresponding
 # pre/tmpinstall rules to stdout.
 
 sub replace($);
@@ -85,7 +85,7 @@ foreach my $l ( @buffer1 ) {
     push @buffer2, "$l";
     $dirmap{"\$\($1\)"} = replace($2);
   } elsif ( $l =~ /^\s*noinst_(.*)\s*[\+]?\=(.*)$/o )
-  { 
+  {
     #ignore: noinst_* are not relevant here.
   } elsif ( $l =~ /^\s*(nodist_|dist_|)(project_|)([a-zA-Z0-9_]+)_(HEADERS|LIBRARIES|DATA|SCRIPTS|PROGRAMS)\s*([\+]?\=)\s*(.*)/o )
   {
@@ -217,7 +217,7 @@ $output .=  "\$(srcdir)/preinstall.am: Makefile.am\n";
 $output .= "\t\$(AMPOLISH3) \$(srcdir)/Makefile.am > \$(srcdir)/preinstall.am\n";
 $output .= "endif\n\n";
 
-foreach my $k ( keys %seen )
+foreach my $k ( sort keys %seen )
 {
   if ( $k =~ /PREINSTALL_FILES/o ) {
     $output .= "all-am: \$(PREINSTALL_FILES)\n\n";
@@ -258,7 +258,7 @@ exit 0;
 sub replace($)
 {
   my ($v) = @_;
-  foreach my $i ( keys %dirmap )
+  foreach my $i ( sort keys %dirmap )
   {
     $v =~ s/\Q$i/$dirmap{$i}/g;
   }
-- 
1.8.5.2 (Apple Git-48)



More information about the devel mailing list