summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-08-08 22:14:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:31:32 -0500
commiteda59a6ca0e9eae395fef339ca809d133f92902c (patch)
tree1d269ee9104dbe28bd6ec5ef712e96e71a663d18 /source4
parent32015e5cdc3a94c90a28bd299b0c9bd28e5d5edf (diff)
downloadsamba-eda59a6ca0e9eae395fef339ca809d133f92902c.tar.gz
samba-eda59a6ca0e9eae395fef339ca809d133f92902c.tar.bz2
samba-eda59a6ca0e9eae395fef339ca809d133f92902c.zip
r9217: 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 (This used to be commit 15b7af1c39a8369fb701f60485c7ac2040f1c27a)
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/heimdal_build/asn1_deps.pl23
1 files changed, 19 insertions, 4 deletions
diff --git a/source4/heimdal_build/asn1_deps.pl b/source4/heimdal_build/asn1_deps.pl
index f102a6c663..962aadfdad 100755
--- a/source4/heimdal_build/asn1_deps.pl
+++ b/source4/heimdal_build/asn1_deps.pl
@@ -7,7 +7,8 @@ use File::Basename;
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 @@ foreach(<IN>) {
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";