zsh-syntax-highlighting/Makefile

44 lines
1.0 KiB
Makefile
Raw Normal View History

2015-09-25 09:28:27 -04:00
NAME=zsh-syntax-highlighting
2015-10-19 02:44:02 -04:00
INSTALL?=install -c
2015-09-25 09:28:27 -04:00
PREFIX?=/usr/local
SHARE_DIR=$(DESTDIR)$(PREFIX)/share/$(NAME)
ZSH?=zsh # zsh binary to run tests with
2015-09-25 09:28:27 -04:00
# Have the default target do nothing.
all:
@ :
2015-09-25 09:28:27 -04:00
install:
$(INSTALL) -d $(SHARE_DIR)
cp -r .version zsh-syntax-highlighting.zsh highlighters $(SHARE_DIR)
if [ x"true" = x"`git rev-parse --is-inside-work-tree 2>/dev/null`" ]; then \
git rev-parse HEAD; \
else \
cat .revision-hash; \
fi > $(SHARE_DIR)/.revision-hash
2015-09-25 22:29:51 -04:00
test:
@result=0; \
for test in highlighters/*; do \
2015-09-25 22:29:51 -04:00
if [ -d $$test/test-data ]; then \
echo "Running test $${test##*/}"; \
$(ZSH) -f tests/test-highlighting.zsh "$${test##*/}"; \
: $$(( result |= $$? )); \
2015-09-25 22:29:51 -04:00
fi \
done | $(ZSH) -f tests/tap-colorizer.zsh; \
exit $$result
2015-10-19 20:26:43 -04:00
2015-10-27 03:46:51 -04:00
perf:
@result=0; \
for test in highlighters/*; do \
if [ -d $$test/test-data ]; then \
echo "Running test $${test##*/}"; \
$(ZSH) -f tests/test-perfs.zsh "$${test##*/}"; \
: $$(( result |= $$? )); \
fi \
done; \
exit $$result
2015-10-19 20:26:43 -04:00
.PHONY: all install test