The branch, master has been updated
       via  fde8c46855350111e94f1da7afc6c440ab746d8b (commit)
      from  ab09fcf1da51451b666f962a418051581fb4e78e (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit fde8c46855350111e94f1da7afc6c440ab746d8b
Author: Andrew Bartlett <[email protected]>
Date:   Sat Sep 12 17:20:32 2009 -0700

    s4:heimdal_build Love pointed me at the --one-code-file option to 
asn1_compile
    
    This new option avoids a lot of code that was used to intuit what
    files would be output by the compiler.
    
    Andrew Bartlett

-----------------------------------------------------------------------

Summary of changes:
 source4/heimdal_build/asn1_deps.pl |   49 ++++++++++++-----------------------
 1 files changed, 17 insertions(+), 32 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/heimdal_build/asn1_deps.pl 
b/source4/heimdal_build/asn1_deps.pl
index 9da0787..3b18755 100755
--- a/source4/heimdal_build/asn1_deps.pl
+++ b/source4/heimdal_build/asn1_deps.pl
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 # Generate make dependency rules for asn1 files
 # Jelmer Vernooij <[email protected]> 2005
-# Andrew Bartlett <[email protected]> 2006
+# Andrew Bartlett <[email protected]> 2006-2009
 # Stefan Metzmacher <[email protected]> 2007
 # GPL
 
@@ -11,12 +11,6 @@ my $file = shift;
 my $prefix = shift;
 my $dirname = shift;
 my $options = join(' ', @ARGV);
-my $x_file;
-my @x_files = ();
-my $c_file;
-my @c_files = ();
-my $o_file;
-my @o_files = ();
 my $import;
 my @imports = ();
 my $dep;
@@ -29,31 +23,27 @@ if (not defined $options) {
 
 my $header = "$dirname/$prefix.h";
 my $headerx = "$dirname/$prefix.hx";
+my $o_file = "$dirname/asn1_$prefix.o";
+my $c_file = "$dirname/asn1_$prefix.c";
+my $x_file = "$dirname/asn1_$prefix.x";
+my $output_file = "$dirname/" . $prefix . "_asn1_files";
 
 print "basics:: $header\n";
+print "$output_file: \$(heimdalsrcdir)/$file \$(ASN1C)\n";
+print "\...@echo \"Compiling ASN1 file \$(heimdalsrcdir)/$file\"\n";
+print "\...@\$(heimdalbuildsrcdir)/asn1_compile_wrapper.sh \$(builddir) 
$dirname \$(ASN1C) \$(call abspath,\$(heimdalsrcdir)/$file) $prefix $options 
--one-code-file\n\n";
+print "$headerx: $output_file\n";
 print "$header: $headerx\n";
 print "\...@cp $headerx $header\n";
-print "$headerx: \$(heimdalsrcdir)/$file \$(ASN1C)\n";
-print "\...@echo \"Compiling ASN1 file \$(heimdalsrcdir)/$file\"\n";
-print "\...@\$(heimdalbuildsrcdir)/asn1_compile_wrapper.sh \$(builddir) 
$dirname \$(ASN1C) \$(call abspath,\$(heimdalsrcdir)/$file) $prefix 
$options\n\n";
+print "$x_file: $output_file\n";
+print "$c_file: $x_file\n";
+print "\...@echo \"#include \\\"config.h\\\"\" > $c_file && cat $x_file >> 
$c_file\n\n";
 
 open(IN,"heimdal/$file") or die("Can't open heimdal/$file: $!");
 my @lines = <IN>;
 close(IN);
 foreach my $line (@lines) {
-       if ($line =~ /^([\w]+[\w\-]+)(\s+OBJECT IDENTIFIER)?\s*::=/) {
-               my $output = $1;
-               $output =~ s/-/_/g;
-               $c_file = "$dirname/asn1_$output.c";
-               $x_file = "$dirname/asn1_$output.x";
-               $o_file = "$dirname/asn1_$output.o";
-               print "$x_file: $header\n";
-               print "$c_file: $dirname/asn1_$output.x\n";
-               print "\...@echo \"#include \\\"config.h\\\"\" > $c_file && cat 
$x_file >> $c_file\n\n";
-               push @x_files, $x_file;
-               push @c_files, $c_file;
-               push @o_files, $o_file;
-       } elsif ($line =~ /^(\s*IMPORT)([\w\,\s])*(\s+FROM\s+)([\w]+[\w\-]+);/) 
{
+       if ($line =~ /^(\s*IMPORT)([\w\,\s])*(\s+FROM\s+)([\w]+[\w\-]+);/) {
                $import = $line;
                chomp $import;
                push @imports, $import;
@@ -94,21 +84,16 @@ print "CFLAGS = -Iheimdal_build -Iheimdal/lib/roken 
-I$dirname\n";
 print "PUBLIC_DEPENDENCIES = $depstr\n\n";
 
 print "HEIMDAL_".uc($prefix)."_OBJ_FILES = ";
-foreach $o_file (@o_files) {
-    print "\\\n\t$o_file";
-}
+print "\\\n\t$o_file";
 
 print "\n\n";
 
 print "clean:: \n";
 print "\...@echo \"Deleting ASN1 output files generated from $file\"\n";
+print "\...@rm -f $output_file\n";
 print "\...@rm -f $header\n";
-foreach $c_file (@c_files) {
-    print "\...@rm -f $c_file\n";
-}
-foreach $x_file (@x_files) {
-    print "\...@rm -f $x_file\n";
-}
+print "\...@rm -f $c_file\n";
+print "\...@rm -f $x_file\n";
 print "\...@rm -f $dirname/$prefix\_files\n";
 print "\...@rm -f $dirname/$prefix\.h\n";
 print "\n";


-- 
Samba Shared Repository

Reply via email to