summaryrefslogtreecommitdiffstats
path: root/usr.bin/rpcgen
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/rpcgen')
-rw-r--r--usr.bin/rpcgen/rpc_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c
index 3755f4c..bf53a28 100644
--- a/usr.bin/rpcgen/rpc_main.c
+++ b/usr.bin/rpcgen/rpc_main.c
@@ -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 @@ $(TARGETS_SVC.c:%%.c=%%.o) ");
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");
OpenPOWER on IntegriCloud