Makefile (853B)
1 servicedir:=$(shell mktemp -d) 2 outputdir:=$(servicedir)/.outputs 3 4 default: fs.lua init.lua nl.lua svc.lua process.lua net/constants.lua 5 6 CHECK=fs.fnl init.fnl svc.fnl process.fnl 7 8 check: 9 ln -s . anoia 10 fennel ./run-tests.fnl $(CHECK) 11 fennel test.fnl 12 mkdir -p $(outputdir) 13 fennel test-svc.fnl $(servicedir) 14 find $(outputdir) -ls 15 test -f $(outputdir)/fish 16 test "`cat $(outputdir)/fish`" = "food" 17 test -d $(outputdir)/nested/path 18 test "`cat $(outputdir)/nested/path/name`" = "value" 19 test "`cat $(outputdir)/nested/path/complex/attribute`" = "val" 20 test "`cat $(outputdir)/nested/path/complex/other`" = "42" 21 22 23 net/constants.lua: net/constants.c 24 $(CC) -imacros sys/socket.h -imacros linux/netlink.h -E -P - < net/constants.c | sed 's/ *$$//g' | cat -s > net/constants.lua 25 26 27 %.lua: %.fnl 28 fennel --add-macro-path './assert.fnl' --compile $< > $@