changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > infra / makefile

changeset 9: 015c6f7d6e16
parent: 34e87d25f113
child: fdc215fe9f17
author: ellis <ellis@rwest.io>
date: Fri, 24 Nov 2023 04:05:51 -0500
permissions: -rw-r--r--
description: bundles
1 ### infra/makefile --- The Compiler Company Infrastructure
2 __ := $(.VARIABLES)
3 LINUX_VERSION:=$(shell uname -r | cut -d- -f1)
4 EMACS_VERSION:=main
5 ROCKSDB_VERSION:=main
6 SBCL_VERSION:=main
7 RUST_VERSION:=main
8 SRC:=comp
9 SHELL=/bin/sh
10 UNAME=$(shell uname)
11 CURL:=curl
12 CPU_COUNT:=$(shell getconf _NPROCESSORS_ONLN)
13 HG_COMMIT:=$(shell hg id -i)
14 VERSION:=
15 VARS:=$(foreach v,$(filter-out $(__) __,$(.VARIABLES)),"\n$(v) = $($(v))")
16 
17 all:dist
18 
19 clean:linux-clean dist-clean;
20 
21 ### Linux
22 LINUX_TARGET:=linux-$(LINUX_VERSION)
23 linux:$(LINUX_TARGET) linux-config;
24  mv build/$< dist/$<
25 $(LINUX_TARGET):scripts/get-linux.sh;
26  mkdir -pv build/$@
27  gpg --export autosigner@ torvalds@ gregkh@ > build/$@/keyring.gpg
28  $< $(LINUX_VERSION) build build/$@/keyring.gpg
29  cd build && unxz $@.tar.xz && tar -xvf $@.tar $(LINUX_TARGET)
30 linux-config:$(LINUX_TARGET);
31  cd build/$< && make mrproper -j && zcat /proc/config.gz > .config && make localmodconfig
32 linux-clean::;rm -rf build/$(LINUX_TARGET)*
33 
34 ### Emacs
35 EMACS_TARGET:=emacs-$(EMACS_VERSION)
36 emacs:scripts/get-emacs.sh;
37  $< $(EMACS_VERSION)
38 
39 ### RocksDB
40 ROCKSDB_TARGET:=rocksdb-$(ROCKSDB_VERSION)
41 rocksdb:scripts/get-rocksdb.sh;
42  $< $(ROCKSDB_VERSION)
43 
44 ### SBCL
45 SBCL_TARGET:=sbcl-$(SBCL_VERSION)
46 sbcl:scripts/get-sbcl.sh;
47  $< $(SBCL_VERSION)
48 
49 ### Rust
50 RUST_TARGET:=rocksdb-$(ROCKSDB_VERSION)
51 rust:scripts/get-rust.sh
52  $< $(RUST_VERSION)
53 
54 ### Code
55 code:scripts/get-code.sh
56  $< $(SRC)
57 
58 ### Virt
59 pod:virt/build-pod.sh
60  $<
61 archlinux:virt/build-archlinux-base.sh
62  $<
63 fedora:virt/build-fedora-base.sh
64  $<
65 box:virt/build-box-base.sh
66  $<
67 bbdb:virt/build-bbdb-base.sh
68  $<
69 heptapod:virt/build-heptapod.sh
70  $<
71 heptapod-runner:virt/build-heptapod-runner.sh
72  $<
73 
74 ### Web
75 compiler.company:;
76 the.compiler.company:;
77 vc.compiler.company:;
78 cdn.compiler.company:;
79 packy.compiler.company:;
80 
81 ### Dist
82 dist/code:scripts/bundle.sh
83  $<
84 
85 dist/style:style
86  cp $< $@
87 
88 dist:dist/code dist/style
89 
90 dist-clean::;rm -rf dist/*