-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
Makefile
31 lines (26 loc) · 1.03 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
.PHONY: deps compile test
SRC_FILES := $(basename $(shell find fnl -type f -name "*.fnl" | cut -d'/' -f2-))
default: deps compile test
deps:
scripts/dep.sh bakpakin Fennel 938a1e494ce9588e6668cbf54da56b3e52b05a91
scripts/dep.sh norcalli nvim.lua 5d57be0b6eea6c06977b1c5fe0752da909cf4154
scripts/dep.sh luafun luafun cb6a7e25d4b55d9578fd371d1474b00e47bd29f3
LUA=luajit cd deps/Fennel && make build
compile:
rm -rf lua
for f in $(SRC_FILES); do \
if [[ $$f != *macro* ]]; then \
mkdir -p lua/$$(dirname $$f); \
luajit deps/Fennel/fennel scripts/internal/compile.fnl fnl/$$f.fnl > lua/$$f.lua; \
fi \
done
mkdir -p lua/aniseed/deps
mkdir -p lua/aniseed/macros
cp fnl/aniseed/macros.fnl lua/aniseed
cp fnl/aniseed/macros/*.fnl lua/aniseed/macros
cp deps/Fennel/fennel.lua lua/aniseed/deps/fennel.lua
cp deps/luafun/fun.lua lua/aniseed/deps/fun.lua
cp deps/nvim.lua/lua/nvim.lua lua/aniseed/deps/nvim.lua
sed -i "s/\"fennel\./\"aniseed.fennel./gI" lua/aniseed/deps/fennel.lua
test:
SUFFIX="test/fnl/foo.fnl" scripts/test.sh