changeset 197: |
1ebb2ba98e88 |
parent: |
813fff1d2096
|
child: |
3b84ce879498 |
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Tue, 19 Mar 2024 23:24:13 -0400 |
permissions: |
-rw-r--r-- |
description: |
get stumpwm |
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 all:dist/
cdn dist/
code dist/
lisp dist/
rust dist/
sbcl dist/
rocksdb dist/
emacs 31 clean:;
rm -
rf $(B) $(D) 32 $(B):;
mkdir -
pv $@/
src 33 $(D):;
mkdir -
pv $@/
bin $@/
lib $@/
include $@/
bundle $@/
share 34 $(DESTINATION):$(D);
cd $< &&
cp -
rf ./* $@
36 LINUX_TARGET:=linux-
$(LINUX_VERSION
) 37 linux:$(LINUX_TARGET) linux-
config;
39 $(LINUX_TARGET):scripts/
get-
linux.
sh;
41 gpg
--export
autosigner@
torvalds@
gregkh@
>
build/
$@/keyring.gpg
42 $<
$(LINUX_VERSION
) build
build/
$@/keyring.gpg
43 cd build
&& unxz
$@.tar.xz
&& tar
-xvf
$@.tar
$(LINUX_TARGET
) 44 linux-config:$(LINUX_TARGET);
45 cd build/$<
&& make
mrproper
-j
&& zcat
/proc/config.gz
>
.config
&& yes
N
| make
localmodconfig
46 clean-linux::;
rm -
rf build/
$(LINUX_TARGET) 49 EMACS_TARGET:=build/src/emacs
50 EMACS_DIST:=$(D
)/src/emacs
51 $(EMACS_TARGET):scripts/
get-
emacs.
sh $(B);
54 emacs-build:scripts/
build-
emacs.
sh $(EMACS_TARGET) 55 cd $(EMACS_TARGET
) && ./autogen.sh
57 emacs-build-mini:scripts/
build-
emacs-
mini.
sh emacs 58 cd $(EMACS_TARGET
) && ./autogen.sh
60 emacs-install:$(EMACS_TARGET);
64 ROCKSDB_TARGET:=build/src/rocksdb
65 $(ROCKSDB_TARGET):scripts/
get-
rocksdb.
sh $(B) 67 rocksdb:$(ROCKSDB_TARGET) 69 rocksdb-build-shared:$(ROCKSDB_TARGET) 70 cd $<
&& make
shared_lib
DISABLE_JEMALLOC=1 72 rocksdb-build-static:$(ROCKSDB_TARGET) 73 cd $<
&& make
static_lib
DISABLE_JEMALLOC=1 75 rocksdb-install:$(ROCKSDB_TARGET) 79 NUSHELL_TARGET:=build/src/nushell
80 $(NUSHELL_TARGET):scripts/
get-
nushell.
sh;$<
81 nushell:$(NUSHELL_TARGET) 82 # build without clipboard to avoid errors at runtime in container env 83 nushell-build:$(NUSHELL_TARGET) 84 cd $<
&& cargo
build
--workspace
--release
--no-default-features
--features
=default-no-clipboard,dataframe,extra
--locked
85 nushell-install:$(NUSHELL_TARGET) nushell-
build 86 cd $<
&& ./scripts/install-all.sh
88 SBCL_TARGET:=build/src/sbcl
90 $(SBCL_TARGET):scripts/
get-
sbcl.
sh $(B) 92 cd $(SBCL_TARGET
) && \ 93 echo '"$(SBCL_VERSION)"' >
version.lisp-expr
95 #### --with-sb-fasteval --without-sb-eval < broken 96 sbcl-build:$(SBCL_TARGET) 100 --with-mark-region-gc
\ 101 --dynamic-space-size
=8Gb
\ 103 sbcl-build-shared:$(SBCL_TARGET) sbcl-
build 105 ./make-shared-library.sh
\ 106 sbcl-build-gencgc:$(SBCL_TARGET) 109 --dynamic-space-size
=8Gb
\ 111 sbcl-docs:sbcl-
build;
## REQUIRES TEXLIVE 112 cd $(SBCL_TARGET
)/doc/manual
&& make
113 sbcl-install:sbcl-
build;
cd $(SBCL_TARGET) &&
INSTALL_ROOT=/
usr/
local sh install.
sh 114 clean-sbcl:$(SBCL_TARGET);
cd $(SBCL_TARGET) && ./
clean.
sh 116 build/quicklisp.lisp:$(B);
cd $< &&
curl -
O https://
beta.
quicklisp.
org/
quicklisp.
lisp 117 quicklisp-install:scripts/
quicklisp-
install.
sh build/
quicklisp.
lisp;$<
118 STUMPWM_TARGET:=build/src/stumpwm
120 $(STUMPWM_TARGET):scripts/
get-
stumpwm.
sh $(B);$<
121 stumpwm:$(STUMPWM_TARGET);
122 stumpwm-build:stumpwm;
123 cd $(STUMPWM_TARGET
) && ./autogen.sh
&& ./configure
&& make
124 stumpwm-install:stumpwm-
build;
125 cd $(STUMPWM_TARGET
) && make
install
127 RUST_TARGET:=build/src/rust
128 $(RUST_TARGET):scripts/
get-
rust.
sh $(B);$<
131 cargo
install
--path
$(RUST_TARGET
)/src/tools/x
132 rust-build:rust rust-
install-
x;
133 cd $(RUST_TARGET
) && x
build
library
134 rust-doc:rust rust-
install-
x;
135 cd $(RUST_TARGET
) && x
doc
136 rust-build-full:rust-
build;
137 cd $(RUST_TARGET
) && x
build
--stage
2 compiler/rustc
138 rust-install:rust-
build;
139 cd $(RUST_TARGET
) && x
install
140 rustup-install:;
curl --
proto '=
https' --
tlsv1.2 -
sSf https://
sh.
rustup.
rs | sh -
s -- -
y 141 cargo-tools-install:scripts/
install-
cargo-
tools.
sh 144 TREE_SITTER_TARGET:=build/src/tree-sitter
145 $(TREE_SITTER_TARGET):scripts/
get-
tree-
sitter.
sh 147 tree-sitter:$(TREE_SITTER_TARGET) 148 tree-sitter-build:$(TREE_SITTER_TARGET) 149 tree-sitter-install:$(TREE_SITTER_TARGET) tree-
sitter-
build 151 ### Tree-sitter Langs 152 TREE_SITTER_LANGS_TARGET:=build/src/tree-sitter-langs
153 tree-sitter-langs-install:scripts/
tree-
sitter-
install-
langs.
sh 156 CODE_TARGET:=build/src/
$(SRC
) 157 $(CODE_TARGET):scripts/
get-
code.
sh $(B) 160 clean-code::;
rm -
rf $(CODE_TARGET) 163 dist/bundle:scripts/
bundle-
code.
sh $(CODE_TARGET) 172 scripts/dist-sbcl-binary.sh
$(SBCL_TARGET
) $(D
) 173 cd $(SBCL_TARGET
) && sh
./clean.sh
174 scripts/dist-sbcl-source.sh
$(SBCL_TARGET
) $(D
) 176 dist/linux:linux $(D);
178 dist/rocksdb:$(D) rocksdb;
180 tar
-I
'zstd' -cf
../../$</rocksdb-binary.tar.zst
rocksdb/include/*
rocksdb/librocksdb.*
182 CORE_SRC?=/usr/local/src/core
184 dist/rust:rust-
build $(D);
185 cd $(RUST_TARGET
) && x
dist
186 dist/rust/bin:scripts/
cargo-
install.
sh 188 $<
"$(CORE_SRC
)/rust/app/cli/alik" dist/rust
189 $<
"$(CORE_SRC
)/rust/app/cli/krypt" dist/rust
190 $<
"$(CORE_SRC
)/rust/app/cli/tz" dist/rust
191 $<
"$(CORE_SRC
)/rust/app/cli/cc-install" dist/rust
192 $<
"$(CORE_SRC
)/rust/app/cli/mailman" dist/rust
194 dist/emacs:emacs-
build $(D);
195 cd $(EMACS_TARGET
) && ./make-dist
--no-info
--no-changelog
&& \ 196 mv
emacs-*.*.*
emacs
&& \ 197 tar
-I
'zstd' -cf
../../../dist/emacs-binary.tar.zst
emacs
199 dist/emacs-mini:emacs-
build-
mini $(D);
200 cd $(EMACS_TARGET
) && ./make-dist
--no-info
--no-changelog
&& \ 201 mv
emacs-*.*.*
emacs
&& \ 202 tar
-I
'zstd' -cf
../../../dist/emacs-mini-binary.tar.zst
emacs
204 dist/nushell:$(D) nushell-
build 205 cd $(NUSHELL_TARGET
)/target/release/
&& \ 206 tar
-I
'zstd' -cf
../../../../../$</nushell.tar.zst
\ 207 nu
nu_plugin_custom_values
nu_plugin_formats
nu_plugin_gstat
\ 208 nu_plugin_inc
nu_plugin_query
210 dist/tree-sitter:scripts/
tree-
sitter-
install-
langs.
sh $(D) 213 # requires quicklisp loaded in .skelrc 214 dist/lisp/fasl:scripts/
sbcl-
save-
core.
sh 217 $<
"$@/prelude.core" "(mapc #'ql:quickload \ 218 (list :nlp :rdb :organ :packy :skel :obj :net :parse :pod :dat :log :packy :rt :syn :xdb :doc :vc))" 220 dist/lisp/bin:scripts/
sbcl-
make-
bin.
sh 223 mv
$(CORE_SRC
)/lisp/app/bin/skel
$@ 224 rm
-f
$(CORE_SRC
)/lisp/app/bin/skel.fasl
226 cp
$(CORE_SRC
)/lisp/app/bin/organ
$@ 227 rm
-f
$(CORE_SRC
)/lisp/app/bin/organ.fasl
229 cp
$(CORE_SRC
)/lisp/app/bin/homer
$@ 230 rm
-f
$(CORE_SRC
)/lisp/app/bin/homer.fasl
232 cp
$(CORE_SRC
)/lisp/app/bin/packy
$@ 233 rm
-f
$(CORE_SRC
)/lisp/app/bin/packy.fasl
235 cp
$(CORE_SRC
)/lisp/app/bin/rdb
$@ 236 rm
-f
$(CORE_SRC
)/lisp/app/bin/rdb.fasl
238 dist/lisp:dist/
lisp/
fasl dist/
lisp/
bin 240 core-lisp-install:dist/
lisp 241 install
-m
755 $</bin/*
/usr/local/bin/
242 install
-m
755 $</fasl/*
/usr/local/lib/sbcl/
244 core-rust-install:dist/
rust/
bin 245 install
-m
755 $</*
/usr/local/bin/
247 core-install:core-
lisp-
install core-
rust-
install 249 dist/core:dist/
rust/
bin dist/
lisp 251 cp
-rf
dist/lisp/fasl
dist/lisp/bin
$@ 253 cd dist
&& tar
-I
'zstd' -cf
core.tar.zst
core
256 cp
-r
$(CODE_TARGET
)/
{org,core,infra,demo
} $@ 257 clean-dist:;
rm -
rf $(D) 258 clean-build:;
rm -
rf $(B)