Browse Source

Add Makefile

Fixes issue #177 (using a different branch than the originally-proposed one).

* phy1729/makefile:
  Makefile: Add default for INSTALL
  Makefile: exit non-zero for a failed test
  Makefile: Add test target
  Add Makefile
pull/214/head
Daniel Shahaf 9 years ago
parent
commit
75d62b9657
1 changed files with 20 additions and 0 deletions
  1. +20
    -0
      Makefile

+ 20
- 0
Makefile View File

@ -0,0 +1,20 @@
NAME=zsh-syntax-highlighting
INSTALL?=install -c
PREFIX?=/usr/local
SHARE_DIR=$(DESTDIR)$(PREFIX)/share/$(NAME)
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

Loading…
Cancel
Save