Skip to content

Commit

Permalink
Makefile: switch to using (and shipping) toolchain.tar
Browse files Browse the repository at this point in the history
  • Loading branch information
pipcet committed Jan 25, 2021
1 parent 16dbabe commit 19d8b82
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -460,26 +460,26 @@ artifact-gcc!: | subrepos/gcc/checkout! artifacts extracted/artifacts/binutils.t
cp wasm/libstdc++.wasm artifacts/
$(MAKE) artifact-push!

artifact-ncurses!: | subrepos/ncurses/checkout! artifacts extracted/artifacts/binutils.tar extracted/artifacts/gcc-preliminary.tar extracted/artifacts/glibc.tar extracted/artifacts/gcc.tar
artifact-ncurses!: | subrepos/ncurses/checkout! artifacts extracted/artifacts/toolchain.tar
$(MAKE) artifact-timestamp
$(MAKE) built/wasm32/ncurses
$(MAKE) wasm/libncurses.wasm
tar cf artifacts/ncurses.tar built wasm32-unknown-none -N ./artifact-timestamp
cp wasm/libncurses.wasm artifacts/
$(MAKE) artifact-push!

artifact-bash!: | subrepos/bash/checkout! artifacts extracted/artifacts/binutils.tar extracted/artifacts/gcc-preliminary.tar extracted/artifacts/glibc.tar extracted/artifacts/gcc.tar extracted/artifacts/ncurses.tar
artifact-bash!: | subrepos/bash/checkout! artifacts extracted/artifacts/toolchain.tar extracted/artifacts/ncurses.tar
$(MAKE) artifact-timestamp
$(MAKE) built/wasm32/bash wasm/bash.wasm
cp wasm/bash.wasm artifacts/
$(MAKE) artifact-push!

artifact-zsh!: | subrepos/zsh/checkout! artifacts extracted/artifacts/binutils.tar extracted/artifacts/gcc-preliminary.tar extracted/artifacts/glibc.tar extracted/artifacts/gcc.tar extracted/artifacts/ncurses.tar
artifact-zsh!: | subrepos/zsh/checkout! artifacts extracted/artifacts/toolchain.tar extracted/artifacts/ncurses.tar
$(MAKE) artifact-timestamp
$(MAKE) built/wasm32/zsh
$(MAKE) artifact-push!

artifact-coreutils!: | subrepos/coreutils/checkout! artifacts extracted/artifacts/binutils.tar extracted/artifacts/gcc-preliminary.tar extracted/artifacts/glibc.tar extracted/artifacts/gcc.tar extracted/artifacts/ncurses.tar install/gperf install/autopoint install/binfmt_misc/elf32-wasm32 install/binfmt_misc/wasm install/file-slurp js/wasm32.js wasm/libc.wasm wasm/ld.wasm wasm/libm.wasm
artifact-coreutils!: | subrepos/coreutils/checkout! artifacts extracted/artifacts/toolchain.tar extracted/artifacts/ncurses.tar install/gperf install/autopoint install/binfmt_misc/elf32-wasm32 install/binfmt_misc/wasm install/file-slurp js/wasm32.js wasm/libc.wasm wasm/ld.wasm wasm/libm.wasm
$(MAKE) artifacts/jsshell-linux-x86_64.zip
unzip artifacts/jsshell-linux-x86_64.zip -d bin
$(MAKE) artifact-timestamp
Expand All @@ -492,7 +492,7 @@ artifact-miniperl!: | install/binfmt_misc/elf32-wasm32
artifact-miniperl!: | install/binfmt_misc/wasm
artifact-miniperl!: | install/file-slurp

artifact-miniperl!: | subrepos/perl/checkout! artifacts extracted/artifacts/binutils.tar extracted/artifacts/gcc-preliminary.tar extracted/artifacts/glibc.tar extracted/artifacts/gcc.tar js/wasm32.js artifacts/jsshell-linux-x86_64.zip
artifact-miniperl!: | subrepos/perl/checkout! artifacts extracted/artifacts/toolchain.tar js/wasm32.js artifacts/jsshell-linux-x86_64.zip
unzip artifacts/jsshell-linux-x86_64.zip -d bin
$(MAKE) artifact-timestamp
$(MAKE) built/wasm32/miniperl wasm/miniperl.wasm
Expand Down Expand Up @@ -533,6 +533,11 @@ ship-gcc/%!: ship/gcc.tar.gz github/assets/%.json | ship github github/release/l
for name in $$(cd ship; ls *); do for id in $$(jq ".[] | if .name == \"$$name\" then .id else 0 end" < github/assets/$*.json); do [ $$id != "0" ] && curl -sSL -XDELETE -H "Authorization: token $$GITHUB_TOKEN" "https://api.github.com/repos/$$GITHUB_REPOSITORY/releases/assets/$$id"; echo; done; done
(for name in ship/*; do bname=$$(basename "$$name"); curl -sSL -XPOST -H "Authorization: token $$GITHUB_TOKEN" --header "Content-Type: application/octet-stream" "https://uploads.github.com/repos/$$GITHUB_REPOSITORY/releases/$$(cat github/release/\"$*\")/assets?name=$$bname" --upload-file $$name; echo; done)

ship-toolchain/%!: ship/toolchain.tar.gz github/assets/%.json | ship github github/release/list!
$(MAKE) github/release/list!
for name in $$(cd ship; ls *); do for id in $$(jq ".[] | if .name == \"$$name\" then .id else 0 end" < github/assets/$*.json); do [ $$id != "0" ] && curl -sSL -XDELETE -H "Authorization: token $$GITHUB_TOKEN" "https://api.github.com/repos/$$GITHUB_REPOSITORY/releases/assets/$$id"; echo; done; done
(for name in ship/*; do bname=$$(basename "$$name"); curl -sSL -XPOST -H "Authorization: token $$GITHUB_TOKEN" --header "Content-Type: application/octet-stream" "https://uploads.github.com/repos/$$GITHUB_REPOSITORY/releases/$$(cat github/release/\"$*\")/assets?name=$$bname" --upload-file $$name; echo; done)

ship-glibc/%!: ship/glibc.tar.gz github/assets/%.json | ship github github/release/list!
$(MAKE) github/release/list!
for name in $$(cd ship; ls *); do for id in $$(jq ".[] | if .name == \"$$name\" then .id else 0 end" < github/assets/$*.json); do [ $$id != "0" ] && curl -sSL -XDELETE -H "Authorization: token $$GITHUB_TOKEN" "https://api.github.com/repos/$$GITHUB_REPOSITORY/releases/assets/$$id"; echo; done; done
Expand Down Expand Up @@ -711,7 +716,7 @@ artifact-push!:
(cd artifacts; for file in *; do if [ "$$file" -nt ../artifact-timestamp ]; then name=$$(basename "$$file"); (cd ..; bash github/ul-artifact "$$name" "artifacts/$$name"); fi; done)
@echo "(Do not be confused by the size stated above; it's the compressed size)"

%.{dejagnu}!: js/wasm32.js install/texinfo-bison-flex install/gcc-dependencies install/dejagnu build | extracted/artifacts/binutils.tar extracted/artifacts/gcc-preliminary.tar extracted/artifacts/gcc.tar extracted/artifacts/glibc.tar tools/bin/wasmrewrite tools/bin/wasmsect artifacts/jsshell-linux-x86_64.zip install/binfmt_misc/wasm install/binfmt_misc/elf32-wasm32 artifacts/libc.wasm artifacts/ld.wasm artifacts/libm.wasm artifacts
%.{dejagnu}!: js/wasm32.js install/texinfo-bison-flex install/gcc-dependencies install/dejagnu build | extracted/artifacts/toolchain.tar tools/bin/wasmrewrite tools/bin/wasmsect artifacts/jsshell-linux-x86_64.zip install/binfmt_misc/wasm install/binfmt_misc/elf32-wasm32 artifacts/libc.wasm artifacts/ld.wasm artifacts/libm.wasm artifacts
$(MKDIR) wasm
cp artifacts/*.wasm wasm
$(MAKE) artifact-timestamp
Expand All @@ -726,7 +731,7 @@ artifact-push!:
grep FAIL build/wasm32/gcc/gcc/testsuite/gcc/gcc.log > artifacts/$(notdir $*)-$$PREFIX-short.log || true
$(MAKE) artifact-push!

%.{dejanew}!: js/wasm32.js install/texinfo-bison-flex install/gcc-dependencies install/dejagnu | extracted/artifacts/binutils.tar extracted/artifacts/gcc-preliminary.tar extracted/artifacts/gcc.tar extracted/artifacts/glibc.tar
%.{dejanew}!: js/wasm32.js install/texinfo-bison-flex install/gcc-dependencies install/dejagnu | extracted/artifacts/toolchain.tar
$(MAKE) tools/bin/wasmrewrite > /dev/null
$(MAKE) tools/bin/wasmsect > /dev/null
$(MAKE) artifacts/jsshell-linux-x86_64.zip
Expand Down

0 comments on commit 19d8b82

Please sign in to comment.