For consistency, this should apply to the ".h" file as well, but if it does,
we get a problem:  you cannot import a .proto file from another project
unless they used the same extension for their header.  So in order to apply
to the .h, this would have to be a .proto file option, e.g.:
  option cc_source_extension = ".pb.cc";
  option cc_header_extension = ".pb.h";
But that seems like overkill.

So I guess your proposal (which does not apply to the header) is OK.  Do you
want to send me a patch?

I wish we never had the ".pb" in the first place, but it's too late to
remove now.

On Tue, Apr 13, 2010 at 4:15 PM, CB <[email protected]> wrote:

>  in writing portable makefiles, one often uses inference rules of the
> form;
>
> .s1.s2 :
>         commands
>
> where .s1 and .s2 are suffixes that have been given as prerequisites
> of the .SUFFIXES special target and s1 and s2 do not contain any
> slashes or periods.  When trying to write a rule for protobuf. like
> this;
>
> .proto.pb.cc ;
>        protoc ....
>
> the '.pb' violates the rule.  Note, using  '.proto.cc' doesn't work,
> as the rule's stem then does not match, and the .cc file is seen by
> make as always out of date.
>
>  It would be nice to be able to suppress the '.pb' using a generator
> option, like;
>
>   protoc --cpp_out=nopb=true:. a.proto
>
> I implemented this, and have a patch file for the change, but don't
> immediately see how to attach it here.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<protobuf%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/protobuf?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to