changeset 68: |
4905e93756d7 |
parent: |
28ed81f2d290
|
child: |
4260b565dfb3 |
author: |
ellis <ellis@rwest.io> |
date: |
Wed, 03 Jan 2024 23:35:39 -0500 |
permissions: |
-rw-r--r-- |
description: |
bin sniping |
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 worker:rocksdb-
install sbcl-
install ts-
langs-
install quicklisp-
install 24 # artifacts can deploy to dist/TARGET - need target triple first 25 # init:sbcl rust emacs rocksdb comp virt; 26 # dist/linux dist/rust dist/bundle 28 operator:core-
install emacs-
build-
mini emacs-
install 29 all:dist/
cdn dist/
comp dist/
lisp dist/
rust dist/
sbcl dist/
rocksdb dist/
emacs 30 clean:;
rm -
rf $(B) $(D) 31 $(B):;
mkdir -
pv $@/
src 33 $(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 emcas;
55 cd $(EMACS_TARGET
) && ./autogen.sh
57 emacs-build-mini:scripts/
build-
emacs-
mini.
sh 58 cd $(EMACS_TARGET
) && ./autogen.sh
60 emacs-install:emacs-
build;
61 cd $(EMACS_TARGET
) && make
install
64 ROCKSDB_TARGET:=build/src/rocksdb
65 $(ROCKSDB_TARGET):scripts/
get-
rocksdb.
sh $(B) 67 cd $(ROCKSDB_TARGET
) && \ 68 make
shared_lib
DISABLE_JEMALLOC=1 69 rocksdb:$(ROCKSDB_TARGET) 71 rocksdb-install:$(ROCKSDB_TARGET) 72 cp
-rf
$(ROCKSDB_TARGET
)/include/*
/usr/local/include/
73 cp
-f
$(ROCKSDB_TARGET
)/librocksdb.*
/usr/local/lib/
75 # TODO: separate params 77 # --with-mark-region-gc \ 79 SBCL_TARGET:=build/src/sbcl
80 $(SBCL_TARGET):scripts/
get-
sbcl.
sh $(B);
82 cd $(SBCL_TARGET
) && \ 83 echo '"2.4.1+main"' >
version.lisp-expr
&& \ 85 --with-sb-xref-for-internals
\ 86 --with-core-compression
\ 87 --dynamic-space-size
=8Gb
\ 90 sbcl-docs:sbcl;
## REQUIRES TEXLIVE 91 cd $(SBCL_TARGET
)/doc/manual
&& make
92 sbcl-install:sbcl;
cd $(SBCL_TARGET) && ./
install.
sh 93 clean-sbcl:$(SBCL_TARGET);
cd $(SBCL_TARGET) && ./
clean.
sh 95 build/quicklisp.lisp:$(B);
cd $< &&
curl -
O https://
beta.
quicklisp.
org/
quicklisp.
lisp 96 quicklisp-install:scripts/
quicklisp-
install.
sh build/
quicklisp.
lisp;$<
99 RUST_TARGET:=build/src/rust
100 $(RUST_TARGET):scripts/
get-
rust.
sh $(B);$<
103 cargo
install
--path
$(RUST_TARGET
)/src/tools/x
104 rust-build:rust rust-
install-
x;
105 cd $(RUST_TARGET
) && x
build
library
106 rust-doc:rust rust-
install-
x;
107 cd $(RUST_TARGET
) && x
doc
108 rust-build-full:rust-
build;
109 cd $(RUST_TARGET
) && x
build
--stage
2 compiler/rustc
110 rust-install:rust-
build;
111 cd $(RUST_TARGET
) && x
install
113 ### Tree-sitter Langs 114 TS_LANGS_TARGET:=build/src/ts-langs
115 ts-langs-install:scripts/
ts-
install-
langs.
sh 118 COMP_TARGET:=build/src/
$(SRC
) 119 comp:scripts/
get-
comp.
sh $(B) 122 clean-comp::;
rm -
rf $(COMP_TARGET) 125 dev-pod:virt/
build-
pod.
sh 127 archlinux:virt/
build-
archlinux-
base.
sh 129 fedora:virt/
build-
fedora-
base.
sh 131 box:virt/
build-
box-
base.
sh 133 bbdb:virt/
build-
bbdb-
base.
sh 135 heptapod:virt/
build-
heptapod.
sh 137 heptapod-runner:virt/
build-
heptapod-
runner.
sh 140 vc-pod:heptapod heptapod-
runner 145 dist/bundle:scripts/
bundle-
dir.
sh comp 155 cp
$(SBCL_TARGET
)/src/runtime/sbcl
$@ 156 cp
$(SBCL_TARGET
)/output/sbcl.core
$@ 157 cp
-r
$(SBCL_TARGET
)/contrib
$@ 158 cd $(SBCL_TARGET
) && ./clean.sh
159 tar
-I
'zstd' -cf
$@/sbcl-source.tar.zst
--exclude
.git
$(SBCL_TARGET
) 161 dist/linux:linux $(D);
163 dist/rocksdb:rocksdb $(D);
165 cp
-rf
$(ROCKSDB_TARGET
)/include/*
$@ 166 cp
-f
$(ROCKSDB_TARGET
)/librocksdb.*
$@ 168 dist/rust:rust-
build $(D);
169 cd $(RUST_TARGET
) && x
dist
170 dist/rust/bin:scripts/
cargo-
install.
sh comp 172 $<
"$(COMP_TARGET
)/core/rust/app/cli/alik" "dist/rust" 173 $<
"$(COMP_TARGET
)/core/rust/app/cli/krypt" "dist/rust" 174 $<
"$(COMP_TARGET
)/core/rust/app/cli/tz" "dist/rust" 175 $<
"$(COMP_TARGET
)/core/rust/app/cli/cc-init" "dist/rust" 176 $<
"$(COMP_TARGET
)/core/rust/app/cli/mailman" "dist/rust" 178 dist/emacs:emacs-
build $(D);
180 # requires quicklisp loaded in .skelrc 181 dist/lisp/fasl:scripts/
sbcl-
save-
core.
sh # quicklisp-install 184 $<
"$@/prelude.core" "(mapc #'ql:quickload \ 185 (list :nlp :rdb :organ :packy :skel :obj :net :parse :pod :dat :log :packy :rt :syn :xdb :doc :vc :rt))" 187 CORE_SRC=/usr/local/share/lisp/core
188 dist/lisp/bin:scripts/
sbcl-
make-
bin.
sh 190 cp
$(CORE_SRC
)/lisp/app/bin/skel
$@ 191 rm
-f
$(CORE_SRC
)/lisp/app/bin/skel.fasl
193 cp
$(CORE_SRC
)/lisp/app/bin/organ
$@ 194 rm
-f
$(CORE_SRC
)/lisp/app/bin/organ.fasl
196 cp
$(CORE_SRC
)/lisp/app/bin/homer
$@ 197 rm
-f
$(CORE_SRC
)/lisp/app/bin/homer.fasl
199 cp
$(CORE_SRC
)/lisp/app/bin/packy
$@ 200 rm
-f
$(CORE_SRC
)/lisp/app/bin/packy.fasl
202 cp
$(CORE_SRC
)/lisp/app/bin/rdb
$@ 203 rm
-f
$(CORE_SRC
)/lisp/app/bin/rdb.fasl
205 dist/lisp:dist/
lisp/
fasl dist/
lisp/
bin 207 core-install:dist/
lisp 208 install
-m
755 $</bin/*
/usr/local/bin/
209 install
-m
755 $</fasl/*
/usr/local/lib/sbcl/
213 cp
-r
$(COMP_TARGET
)/
{org,core,infra,demo,nas-t
} $@ 214 clean-dist:;
rm -
rf $(D) 215 clean-build:;
rm -
rf $(B)