changeset 653: |
119532882cb1 |
parent: |
af486e0a40c9
|
child: |
3dd1924ad5ea |
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Sun, 15 Sep 2024 19:34:00 -0400 |
permissions: |
-rwxr-xr-x |
description: |
added keyword-opts (experimental) |
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") 13 :components ((:dir-locals ".dir-locals") 17 psl.dat parquet.json rgb.txt 18 save-std save-prelude save-user 19 save-infra save-core save-tests 20 build-tree-sitter-alien build-core fasl 21 ;; build-skel build-organ build-homer build-packy build-rdb 26 #$find emacs -name '*.elc' -type f -delete$# 27 #$find lisp -name '*.fasl' -type f -delete$# 28 #$echo 'cargo clean:' && cd rust && cargo clean$#) 30 (:build () #$cd lisp/ffi/tree-sitter && 31 clang -g -O2 -Wall -Wno-unused-value -ltree-sitter -shared \
32 alien.c -o ../../../.stash/libtree-sitter-alien.so$#) 33 (:install () #$cp .stash/libtree-sitter-alien.so /usr/local/lib/$#)) 35 (download "https://publicsuffix.org/list/public_suffix_list.dat" 36 :output (merge-pathnames 40 (download "https://packy.compiler.company/data/rgb.txt" 41 :output (merge-pathnames 45 (color::parse-x11-color-definitions 46 :input ".stash/rgb.txt" 47 :output (merge-pathnames "color/x11.lisp" *skel-path*))) 48 (parquet.thrift (%stash) 50 "https://raw.githubusercontent.com/apache/parquet-format/master/src/main/thrift/parquet.thrift" 51 :output (merge-pathnames ".stash/parquet.thrift" *skel-path*)) 52 #$thrift --gen json -out .stash .stash/parquet.thrift$#) 53 (parquet.json (%stash) 54 (download "https://packy.compiler.company/data/parquet.json" 55 :output (merge-pathnames ".stash/parquet.json" *skel-path*))) 56 (freedesktop.org.xml (%stash) 57 (download "https://packy.compiler.company/data/freedesktop.org.xml" 58 :output (merge-pathnames ".stash/freedesktop.org.xml" *skel-path*))) 59 (parquet-test-data (%stash) (download "https://packy.compiler.company/data/test/alltypes_plain.parquet" 60 :output (merge-pathnames ".stash/alltypes_plain.parquet" *skel-path*))) 62 (%stash () #$mkdir -pv .stash$#) 65 (with-sbcl (:noinform t :quit t) 66 (ql:quickload :bin/rdb) 68 #$mv lisp/bin/rdb .stash/rdb$#) 69 (:install () #$install -C -m 755 .stash/rdb /usr/local/bin/rdb$#)) 72 (with-sbcl (:noinform t :quit t) 73 (ql:quickload :bin/skel) 74 (asdf:make :bin/skel)) 75 #$mv lisp/bin/skel .stash/skel$#) 77 (with-sbcl (:noinform t :quit t) 78 (push :tools *features*) 79 (ql:quickload :bin/skel) 80 (asdf:make :bin/skel)) 81 #$mv lisp/bin/skel .stash/skel$#) 82 (:install () #$install -C -m 755 .stash/skel /usr/local/bin/skel$#)) 84 (:build () (with-sbcl (:noinform t :quit t) 85 (ql:quickload :bin/organ) 86 (asdf:make :bin/organ)) 87 #$mv lisp/bin/organ .stash/organ$#)) 89 (:build () (with-sbcl (:noinform t :quit t) 90 (ql:quickload :bin/homer) 91 (asdf:make :bin/homer)) 92 #$mv lisp/bin/homer .stash/homer$#)) 94 (:build () (with-sbcl (:noinform t :quit t) 95 (ql:quickload :bin/packy) 96 (asdf:make :bin/packy)) 97 #$mv lisp/bin/packy .stash/packy$#)) 98 (std () (:save () (with-sbcl (:noinform t :quit t) 100 (in-package :std-user) 101 (compile-lisp :std :save ".stash/std.core")))) 103 (:save () (with-sbcl (:noinform t :quit t) 104 (ql:quickload :prelude) 105 (in-package :std-user) 106 (compile-lisp :prelude :save ".stash/prelude.core"))) 107 (:compile () (compile-lisp :prelude :force t :verbose t))) 109 (:save () (with-sbcl (:noinform t :quit t) 112 (compile-lisp :user :save ".stash/user.core"))) 113 (:compile () (compile-lisp :user :force t :verbose t))) 114 (infra () (:save () (with-sbcl (:noinform t :quit t) 117 (compile-lisp :user :save ".stash/infra.core" :compression 22)))) 119 (:build () (with-sbcl (:noinform t :quit t) 120 (ql:quickload :bin/core) 121 (asdf:make :bin/core)) 122 #$mv lisp/bin/core .stash/core$#) 123 (:save () (with-sbcl (:noinform t :quit t) 124 (ql:quickload (list :std :core)) 125 (in-package :std-user) 126 (compile-lisp :core :save ".stash/core.core"))) 127 (:compile () (compile-lisp :core :force t :verbose t)) 128 (:install () #$install -C -m 755 .stash/core /usr/local/bin/core 129 echo "core -> /usr/local/bin/" 130 links="skel homer packy rdb organ" 132 ln -sf /usr/local/bin/core /usr/local/bin/$i 133 echo "$i -> core -> /usr/local/bin/" 136 (:save () (with-sbcl (:noinform t :quit t) 137 (ql:quickload :core/tests) 138 (in-package :core/tests) 139 (compile-lisp :core/tests :save ".stash/tests.core"))) 140 (:compile () (compile-lisp :core/tests :force t :verbose t))) 141 (bench () (:compile () (compile-lisp :core/bench :force t :verbose t))) 142 (fasl (compile-core compile-tests compile-bench compile-user compile-prelude)) 144 (mailman () #$cd rust && cargo build -Z unstable-options --bin mailman --artifact-dir ../.stash/$#) 145 (alik () #$cd rust && cargo build -Z unstable-options --bin alik --artifact-dir ../.stash/$#) 146 (rust-bin (mailman alik)) 147 (alik-ui () #$trunk build --config rust/ui/alik/Trunk.toml$#) 149 (install (install-core) 150 #$d=/usr/local/share/lisp/ 154 for f in $(find . -type f -name "*.core") 155 do echo "$(basename $f) -> $d" 156 install -C -m 755 $f $d 158 (emacs () #$make -C emacs$#) 160 (core-syms.sxp () (with-open-file (f ".stash/symbols.sxp" :direction :output))) 162 mkdir -pv core core/bin core/share/lisp/fasl core/lib 163 mv *.core core/share/lisp/ 164 mv *.fasl core/share/lisp/fasl/ 166 mv $(find -maxdepth 1 -type f ! -name "*.*") core/bin/ 167 tar -I 'zstd' -cf core.tar.zst core/*$#) 168 (dist-clean (clean) #$cd .. && tar -I 'zstd' -cf core/core-source.tar.zst core/* && cd core 170 mv core-source.tar.zst .stash/$#))