SHELL := /usr/bin/env bash -euo pipefail # LEAN_OPTS: don't use native code (except for primitives) since it is from the previous stage # MORE_DEPS: rebuild the stdlib whenever the compiler has changed LEANMAKE_OPTS+=\ LEAN="${PREV_STAGE}/bin/lean${CMAKE_EXECUTABLE_SUFFIX}"\ OUT="${LIB}"\ LIB_OUT="${LIB}/lean"\ OLEAN_OUT="${LIB}/lean"\ LEAN_OPTS="${LEAN_EXTRA_MAKE_OPTS} -Dinterpreter.prefer_native=false"\ LEANC_OPTS="${LEANC_OPTS}"\ MORE_DEPS="${PREV_STAGE}/bin/lean${CMAKE_EXECUTABLE_SUFFIX}"\ CMAKE_LIKE_OUTPUT=1 stdlib: # Use `+` to use the Make jobserver with `leanmake` for parallelized builds +"${LEAN_BIN}/leanmake" lib PKG=Init $(LEANMAKE_OPTS) +"${LEAN_BIN}/leanmake" lib PKG=Std $(LEANMAKE_OPTS) +"${LEAN_BIN}/leanmake" lib PKG=Lean $(LEANMAKE_OPTS)