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