blob: 1d163b6c981e90bbc4ffd28bbc1da1380e6a7c5d [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001
2lib_LTLIBRARIES = libbz2.la
3
4libbz2_la_SOURCES = blocksort.c \
5 huffman.c \
6 crctable.c \
7 randtable.c \
8 compress.c \
9 decompress.c \
10 bzlib.c
11
12bin_PROGRAMS = bzip2 bzip2recover
13
14bzip2_SOURCES = bzip2.c
15bzip2_LDADD = libbz2.la
16bzip2_DEPENDENCIES = libbz2.la
17
18include_HEADERS = bzlib.h
19
20bzip2recover_SOURCES = bzip2recover.c
21bzip2recover_LDADD = libbz2.la
22bzip2recover_DEPENDENCIES = libbz2.la
23
24bin_SCRIPTS = bzgrep bzmore bzdiff
25
26man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1
27EXTRA_DIST = $(man_MANS)
28
29runtest:
30 ./bzip2 -1 < sample1.ref > sample1.rb2
31 ./bzip2 -2 < sample2.ref > sample2.rb2
32 ./bzip2 -3 < sample3.ref > sample3.rb2
33 ./bzip2 -d < sample1.bz2 > sample1.tst
34 ./bzip2 -d < sample2.bz2 > sample2.tst
35 ./bzip2 -ds < sample3.bz2 > sample3.tst
36 @if cmp sample1.bz2 sample1.rb2; then echo "PASS: sample1 compress";\
37 else echo "FAIL: sample1 compress"; fi
38 @if cmp sample2.bz2 sample2.rb2; then echo "PASS: sample2 compress";\
39 else echo "FAIL: sample2 compress"; fi
40 @if cmp sample3.bz2 sample3.rb2; then echo "PASS: sample3 compress";\
41 else echo "FAIL: sample3 compress"; fi
42 @if cmp sample1.tst sample1.ref; then echo "PASS: sample1 decompress";\
43 else echo "FAIL: sample1 decompress"; fi
44 @if cmp sample2.tst sample2.ref; then echo "PASS: sample2 decompress";\
45 else echo "FAIL: sample2 decompress"; fi
46 @if cmp sample3.tst sample3.ref; then echo "PASS: sample3 decompress";\
47 else echo "FAIL: sample3 decompress"; fi
48
49install-ptest:
50 cp $(srcdir)/Makefile $(DESTDIR)/
51 cp $(srcdir)/sample1.ref $(DESTDIR)/
52 cp $(srcdir)/sample2.ref $(DESTDIR)/
53 cp $(srcdir)/sample3.ref $(DESTDIR)/
54 cp $(srcdir)/sample1.bz2 $(DESTDIR)/
55 cp $(srcdir)/sample2.bz2 $(DESTDIR)/
56 cp $(srcdir)/sample3.bz2 $(DESTDIR)/
57 ln -s $(bindir)/bzip2 $(DESTDIR)/bzip2
58
59install-exec-hook:
60 ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bunzip2$(EXEEXT)
61 ln -s $(bindir)/bzip2$(EXEEXT) $(DESTDIR)$(bindir)/bzcat$(EXEEXT)
62 ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzegrep$(EXEEXT)
63 ln -s $(bindir)/bzgrep$(EXEEXT) $(DESTDIR)$(bindir)/bzfgrep$(EXEEXT)
64 ln -s $(bindir)/bzmore$(EXEEXT) $(DESTDIR)$(bindir)/bzless$(EXEEXT)
65 ln -s $(bindir)/bzdiff$(EXEEXT) $(DESTDIR)$(bindir)/bzcmp$(EXEEXT)
66
67install-data-hook:
68 echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzegrep.1
69 echo ".so man1/bzgrep.1" > $(DESTDIR)$(mandir)/man1/bzfgrep.1
70 echo ".so man1/bzmore.1" > $(DESTDIR)$(mandir)/man1/bzless.1
71 echo ".so man1/bzdiff.1" > $(DESTDIR)$(mandir)/man1/bzcmp.1