-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (27 loc) · 854 Bytes
/
Makefile
File metadata and controls
40 lines (27 loc) · 854 Bytes
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
all: compile
run:
./run
bounce:
sudo svc -du /etc/service/$$(basename $$(pwd))
start-service:
sudo svc -u /etc/service/$$(basename $$(pwd))
stop-service:
sudo svc -d /etc/service/$$(basename $$(pwd))
compile:
raco make src/main.rkt src/site.rkt src/backup/main.rkt
clean:
find . -depth -type d -iname compiled -exec rm -rf {} \;
.PHONY: run bounce
###########################################################################
ROOT=compiled/root
keys: $(ROOT)/private-key.pem $(ROOT)/server-cert.pem
$(ROOT)/private-key.pem:
mkdir -p $(ROOT)
openssl genpkey -algorithm RSA -out $@
$(ROOT)/server-cert.pem: $(ROOT)/private-key.pem
mkdir -p $(ROOT)
openssl req -new -x509 -days 365 \
-subj /CN=beta.package.database.localhost \
-key $(ROOT)/private-key.pem -out $@
clean-keys:
rm -f $(ROOT)/private-key.pem $(ROOT)/server-cert.pem