svn commit: samba r9102 - in branches/SAMBA_4_0/source/script: .

tpot at samba.org tpot at samba.org
Fri Aug 5 05:32:39 GMT 2005


Author: tpot
Date: 2005-08-05 05:32:39 +0000 (Fri, 05 Aug 2005)
New Revision: 9102

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

Log:
Generate files in $srcdir/libcli/gen_raw instead of $srcdir.

Start fixing compile problems in generated output.

Modified:
   branches/SAMBA_4_0/source/script/build_smb_interfaces.pl


Changeset:
Modified: branches/SAMBA_4_0/source/script/build_smb_interfaces.pl
===================================================================
--- branches/SAMBA_4_0/source/script/build_smb_interfaces.pl	2005-08-05 05:26:58 UTC (rev 9101)
+++ branches/SAMBA_4_0/source/script/build_smb_interfaces.pl	2005-08-05 05:32:39 UTC (rev 9102)
@@ -13,9 +13,11 @@
 my $parser = new smb_interfaces;
 $header = $parser->parse($file);
 
+stat "libcli/gen_raw" || mkdir("libcli/gen_raw") || die("mkdir");
+
 # Create header
 
-open(FILE, ">ejs_${basename}.h");
+open(FILE, ">libcli/gen_raw/ejs_${basename}.h");
 
 print FILE "/* header auto-generated by build_smb_interfaces.pl */\n\n";
 
@@ -60,16 +62,23 @@
 
 # Create file
 
-open(FILE, ">ejs_${basename}.c");
+open(FILE, ">libcli/gen_raw/ejs_${basename}.c");
 
 print FILE "/* EJS wrapper functions auto-generated by build_smb_interfaces.pl */\n\n";
 
+print FILE "#include \"includes.h\"\n";
+print FILE "#include \"lib/appweb/ejs/ejs.h\"\n";
+print FILE "#include \"scripting/ejs/ejsrpc.h\"\n"; # TODO: remove this
+print FILE "\n";
+
 # Top level push/pull functions
 
 sub print_field($$) {
   my $f = shift;
   my $suffix = shift;
 
+  my $type = "UNKNOWN";
+
   if ($f->{TYPE} eq "char" and $f->{POINTERS} == 1) {
     $type = "string";
   }
@@ -106,7 +115,7 @@
 
   # Push from struct.out
 
-  print FILE "static NTSTATUS ejs_push_$x->{STRUCT_NAME}(struct ejs_rpc *ejs, struct MprVar *v, const struct $x->{STRUCT_NAME} *r)\n\n";
+  print FILE "static NTSTATUS ejs_push_$x->{STRUCT_NAME}(struct ejs_rpc *ejs, struct MprVar *v, struct $x->{STRUCT_NAME} *r)\n\n";
   print FILE "{\n";
   print FILE "\tNDR_CHECK(ejs_push_struct_start(ejs, &v, \"output\"));\n";
 



More information about the samba-cvs mailing list