svn commit: samba r9217 - in branches/SAMBA_4_0/source/heimdal_build: .

abartlet at samba.org abartlet at samba.org
Mon Aug 8 22:14:41 GMT 2005


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 "\t\@cp $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 "\t\@cp $x_file $c_file\n\n";
+		push @x_files, $x_file;
+		push @c_files, $c_file;
 	}
 }
 close(IN);
+print $prefix."_clean: \n";
+print "\t\@echo \"Deleting ASN1 ouput files generated from $file\"";
+print "\n\t\@rm -f $header";
+foreach $c_file (@c_files) {
+    print "\n\t\@rm -f $c_file";
+}
+foreach $x_file (@x_files) {
+    print "\n\t\@rm -f $x_file";
+}
+print "\n\n";



More information about the samba-cvs mailing list