This repository has been archived on 2024-08-04. You can view files and clone it, but cannot push or open issues or pull requests.
stagex/Makefile

268 lines
5.2 KiB
Makefile
Raw Normal View History

export SOURCE_DATE_EPOCH = 0
2023-12-10 18:05:50 +00:00
export REGISTRY := local
export BUILDER := $(shell which docker)
define build
${BUILDER} \
build \
-t $(REGISTRY)/$(1):$(2) \
--build-arg REGISTRY=$(REGISTRY) \
--target $(3) \
--output type=oci,dest=$@ \
$(1)
endef
2023-11-09 10:13:20 +00:00
out/bootstrap.oci.tgz:
2023-12-10 18:05:50 +00:00
$(call build,bootstrap)
out/musl.oci.tgz: \
2023-11-13 22:48:49 +00:00
out/bootstrap.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,musl)
2023-11-13 22:48:49 +00:00
out/busybox.oci.tgz: \
out/bootstrap.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,busybox)
2023-11-13 22:48:49 +00:00
out/binutils.oci.tgz: \
out/bootstrap.oci.tgz \
out/musl.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,binutils)
2023-11-17 10:00:25 +00:00
out/linux-headers.oci.tgz:
2023-12-10 18:05:50 +00:00
$(call build,linux-headers)
out/gcc.oci.tgz: \
2023-11-13 22:48:49 +00:00
out/bootstrap.oci.tgz \
out/musl.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,gcc)
2023-11-09 10:13:20 +00:00
2023-11-16 10:01:19 +00:00
out/make.oci.tgz: \
out/bootstrap.oci.tgz \
out/musl.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,make)
2023-11-16 10:01:19 +00:00
2023-11-19 07:38:16 +00:00
out/ca-certificates.oci.tgz:
2023-12-10 18:05:50 +00:00
$(call build,ca-certificates)
2023-11-19 07:38:16 +00:00
out/bash.oci.tgz: \
out/gcc.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,bash)
2023-12-05 04:34:07 +00:00
out/m4.oci.tgz: \
out/busybox.oci.tgz \
out/gcc.oci.tgz \
out/binutils.oci.tgz \
out/musl.oci.tgz \
2023-12-06 12:56:43 +00:00
out/make.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,m4)
2023-12-05 04:34:07 +00:00
out/autoconf.oci.tgz: \
out/busybox.oci.tgz \
out/gcc.oci.tgz \
out/binutils.oci.tgz \
out/musl.oci.tgz \
out/make.oci.tgz \
out/perl.oci.tgz \
out/m4.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,autoconf)
2023-12-05 04:34:07 +00:00
out/automake.oci.tgz: \
out/busybox.oci.tgz \
out/gcc.oci.tgz \
out/binutils.oci.tgz \
out/musl.oci.tgz \
out/make.oci.tgz \
out/perl.oci.tgz \
out/autoconf.oci.tgz \
out/m4.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,automake)
2023-12-05 04:34:07 +00:00
2023-12-05 04:36:18 +00:00
out/sed.oci.tgz: \
out/busybox.oci.tgz \
out/gcc.oci.tgz \
out/binutils.oci.tgz \
out/musl.oci.tgz \
out/make.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,sed)
2023-12-05 04:36:18 +00:00
out/libtool.oci.tgz: \
out/busybox.oci.tgz \
out/gcc.oci.tgz \
out/binutils.oci.tgz \
out/musl.oci.tgz \
out/make.oci.tgz \
out/bash.oci.tgz \
out/sed.oci.tgz \
out/m4.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,libtool)
2023-12-05 04:36:18 +00:00
out/pkgconf.oci.tgz: \
out/busybox.oci.tgz \
out/gcc.oci.tgz \
out/binutils.oci.tgz \
out/musl.oci.tgz \
out/make.oci.tgz \
out/libtool.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,pkgconf)
2023-12-05 04:36:18 +00:00
out/libxml2.oci.tgz: \
out/busybox.oci.tgz \
out/gcc.oci.tgz \
out/binutils.oci.tgz \
out/musl.oci.tgz \
out/make.oci.tgz \
out/bash.oci.tgz \
out/python.oci.tgz \
out/sed.oci.tgz \
out/m4.oci.tgz \
out/autoconf.oci.tgz \
out/automake.oci.tgz \
out/pkgconf.oci.tgz \
out/libtool.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,libxml2)
2023-12-05 04:36:18 +00:00
2023-12-06 12:56:43 +00:00
out/libunwind.oci.tgz: \
out/busybox.oci.tgz \
out/gcc.oci.tgz \
out/binutils.oci.tgz \
out/musl.oci.tgz \
out/make.oci.tgz \
out/bash.oci.tgz \
out/autoconf.oci.tgz \
out/automake.oci.tgz \
out/libtool.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,libunwind)
2023-12-06 12:56:43 +00:00
2023-11-16 10:01:19 +00:00
out/openssl.oci.tgz: \
out/gcc.oci.tgz \
out/binutils.oci.tgz \
out/busybox.oci.tgz \
2023-11-21 23:57:26 +00:00
out/linux-headers.oci.tgz \
2023-11-16 10:01:19 +00:00
out/musl.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,openssl)
2023-11-16 10:01:19 +00:00
out/go.oci.tgz: \
out/gcc.oci.tgz \
out/binutils.oci.tgz \
out/busybox.oci.tgz \
out/bash.oci.tgz \
out/musl.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,go)
2023-11-15 00:30:48 +00:00
2023-11-16 10:01:19 +00:00
out/perl.oci.tgz: \
out/gcc.oci.tgz \
out/binutils.oci.tgz \
out/busybox.oci.tgz \
2023-11-21 23:57:26 +00:00
out/make.oci.tgz \
2023-11-16 10:01:19 +00:00
out/musl.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,perl)
2023-11-16 10:01:19 +00:00
2023-11-19 07:38:16 +00:00
out/curl.oci.tgz: \
out/gcc.oci.tgz \
out/musl.oci.tgz \
out/busybox.oci.tgz \
out/make.oci.tgz \
out/binutils.oci.tgz \
out/openssl.oci.tgz \
out/ca-certificates.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,curl)
2023-11-19 07:38:16 +00:00
2023-11-16 10:01:19 +00:00
out/python.oci.tgz: \
out/gcc.oci.tgz \
out/perl.oci.tgz \
out/binutils.oci.tgz \
out/busybox.oci.tgz \
out/openssl.oci.tgz \
out/make.oci.tgz \
out/musl.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,python)
2023-11-16 10:01:19 +00:00
2023-11-21 23:57:26 +00:00
out/ninja.oci.tgz: \
out/busybox.oci.tgz \
out/gcc.oci.tgz \
out/binutils.oci.tgz \
out/musl.oci.tgz \
out/make.oci.tgz \
out/openssl.oci.tgz \
out/python.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,ninja)
2023-11-21 23:57:26 +00:00
out/cmake.oci.tgz: \
out/busybox.oci.tgz \
out/gcc.oci.tgz \
out/binutils.oci.tgz \
out/ninja.oci.tgz \
out/musl.oci.tgz \
out/make.oci.tgz \
out/linux-headers.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,cmake)
2023-11-21 23:57:26 +00:00
out/py-setuptools.oci.tgz: \
out/busybox.oci.tgz \
out/python.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,py-setuptools)
2023-11-21 23:57:26 +00:00
out/zlib.oci.tgz: \
out/busybox.oci.tgz \
out/gcc.oci.tgz \
out/binutils.oci.tgz \
out/musl.oci.tgz \
out/make.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,zlib)
2023-11-21 23:57:26 +00:00
out/llvm.oci.tgz: \
out/gcc.oci.tgz \
out/python.oci.tgz \
out/py-setuptools.oci.tgz \
out/perl.oci.tgz \
out/binutils.oci.tgz \
out/cmake.oci.tgz \
out/ninja.oci.tgz \
out/busybox.oci.tgz \
out/musl.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,llvm)
2023-11-21 23:57:26 +00:00
2023-12-04 02:08:26 +00:00
out/llvm13.oci.tgz: \
out/gcc.oci.tgz \
out/python.oci.tgz \
out/py-setuptools.oci.tgz \
out/perl.oci.tgz \
out/binutils.oci.tgz \
out/cmake.oci.tgz \
out/ninja.oci.tgz \
out/busybox.oci.tgz \
out/musl.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,llvm13)
2023-12-04 02:08:26 +00:00
2023-12-10 18:05:50 +00:00
out/rust1.54.oci.tgz: \
out/gcc.oci.tgz \
out/bash.oci.tgz \
out/zlib.oci.tgz \
out/python.oci.tgz \
2023-12-10 18:05:50 +00:00
out/py-setuptools.oci.tgz \
out/curl.oci.tgz \
out/perl.oci.tgz \
out/libunwind.oci.tgz \
out/llvm13.oci.tgz \
out/binutils.oci.tgz \
out/cmake.oci.tgz \
out/make.oci.tgz \
out/busybox.oci.tgz \
out/musl.oci.tgz
2023-12-10 18:05:50 +00:00
$(call build,rust,1.54.0,bootstrap)
out/rust1.55.oci.tgz: out/rust1.54.oci.tgz
$(call build,rust,1.55.0)
2023-11-15 00:30:48 +00:00
test:
2023-12-10 18:05:50 +00:00
docker build -t $(REGISTRY)/test-c tests/c
docker build -t $(REGISTRY)/test-go tests/go
docker build -t $(REGISTRY)/test-perl tests/perl
2023-11-15 00:30:48 +00:00
@printf "\nOcirep Test Suite\n"
2023-11-16 10:01:19 +00:00
@printf "go -> "
2023-12-10 18:05:50 +00:00
@docker run -i $(REGISTRY)/test-go | grep Success
2023-11-16 10:01:19 +00:00
@printf "c -> "
2023-12-10 18:05:50 +00:00
@docker run -i $(REGISTRY)/test-c | grep Success
2023-11-16 10:01:19 +00:00
@printf "perl -> "
2023-12-10 18:05:50 +00:00
@docker run -i $(REGISTRY)/test-perl | grep Success