changeset 647: |
74e563ed4537 |
parent: |
3e6a17fb5712
|
child: |
af486e0a40c9 |
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Wed, 11 Sep 2024 21:40:01 -0400 |
permissions: |
-rwxr-xr-x |
description: |
cli and rt/fuzz |
1 ;;; skelfile --- CC/core skelfile -*- mode: skel; -*- 3 :author ("Richard Westhaver" . "ellis@rwest.io") 8 :description "The Compiler Company Core" 9 :tags ("core" "lisp" "rust" "emacs" "c") 10 :include ("lisp.sk" "rust.sk" "emacs.sk") 11 :vc (:hg "https://vc.compiler.company/core") 12 :scripts ((:lisp "x.lisp")) 14 :components ((:dir-locals ".dir-locals") 18 psl.dat parquet.json rgb.txt 19 compile save-std save-prelude save-user 20 save-infra save-core save-tests build-rdb 21 build-skel build-organ build-homer build-packy 22 fasl rust-bin build-tree-sitter-alien)) 25 #$find emacs -name '*.elc' -type f -delete$# 26 #$find lisp -name '*.fasl' -type f -delete$# 27 #$echo 'cargo clean:' && cd rust && cargo clean$#) 29 (:build () #$cd lisp/ffi/tree-sitter && 30 clang -g -O2 -Wall -Wno-unused-value -ltree-sitter -shared \
31 alien.c -o ../../../.stash/libtree-sitter-alien.so$#) 32 (:install () #$cp .stash/libtree-sitter-alien.so /usr/local/lib/$#)) 34 (download "https://publicsuffix.org/list/public_suffix_list.dat" 35 :output (merge-pathnames 39 (download "https://packy.compiler.company/data/rgb.txt" 40 :output (merge-pathnames 44 (color::parse-x11-color-definitions 45 :input ".stash/rgb.txt" 46 :output (merge-pathnames "color/x11.lisp" *skel-path*))) 47 (parquet.thrift (%stash) 49 "https://raw.githubusercontent.com/apache/parquet-format/master/src/main/thrift/parquet.thrift" 50 :output (merge-pathnames ".stash/parquet.thrift" *skel-path*)) 51 #$thrift --gen json -out .stash .stash/parquet.thrift$#) 52 (parquet.json (%stash) 53 (download "https://packy.compiler.company/data/parquet.json" 54 :output (merge-pathnames ".stash/parquet.json" *skel-path*))) 55 (freedesktop.org.xml (%stash) 56 (download "https://packy.compiler.company/data/freedesktop.org.xml" 57 :output (merge-pathnames ".stash/freedesktop.org.xml" *skel-path*))) 58 (parquet-test-data (%stash) (download "https://packy.compiler.company/data/test/alltypes_plain.parquet" 59 :output (merge-pathnames ".stash/alltypes_plain.parquet" *skel-path*))) 61 (%stash () #$mkdir -pv .stash$#) 64 (with-sbcl (:noinform t :quit t) 65 (ql:quickload :bin/rdb) 67 #$mv lisp/bin/rdb .stash/rdb$#) 68 (:install () #$install -C -m 755 .stash/rdb /usr/local/bin/rdb$#)) 71 (with-sbcl (:noinform t :quit t) 72 (ql:quickload :bin/skel) 73 (asdf:make :bin/skel)) 74 #$mv lisp/bin/skel .stash/skel$#) 76 (with-sbcl (:noinform t :quit t) 77 (push :tools *features*) 78 (ql:quickload :bin/skel) 79 (asdf:make :bin/skel)) 80 #$mv lisp/bin/skel .stash/skel$#) 81 (:install () #$install -C -m 755 .stash/skel /usr/local/bin/skel$#)) 83 (:build () (with-sbcl (:noinform t :quit t) 84 (ql:quickload :bin/organ) 85 (asdf:make :bin/organ)) 86 #$mv lisp/bin/organ .stash/organ$#)) 88 (:build () (with-sbcl (:noinform t :quit t) 89 (ql:quickload :bin/homer) 90 (asdf:make :bin/homer)) 91 #$mv lisp/bin/homer .stash/homer$#)) 93 (:build () (with-sbcl (:noinform t :quit t) 94 (ql:quickload :bin/packy) 95 (asdf:make :bin/packy)) 96 #$mv lisp/bin/packy .stash/packy$#)) 97 (compile () #$./x.lisp compile$#) 98 (std () (:save () #$./x.lisp save std$#)) 100 (:save () #$./x.lisp save prelude$#) 101 (:compile () #$./x.lisp make prelude$#)) 103 (:save () #$./x.lisp save user$#) 104 (:compile () #$./x.lisp make user$#)) 105 (infra () (:save () #$./x.lisp save infra$#)) 107 (:save () #$./x.lisp save core$#) 108 (:compile () #$./x.lisp make core$#)) 110 (:save () #$./x.lisp save tests$#) 111 (:compile () #$./x.lisp make core/tests$#)) 112 (bench () (:compile () #$./x.lisp make core/bench$#)) 113 (fasl (compile-core compile-tests compile-bench compile-user compile-prelude)) 115 (mailman () #$cd rust && cargo build -Z unstable-options --bin mailman --artifact-dir ../.stash/$#) 116 (alik () #$cd rust && cargo build -Z unstable-options --bin alik --artifact-dir ../.stash/$#) 117 (rust-bin (mailman alik)) 118 (alik-ui () #$trunk build --config rust/ui/alik/Trunk.toml$#) 120 (install () #$d=/usr/local/bin 122 for f in $(find . -type f ! -name "*.*") 123 do echo "$(basename $f) -> $d" 124 install -C -m 755 $f $d 126 d=/usr/local/share/lisp 129 for f in $(find . -type f -name "*.core") 130 do echo "$(basename $f) -> $d" 131 install -C -m 755 $f $d 133 (emacs () #$make -C emacs$#) 135 (with-open-file (f "emacs/core-syms.sxp") 136 (write `(defvar lisp-standard-function-names ,(standard-symbol-names #'fboundp)) :stream f) 137 (write `(defvar lisp-standard-value-names ,(standard-symbol-names #'boundp)) :stream f))) 139 mkdir -pv core/bin core/share/lisp/fasl core/lib 140 mv *.core core/share/lisp/ 141 mv *.fasl core/share/lisp/fasl/ 143 mv $(find -maxdepth 1 -type f ! -name "*.*") core/bin/ 144 tar -I 'zstd' -cf core.tar.zst core/*$#) 145 (dist-clean (clean) #$cd .. && tar -I 'zstd' -cf core/core-source.tar.zst core/* && cd core 147 mv core-source.tar.zst .stash/$#))