summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Porting/manifest_lib.pl9
-rw-r--r--t/porting/manifest.t6
2 files changed, 11 insertions, 4 deletions
diff --git a/Porting/manifest_lib.pl b/Porting/manifest_lib.pl
index 555804836e..c062c94410 100644
--- a/Porting/manifest_lib.pl
+++ b/Porting/manifest_lib.pl
@@ -37,7 +37,14 @@ sub sort_manifest {
my @line_tuples;
foreach my $idx (0 .. $#lines) {
my $line = $lines[$idx];
- $line =~ s/\t +/\t/;
+ # clean up tab/space issues
+ $line =~ s/\t[ ]+/\t/;
+ if ($line =~ s/^(\S+)([ ]\s+)(\S+.*)/$1\t/) {
+ my $descr = $2;
+ $descr =~ s/\t+/ /g;
+ $line .= $descr;
+ }
+ $line =~ s/\s+\z//;
$line =~ /^(\S+)(?:\t+([^\t]*))?\z/
or do {
$line =~ s/\t/\\t/g;
diff --git a/t/porting/manifest.t b/t/porting/manifest.t
index 666c2d9204..f8910c3e49 100644
--- a/t/porting/manifest.t
+++ b/t/porting/manifest.t
@@ -60,11 +60,11 @@ while (<$m>) {
next;
} elsif ($separator !~ tr/ //c) {
# It's all spaces
- fail("Spaces in entry for $file in MANIFEST at line $.");
+ fail("Spaces in entry for $file in MANIFEST at line $. (run `make manisort` to fix)");
} elsif ($separator =~ tr/\t//) {
- fail("Mixed tabs and spaces in entry for $file in MANIFEST at line $.");
+ fail("Mixed tabs and spaces in entry for $file in MANIFEST at line $. (run `make manisort` to fix)");
} else {
- fail("Odd whitespace in entry for $file in MANIFEST at line $.");
+ fail("Odd whitespace in entry for $file in MANIFEST at line $. (run `make manisort` to fix)");
}
}