Generate only wanted files.
This commit is contained in:
parent
171c9420c2
commit
35a92e16c7
|
@ -130,7 +130,7 @@ int main(int argc,char *argv[])
|
|||
extern char* optarg;
|
||||
extern int optind;
|
||||
int optc;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
signal(SIGSEGV, segvhandler);
|
||||
|
||||
|
@ -201,17 +201,17 @@ int main(int argc,char *argv[])
|
|||
(debuglevel & DEBUGLEVEL_PPTRACE) != 0,
|
||||
(debuglevel & DEBUGLEVEL_PPMSG) != 0 );
|
||||
|
||||
if (!header_name) {
|
||||
if (!header_name && (do_everything || header_only)) {
|
||||
header_name = dup_basename(input_name, ".idl");
|
||||
strcat(header_name, ".h");
|
||||
}
|
||||
|
||||
if (!typelib_name) {
|
||||
if (!typelib_name && (do_everything || typelib_only)) {
|
||||
typelib_name = dup_basename(input_name, ".idl");
|
||||
strcat(typelib_name, ".tlb");
|
||||
}
|
||||
|
||||
if (!proxy_name) {
|
||||
if (!proxy_name && do_everything) {
|
||||
proxy_name = dup_basename(input_name, ".idl");
|
||||
proxy_token = xstrdup(proxy_name);
|
||||
strcat(proxy_name, "_p.c");
|
||||
|
@ -247,28 +247,31 @@ int main(int argc,char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
header_token = make_token(header_name);
|
||||
if(do_everything || header_only) {
|
||||
header_token = make_token(header_name);
|
||||
|
||||
if(!(header = fopen(header_name, "w"))) {
|
||||
fprintf(stderr, "Could not open %s for output\n", header_name);
|
||||
return 1;
|
||||
if(!(header = fopen(header_name, "w"))) {
|
||||
fprintf(stderr, "Could not open %s for output\n", header_name);
|
||||
return 1;
|
||||
}
|
||||
fprintf(header, "/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n", WIDL_FULLVERSION, input_name);
|
||||
fprintf(header, "#include <rpc.h>\n" );
|
||||
fprintf(header, "#include <rpcndr.h>\n\n" );
|
||||
fprintf(header, "#ifndef __WIDL_%s\n", header_token);
|
||||
fprintf(header, "#define __WIDL_%s\n", header_token);
|
||||
fprintf(header, "#ifdef __cplusplus\n");
|
||||
fprintf(header, "extern \"C\" {\n");
|
||||
fprintf(header, "#endif\n");
|
||||
|
||||
ret = yyparse();
|
||||
|
||||
fprintf(header, "#ifdef __cplusplus\n");
|
||||
fprintf(header, "}\n");
|
||||
fprintf(header, "#endif\n");
|
||||
fprintf(header, "#endif /* __WIDL_%s */\n", header_token);
|
||||
fclose(header);
|
||||
}
|
||||
fprintf(header, "/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n", WIDL_FULLVERSION, input_name);
|
||||
fprintf(header, "#include <rpc.h>\n" );
|
||||
fprintf(header, "#include <rpcndr.h>\n\n" );
|
||||
fprintf(header, "#ifndef __WIDL_%s\n", header_token);
|
||||
fprintf(header, "#define __WIDL_%s\n", header_token);
|
||||
fprintf(header, "#ifdef __cplusplus\n");
|
||||
fprintf(header, "extern \"C\" {\n");
|
||||
fprintf(header, "#endif\n");
|
||||
|
||||
ret = yyparse();
|
||||
|
||||
fprintf(header, "#ifdef __cplusplus\n");
|
||||
fprintf(header, "}\n");
|
||||
fprintf(header, "#endif\n");
|
||||
fprintf(header, "#endif /* __WIDL_%s */\n", header_token);
|
||||
fclose(header);
|
||||
fclose(yyin);
|
||||
|
||||
if(ret) {
|
||||
|
|
Loading…
Reference in New Issue