mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-08-03 23:33:01 +00:00
Chris Lamb <lamby@debian.org> reported in Debian that criu is not building reproducible while working on the "reproducible builds" effort [0]. [0] https://wiki.debian.org/ReproducibleBuilds [1] https://bugs.debian.org/801211 Signed-off-by: Salvatore Bonaccorso <carnil@debian.org> Acked-by: Andrew Vagin <avagin@odin.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
26 lines
829 B
Makefile
26 lines
829 B
Makefile
all: pb.py protobuf magic.py
|
|
|
|
.PHONY: all protobuf clean pb.py
|
|
|
|
proto := $(filter-out $(SRC_DIR)/protobuf/rpc.proto, $(sort $(wildcard $(SRC_DIR)/protobuf/*.proto)))
|
|
proto-py-modules := $(foreach m,$(proto),$(subst -,_,$(notdir $(m:.proto=_pb2))))
|
|
|
|
# We don't need rpc_pb2.py here, as it is not related to the
|
|
# images.
|
|
# Unfortunately, we can't drop ugly _pb2 suffixes here, because
|
|
# some _pb2 files depend on others _pb2 files.
|
|
protobuf:
|
|
$(Q) protoc -I=$(SRC_DIR)/protobuf -I=/usr/include/ --python_out=./ $(proto)
|
|
|
|
magic.py: $(SRC_DIR)/scripts/magic-gen.py $(SRC_DIR)/include/magic.h
|
|
$(E) " GEN " $@
|
|
$(Q) python $^ $@
|
|
|
|
pb.py: protobuf
|
|
$(Q) echo "# Autogenerated. Do not edit!" > $@
|
|
$(Q) for m in $(proto-py-modules); do \
|
|
echo "from $$m import *" >> $@ ;\
|
|
done
|
|
|
|
clean:
|
|
$(Q) $(RM) ./*_pb2.py ./*.pyc magic.py pb.py
|