forked from bbarker/inigo
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
76 lines (60 loc) · 2.23 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
include config.mk
all : inigo
.PHONY : bootstrap server idrall inigo install static local-server deploy-init deploy test clean distclean golden
define build_base_dep
(cd Base/$(1) && idris2 --build Bootstrap.ipkg --build-dir ../../build)
endef
bootstrap :
mkdir -p build
$(call build_base_dep,Color)
$(call build_base_dep,Extra)
$(call build_base_dep,Fmt)
$(call build_base_dep,IdrTest)
$(call build_base_dep,Markdown)
$(call build_base_dep,SemVar)
$(call build_base_dep,Toml)
$(MAKE) inigo
server :
idris2 --build Server/InigoServer.ipkg --cg node
idrall :
idris2 --build idrall/idrall.ipkg
mkdir -p depends/idrall-0
cp -r idrall/build/ttc/* depends/idrall-0/
inigo : idrall
idris2 --build Inigo.ipkg --cg node
echo '#!/usr/bin/env node' | cat - build/exec/inigo > temp && mv temp build/exec/inigo
chmod +x build/exec/inigo
@echo "Built \"build/exec/inigo\""
install : inigo
cp build/exec/inigo $(INSTALL_DIR)
chmod +x $(INSTALL_DIR)/inigo
static :
env SKIP_EXT=true node Server/InigoStatic/localize.js Server/InigoStatic/Pages Server/InigoStatic/Local/pages.json
node Server/InigoStatic/localize.js Server/InigoStatic/Static Server/InigoStatic/Local/static.json
local-server : server static
cloudworker --debug \
--kv-file "pages=./Server/InigoStatic/Local/pages.json" \
--kv-file "static=./Server/InigoStatic/Local/static.json" \
--kv-file "index=./Server/InigoStatic/Local/index.json" \
--kv-file "packages=./Server/InigoStatic/Local/packages.json" \
--kv-file "deps=./Server/InigoStatic/Local/deps.json" \
--kv-file "archives=./Server/InigoStatic/Local/archives.json" \
--kv-file "readme=./Server/InigoStatic/Local/readme.json" \
--kv-file "accounts=./Server/InigoStatic/Local/accounts.json" \
--kv-file "sessions=./Server/InigoStatic/Local/sessions.json" \
build/exec/inigo-server
deploy-init :
terraform init -upgrade -var-file=${HOME}/InigoStatic.tfvars InigoStatic
deploy : static server
terraform apply -var-file=${HOME}/InigoStatic.tfvars Server/InigoStatic
test :
idris2 --find-ipkg Test/Suite.idr --cg node -x suite
clean :
idris2 --clean Inigo.ipkg
idris2 --clean idrall/idrall.ipkg
testbin :
${MAKE} -C golden testbin
golden : testbin
${MAKE} -C golden only=$(only)
distclean : clean
$(RM) -r build