This repository was archived by the owner on Nov 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
48 lines (39 loc) · 1.27 KB
/
makefile
File metadata and controls
48 lines (39 loc) · 1.27 KB
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
47
48
guix := guix environment -L guix-modules --ad-hoc cache-cache
# guix-shell := guix shell -L guix-modules -f guix.scm -e 'cache-cache' --rebuild-cache
.PHONY: run-dev
run-dev:
# Assuming everything is loaded by direnv
@# See .envrc and guix.scm
sbcl \
--no-userinit \
--eval "(require 'asdf)" \
--eval '(asdf:load-asd (truename "cache-cache.asd"))' \
--eval "(mapc #'asdf:load-system '(#:cache-cache #:swank))" \
--eval "(swank:create-server :port (find-port:find-port :min 4005) :dont-close t)" \
--eval "(cache-cache:serve :join-thread-p t)"
.PHONY: help
help:
@echo 'Default target is run-dev'
@echo ''
@echo 'Available targets:'
@echo ' build Build using guix'
@echo ' help Show this help.'
@echo ' install Build and install using guix'
@echo ' run Build using guix and run'
@echo ' run-dev Load the system in sbcl, start a swank server and the web server.'
@echo ' shell Build using guix and open a shell'
.PHONY: run
run:
${guix} -- cache-cache
.PHONY: shell
# Start a new shell with the binary "cache-cache" available
shell:
${guix}
.PHONY: build
build:
rm -f ./guix-results
guix build -L guix-modules --root=./guix-results.tmp cache-cache
mv ./guix-results.tmp ./guix-results
.PHONY: install
install:
guix install -L guix-modules cache-cache