Merge pull request #82 from mdboom/emsdk-rerun

Fix #80: Delete emsdk if rerunning make
This commit is contained in:
Michael Droettboom 2018-07-19 15:49:50 -04:00 committed by GitHub
commit d4862b85ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -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/emsdk:
emsdk/emsdk/emsdk/.complete:
make -C emsdk

View File

@ -1,9 +1,10 @@
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
( \
@ -16,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: