Generate client sample code which compiles without warnings.
For 'rpcgen -a', generate a makefile where 'make clean all' works.
This commit is contained in:
parent
0673132dcb
commit
7c31e86bcb
@ -776,6 +776,8 @@ clnt_output(const char *infile, const char *define, int extend, const char *outf
|
||||
free(include);
|
||||
} else
|
||||
f_print(fout, "#include <rpc/rpc.h>\n");
|
||||
f_print(fout, "#include <stdio.h>\n");
|
||||
f_print(fout, "#include <stdlib.h>\n");
|
||||
tell = ftell(fout);
|
||||
while ( (def = get_definition()) ) {
|
||||
has_program += write_sample_clnt(def);
|
||||
@ -863,6 +865,10 @@ static void mkfile_output(struct commandline *cmd)
|
||||
f_print(fout, "all : $(CLIENT) $(SERVER)\n\n");
|
||||
f_print(fout, "$(TARGETS) : $(SOURCES.x) \n");
|
||||
f_print(fout, "\trpcgen $(RPCGENFLAGS) $(SOURCES.x)\n\n");
|
||||
if (allfiles) {
|
||||
f_print(fout, "\trpcgen -Sc $(RPCGENFLAGS) $(SOURCES.x) -o %s\n\n", clientname);
|
||||
f_print(fout, "\trpcgen -Ss $(RPCGENFLAGS) $(SOURCES.x) -o %s\n\n", servername);
|
||||
}
|
||||
f_print(fout, "$(OBJECTS_CLNT) : $(SOURCES_CLNT.c) $(SOURCES_CLNT.h) \
|
||||
$(TARGETS_CLNT.c) \n\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user