# makefile for mccabe utilities

BIN=../bin
TEST=../testfiles


all:	mccabe

mccabe:	mccabe.sh
	cp mccabe.sh mccabe
	chmod u+x mccabe

install:	all
	mv mccabe $(BIN)/mccabe
	chmod 755 $(BIN)/mccabe

clean:
	-rm -f mccabe _test
	
test:
	@echo results of this command should be the same as test.result
	@cp $(TEST)/test1.c $(TEST)/test2.y $(TEST)/test3.c .
	mccabe test1.c test2.y test3.c > _test
	diff _test test.result
	@/bin/rm -f test1.c test2.y test3.c
