mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-02-06 09:55:31 +08:00
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
This commit is contained in:
commit
75d62b9657
20
Makefile
Normal file
20
Makefile
Normal 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…
Reference in New Issue
Block a user