zsh-syntax-highlighting/Makefile
Daniel Shahaf bb9c407c95 'make install': Tweak to work with one-shell-per-logical-line 'make' implementations,
Tested with 'bmake -B'.

Found-by: Carsten Hey
2015-10-20 00:35:50 +00:00

32 lines
713 B
Makefile

NAME=zsh-syntax-highlighting
INSTALL?=install -c
PREFIX?=/usr/local
SHARE_DIR=$(DESTDIR)$(PREFIX)/share/$(NAME)
# Have the default target do nothing.
all:
@ :
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
test:
@result=0; \
for test in highlighters/*; do \
if [ -d $$test/test-data ]; then \
echo "Running test $${test##*/}"; \
zsh -f tests/test-highlighting.zsh "$${test##*/}"; \
: $$(( result |= $$? )); \
fi \
done; \
exit $$result
.PHONY: all install test