changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > core / skelfile

changeset 450: b9dc54992641
parent: 7ca2e98f0847
child: 8e94959e96bd
author: Richard Westhaver <ellis@rwest.io>
date: Sun, 16 Jun 2024 02:22:07 +0000
permissions: -rwxr-xr-x
description: x updates
1 ;;; skelfile --- CC/core skelfile -*- mode: skel; -*-
2 :name "core"
3 :author "Richard Westhaver <ellis@rwest.io>"
4 :version "0.1.0"
5 :license "MPL"
6 :stash ".stash"
7 :store ".store"
8 :description "The Compiler Company Core"
9 :tags ("core" "lisp" "rust" "emacs" "c")
10 :imports ("lisp/skelfile" "rust/skelfile" "emacs/skelfile" "c/skelfile")
11 :vc :hg
12 :docs ((:org "readme"))
13 :scripts ((:lisp "x"))
14 :env ((cc "clang"))
15 :rules
16 ((all (compile std prelude user core tests build fasl)) ;; TODO: add keyword args -- (emacs :stage 'install)
17  (clean ()
18  #$rm -vrf .stash$#
19  #$find emacs -name '*.elc' -type f -delete$#
20  #$find lisp -name '*.fasl' -type f -delete$#
21  #$echo 'cargo clean:' && cd rust && cargo clean$#)
22  (tree-sitter-alien ()
23  #$ cd lisp/ffi/tree-sitter &&
24  clang -g -O2 -Wall -Wno-unused-value -ltree-sitter -shared \
25  alien.c -o /usr/local/lib/libtree-sitter-alien.so$#
26  (info! "installed /usr/local/lib/libtree-sitter-alien.so"))
27  (psl.dat () ;; req:fetch works in slime and sk-shell but not here? hmm..
28  (with-open-file
29  (st ".stash/psl.dat" :direction :output :element-type 'octet)
30  (loop for x across (req:get "https://publicsuffix.org/list/public_suffix_list.dat" :force-binary t)
31  do (write-byte x st))))
32  (rdb ()
33  #$./x.lisp build rdb$#)
34  (skel () #$./x.lisp build skel$#)
35  (organ () #$./x.lisp build organ$#)
36  (homer () #$./x.lisp build homer$#)
37  (packy () #$./x.lisp build packy$#)
38  (build () #$./x.lisp build$#)
39  (compile () #$./x.lisp compile$#)
40  (std () #$./x.lisp save std$#)
41  (prelude () #$./x.lisp save prelude$#)
42  (user () #$./x.lisp save user$#)
43  (core () #$./x.lisp save core$#)
44  (tests () #$./x.lisp save tests$#)
45  (prelude-fasl () #$./x.lisp make prelude$#)
46  (user-fasl () #$./x.lisp make user$#)
47  (core-fasl () #$./x.lisp make core$#)
48  (tests-fasl () #$./x.lisp make core/tests$#)
49  (bench-fasl () #$./x.lisp make core/bench$#)
50  (fasl (core-fasl tests-fasl bench-fasl user-fasl prelude-fasl))
51  (box () #$podman build . --build-arg IMAGE=box -t core$#)
52  ;; x does the same thing, but prompts for sudo -- having issues with
53  ;; passing the shell input to SKEL though.
54  (install () #$d=/usr/local/bin
55  cd .stash
56  for f in $(find . -type f ! -name "*.*")
57  do echo "$(basename $f) -> $d"
58  install -C -m 755 $f $d
59  done
60  d=/usr/local/share/lisp
61  if [ -d $d ];
62  then
63  for f in $(find . -type f -name "*.core")
64  do echo "$(basename $f) -> $d"
65  install -C -m 755 $f $d
66  done fi$#)
67  (dist (all) #$cd .stash
68  mkdir -pv core/bin core/share/lisp/fasl
69  mv *.core core/share/lisp/
70  mv *.fasl core/share/lisp/fasl/
71  mv $(find -maxdepth 1 -type f ! -name "*.*") core/bin/
72  tar -I 'zstd' -cf core.tar.zst core/*$#)
73  (clean-dist (clean) #$cd .. && tar -I 'zstd' -cf core/core-source.tar.zst core/* && cd core
74  mkdir -pv .stash
75  mv core-source.tar.zst .stash/$#))