From abed38c544b7eba4b9ea185db284c906700770a5 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 1 Apr 2021 12:13:15 -0400 Subject: [PATCH] chore: Skip wasmception build if present --- Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 03826ce..40d7241 100644 --- a/Makefile +++ b/Makefile @@ -3,15 +3,23 @@ ROOT=${ROOT:-$(cd "$(dirname ${BASH_SOURCE:-$0})" && pwd)} .PHONY: build build: - @echo "Building wasmception toolchain, takes a while." - @cd ${COMPILER} && make -C wasmception && cd ${ROOT} + if [[ -x "${COMPILER}/wasmception/dist/bin/clang" ]]; then + @echo "Wasmception seems to have been built... Skipping" + else + @echo "Building wasmception toolchain, takes a while." + @cd ${COMPILER} && make -C wasmception && cd ${ROOT} + fi @echo "Building aWsm compiler (release)" @cd ${COMPILER} && cargo build --release && cd ${ROOT} .PHONY: build-dev build-dev: - @echo "Building wasmception toolchain, takes a while." - @cd ${COMPILER} && make -C wasmception && cd ${ROOT} + if [[ -x "${COMPILER}/wasmception/dist/bin/clang" ]]; then + @echo "Wasmception seems to have been built... Skipping" + else + @echo "Building wasmception toolchain, takes a while." + @cd ${COMPILER} && make -C wasmception && cd ${ROOT} + fi @echo "Building aWsm compiler (default==debug)" @cd ${COMPILER} && cargo build && cd ${ROOT}