changeset 147: |
6b01a0f442bc |
parent: |
70bc6f20adcf
|
child: |
f96ab32de161 |
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Sun, 21 Jan 2024 21:01:13 -0500 |
permissions: |
-rw-r--r-- |
description: |
nushell fixes (ty Antoine) |
1 ### infra/makefile --- The Compiler Company Infrastructure 3 # this makefile is used to build all of our source code, package it, 4 # and ship it to various locations. It is for internal-use only. 6 # If possible, use the packy (packy.compiler.company) to find and 7 # download a prepared bundle that suits your project needs. 9 # You probably don't want to install all targets unless you have lots 10 # of time and a powerful machine, although it is possible. Instead, 11 # just run the targets for the components you are missing in your 12 # local environment (compatible compiler versions, shared libraries, 16 LINUX_VERSION:=$(shell
uname
-r
| cut
-d-
-f1
) 20 HG_COMMIT:=$(shell
hg
id
-i
) 21 DESTINATION:=/mnt/y/data/packy
22 # requires emacs-build-minimal 23 # artifacts can deploy to dist/TARGET - need target triple first 24 # init:sbcl rust emacs rocksdb code 25 # dist/linux dist/rust dist/bundle 26 box:Containerfile.
box;
podman build -
f $< -
t localhost/
infra/
box 27 worker:Containerfile.
worker;
podman build -
f $< -
t localhost/
infra/
worker 28 operator:Containerfile.
operator;
podman build -
f $< -
t localhost/
infra/
operator 30 operator:core-
lisp-
install core-
rust-
install 31 all:dist/
cdn dist/
code dist/
lisp dist/
rust dist/
sbcl dist/
rocksdb dist/
emacs 32 clean:;
rm -
rf $(B) $(D) 33 $(B):;
mkdir -
pv $@/
src 34 $(D):;
mkdir -
pv $@/
bin $@/
lib $@/
include $@/
bundle $@/
share 35 $(DESTINATION):$(D);
cd $< &&
cp -
rf ./* $@
37 LINUX_TARGET:=linux-
$(LINUX_VERSION
) 38 linux:$(LINUX_TARGET) linux-
config;
40 $(LINUX_TARGET):scripts/
get-
linux.
sh;
42 gpg
--export
autosigner@
torvalds@
gregkh@
>
build/
$@/keyring.gpg
43 $<
$(LINUX_VERSION
) build
build/
$@/keyring.gpg
44 cd build
&& unxz
$@.tar.xz
&& tar
-xvf
$@.tar
$(LINUX_TARGET
) 45 linux-config:$(LINUX_TARGET);
46 cd build/$<
&& make
mrproper
-j
&& zcat
/proc/config.gz
>
.config
&& yes
N
| make
localmodconfig
47 clean-linux::;
rm -
rf build/
$(LINUX_TARGET) 50 EMACS_TARGET:=build/src/emacs
51 EMACS_DIST:=$(D
)/src/emacs
52 $(EMACS_TARGET):scripts/
get-
emacs.
sh $(B);
55 emacs-build:scripts/
build-
emacs.
sh $(EMACS_TARGET) 56 cd $(EMACS_TARGET
) && ./autogen.sh
58 emacs-build-mini:scripts/
build-
emacs-
mini.
sh emacs 59 cd $(EMACS_TARGET
) && ./autogen.sh
61 emacs-install:$(EMACS_TARGET);
65 ROCKSDB_TARGET:=build/src/rocksdb
66 $(ROCKSDB_TARGET):scripts/
get-
rocksdb.
sh $(B) 68 rocksdb:$(ROCKSDB_TARGET) 70 rocksdb-build-shared:$(ROCKSDB_TARGET) 71 cd $<
&& make
shared_lib
DISABLE_JEMALLOC=1 73 rocksdb-build-static:$(ROCKSDB_TARGET) 74 cd $<
&& make
static_lib
DISABLE_JEMALLOC=1 76 rocksdb-install:$(ROCKSDB_TARGET) 80 NUSHELL_TARGET:=build/src/nushell
81 $(NUSHELL_TARGET):scripts/
get-
nushell.
sh;$<
82 nushell:$(NUSHELL_TARGET) 83 # build without clipboard to avoid errors at runtime in container env 84 nushell-build:$(NUSHELL_TARGET) 85 cd $<
&& cargo
build
--workspace
--release
--no-default-features
--features
=default-no-clipboard,dataframe,extra
--locked
86 nushell-install:$(NUSHELL_TARGET) nushell-
build 87 cd $<
&& ./scripts/install-all.sh
89 SBCL_TARGET:=build/src/sbcl
90 $(SBCL_TARGET):scripts/
get-
sbcl.
sh $(B) 92 cd $(SBCL_TARGET
) && \ 93 echo '"2.4.1+main"' >
version.lisp-expr
95 sbcl-build:$(SBCL_TARGET) 99 --with-mark-region-gc
\ 100 --with-core-compression
\ 101 --dynamic-space-size
=8Gb
\ 104 sbcl-build-gencgc:$(SBCL_TARGET) 107 --with-core-compression
\ 108 --dynamic-space-size
=8Gb
\ 110 sbcl-docs:sbcl-
build;
## REQUIRES TEXLIVE 111 cd $(SBCL_TARGET
)/doc/manual
&& make
112 sbcl-install:sbcl-
build;
cd $(SBCL_TARGET) &&
INSTALL_ROOT=/
usr/
local sh install.
sh 113 clean-sbcl:$(SBCL_TARGET);
cd $(SBCL_TARGET) && ./
clean.
sh 115 build/quicklisp.lisp:$(B);
cd $< &&
curl -
O https://
beta.
quicklisp.
org/
quicklisp.
lisp 116 quicklisp-install:scripts/
quicklisp-
install.
sh build/
quicklisp.
lisp;$<
119 RUST_TARGET:=build/src/rust
120 $(RUST_TARGET):scripts/
get-
rust.
sh $(B);$<
123 cargo
install
--path
$(RUST_TARGET
)/src/tools/x
124 rust-build:rust rust-
install-
x;
125 cd $(RUST_TARGET
) && x
build
library
126 rust-doc:rust rust-
install-
x;
127 cd $(RUST_TARGET
) && x
doc
128 rust-build-full:rust-
build;
129 cd $(RUST_TARGET
) && x
build
--stage
2 compiler/rustc
130 rust-install:rust-
build;
131 cd $(RUST_TARGET
) && x
install
132 rustup-install:;
curl --
proto '=
https' --
tlsv1.2 -
sSf https://
sh.
rustup.
rs | sh -
s -- -
y 133 cargo-tools-install:scripts/
install-
cargo-
tools.
sh 136 TREE_SITTER_TARGET:=build/src/tree-sitter
137 $(TREE_SITTER_TARGET):scripts/
get-
tree-
sitter.
sh 139 tree-sitter:$(TREE_SITTER_TARGET) 140 tree-sitter-build:$(TREE_SITTER_TARGET) 141 tree-sitter-install:$(TREE_SITTER_TARGET) tree-
sitter-
build 143 ### Tree-sitter Langs 144 TREE_SITTER_LANGS_TARGET:=build/src/tree-sitter-langs
145 tree-sitter-langs-install:scripts/
tree-
sitter-
install-
langs.
sh 148 CODE_TARGET:=build/src/
$(SRC
) 149 $(CODE_TARGET):scripts/
get-
code.
sh $(B) 152 clean-code::;
rm -
rf $(CODE_TARGET) 155 dist/bundle:scripts/
bundle-
code.
sh $(CODE_TARGET) 164 scripts/dist-sbcl-binary.sh
$(SBCL_TARGET
) $(D
) 165 cd $(SBCL_TARGET
) && sh
./clean.sh
166 scripts/dist-sbcl-source.sh
$(SBCL_TARGET
) $(D
) 168 dist/linux:linux $(D);
170 dist/rocksdb:$(D) rocksdb;
172 tar
-I
'zstd' -cf
../../$</rocksdb-binary.tar.zst
rocksdb/include/*
rocksdb/librocksdb.*
174 CORE_SRC=/usr/local/src/core
176 dist/rust:rust-
build $(D);
177 cd $(RUST_TARGET
) && x
dist
178 dist/rust/bin:scripts/
cargo-
install.
sh 180 $<
"$(CORE_SRC
)/rust/app/cli/alik" dist/rust
181 $<
"$(CORE_SRC
)/rust/app/cli/krypt" dist/rust
182 $<
"$(CORE_SRC
)/rust/app/cli/tz" dist/rust
183 $<
"$(CORE_SRC
)/rust/app/cli/cc-init" dist/rust
184 $<
"$(CORE_SRC
)/rust/app/cli/mailman" dist/rust
186 dist/emacs:emacs-
build $(D);
187 cd $(EMACS_TARGET
) && ./make-dist
--no-info
--no-changelog
&& \ 188 mv
emacs-*.*.*
emacs
&& \ 189 tar
-I
'zstd' -cf
../../../dist/emacs-binary.tar.zst
emacs
191 dist/nushell:$(D) nushell-
build 192 cd $(NUSHELL_TARGET
)/target/release/
&& \ 193 tar
-I
'zstd' -cf
../../../../../$</nushell.tar.zst
\ 194 nu
nu_plugin_custom_values
nu_plugin_formats
nu_plugin_gstat
\ 195 nu_plugin_inc
nu_plugin_query
197 dist/tree-sitter:scripts/
tree-
sitter-
install-
langs.
sh $(D) 200 # requires quicklisp loaded in .skelrc 201 dist/lisp/fasl:scripts/
sbcl-
save-
core.
sh 204 $<
"$@/prelude.core" "(mapc #'ql:quickload \ 205 (list :nlp :rdb :organ :packy :skel :obj :net :parse :pod :dat :log :packy :rt :syn :xdb :doc :vc :rt))" 207 dist/lisp/bin:scripts/
sbcl-
make-
bin.
sh 210 mv
$(CORE_SRC
)/lisp/app/bin/skel
$@ 211 rm
-f
$(CORE_SRC
)/lisp/app/bin/skel.fasl
213 cp
$(CORE_SRC
)/lisp/app/bin/organ
$@ 214 rm
-f
$(CORE_SRC
)/lisp/app/bin/organ.fasl
216 cp
$(CORE_SRC
)/lisp/app/bin/homer
$@ 217 rm
-f
$(CORE_SRC
)/lisp/app/bin/homer.fasl
219 cp
$(CORE_SRC
)/lisp/app/bin/packy
$@ 220 rm
-f
$(CORE_SRC
)/lisp/app/bin/packy.fasl
222 cp
$(CORE_SRC
)/lisp/app/bin/rdb
$@ 223 rm
-f
$(CORE_SRC
)/lisp/app/bin/rdb.fasl
225 dist/lisp:dist/
lisp/
fasl dist/
lisp/
bin 227 core-lisp-install:dist/
lisp 228 install
-m
755 $</bin/*
/usr/local/bin/
229 install
-m
755 $</fasl/*
/usr/local/lib/sbcl/
231 core-rust-install:dist/
rust/
bin 232 install
-m
755 $</*
/usr/local/bin/
234 core-install:core-
lisp-
install core-
rust-
install 238 cp
-r
$(CODE_TARGET
)/
{org,core,infra,demo
} $@ 239 clean-dist:;
rm -
rf $(D) 240 clean-build:;
rm -
rf $(B)