zsh-syntax-highlighting/Makefile
Daniel Shahaf 984b4acd78 Makefile: have the default invocation safer.
Don't modify $(PREFIX) from 'make', only from 'make install'.
2015-10-19 07:08:42 +00:00

25 lines
502 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 zsh-syntax-highlighting.zsh highlighters $(SHARE_DIR)
test:
@result=0
@for test in highlighters/*; do \
if [ -d $$test/test-data ]; then \
echo "Running test $${test##*/}"; \
zsh tests/test-highlighting.zsh "$${test##*/}"; \
: $$(( result |= $$? )); \
fi \
done
@exit $$result