Author: abartlet
Date: 2005-08-08 22:14:40 +0000 (Mon, 08 Aug 2005)
New Revision: 9217

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9217

Log:
Add 'make clean' hooks to the ans1 depedency generator.

To be used by the impending Heimdal resync, which has files starting
with asn1_ that are not generated.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/heimdal_build/asn1_deps.pl


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal_build/asn1_deps.pl
===================================================================
--- branches/SAMBA_4_0/source/heimdal_build/asn1_deps.pl        2005-08-08 
22:14:37 UTC (rev 9216)
+++ branches/SAMBA_4_0/source/heimdal_build/asn1_deps.pl        2005-08-08 
22:14:40 UTC (rev 9217)
@@ -7,7 +7,8 @@
 
 my $file = shift;
 my $prefix = shift;
-
+my $x_file, @x_files;
+my $c_file, @c_files;
 if (not defined ($prefix)) { $prefix = "asn1"; }
 
 $dirname = dirname($file);
@@ -24,9 +25,23 @@
        if (/^([A-Za-z0-9_-]+)[ \t]*::= /) {
                my $output = $1;
                $output =~ s/-/_/g;
-               print "$dirname/asn1_$output.x: $header\n";
-               print "$dirname/asn1_$output.c: $dirname/asn1_$output.x\n";
-               print "[EMAIL PROTECTED] $dirname/asn1_$output.x 
$dirname/asn1_$output.c\n\n";
+               $c_file = "$dirname/asn1_$output.c";
+               $x_file = "$dirname/asn1_$output.x";
+               print "$x_file: $header\n";
+               print "$c_file: $dirname/asn1_$output.x\n";
+               print "[EMAIL PROTECTED] $x_file $c_file\n\n";
+               push @x_files, $x_file;
+               push @c_files, $c_file;
        }
 }
 close(IN);
+print $prefix."_clean: \n";
+print "[EMAIL PROTECTED] \"Deleting ASN1 ouput files generated from $file\"";
+print "[EMAIL PROTECTED] -f $header";
+foreach $c_file (@c_files) {
+    print "[EMAIL PROTECTED] -f $c_file";
+}
+foreach $x_file (@x_files) {
+    print "[EMAIL PROTECTED] -f $x_file";
+}
+print "\n\n";

Reply via email to