mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-02 15:25:21 +00:00
scripts/build/Makefile: brevity is the soul of wit
Make the Makefile leaner and cleaner. Signed-off-by: Kir Kolyshkin <kir@openvz.org> Acked-by: Andrew Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
31171692fc
commit
c38f6db0bc
@@ -1,26 +1,10 @@
|
|||||||
all: armv7hf aarch64 ppc64le
|
ARCHES ?= armv7hf aarch64 ppc64le # x86_64
|
||||||
|
all: $(ARCHES)
|
||||||
AARCH64_IMG ?= aarch64/ubuntu:trusty
|
|
||||||
ARMV7HF_IMG ?= armv7/armhf-ubuntu
|
|
||||||
PPC64LE_IMG ?= ppc64le/ubuntu
|
|
||||||
|
|
||||||
.FORCE:
|
.FORCE:
|
||||||
|
|
||||||
Dockerfile.aarch64: Dockerfile.aarch64.hdr Dockerfile.tmpl
|
Dockerfile.%: Dockerfile.%.hdr Dockerfile.tmpl
|
||||||
cat Dockerfile.aarch64.hdr > Dockerfile.aarch64
|
cat $^ > $@
|
||||||
cat Dockerfile.tmpl >> Dockerfile.aarch64
|
|
||||||
|
|
||||||
Dockerfile.armv7hf: Dockerfile.armv7hf.hdr Dockerfile.tmpl
|
|
||||||
cat Dockerfile.armv7hf.hdr > Dockerfile.armv7hf
|
|
||||||
cat Dockerfile.tmpl >> Dockerfile.armv7hf
|
|
||||||
|
|
||||||
Dockerfile.ppc64le: Dockerfile.ppc64le.hdr Dockerfile.tmpl
|
|
||||||
cat Dockerfile.ppc64le.hdr > Dockerfile.ppc64le
|
|
||||||
cat Dockerfile.tmpl >> Dockerfile.ppc64le
|
|
||||||
|
|
||||||
Dockerfile.x86_64: Dockerfile.x86_64.hdr Dockerfile.tmpl
|
|
||||||
cat Dockerfile.x86_64.hdr > Dockerfile.x86_64
|
|
||||||
cat Dockerfile.tmpl >> Dockerfile.x86_64
|
|
||||||
|
|
||||||
qemu-user-static:
|
qemu-user-static:
|
||||||
./extract-deb-pkg qemu-user-static
|
./extract-deb-pkg qemu-user-static
|
||||||
@@ -28,20 +12,13 @@ qemu-user-static:
|
|||||||
binfmt_misc: .FORCE
|
binfmt_misc: .FORCE
|
||||||
./binfmt_misc
|
./binfmt_misc
|
||||||
|
|
||||||
armv7hf: qemu-user-static binfmt_misc Dockerfile.armv7hf
|
%: Dockerfile.% qemu-user-static binfmt_misc
|
||||||
docker build -t criu-armv7hf -f Dockerfile.armv7hf ../..
|
docker build -t criu-$@ -f $< ../..
|
||||||
|
|
||||||
aarch64: qemu-user-static binfmt_misc Dockerfile.aarch64
|
|
||||||
docker build -t criu-aarch64 -f Dockerfile.aarch64 ../..
|
|
||||||
|
|
||||||
ppc64le: qemu-user-static binfmt_misc Dockerfile.ppc64le
|
|
||||||
docker build -t criu-ppc64le -f Dockerfile.ppc64le ../..
|
|
||||||
|
|
||||||
x86_64: Dockerfile.x86_64
|
|
||||||
docker build -t criu-x86_64 -f Dockerfile.x86_64 ../..
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
[ ! -f /proc/sys/fs/binfmt_misc/ppc64le ] || echo -1 > /proc/sys/fs/binfmt_misc/ppc64le
|
rm -rf qemu-user-static
|
||||||
[ ! -f /proc/sys/fs/binfmt_misc/armv7hf ] || echo -1 > /proc/sys/fs/binfmt_misc/armv7hf
|
for ARCH in $(ARCHES); do \
|
||||||
[ ! -f /proc/sys/fs/binfmt_misc/aarch64 ] || echo -1 > /proc/sys/fs/binfmt_misc/aarch64
|
FILE=/proc/sys/fs/binfmt_misc/$$ARCH; \
|
||||||
rm -rf qemu-user-static Dockerfile.aarch64 Dockerfile.armv7hf Dockerfile.ppc64le Dockerfile.x86_64
|
test -f $$FILE && echo -1 > $$FILE; \
|
||||||
|
rm -f Dockerfile.$$ARCH; \
|
||||||
|
done
|
||||||
|
Reference in New Issue
Block a user