changeset 23: |
4300e14bb1db |
parent: |
3491c1d1815d
|
child: |
3e8310575574 |
author: |
ellis <ellis@rwest.io> |
date: |
Tue, 05 Dec 2023 23:12:16 -0500 |
permissions: |
-rw-r--r-- |
description: |
goodnight |
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
) 24 HG_COMMIT:=$(shell
hg
id
-i
) 26 init:sbcl rust emacs rocksdb code virt;
27 dist:dist/
bundle dist/
cdn dist/
sbcl dist/
rocksdb # dist/linux dist/rust 28 clean:;
rm -
rf $(B) $(D) 29 $(B):;
mkdir -
pv $@/
src 32 LINUX_TARGET:=linux-
$(LINUX_VERSION
) 33 linux:$(LINUX_TARGET) linux-
config;
35 $(LINUX_TARGET):scripts/
get-
linux.
sh;
37 gpg
--export
autosigner@
torvalds@
gregkh@
>
build/
$@/keyring.gpg
38 $<
$(LINUX_VERSION
) build
build/
$@/keyring.gpg
39 cd build
&& unxz
$@.tar.xz
&& tar
-xvf
$@.tar
$(LINUX_TARGET
) 40 linux-config:$(LINUX_TARGET);
41 cd build/$<
&& make
mrproper
-j
&& zcat
/proc/config.gz
>
.config
&& yes
N
| make
localmodconfig
42 clean-linux::;
rm -
rf build/
$(LINUX_TARGET) 45 EMACS_TARGET:=build/src/emacs-
$(EMACS_VERSION
) 46 EMACS_DIST:=$(D
)/src/emacs
47 emacs:$(B) scripts/
get-
emacs.
sh;
50 emacs-build:emacs scripts/
build-
emacs.
sh;
53 mkdir
-pv
$(EMACS_DIST
) 54 scripts/build-emacs.sh
$(EMACS_VERSION
) $(EMACS_TARGET
) $(EMACS_DIST
) 56 emacs-install:emacs-
build;
61 ROCKSDB_TARGET:=build/src/rocksdb-
$(ROCKSDB_VERSION
) 62 rocksdb:scripts/
get-
rocksdb.
sh;
65 make
shared_lib
DISABLE_JEMALLOC=1 68 SBCL_TARGET:=build/src/sbcl-
$(SBCL_VERSION
) 69 sbcl:scripts/
get-
sbcl.
sh $(B);
71 cd $(SBCL_TARGET
) && \ 72 echo '"2.3.12+main"' >
version.lisp-expr
&& \ 75 --with-mark-region-gc
\ 76 --with-core-compression
\ 77 --with-sb-xref-for-internals
\ 78 --dynamic-space-size
=4Gb
\ 81 clean-sbcl:;
rm -
rf $(SBCL_TARGET) 84 RUST_TARGET:=build/src/rust-
$(RUST_VERSION
) 85 rust:scripts/
get-
rust.
sh $(B);
88 cargo
install
--path
$(RUST_TARGET
)/src/tools/x
89 rust-build:rust rust-
install-
x;
90 cd $(RUST_TARGET
) && x
build
library
91 rust-doc:rust rust-
install-
x;
92 cd $(RUST_TARGET
) && x
doc
93 rust-build-full:rust-
build;
94 cd $(RUST_TARGET
) && x
build
--stage
2 compiler/rustc
95 rust-install:rust-
build;
96 cd $(RUST_TARGET
) && x
install
99 CODE_TARGET:=build/src/
$(SRC
) 100 code:scripts/
get-
code.
sh $(B) 103 clean-code::;
rm -
rf $(CODE_TARGET) 106 dev-pod:virt/
build-
pod.
sh 108 archlinux:virt/
build-
archlinux-
base.
sh 110 fedora:virt/
build-
fedora-
base.
sh 112 box:virt/
build-
box-
base.
sh 114 bbdb:virt/
build-
bbdb-
base.
sh 116 heptapod:virt/
build-
heptapod.
sh 118 heptapod-runner:virt/
build-
heptapod-
runner.
sh 121 vc-pod:heptapod heptapod-
runner 126 dist/bundle:scripts/
bundle-
dir.
sh $(D) 134 $(SBCL_TARGET
)/install.sh
--prefix
=$(D
) 136 dist/linux:linux $(D);
138 dist/rocksdb:rocksdb $(D);
140 cp
-rf
include/*
$(D
) 141 cp
-f
librocksdb.so*
$(D
)/lib/
143 dist/rust:rust-
build $(D);
144 cd $(RUST_TARGET
) && x
dist
146 dist/emacs:emacs-
build $(D);
148 clean-dist:;
rm -
rf $(D) 149 clean-build:;
rm -
rf $(B)