changeset 42: |
36c0358a46be |
parent: |
21e3a05f8c27
|
child: |
16e13f034efc |
author: |
ellis <ellis@rwest.io> |
date: |
Sun, 31 Dec 2023 00:21:40 -0500 |
permissions: |
-rw-r--r-- |
description: |
patience is key |
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
) 22 # init:sbcl rust emacs rocksdb comp virt; 23 # dist/linux dist/rust dist/bundle 24 all:dist/
cdn dist/
comp dist/
fasl dist/
sbcl dist/
rocksdb dist/
emacs 25 clean:;
rm -
rf $(B) $(D) 26 $(B):;
mkdir -
pv $@/
src 30 LINUX_TARGET:=linux-
$(LINUX_VERSION
) 31 linux:$(LINUX_TARGET) linux-
config;
33 $(LINUX_TARGET):scripts/
get-
linux.
sh;
35 gpg
--export
autosigner@
torvalds@
gregkh@
>
build/
$@/keyring.gpg
36 $<
$(LINUX_VERSION
) build
build/
$@/keyring.gpg
37 cd build
&& unxz
$@.tar.xz
&& tar
-xvf
$@.tar
$(LINUX_TARGET
) 38 linux-config:$(LINUX_TARGET);
39 cd build/$<
&& make
mrproper
-j
&& zcat
/proc/config.gz
>
.config
&& yes
N
| make
localmodconfig
40 clean-linux::;
rm -
rf build/
$(LINUX_TARGET) 43 EMACS_TARGET:=build/src/emacs
44 EMACS_DIST:=$(D
)/src/emacs
45 $(EMACS_TARGET):scripts/
get-
emacs.
sh $(B);
48 emacs-build:emacs scripts/
build-
emacs.
sh;
49 cd $(EMACS_TARGET
) && ./autogen.sh
50 scripts/build-emacs.sh
$(EMACS_TARGET
) 51 emacs-install:emacs-
build;
52 cd $(EMACS_TARGET
) && make
install
55 ROCKSDB_TARGET:=build/src/rocksdb
56 $(ROCKSDB_TARGET):scripts/
get-
rocksdb.
sh $(B) 58 cd $(ROCKSDB_TARGET
) && \ 59 make
shared_lib
DISABLE_JEMALLOC=1 60 rocksdb:$(ROCKSDB_TARGET) 62 rocksdb-install:$(ROCKSDB_TARGET) 63 cd $<
&& cp
-rf
$(ROCKSDB_TARGET
)/include/*
/usr/local/include/
&& \ 64 cp
-f
$(ROCKSDB_TARGET
)/librocksdb.
{so,dylib
}*
/usr/local/include/
67 SBCL_TARGET:=build/src/sbcl
68 $(SBCL_TARGET):scripts/
get-
sbcl.
sh $(B);
70 cd $(SBCL_TARGET
) && \ 71 echo '"2.4.1+main"' >
version.lisp-expr
&& \ 74 --with-mark-region-gc
\ 75 --with-sb-xref-for-internals
\ # 76 --with-core-compression
\ 77 --dynamic-space-size
=8Gb
\ 80 sbcl-docs:sbcl;
## REQUIRES TEXLIVE 81 cd $(SBCL_TARGET
)/doc/manual
&& make
82 sbcl-install:sbcl;
cd $(SBCL_TARGET) && ./
install.
sh 83 clean-sbcl:$(SBCL_TARGET);
cd $(SBCL_TARGET) && ./
clean.
sh 84 build/quicklisp.lisp:;
curl -
o build/
quicklisp.
lisp -
O https://
beta.
quicklisp.
org/
quicklisp.
lisp 85 quicklisp-install:build/
quicklisp.
lisp 86 sbcl
--script
$<
--eval
'(quicklisp-quickstart:install)' 88 RUST_TARGET:=build/src/rust
89 $(RUST_TARGET):scripts/
get-
rust.
sh $(B);$<
92 cargo
install
--path
$(RUST_TARGET
)/src/tools/x
93 rust-build:rust rust-
install-
x;
94 cd $(RUST_TARGET
) && x
build
library
95 rust-doc:rust rust-
install-
x;
96 cd $(RUST_TARGET
) && x
doc
97 rust-build-full:rust-
build;
98 cd $(RUST_TARGET
) && x
build
--stage
2 compiler/rustc
99 rust-install:rust-
build;
100 cd $(RUST_TARGET
) && x
install
102 ### Tree-sitter Langs 103 TS_LANGS_TARGET:=build/src/ts-langs
104 ts-langs-install:scripts/
ts-
install-
langs.
sh 107 COMP_TARGET:=build/src/
$(SRC
) 108 comp:scripts/
get-
comp.
sh $(B) 111 clean-comp::;
rm -
rf $(COMP_TARGET) 114 dev-pod:virt/
build-
pod.
sh 116 archlinux:virt/
build-
archlinux-
base.
sh 118 fedora:virt/
build-
fedora-
base.
sh 120 box:virt/
build-
box-
base.
sh 122 bbdb:virt/
build-
bbdb-
base.
sh 124 heptapod:virt/
build-
heptapod.
sh 126 heptapod-runner:virt/
build-
heptapod-
runner.
sh 129 vc-pod:heptapod heptapod-
runner 134 dist/bundle:scripts/
bundle-
dir.
sh $(D) 143 cp
$(SBCL_TARGET
)/src/runtime/sbcl
$@ 144 cp
$(SBCL_TARGET
)/output/sbcl.core
$@ 145 cp
-r
$(SBCL_TARGET
)/contrib
$@ 146 cd $(SBCL_TARGET
) && ./clean.sh
147 tar
-I
'zstd' -cf
$@/sbcl-source.tar.zst
--exclude
.git
$(SBCL_TARGET
) 149 dist/linux:linux $(D);
151 dist/rocksdb:rocksdb $(D);
153 cp
-rf
$(ROCKSDB_TARGET
)/include/*
$@ 154 cp
-f
$(ROCKSDB_TARGET
)/librocksdb.*
$@ 156 dist/rust:rust-
build $(D);
157 cd $(RUST_TARGET
) && x
dist
159 dist/emacs:emacs-
build $(D);
161 dist/fasl:scripts/
sbcl-
save-
core.
sh quicklisp-
install 164 $<
"$@/prelude.core" "(mapc #'ql:quickload \ 165 (list :nlp :rdb :organ :packy :skel :obj :net :parse :pod :dat :log :packy :rt :syn :xdb))" 169 cp
-r
$(COMP_TARGET
)/
{org,core,infra,demo,nas-t
} $@ 170 clean-dist:;
rm -
rf $(D) 171 clean-build:;
rm -
rf $(B)