From 31979b86c3856b276e3b0e70d4756171ad448769 Mon Sep 17 00:00:00 2001 From: Amir Husayn Panahifar Date: Mon, 2 Jun 2025 04:58:38 +0330 Subject: [PATCH] Add Makefile targets to build rootfs tarballs and Docker images with cleaning support --- Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c09d106 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +OCITOOL=docker +BUILDDIR=$(shell pwd)/build +OUTPUTDIR=$(shell pwd)/output + +.PHONY: clean +clean: + rm -rf $(BUILDDIR) $(OUTPUTDIR) + +.PRECIOUS: $(OUTPUTDIR)/%.tar.zst +$(OUTPUTDIR)/%.tar.zst: + scripts/make-rootfs.sh $(*) $(BUILDDIR) $(OUTPUTDIR) + +.PRECIOUS: $(OUTPUTDIR)/Dockerfile.% +$(OUTPUTDIR)/Dockerfile.%: $(OUTPUTDIR)/%.tar.zst + scripts/make-dockerfile.sh "$(*).tar.zst" $(*) $(OUTPUTDIR) "true" "Dev" + + +all: image-base image-base-devel image-multilib-devel +image-%: $(OUTPUTDIR)/Dockerfile.% + ${OCITOOL} build -f $(OUTPUTDIR)/Dockerfile.$(*) -t parchlinux/parchlinux:$(*) $(OUTPUTDIR)