mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-23 01:59:04 +00:00
Makefiles: do not re-generate magic.py every time
I always wondered why re-running make on a criu checkout always prints out GEN magic.py even if no file has changed. It seems the Makefile was looking for the file in the wrong location. Providing the full path to the file will now only rebuild magic.py if something actually changed that requires a rebuild. Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
parent
5106b232e7
commit
65a930d923
1 changed files with 3 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
all-y += images magic.py pb.py
|
||||
all-y += images $(obj)/magic.py pb.py
|
||||
|
||||
proto := $(filter-out images/rpc.proto, $(sort $(wildcard images/*.proto)))
|
||||
proto-py-modules := $(foreach m,$(proto),$(subst -,_,$(notdir $(m:.proto=_pb2))))
|
||||
|
|
@ -10,9 +10,9 @@ images:
|
|||
$(Q) protoc -I=images/ -I=/usr/include/ --python_out=$(obj) $(proto)
|
||||
.PHONY: images
|
||||
|
||||
magic.py: scripts/magic-gen.py criu/include/magic.h
|
||||
$(obj)/magic.py: scripts/magic-gen.py criu/include/magic.h
|
||||
$(call msg-gen, $@)
|
||||
$(Q) $(PYTHON) $^ $(obj)/$@
|
||||
$(Q) $(PYTHON) $^ $@
|
||||
|
||||
pb.py: images
|
||||
$(Q) echo "# Autogenerated. Do not edit!" > $(obj)/$@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue