1 AUTOMAKE_OPTIONS = 1.4 foreign
2 AUTOTOOL_VERSION=autoconf-2.52 automake-1.5 libtool-1.4.2
3 DEFAULT_INCLUDES = # nothing - no default of -I. -I$(srcdir)
4 DEFS = @DEFS@ -I$(top_builddir) -I$(top_srcdir) # also for automake 1.4
6 EXTRA_DIST = test.zip zziptests.py
7 DISTCLEANFILES = test*.dat test0.zip test1.zip test2.zip test3.zip
9 zzcat = ../bins/zzcat$(EXEEXT)
10 zzdir = ../bins/zzdir$(EXEEXT)
11 zziptest = ../bins/zziptest$(EXEEXT)
12 zzxorcat = ../bins/zzxorcat$(EXEEXT)
13 zzxordir = ../bins/zzxordir$(EXEEXT)
14 zzxorcopy = ../bins/zzxorcopy$(EXEEXT)
16 $(zzcat) $(zzdir) $(zziptest) $(zzxorcat) $(zzxordir) $(xorcopy) : \
17 @top_srcdir@/bins/*.c @top_srcdir@/zzip/*.c
18 (cd ../bins && $(MAKE))
20 # -------------------------------------------------------------------
22 README = $(top_srcdir)/README
23 testdatadir = $(top_builddir)/testdata.d
25 testzip testzips : test.zip test1.zip test2.zip test3.zip
28 - test -d tmp || mkdir tmp
29 - cp $(README) tmp/README
31 - cd tmp && $(MKZIP) ../test0.zip README
33 test -s test0.zip && cp -v test0.zip $(srcdir)/test.zip
37 - test -s $@ || cp $(srcdir)/test.zip $@
39 # -------------------------------------------------------------------
41 sfxtests = @ZIPTESTS@ check-sfx
42 newtests = @ZIPTESTS@ check-tests
44 check-local: check-readme $(sfxtests) $(newtests)
48 @ test -f zziptests.py || ln -s -v $(srcdir)/zziptests.py . || cp -v $(srcdir)/zziptests.py .
49 $(PYTHON) zziptests.py --exeext "$(EXEEXT)" --topsrcdir "$(top_srcdir)"
51 @ test -f zziptests.py || ln -s -v $(srcdir)/zziptests.py . || cp -v $(srcdir)/zziptests.py .
52 $(PYTHON) zziptests.py $@ -vvvv --exeext "$(EXEEXT)" --topsrcdir "$(top_srcdir)"
54 check-readme : $(zzcat) test.zip
55 @ test -f test.zip || $(MAKE) test0.zip
56 test -s test.zip || cp $(srcdir)/test.zip test.zip
57 @ echo :$@: checking $(zzcat) test/README
58 @ $(zzcat) test/README >test.out
59 @ if diff test.out $(README) >$(NULL) \
60 ; then rm test.out ; echo check OK ; true \
61 ; else rm test.out ; echo check FAIL ; false ; fi
63 # -------------------------------------------------------------------
65 noinst_PROGRAMS = zzipself zzipsetstub
67 zzipself_LDFLAGS = @ZZIPLIB_LDFLAGS@
68 zzipself_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz
70 ../zzip/libzzip.la : @top_srcdir@/zzip/*.c
71 (cd ../zzip && $(MAKE) `basename $@`)
73 zzshowme$(EXEEXT) : zzipself$(EXEEXT) zzipsetstub$(EXEEXT)
74 $(MKZIP) -0 -j $@ .libs/zzipself$(EXEEXT)
75 $(MKZIP) -9 -j $@ $(README)
76 - test -s $@ || cp test2.zip $@
77 test ! -f $@.zip || mv $@.zip $@
78 ./zzipsetstub $@ .libs/zzipself$(EXEEXT)
81 check-sfx : zzshowme$(EXEEXT)
82 echo :$@: "./zzshowme readme >readme.out 2>readme.err"
83 export LD_LIBRARY_PATH="../zzip/.libs:$$LD_LIBRARY_PATH" \
84 ; ./zzshowme readme >readme.out 2>readme.err ; true
85 @ echo 'diff readme.out $(README) || grep "libzzip-" readme.err' \
86 ; if test -s readme.out ; then diff readme.out $(README) \
87 ; else grep "libzzip-" readme.err || echo "readme.out is empty!" ; fi
88 rm readme.out readme.err