liminix/pkgs/anoia/Makefile

26 lines
723 B
Makefile
Raw Normal View History

2024-08-08 10:37:50 +00:00
servicedir:=$(shell mktemp -d)
default: fs.lua init.lua nl.lua svc.lua net/constants.lua
2024-08-27 21:42:03 +00:00
CHECK=fs.fnl init.fnl svc.fnl
2024-08-08 10:37:50 +00:00
check:
2024-04-25 20:14:37 +00:00
ln -s . anoia
2024-08-27 21:42:03 +00:00
fennel ./run-tests.fnl $(CHECK)
fennel test.fnl
2024-08-08 10:37:50 +00:00
fennel test-svc.fnl $(servicedir)
test -f $(servicedir)/fish
test "`cat $(servicedir)/fish`" = "food"
test -d $(servicedir)/nested/path
test "`cat $(servicedir)/nested/path/name`" = "value"
test "`cat $(servicedir)/nested/path/complex/attribute`" = "val"
test "`cat $(servicedir)/nested/path/complex/other`" = "42"
net/constants.lua: net/constants.c
$(CC) -imacros sys/socket.h -imacros linux/netlink.h -E -P - < net/constants.c | sed 's/ *$$//g' | cat -s > net/constants.lua
%.lua: %.fnl
fennel --compile $< > $@