[CRIU] [PATCH 3/3] make: protobuf -- Order .c files generation

Cyrill Gorcunov gorcunov at openvz.org
Wed Jan 23 16:44:40 EST 2013


This patch introduce dependencies on .c files
generation parsing import keywords in .proto
files.

In particular, the core.proto file refers to
core-x86.proto which means we need to generate
.[c|h] files from core-x86.proto earlier than
handlig of core.proto.

A positive side effect of this patch is that
the compilation is independent now of order the
proto files are declated in the make file.

Instead of currently present manual order

PROTO_FILES	+= core-x86.proto
PROTO_FILES	+= core-arm.proto
PROTO_FILES	+= core.proto

one can write it in any arrangement, say

PROTO_FILES     += core.proto
PROTO_FILES     += core-arm.proto
PROTO_FILES     += core-x86.proto

and it still be resolved correctly.

BUT beware of circular import directives,
we can't handle them now.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 protobuf/Makefile | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-make-protobuf-Order-.c-files-generation.patch
Type: text/x-patch
Size: 1263 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20130124/a13f18d0/attachment-0001.bin>


More information about the CRIU mailing list