criu/scripts/build/Makefile
Kir Kolyshkin 2edc082e07 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: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-24 23:48:11 +03:00

23 lines
486 B
Makefile

ARCHES ?= armv7hf aarch64 ppc64le # x86_64
all: $(ARCHES)
Dockerfile.%: Dockerfile.%.hdr Dockerfile.tmpl
cat $^ > $@
qemu-user-static:
./extract-deb-pkg qemu-user-static
binfmt_misc:
./binfmt_misc
.PHONY: binfmt_misc
%: Dockerfile.% qemu-user-static binfmt_misc
docker build -t criu-$@ -f $< ../..
clean:
rm -rf qemu-user-static
for ARCH in $(ARCHES); do \
FILE=/proc/sys/fs/binfmt_misc/$$ARCH; \
test -f $$FILE && echo -1 > $$FILE; \
rm -f Dockerfile.$$ARCH; \
done