Commit 2edc082e authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

Makefiles: don't use the FORCE, Luke!

With GNU make, using .PHONY leads to the same result as using
the "FORCE" hack, but unlike FORCE is not a hack. Since we do not
plan to use any other make than GNU make, let's just mark phony
targets as such.

For more details about why PHONY is better than FORCE, see
http://www.gnu.org/software/make/manual/make.html#index-FORCE

[v2: rebased and splitted]
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 885370f1
ARCHES ?= armv7hf aarch64 ppc64le # x86_64
all: $(ARCHES)
.FORCE:
Dockerfile.%: Dockerfile.%.hdr Dockerfile.tmpl
cat $^ > $@
qemu-user-static:
./extract-deb-pkg qemu-user-static
binfmt_misc: .FORCE
binfmt_misc:
./binfmt_misc
.PHONY: binfmt_misc
%: Dockerfile.% qemu-user-static binfmt_misc
docker build -t criu-$@ -f $< ../..
......
......@@ -3,45 +3,46 @@ RM := rm -f --one-file-system
ZDTM_ARGS ?= -C
export ZDTM_ARGS
.FORCE:
all:
$(MAKE) zdtm
$(MAKE) zdtm-pre-dump
$(MAKE) zdtm-snapshot
$(MAKE) zdtm-iter
$(MAKE) zdtm-freezer
.PHONY: all
TESTS = unix-callback mem-snap rpc libcriu mounts/ext security pipes crit socketpairs overlayfs
other: .FORCE
other:
for t in $(TESTS); do \
setsid $(MAKE) -C $$t run || exit 1; \
done \
done
.PHONY: other
zdtm_ct: zdtm_ct.c
zdtm: .FORCE
zdtm:
./zdtm.py run -a --parallel 2
.PHONY: zdtm
zdtm-pre-dump:
./zdtm.py run --pre 2:1 -t zdtm/transition/fork -f uns
.PHONY: zdtm
zdtm-snapshot:
./zdtm.py run --pre 2:1 --snap -t zdtm/transition/fork -f uns
.PHONY: zdtm-snapshot
zdtm-iter:
./zdtm.py run --iters 3:1 -t zdtm/transition/fork -f uns
.PHONY: zdtm-iter
zdtm-freezer:
./zdtm.py run --test zdtm/transition/thread-bomb --pre 3 --freezecg zdtm:t
./zdtm.py run --test zdtm/transition/thread-bomb --pre 3 --freezecg zdtm:f
.PHONY: zdtm-freezer
.PHONY: zdtm
fault-injection: .FORCE
fault-injection:
$(MAKE) -C fault-injection
.PHONY: fault-injection
......@@ -49,6 +50,7 @@ override CFLAGS += -D_GNU_SOURCE
clean_root:
$(Q) ./zdtm.py clean nsroot
.PHONY: clean_root
clean: clean_root
$(RM) zdtm_ct zdtm-tst-list
......@@ -58,5 +60,4 @@ clean: clean_root
$(Q) $(MAKE) -C libcriu clean
$(Q) $(MAKE) -C rpc clean
$(Q) $(MAKE) -C crit clean
.PHONY: zdtm_ns
.PHONY: clean
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