2024-08-08 10:37:50 +00:00
|
|
|
servicedir:=$(shell mktemp -d)
|
2025-03-11 00:21:44 +00:00
|
|
|
outputdir:=$(servicedir)/.outputs
|
2024-04-20 13:04:32 +00:00
|
|
|
|
2024-09-05 23:11:33 +00:00
|
|
|
default: fs.lua init.lua nl.lua svc.lua process.lua net/constants.lua
|
2024-04-20 13:04:32 +00:00
|
|
|
|
2024-09-05 23:11:33 +00:00
|
|
|
CHECK=fs.fnl init.fnl svc.fnl process.fnl
|
2024-08-27 21:42:03 +00:00
|
|
|
|
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)
|
2024-04-20 13:04:32 +00:00
|
|
|
fennel test.fnl
|
2024-08-08 10:37:50 +00:00
|
|
|
fennel test-svc.fnl $(servicedir)
|
2025-03-11 00:21:44 +00:00
|
|
|
find $(outputdir) -ls
|
|
|
|
test -f $(outputdir)/fish
|
|
|
|
test "`cat $(outputdir)/fish`" = "food"
|
|
|
|
test -d $(outputdir)/nested/path
|
|
|
|
test "`cat $(outputdir)/nested/path/name`" = "value"
|
|
|
|
test "`cat $(outputdir)/nested/path/complex/attribute`" = "val"
|
|
|
|
test "`cat $(outputdir)/nested/path/complex/other`" = "42"
|
2024-08-08 10:37:50 +00:00
|
|
|
|
2024-04-20 13:04:32 +00:00
|
|
|
|
2024-04-26 15:43:09 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2024-04-20 13:04:32 +00:00
|
|
|
%.lua: %.fnl
|
2024-09-05 23:11:33 +00:00
|
|
|
fennel --add-macro-path './assert.fnl' --compile $< > $@
|