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
					
				|  | @ -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