diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-11-25 18:16:35 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-12-04 17:47:00 +0100 |
commit | 5d4e58dcdb5d3b0a6dfc17071d845e7fc69ff071 (patch) | |
tree | d8f393a17bd968d5f2cf01c2e0afbe4d42930a29 /makedef.pl | |
parent | ee8bc8b7e369e9f69b93c0b0a137db3c4886a1a3 (diff) | |
download | perl-5d4e58dcdb5d3b0a6dfc17071d845e7fc69ff071.tar.gz |
On AIX, avoid a shell pipepline by making makedef.pl sort case insenitively.
Previously the Makefile piped the output of makedef.pl to sort. This had the
side effect of ignoring the exit code from makedef.pl, as make could only
see the exit code of the last command in the pipeline. This concealed the
causes of the parallel make failure when makedef.pl was missing a dependency
on Config.pm
Diffstat (limited to 'makedef.pl')
-rw-r--r-- | makedef.pl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/makedef.pl b/makedef.pl index 8d6148a123..0994fd91f1 100644 --- a/makedef.pl +++ b/makedef.pl @@ -40,6 +40,8 @@ my %ARGS = (CCTYPE => 'MSVC', TARG_DIR => ''); my %define; +my $fold; + sub process_cc_flags { foreach (map {split /\s+/, $_} @_) { $define{$1} = $2 // 1 if /^-D(\w+)(?:=(.+))?/; @@ -52,6 +54,8 @@ while (@ARGV) { process_cc_flags($1); } elsif ($flag =~ /^(CCTYPE|FILETYPE|PLATFORM|TARG_DIR)=(.+)$/) { $ARGS{$1} = $2; + } elsif ($flag eq '--sort-fold') { + ++$fold; } } @@ -1347,7 +1351,8 @@ elsif ($ARGS{PLATFORM} eq 'netware') { # Then the symbols -foreach my $symbol (sort keys %export) { +my @symbols = $fold ? sort {lc $a cmp lc $b} keys %export : sort keys %export; +foreach my $symbol (@symbols) { if ($ARGS{PLATFORM} =~ /^win(?:32|ce)$/) { print "\t$symbol\n"; } |