diff options
author | Adrian Reber <areber@redhat.com> | 2020-08-05 16:17:00 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2020-10-20 10:18:24 +0300 |
commit | 3d67e8a0d2341ee7cb8c64031b7a585d92c1b1b0 (patch) | |
tree | 9bd44b000e51cbb84ecf517d9010369c4afa7f19 /lib | |
parent | 9ce4ed0935bc1902b250d570ec32271726d4d1ca (diff) |
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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/py/images/Makefile | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/py/images/Makefile b/lib/py/images/Makefile index f7df20f12..d55362dd1 100644 --- a/lib/py/images/Makefile +++ b/lib/py/images/Makefile @@ -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)/$@ |