build: autogenerate heimdal basics
[metze/samba/wip.git] / source / heimdal_build / asn1_deps.pl
index f5ee2c54eae203e013f6d31bc7bd560329418d57..6c4d10d262b9c7c193971c1789ddb6d984c92af5 100755 (executable)
@@ -29,11 +29,12 @@ if (not defined $options) {
 
 my $header = "$dirname/$prefix.h";
 
-print "$header: $file bin/asn1_compile\n";
-print "\t\@echo \"Compiling ASN1 file $file\"\n";
-print "\t\@\$(builddir)/heimdal_build/asn1_compile_wrapper.sh \$(srcdir) \$(builddir) $dirname bin/asn1_compile $file $prefix $options\n\n";
+print "basics:: $header\n";
+print "$header: \$(heimdalsrcdir)/$file \$(ASN1C)\n";
+print "\t\@echo \"Compiling ASN1 file \$(heimdalsrcdir)/$file\"\n";
+print "\t\@\$(heimdalbuildsrcdir)/asn1_compile_wrapper.sh \$(builddir) $dirname \$(ASN1C) \$(call abspath,\$(heimdalsrcdir)/$file) $prefix $options\n\n";
 
-open(IN,$file) or die("Can't open $file: $!");
+open(IN,"heimdal/$file") or die("Can't open heimdal/$file: $!");
 my @lines = <IN>;
 close(IN);
 foreach my $line (@lines) {
@@ -87,13 +88,14 @@ my $depstr = join(' ', @deps);
 
 print '[SUBSYSTEM::HEIMDAL_'.uc($prefix).']'."\n";
 print "CFLAGS = -Iheimdal_build -Iheimdal/lib/roken -I$dirname\n";
-print "\nPUBLIC_DEPENDENCIES = $depstr\n\n";
+print "PUBLIC_DEPENDENCIES = $depstr\n\n";
 
-print "HEIMDAL_".uc($prefix)."_OBJ_FILES = \$(addprefix heimdal/,";
+print "HEIMDAL_".uc($prefix)."_OBJ_FILES = ";
 foreach $o_file (@o_files) {
     print "\\\n\t$o_file";
 }
-print "\t)\n\n";
+
+print "\n\n";
 
 print "clean:: \n";
 print "\t\@echo \"Deleting ASN1 output files generated from $file\"\n";