Commit cf6d5d02 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

make: protobuf -- Escape slashes to future needs

At moment we generate protobuf dependencies having in
mind that protobuf/ directory is _always_ in the source
code root. This may change one day in future so better to
be on safe side and escape slashes immediately.

I meet this problem when been needed to build protobuf
builtin in $(root)/src/protobuf directory.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 401680e8
...@@ -66,19 +66,19 @@ proto-h := $(proto-obj-y:.o=.pb-c.h) ...@@ -66,19 +66,19 @@ proto-h := $(proto-obj-y:.o=.pb-c.h)
$(obj)/%.proto.d: $(obj)/%.proto $(obj)/%.proto.d: $(obj)/%.proto
$(E) " PB DDEP " $@ $(E) " PB DDEP " $@
$(Q) grep "^[[:blank:]]*import[[:blank:]]" $^ | sed \ $(Q) grep "^[[:blank:]]*import[[:blank:]]" $^ | sed \
-e 's/[[:blank:]]*import[[:blank:]]*//' \ -e 's/[[:blank:]]*import[[:blank:]]*//' \
-e 's/[\";]//g' \ -e 's/[\";]//g' \
-e 's/.*/$(subst /,\/,$^):$(obj)\/&/' | \ -e 's/.*/$(subst /,\/,$^):$(subst /,\/,$(obj))\/&/' | \
uniq > $@ uniq > $@
$(obj)/%.proto.c.d: $(obj)/%.proto | $(obj)/%.proto.d $(obj)/%.proto.c.d: $(obj)/%.proto | $(obj)/%.proto.d
$(E) " PB DEP " $@ $(E) " PB DEP " $@
$(Q) grep "^[[:blank:]]*import[[:blank:]]" $< | sed \ $(Q) grep "^[[:blank:]]*import[[:blank:]]" $< | sed \
-e 's/[[:blank:]]*import[[:blank:]]*//' \ -e 's/[[:blank:]]*import[[:blank:]]*//' \
-e 's/.proto/.pb-c.c/' \ -e 's/.proto/.pb-c.c/' \
-e 's/[\";]//g' \ -e 's/[\";]//g' \
-e 's/.*/$(subst .proto,.pb-c.c,$(subst /,\/,$<)):$(obj)\/&/' | \ -e 's/.*/$(subst .proto,.pb-c.c,$(subst /,\/,$<)):$(subst /,\/,$(obj))\/&/' | \
uniq > $@ uniq > $@
$(obj)/%.pb-c.c $(obj)/%.pb-c.h: $(obj)/%.proto $(obj)/%.proto.c.d $(obj)/%.pb-c.c $(obj)/%.pb-c.h: $(obj)/%.proto $(obj)/%.proto.c.d
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment