From bd826e01ecdece1110e04963f8aee5378d2b444b Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 1 Apr 2021 13:21:42 -0400 Subject: [PATCH] chore: try Make friendly syntax --- Makefile | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 40d7241..91c208f 100644 --- a/Makefile +++ b/Makefile @@ -1,25 +1,14 @@ -COMPILER='awsm' +COMPILER=awsm ROOT=${ROOT:-$(cd "$(dirname ${BASH_SOURCE:-$0})" && pwd)} .PHONY: build build: - 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)" + test -f ./${COMPILER}/wasmception/dist/bin/clang || make -C ${COMPILER}/wasmception @cd ${COMPILER} && cargo build --release && cd ${ROOT} .PHONY: build-dev build-dev: - 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 + test -f ./${COMPILER}/wasmception/dist/bin/clang || make -C ${COMPILER}/wasmception @echo "Building aWsm compiler (default==debug)" @cd ${COMPILER} && cargo build && cd ${ROOT}