You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2006/09/02 23:28:49 UTC

svn commit: r439659 - /spamassassin/trunk/build/mkrules

Author: jm
Date: Sat Sep  2 14:28:48 2006
New Revision: 439659

URL: http://svn.apache.org/viewvc?rev=439659&view=rev
Log:
instead of creating no files at all on lint failure, create empty files so that MANIFEST conditions are still satisfied and builds can complete

Modified:
    spamassassin/trunk/build/mkrules

Modified: spamassassin/trunk/build/mkrules
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/mkrules?rev=439659&r1=439658&r2=439659&view=diff
==============================================================================
--- spamassassin/trunk/build/mkrules (original)
+++ spamassassin/trunk/build/mkrules Sat Sep  2 14:28:48 2006
@@ -174,7 +174,13 @@
     my $text = join("\n", "file start $file", $output_file_text->{$file}, "file end $file");
     if (lint_rule_text($text) != 0) {
       warn "\nERROR: LINT FAILED, suppressing output: $file\n\n";
-      delete $output_file_text->{$file};
+
+      # don't suppress entirely, otherwise 'make distcheck'/'disttest'
+      # will fail since the MANIFEST-listed output files will be 
+      # empty.
+
+      # delete $output_file_text->{$file};
+      $output_file_text->{$file} = '';
     }
   }
 }
@@ -805,6 +811,10 @@
     }
     else {
       print "$pubfile: no rules promoted\n";
+
+      # create an empty file anyway to satisfy MANIFEST
+      open (OUT, ">".$pubfile) or die "cannot write to output file '$pubfile'";
+      close OUT or die "cannot close output file '$pubfile'";
     }
   }
 }