-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
46 lines (40 loc) · 1.38 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
### makefile --- NAS-T Makefile
## ROOT --- run podman as root (0,1)
## EMACS --- emacs program string
## POD_NAME --- name for podman pod
## POD_IMAGE_BASE --- base image for podman containers
### Code:
include infra/common.mk
ROOT?=0
DEBUG?=0
EMACS?=emacsclient -n
POD_NAME?=nas-t-pod
POD_IMAGE_BASE?=docker.io/library/archlinux:latest
ll1=--eval '(asdf:load-asd "btrfs.asd")' --eval '(ql:quickload :btrfs)'
ll2=--eval '(asdf:load-asd "nas-t.asd")' --eval '(ql:quickload :nas-t)'
lp1=--eval '(require :sb-sprof)' --eval '(sb-sprof:start-profiling :sample-interval 0.001)'
lp2=--eval '(sb-sprof:stop-profiling)' --eval '(sb-sprof:report)'
E?=$(EMACS)
PM:=podman
ifeq ($(ROOT),1)
PM=sudo $(PM)
endif
ifeq ($(DEBUG),1)
L=sbcl --noinform --non-interactive $(ll1) $(ll2)
else
L=sbcl --noinform --non-interactive $(ll2)
endif
all::compile
.PHONY::podman-init podman-ps hg-yolo compile install clean deps vars bin
deps:$(INFRA_DIR)/deps.sh;$< find_all_deps
vars:;echo -e $(VARS)
compile::;$(L) --eval '(asdf:compile-system :nas-t)'
test::tests/pkg.lisp;$(L) --eval '(asdf:test-system :nas-t)'
bin:;mkdir -pv $@
nasd:bin compile;$(L) --eval '(asdf:make :nas-t)'
build::nasd;
install::build;install -m 755 nasd /usr/local/bin
clean::;rm -rf */*.fasl
podman-init:;$(PM) pod create --name $(POD_NAME)
podman-ps:;$(PM) ps -a --pod
hg-yolo:;hg commit -A -m make-hg-yolo-$(date);hg push;hgfe # babel+cfg dependency