Well, the build-if-newer is handled by either Make or VisualStudio, not by the compiler in either case.
As for the dependencies ... gcc _does_ have options (-MD -MP -MF) to spit out depends that it determines from following include files in Makefile format. automake uses this feature to construct its Makefile. I know that SWIG also supports those (using the gcc options and semantics) which makes writing Makefile rule snippets to properly build and re-build based on included-file changes work properly and automatically. What this means for generated Java code I do not know. So I would be in favor of protoc including support for the second. I have no interest (and actually a negative interest) in protoc handling the first thing - that's a job for a build system) Monty George Georgiev wrote: > http://www.zeroc.com/vsplugin.html > > ------------------------------------------------------------------------ > *From:* Kenton Varda [mailto:ken...@google.com] > *Sent:* Friday, September 11, 2009 12:18 PM > *To:* George Georgiev > *Cc:* Protocol Buffers > *Subject:* Re: protoc feature question > > Is there precedent for other tools like protoc providing this kind of > behavior? I've never heard of such a thing. E.g. GCC does not check if > the .cc file is newer than the .o file before compiling. > > On Fri, Sep 11, 2009 at 8:41 AM, George Georgiev > <georgi.georg...@citrix.com <mailto:georgi.georg...@citrix.com>> wrote: > > Just one more thing. > > I forgot to mention that the output is just one side of the coin. > > What about of the dependencies. If I have a proto file that includes > another proto file now I need to extend the makefile to handle this > too. What about if the dependencies are more complex and dynamic. > > My personal opinion is that the best place to handle all this is the > protoc itself. > > -G > > ------------------------------------------------------------------------ > *From:* protobuf@googlegroups.com <mailto:protobuf@googlegroups.com> > [mailto:protobuf@googlegroups.com > <mailto:protobuf@googlegroups.com>] *On Behalf Of *George Georgiev > *Sent:* Thursday, September 10, 2009 6:19 PM > *To:* Kenton Varda; Protocol Buffers > *Subject:* RE: protoc feature question > > That seems reasonable to me. If you changed the package of any of > your other Java files it would mean moving source code around which > would certainly require updating the makefile. > for me too, but some colleagues find this as extra pain > > Another idea is to have protoc output the .java files into a > temporary directory, and then jar up that whole directory, and > consider the .jar to be the output of the operation. That way you > have just one output and it's the same regardless of the content of > the .proto files. > this means I will need to rebuild the whole jar file if any of the > proto files is changed > > It looks like my use case isn't usual, but the way I'm using > protobufs involves permanent updates of the proto files. > > Anyway, I could live with it as is. > > Thanks, > George > > ------------------------------------------------------------------------ > *From:* Kenton Varda [mailto:ken...@google.com > <mailto:ken...@google.com>] > *Sent:* Thursday, September 10, 2009 5:45 PM > *To:* George Georgiev; Protocol Buffers > *Subject:* Re: protoc feature question > > On Thu, Sep 10, 2009 at 4:59 PM, George Georgiev > <georgi.georg...@citrix.com <mailto:georgi.georg...@citrix.com>> wrote: > > So you suggest if I change the java package in a proto file, I > to update the makefile too? > > > That seems reasonable to me. If you changed the package of any of > your other Java files it would mean moving source code around which > would certainly require updating the makefile. > > Another idea is to have protoc output the .java files into a > temporary directory, and then jar up that whole directory, and > consider the .jar to be the output of the operation. That way you > have just one output and it's the same regardless of the content of > the .proto files. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~----------~----~----~----~------~----~------~--~---