Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Check for existence of compress binary before using in make test.
  • Loading branch information
madler committed Jan 22, 2012
1 parent de5107a commit 4c99fe1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Makefile
Expand Up @@ -39,17 +39,20 @@ test: pigz
(printf "w" | gzip ; printf "x") | ./pigz -cdf | wc -c | test `cat` -eq 2
(printf "w" | gzip ; printf "xy") | ./pigz -cdf | wc -c | test `cat` -eq 3
(printf "w" | gzip ; printf "xyz") | ./pigz -cdf | wc -c | test `cat` -eq 4
compress -f < pigz.c | ./unpigz | cmp - pigz.c
rm -f pigz.c.gz pigz.c.zz pigz.c.zip
-@if whereis compress > /dev/null; then \
echo 'compress -f < pigz.c | ./unpigz | cmp - pigz.c' ;\
compress -f < pigz.c | ./unpigz | cmp - pigz.c ;\
fi
@rm -f pigz.c.gz pigz.c.zz pigz.c.zip

tests: dev test
./pigzn -kf pigz.c ; ./pigz -t pigz.c.gz
rm -f pigz.c.gz
@rm -f pigz.c.gz

docs: pigz.pdf

pigz.pdf: pigz.1
groff -mandoc -f H -T ps pigz.1 | ps2pdf - pigz.pdf

clean:
rm -f *.o pigz unpigz pigzn pigzt pigz.c.gz pigz.c.zz pigz.c.zip
@rm -f *.o pigz unpigz pigzn pigzt pigz.c.gz pigz.c.zz pigz.c.zip

0 comments on commit 4c99fe1

Please sign in to comment.