Developed internally, for system-test; not suitable for upstream.
--- pigz-2.3.3/Makefile.orig 2016-09-26 13:21:02.245052682 +0000
+++ pigz-2.3.3/Makefile 2016-09-26 13:16:33.808207549 +0000
@@ -1,5 +1,6 @@
CC=cc
CFLAGS=-O3 -Wall -Wextra
+TARGETDIR ?= $(shell pwd)
LDFLAGS=-lz
ZOPFLI=zopfli/src/zopfli/
# use gcc and gmake on Solaris
@@ -52,36 +53,36 @@
-test: pigz
- ./pigz -kfK pigz.c ; ./pigz -t pigz.c.zip
- printf "" | ./pigz -cdf | wc -c | test `cat` -eq 0
- printf "x" | ./pigz -cdf | wc -c | test `cat` -eq 1
- printf "xy" | ./pigz -cdf | wc -c | test `cat` -eq 2
- printf "xyz" | ./pigz -cdf | wc -c | test `cat` -eq 3
- (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
- -@if test "`which compress | grep /`" != ""; then \
+test: $(TARGETDIR)/pigz
+ $(TARGETDIR)/pigz -kfK pigz.c ; $(TARGETDIR)/pigz -t pigz.c.zip
+ printf "" | $(TARGETDIR)/pigz -cdf | wc -c | test `cat` -eq 0
+ printf "x" | $(TARGETDIR)/pigz -cdf | wc -c | test `cat` -eq 1
+ printf "xy" | $(TARGETDIR)/pigz -cdf | wc -c | test `cat` -eq 2
+ printf "xyz" | $(TARGETDIR)/pigz -cdf | wc -c | test `cat` -eq 3
+ (printf "w" | gzip ; printf "x") | $(TARGETDIR)/pigz -cdf | wc -c | test `cat` -eq 2
+ (printf "w" | gzip ; printf "xy") | $(TARGETDIR)/pigz -cdf | wc -c | test `cat` -eq 3
+ (printf "w" | gzip ; printf "xyz") | $(TARGETDIR)/pigz -cdf | wc -c | test `cat` -eq 4
+ -@if test "`type -f compress | grep /`" != ""; then \
fi
@rm -rf d/1 d/2
(mkdir -p d/1; cd d/1; tar xzf ../../../../pigz-2.3.3.tar.gz; \
- cd ..; cp -pr 1 2; ../pigz -rp 4 --index %z 1; \
- ../pigz -drp 4 --index %z 1; diff -r 1 2)
+ cd ..; cp -pr 1 2; $(TARGETDIR)/pigz -rp 4 --index %z 1; \
+ $(TARGETDIR)/pigz -drp 4 --index %z 1; diff -r 1 2)
@rm -rf d/1 d/2
(mkdir -p d/1; cd d/1; tar xzf ../../../../pigz-2.3.3.tar.gz; \
- cd ..; cp -pr 1 2; ../pigz -zrp 4 -X %f.idx 1; \
- ../pigz -dzrp 4 -X %f.idx 1; diff -r 1 2)
+ cd ..; cp -pr 1 2; $(TARGETDIR)/pigz -zrp 4 -X %f.idx 1; \
+ $(TARGETDIR)/pigz -dzrp 4 -X %f.idx 1; diff -r 1 2)
@rm -rf d/1 d/2
tests: dev test
@rm -f pigz.c.gz
docs: pigz.pdf