eufon/saturn/Makefile
Samuel Dionne-Riel 2df6bd80a7 saturn: Provide usable lua shebang
The end-result can be executed directly on my NixOS system.
2022-04-26 22:55:10 +01:00

16 lines
283 B
Makefile

FENNEL?=$(fennel)
PREFIX?=/usr/local
MODULES=main.fnl
%.lua : %.fnl
lua $(FENNEL) --compile $< > $@
saturn: $(patsubst %.fnl,%.lua,$(MODULES)) Makefile
(echo -e "#!/usr/bin/env lua\n" ; cat main.lua ) > $@
chmod +x $@
install:
mkdir -p $(PREFIX)/bin
cp saturn $(PREFIX)/bin