Skip to content

Commit

Permalink
Makefile: python rules
Browse files Browse the repository at this point in the history
  • Loading branch information
pipcet committed Jan 29, 2021
1 parent 169f4e2 commit 26be126
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ built/wasm32: | built
$(MKDIR) $@
test/wasm32: | test
$(MKDIR) $@
build/wasm32/binutils-gdb build/wasm32/gcc-preliminary build/wasm32/gdb build/wasm32/glibc build/wasm32/gcc build/wasm32/gcc-testsuite build/wasm32/gcc-testsuite-tar build/wasm32/gcc-testsuite-make build/wasm32/ncurses build/wasm32/bash: | build/wasm32
build/wasm32/binutils-gdb build/wasm32/gcc-preliminary build/wasm32/gdb build/wasm32/glibc build/wasm32/gcc build/wasm32/gcc-testsuite build/wasm32/gcc-testsuite-tar build/wasm32/gcc-testsuite-make build/wasm32/ncurses build/wasm32/bash build/wasm32/python: | build/wasm32
$(MKDIR) $@
build/common/binaryen build/common/wabt: | build/common
$(MKDIR) $@
Expand All @@ -50,7 +50,7 @@ src/wasm32/binutils-gdb: | src/wasm32
mv $@T $@

# These repos do not require source tree modification.
good-repos = gcc glibc ncurses bash wabt binaryen coreutils perl zsh
good-repos = gcc glibc ncurses bash wabt binaryen coreutils perl zsh python

$(patsubst %,src/%,$(good-repos)): src/%: | src
test -L $@ || ln -sf ../subrepos/$* $@
Expand Down Expand Up @@ -398,6 +398,10 @@ build/wasm32/ncurses/Makefile: | built/wasm32/gcc src/ncurses build/wasm32/ncurs
(cd build/wasm32/ncurses; CC=wasm32-unknown-none-gcc PATH=$(PWD)/wasm32-unknown-none/bin:$$PATH ../../../src/ncurses/configure --enable-optimize=$(OPT_ASMJS) --build=x86_64-pc-linux-gnu --host=wasm32-unknown-none --prefix=$(PWD)/wasm32-unknown-none/wasm32-unknown-none --disable-stripping --with-shared)
touch $@

build/wasm32/python/Makefile: | built/wasm32/gcc src/python build/wasm32/python
(cd build/wasm32/python; CC=wasm32-unknown-none-gcc PATH=$(PWD)/wasm32-unknown-none/bin:$$PATH ../../../src/python/configure --build=x86_64-pc-linux-gnu --host=wasm32-unknown-none --prefix=$(PWD)/wasm32-unknown-none/wasm32-unknown-none --disable-ipv6)
touch $@

build/wasm32/bash/Makefile: | built/wasm32/ncurses src/bash build/wasm32/bash
(cd build/wasm32/bash; CC=wasm32-unknown-none-gcc PATH=$(PWD)/wasm32-unknown-none/bin:$$PATH ../../../src/bash/configure --build=x86_64-pc-linux-gnu --host=wasm32-unknown-none --prefix=$(PWD)/wasm32-unknown-none/wasm32-unknown-none --without-bash-malloc)
touch $@
Expand Down Expand Up @@ -425,6 +429,12 @@ built/wasm32/perl: build/wasm32/perl/Makefile | install/binfmt_misc/elf32-wasm32
PATH=$(PWD)/wasm32-unknown-none/bin:$$PATH $(MAKE) -C build/wasm32/perl install
touch $@

built/wasm32/python: build/wasm32/python/Makefile
PATH=$(PWD)/wasm32-unknown-none/bin:$$PATH $(MAKE) -C build/wasm32/python
PATH=$(PWD)/wasm32-unknown-none/bin:$$PATH $(MAKE) -C build/wasm32/python install
touch $@


built/wasm32/miniperl: build/wasm32/perl/Makefile | install/binfmt_misc/elf32-wasm32
PATH=$(PWD)/wasm32-unknown-none/bin:$$PATH $(MAKE) -C build/wasm32/perl miniperl
cp build/wasm32/perl/miniperl wasm32-unknown-none/wasm32-unknown-none/bin/miniperl
Expand Down

0 comments on commit 26be126

Please sign in to comment.