zsh-syntax-highlighting/Makefile

30 lines
683 B
Makefile
Raw Normal View History

2015-09-25 15:28:27 +02:00
NAME=zsh-syntax-highlighting
2015-10-19 08:44:02 +02:00
INSTALL?=install -c
2015-09-25 15:28:27 +02:00
PREFIX?=/usr/local
SHARE_DIR=$(DESTDIR)$(PREFIX)/share/$(NAME)
# Have the default target do nothing.
all:
@ :
2015-09-25 15:28:27 +02: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-26 04:29:51 +02:00
test:
@result=0
2015-09-26 04:29:51 +02:00
@for test in highlighters/*; do \
if [ -d $$test/test-data ]; then \
echo "Running test $${test##*/}"; \
zsh -f tests/test-highlighting.zsh "$${test##*/}"; \
: $$(( result |= $$? )); \
2015-09-26 04:29:51 +02:00
fi \
done
@exit $$result