changeset 694: |
a36280d2ef4e |
parent: |
5f88b237ce29
|
child: |
38e9c3be2392 |
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Thu, 03 Oct 2024 21:54:07 -0400 |
permissions: |
-rwxr-xr-x |
description: |
tasks |
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/lisp.sk" "rust/rust.sk" "emacs/emacs.sk") 11 :vc (:hg "https://vc.compiler.company/core") 12 :bind ((stash ".stash") 14 (emacs-locals :dir-locals 15 (nil . ((indent-tabs-mode . nil))) 16 (rust-mode . ((eglot-workspace-configuration 17 . (:rust-analyzer (:cargo (:buildScripts (:enable t) (:features "all"))))))) 18 (nushell-mode . ((nushell-indent-offset . 2))) 19 (nushell-ts-mode . ((nushell-indent-offset . 2))) 20 (sh-mode . (sh-indentation . 2)) 21 (makefile-mode . ((indent-tabs-mode . t))) 22 (slint-mode . ((slint-indent-level . 2))))) 23 :components ((:org "readme") 29 psl.dat parquet.json rgb.txt 30 save-std save-prelude save-user 31 save-infra save-core save-tests 32 build-tree-sitter-alien build-core fasls 33 ;; build-skel build-organ build-homer build-packy build-rdb 38 #$find emacs -name '*.elc' -type f -delete$# 39 #$find lisp -name '*.fasl' -type f -delete$# 40 #$echo 'cargo clean:' && cd rust && cargo clean$#) 42 (:build () #$cd lisp/ffi/tree-sitter && 43 clang -g -O2 -Wall -Wno-unused-value -ltree-sitter -shared \ 44 alien.c -o ../../../.stash/libtree-sitter-alien.so$#) 45 (:install () #$cp .stash/libtree-sitter-alien.so /usr/local/lib/$#)) 47 (download "https://publicsuffix.org/list/public_suffix_list.dat" 48 :output (merge-pathnames 52 (download "https://packy.compiler.company/data/rgb.txt" 53 :output (merge-pathnames 57 (color::parse-x11-color-definitions 58 :input ".stash/rgb.txt" 59 :output (merge-pathnames "color/x11.lisp" *skel-path*))) 60 (parquet.thrift (%stash) 62 "https://raw.githubusercontent.com/apache/parquet-format/master/src/main/thrift/parquet.thrift" 63 :output (merge-pathnames ".stash/parquet.thrift" *skel-path*)) 64 #$thrift --gen json -out .stash .stash/parquet.thrift$#) 65 (parquet.json (%stash) 66 (download "https://packy.compiler.company/data/parquet.json" 67 :output (merge-pathnames ".stash/parquet.json" *skel-path*))) 68 (freedesktop.org.xml (%stash) 69 (download "https://packy.compiler.company/data/freedesktop.org.xml" 70 :output (merge-pathnames ".stash/freedesktop.org.xml" *skel-path*))) 71 (parquet-test-data (%stash) (download "https://packy.compiler.company/data/test/alltypes_plain.parquet" 72 :output (merge-pathnames ".stash/alltypes_plain.parquet" *skel-path*))) 74 (%stash () #$mkdir -pv .stash$#) 77 (with-sbcl (:noinform t :quit t) 78 (ql:quickload :bin/rdb) 80 #$mv lisp/bin/rdb .stash/rdb$#) 81 (:install () #$install -C -m 755 .stash/rdb /usr/local/bin/rdb$#)) 84 (with-sbcl (:noinform t :quit t) 85 (ql:quickload :bin/skel) 86 (asdf:make :bin/skel)) 87 #$mv lisp/bin/skel .stash/skel$#) 89 (with-sbcl (:noinform t :quit t) 90 (push :tools *features*) 91 (ql:quickload :bin/skel) 92 (asdf:make :bin/skel)) 93 #$mv lisp/bin/skel .stash/skel$#) 94 (:install () #$install -C -m 755 .stash/skel /usr/local/bin/skel$#)) 97 (with-sbcl (:noinform t :quit t) 98 (ql:quickload :bin/skc) 100 #$mv lisp/bin/skc .stash/skc$#)) 102 (:build () (with-sbcl (:noinform t :quit t) 103 (ql:quickload :bin/organ) 104 (asdf:make :bin/organ)) 105 #$mv lisp/bin/organ .stash/organ$#)) 107 (:build () (with-sbcl (:noinform t :quit t) 108 (ql:quickload :bin/homer) 109 (asdf:make :bin/homer)) 110 #$mv lisp/bin/homer .stash/homer$#)) 112 (:build () (with-sbcl (:noinform t :quit t) 113 (ql:quickload :bin/packy) 114 (asdf:make :bin/packy)) 115 #$mv lisp/bin/packy .stash/packy$#)) 116 (std () (:save () (with-sbcl (:noinform t :quit t) 118 (in-package :std-user) 119 (compile-lisp :std :save ".stash/std.core")))) 121 (:save () (with-sbcl (:noinform t :quit t) 122 (ql:quickload :prelude) 123 (in-package :std-user) 124 (compile-lisp :prelude :save ".stash/prelude.core"))) 125 (:compile () (compile-lisp :prelude :force t :verbose t))) 127 (:save () (with-sbcl (:noinform t :quit t) 130 (compile-lisp :user :save ".stash/user.core"))) 131 (:compile () (compile-lisp :user :force t :verbose t))) 132 (infra () (:save () (with-sbcl (:noinform t :quit t) 135 (compile-lisp :user :save ".stash/infra.core" :compression 22)))) 137 (:build () (with-sbcl (:noinform t :quit t) 138 (ql:quickload :bin/core) 139 (asdf:make :bin/core)) 140 #$mv lisp/bin/core .stash/core$#) 141 (:save () (with-sbcl (:noinform t :quit t) 142 (ql:quickload (list :std :core)) 143 (in-package :std-user) 144 (compile-lisp :core :save ".stash/core.core"))) 145 (:compile () (compile-lisp :core :force t :verbose t)) 146 (:install () #$install -C -m 755 .stash/core /usr/local/bin/core 147 echo "core -> /usr/local/bin/" 148 links="skel homer packy rdb organ" 150 ln -sf /usr/local/bin/core /usr/local/bin/$i 151 echo "$i -> core -> /usr/local/bin/" 154 (:save () (with-sbcl (:noinform t :quit t) 155 (ql:quickload :core/tests) 156 (in-package :core/tests) 157 (compile-lisp :core/tests :save ".stash/tests.core"))) 159 (compile-lisp :core/tests :force t :verbose t))) 160 (bench () (:compile () (compile-lisp :core/bench :force t :verbose t))) 161 (fasls (compile-core #+nil compile-tests compile-bench compile-user compile-prelude)) 163 (mailman () #$cd rust && cargo build -Z unstable-options --bin mailman --artifact-dir ../.stash/$#) 164 (alik () #$cd rust && cargo build -Z unstable-options --bin alik --artifact-dir ../.stash/$#) 165 (rust-bin (mailman alik)) 166 (alik-ui () #$trunk build --config rust/ui/alik/Trunk.toml$#) 168 (install (install-core) 169 #$d=/usr/local/share/lisp/ 173 for f in $(find . -type f -name "*.core") 174 do echo "$(basename $f) -> $d" 175 install -C -m 755 $f $d 177 (emacs () #$make -C emacs$#) 179 (core-syms.sxp () (with-open-file (f ".stash/symbols.sxp" :direction :output))) 180 (dist () #$mkdir -pv .stash/tmp/core/bin/ .stash/tmp/core/share/lisp/fasl/ .stash/tmp/core/lib/ 182 mv *.core tmp/core/share/lisp/ 183 mv *.fasl tmp/core/share/lisp/fasl/ 184 mv *.so tmp/core/lib/ 185 mv $(find -maxdepth 1 -type f ! -name "*.*") tmp/core/bin/ 186 cd tmp && tar -I 'zstd' -cf core.tar.zst core/* && mv core.tar.zst ../$#) 187 (dist-clean (clean) #$cd .. && tar -I 'zstd' -cf core/core-source.tar.zst core/* && cd core 189 mv core-source.tar.zst .stash/$#))