1ENGINE=docker
2#ENGINE=podman
3
4# Example mounting source code directory into container
5# (lets you "work on the code used to bootstrap" a bit easier)
6SOURCES=$(HOME)/Code
7EXTRA=-v $(SOURCES)/haiku:/work/src/haiku -v $(SOURCES)/buildtools:/work/src/buildtools
8
9default:
10	${ENGINE} build . --no-cache -t docker.io/haiku/bootstrap
11clean:
12	${ENGINE} ps -q --filter=ancestor=docker.io/haiku/bootstrap | xargs -I {} ${ENGINE} kill {}
13	${ENGINE} ps -a -q --filter=ancestor=docker.io/haiku/bootstrap | xargs -I {} ${ENGINE} rm {}
14	${ENGINE} volume rm bootstrap_work
15prep:
16	${ENGINE} run -v bootstrap_work:/work ${EXTRA} docker.io/haiku/bootstrap prep
17crosstools:
18	${ENGINE} run -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work ${EXTRA} docker.io/haiku/bootstrap crosstools
19bootstrap:
20	${ENGINE} run -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work ${EXTRA} docker.io/haiku/bootstrap bootstrap
21enter:
22	${ENGINE} run -it -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work ${EXTRA} docker.io/haiku/bootstrap /bin/bash -l
23