mirror of
https://github.com/janet-lang/janet
synced 2025-09-10 06:46:08 +00:00
simplify janet APE build
This commit is contained in:
11
.github/cosmo/build
vendored
Normal file
11
.github/cosmo/build
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# copy janet recipe
|
||||
mkdir -p /sc/sueprconfigure/janet
|
||||
cp ./.github/cosmo/recipe.mk /sc/superconfigure/BUILD.mk
|
||||
cat 'include janet/BUILD.mk' >> /sc/superconfigure/custom.mk
|
||||
|
||||
export SOURCE_DIR=$(realpath .)
|
||||
|
||||
cd /sc/superconfigure
|
||||
make o/janet/built.fat
|
26
.github/cosmo/recipe.mk
vendored
Normal file
26
.github/cosmo/recipe.mk
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
# this recipe is copied into superconfigure/janet/BUILD.mk
|
||||
o/janet/downloaded: \
|
||||
DL_COMMAND = cp -r $(SOURCE_DIR) ./ && ls -al && ls -al ..
|
||||
|
||||
o/janet/patched: PATCH_COMMAND = $(DUMMYLINK0)
|
||||
|
||||
o/janet/configured.x86_64: \
|
||||
CONFIG_COMMAND = cp -r $(BASELOC)/o/janet/janet/* ./
|
||||
|
||||
o/janet/configured.aarch64: \
|
||||
CONFIG_COMMAND = cp -r $(BASELOC)/o/janet/janet/* ./
|
||||
|
||||
o/janet/built.x86_64: \
|
||||
BUILD_COMMAND = make PREFIX=$(COSMOS) HAS_SHARED=0 JANET_NO_AMALG=1
|
||||
|
||||
o/janet/built.aarch64: \
|
||||
BUILD_COMMAND = make PREFIX=$(COSMOS) HAS_SHARED=0 JANET_NO_AMALG=1
|
||||
|
||||
o/janet/installed.x86_64: \
|
||||
INSTALL_COMMAND = cp build/janet $(COSMOS)/bin/
|
||||
|
||||
o/janet/installed.aarch64: \
|
||||
INSTALL_COMMAND = cp build/janet $(COSMOS)/bin/
|
||||
|
||||
o/janet/built.fat: \
|
||||
BINS = janet
|
28
.github/cosmo/setup
vendored
Normal file
28
.github/cosmo/setup
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
sudo apt update
|
||||
sudo apt-get install -y ca-certificates libssl-dev\
|
||||
qemu qemu-utils qemu-user-static\
|
||||
texinfo groff\
|
||||
cmake ninja-build bison zip\
|
||||
pkg-config build-essential autoconf re2c
|
||||
|
||||
# clone superconfigure
|
||||
cd /sc
|
||||
git clone https://github.com/ahgamut/superconfigure --depth=1 --branch=z0.0.39
|
||||
|
||||
# the zip folder
|
||||
sudo mkdir -p /zip
|
||||
sudo chmod -R 0777 /zip
|
||||
|
||||
# clone cosmo
|
||||
cd /sc/superconfigure
|
||||
git clone https://github.com/jart/cosmopolitan --depth=1 --branch=3.3.3 cosmopolitan
|
||||
sudo cp cosmopolitan/build/bootstrap/ape.elf /usr/bin/ape
|
||||
sudo sh -c "echo ':APE:M::MZqFpD::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register"
|
||||
# ls /proc/sys/fs/binfmt_misc/
|
||||
|
||||
# build cosmo
|
||||
cd /sc/superconfigure
|
||||
./.github/scripts/cosmo
|
Reference in New Issue
Block a user