X-Git-Url: http://git.refcnt.org/?a=blobdiff_plain;f=Makefile;h=381f11aacc7366e2ec15221a59bb80688f0ceca9;hb=3180102d0475ab9686cfe9c9c7501d4eec567db6;hp=0ef31e783a276664126b1d25f02fcedf51960b6e;hpb=e432a5daa5a55665da6294448c513cf0e10b14d8;p=colorize.git diff --git a/Makefile b/Makefile index 0ef31e7..381f11a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: check clean +.PHONY: check check_valgrind install clean release .SUFFIXES: .SUFFIXES: .c .o @@ -13,7 +13,15 @@ colorize: colorize.c $(CC) $(CFLAGS) -o colorize colorize.c -DCFLAGS="$(CFLAGS)" -DHAVE_VERSION $(FLAGS) check: - perl ./test.pl + perl ./test.pl --regular + +check_valgrind: + @which valgrind >/dev/null 2>&1 || (printf '%s\n' "valgrind not found" && exit 1) + perl ./test.pl --valgrind || exit 0 + +install: + test ! -d $(DESTDIR)/usr/bin && mkdir -p $(DESTDIR)/usr/bin || exit 0 + cp colorize $(DESTDIR)/usr/bin clean: rm -f a.out colorize debug.txt version.h