Date: Thu, 26 Dec 2013 11:38:33 +0000 (UTC) From: Doug Rabson <dfr@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259914 - head/usr.bin/rpcgen Message-ID: <201312261138.rBQBcXPQ044113@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dfr Date: Thu Dec 26 11:38:33 2013 New Revision: 259914 URL: http://svnweb.freebsd.org/changeset/base/259914 Log: Generate client sample code which compiles without warnings. For 'rpcgen -a', generate a makefile where 'make clean all' works. Modified: head/usr.bin/rpcgen/rpc_main.c Modified: head/usr.bin/rpcgen/rpc_main.c ============================================================================== --- head/usr.bin/rpcgen/rpc_main.c Thu Dec 26 11:32:39 2013 (r259913) +++ head/usr.bin/rpcgen/rpc_main.c Thu Dec 26 11:38:33 2013 (r259914) @@ -776,6 +776,8 @@ clnt_output(const char *infile, const ch 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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312261138.rBQBcXPQ044113>