From a0046f2799e0665eec4393d45b8e18aada6b7b5c Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 18 Jul 2018 18:45:20 -0400 Subject: [PATCH 1/3] Fix #80: Delete emsdk if rerunning make --- emsdk/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/emsdk/Makefile b/emsdk/Makefile index 28eae6d96..0f6eeeb99 100644 --- a/emsdk/Makefile +++ b/emsdk/Makefile @@ -4,6 +4,7 @@ all: emsdk/emsdk # run out of memory emsdk/emsdk: + if [ -d emsdk ]; then rm -rf emsdk; fi git clone https://github.com/juj/emsdk.git sed -i -e "s#CPU_CORES = max(multiprocessing.cpu_count()-1, 1)#CPU_CORES = 3#g" emsdk/emsdk ( \ From 6c2d77979fa6141417c6325289c57e75ad13811f Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Thu, 19 Jul 2018 07:53:37 -0400 Subject: [PATCH 2/3] Use a file, rather than a directory as the target for OSX compat --- Makefile | 2 +- emsdk/Makefile | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index b46055b4e..6e21db1cf 100644 --- a/Makefile +++ b/Makefile @@ -173,5 +173,5 @@ build/packages.json: $(CPYTHONLIB) make -C packages -emsdk/emsdk/emsdk: +emsdk/emsdk/.complete: make -C emsdk diff --git a/emsdk/Makefile b/emsdk/Makefile index 0f6eeeb99..594ecfcfe 100644 --- a/emsdk/Makefile +++ b/emsdk/Makefile @@ -1,9 +1,9 @@ -all: emsdk/emsdk +all: emsdk/emsdk/.complete # We hack the CPU_CORES, because if you use all of the cores on Circle-CI, you # run out of memory -emsdk/emsdk: +emsdk/emsdk/.complete: if [ -d emsdk ]; then rm -rf emsdk; fi git clone https://github.com/juj/emsdk.git sed -i -e "s#CPU_CORES = max(multiprocessing.cpu_count()-1, 1)#CPU_CORES = 3#g" emsdk/emsdk @@ -17,7 +17,8 @@ emsdk/emsdk: make ; \ cd ../.. ; \ cp binaryen/tag-1.38.4/bin/binaryen.js binaryen/tag-1.38.4_64bit_binaryen/bin ; \ - ./emsdk activate --embedded --build=Release sdk-tag-1.38.4-64bit binaryen-tag-1.38.4-64bit \ + ./emsdk activate --embedded --build=Release sdk-tag-1.38.4-64bit binaryen-tag-1.38.4-64bit ; \ + touch .complete \ ) clean: From e4f3ad147e00a52108f9e12f252c0fbe862212d9 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Thu, 19 Jul 2018 11:24:36 -0400 Subject: [PATCH 3/3] Fix main Makefile --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6e21db1cf..730eb5896 100644 --- a/Makefile +++ b/Makefile @@ -161,7 +161,7 @@ root/.built: \ touch root/.built -$(CPYTHONLIB): emsdk/emsdk/emsdk +$(CPYTHONLIB): emsdk/emsdk/emsdk/.complete make -C $(CPYTHONROOT) @@ -173,5 +173,5 @@ build/packages.json: $(CPYTHONLIB) make -C packages -emsdk/emsdk/.complete: +emsdk/emsdk/emsdk/.complete: make -C emsdk