2019-06-03 16:41:40 +03:00
|
|
|
ENGINE=docker
|
|
|
|
#ENGINE=podman
|
|
|
|
|
|
|
|
# Example mounting source code directory into container
|
|
|
|
# (lets you "work on the code used to bootstrap" a bit easier)
|
2019-06-19 19:24:18 +03:00
|
|
|
SOURCES=$(HOME)/Code
|
2019-12-09 21:34:14 +03:00
|
|
|
EXTRA=-v $(SOURCES)/haiku:/work/src/haiku -v $(SOURCES)/buildtools:/work/src/buildtools
|
2019-06-03 16:41:40 +03:00
|
|
|
|
2018-11-02 23:03:48 +03:00
|
|
|
default:
|
2019-12-09 19:28:21 +03:00
|
|
|
${ENGINE} build . --no-cache -t docker.io/haiku/bootstrap
|
2018-11-02 23:03:48 +03:00
|
|
|
clean:
|
2019-07-01 22:06:16 +03:00
|
|
|
${ENGINE} ps -q --filter=ancestor=docker.io/haiku/bootstrap | xargs -I {} ${ENGINE} kill {}
|
|
|
|
${ENGINE} ps -a -q --filter=ancestor=docker.io/haiku/bootstrap | xargs -I {} ${ENGINE} rm {}
|
2019-06-03 16:41:40 +03:00
|
|
|
${ENGINE} volume rm bootstrap_work
|
2019-12-09 21:34:14 +03:00
|
|
|
prep:
|
2020-05-21 04:22:00 +03:00
|
|
|
${ENGINE} run -v bootstrap_work:/work:exec ${EXTRA} docker.io/haiku/bootstrap prep
|
2018-11-02 23:03:48 +03:00
|
|
|
crosstools:
|
2020-05-21 04:22:00 +03:00
|
|
|
${ENGINE} run -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work:exec ${EXTRA} docker.io/haiku/bootstrap crosstools
|
2018-11-02 23:03:48 +03:00
|
|
|
bootstrap:
|
2020-05-21 04:22:00 +03:00
|
|
|
${ENGINE} run -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work:exec ${EXTRA} docker.io/haiku/bootstrap bootstrap
|
2018-11-02 23:03:48 +03:00
|
|
|
enter:
|
2020-05-21 04:22:00 +03:00
|
|
|
${ENGINE} run -it -e TARGET_ARCH=$(TARGET_ARCH) -v bootstrap_work:/work:exec ${EXTRA} docker.io/haiku/bootstrap /bin/bash -l
|