-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGNUmakefile
35 lines (28 loc) · 881 Bytes
/
GNUmakefile
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
32
33
34
35
LUA ?= lua
CURL ?= curl
CURLFLAGS ?= -sSL
NCURSES_SNAPSHOTS = https://raw.githubusercontent.com/ThomasDickey/ncurses-snapshots
TERMINFO_SRC_ORIG = $(NCURSES_SNAPSHOTS)/master/misc/terminfo.src
EXAMPLE_OUTPUTS = $(addprefix examples/output/, $(addsuffix .txt, \
backspace-key-sends-bs \
backspace-key-sends-del \
backspace-key-values \
cap-names \
delete-key-sends-del \
has-auto-margins \
has-repeat-char \
longest-key-sequence \
longest-sequence \
longest-term-names \
))
update: update-terminfo example-outputs
example-outputs: $(EXAMPLE_OUTPUTS)
check:
$(LUA) test/basic.lua
$(LUA) test/errors.lua
$(EXAMPLE_OUTPUTS): examples/output/%.txt: examples/%.lua terminfo.src
$(LUA) '$<' > '$@'
update-terminfo:
$(CURL) $(CURLFLAGS) -O '$(TERMINFO_SRC_ORIG)'
.DEFAULT_GOAL = check
.PHONY: update update-terminfo example-outputs check