Skip to content

Latest commit

 

History

History
292 lines (265 loc) · 9.25 KB

Makefile.am

File metadata and controls

292 lines (265 loc) · 9.25 KB
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# Tag Image File Format (TIFF) Software
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
# OF THIS SOFTWARE.
# Process this file with automake to produce Makefile.in.
AUTOMAKE_OPTIONS = 1.12 color-tests parallel-tests foreign
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
# Environment parameters to be used during tests
TESTS_ENVIRONMENT = \
MAKE="$(MAKE)" \
MAKEFLAGS="$(MAKEFLAGS)" \
MEMCHECK="$(MEMCHECK)"
EXTRA_DIST = \
$(TESTSCRIPTS) \
$(IMAGES_EXTRA_DIST) \
common.sh
# All of the tests to execute via 'make check'
TESTS = $(check_PROGRAMS) $(TESTSCRIPTS)
# Tests which are expected to fail
XFAIL_TESTS =
# Extra files which should be cleaned by 'make clean'
CLEANFILES = test_packbits.tif o-*
# Executable programs which need to be built in order to support tests
check_PROGRAMS = ascii_tag long_tag short_tag strip_rw rewrite raw_decode custom_dir
# Test scripts to execute
TESTSCRIPTS = \
bmp2tiff_palette.sh \
bmp2tiff_rgb.sh \
gif2tiff.sh \
ppm2tiff_pbm.sh \
ppm2tiff_pgm.sh \
ppm2tiff_ppm.sh \
tiffcp-g3.sh \
tiffcp-g3-1d.sh \
tiffcp-g3-1d-fill.sh \
tiffcp-g3-2d.sh \
tiffcp-g3-2d-fill.sh \
tiffcp-g4.sh \
tiffcp-logluv.sh \
tiffcp-thumbnail.sh \
tiffdump.sh \
tiffinfo.sh \
tiffcp-split.sh \
tiffcp-split-join.sh \
tiff2ps-PS1.sh \
tiff2ps-PS2.sh \
tiff2ps-PS3.sh \
tiff2ps-EPS1.sh \
tiff2pdf.sh \
tiffcrop-doubleflip-logluv-3c-16b.sh \
tiffcrop-doubleflip-minisblack-1c-16b.sh \
tiffcrop-doubleflip-minisblack-1c-8b.sh \
tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh \
tiffcrop-doubleflip-miniswhite-1c-1b.sh \
tiffcrop-doubleflip-palette-1c-1b.sh \
tiffcrop-doubleflip-palette-1c-4b.sh \
tiffcrop-doubleflip-palette-1c-8b.sh \
tiffcrop-doubleflip-rgb-3c-16b.sh \
tiffcrop-doubleflip-rgb-3c-8b.sh \
tiffcrop-extract-logluv-3c-16b.sh \
tiffcrop-extract-minisblack-1c-16b.sh \
tiffcrop-extract-minisblack-1c-8b.sh \
tiffcrop-extract-minisblack-2c-8b-alpha.sh \
tiffcrop-extract-miniswhite-1c-1b.sh \
tiffcrop-extract-palette-1c-1b.sh \
tiffcrop-extract-palette-1c-4b.sh \
tiffcrop-extract-palette-1c-8b.sh \
tiffcrop-extract-rgb-3c-16b.sh \
tiffcrop-extract-rgb-3c-8b.sh \
tiffcrop-extractz14-logluv-3c-16b.sh \
tiffcrop-extractz14-minisblack-1c-16b.sh \
tiffcrop-extractz14-minisblack-1c-8b.sh \
tiffcrop-extractz14-minisblack-2c-8b-alpha.sh \
tiffcrop-extractz14-miniswhite-1c-1b.sh \
tiffcrop-extractz14-palette-1c-1b.sh \
tiffcrop-extractz14-palette-1c-4b.sh \
tiffcrop-extractz14-palette-1c-8b.sh \
tiffcrop-extractz14-rgb-3c-16b.sh \
tiffcrop-extractz14-rgb-3c-8b.sh \
tiffcrop-R90-logluv-3c-16b.sh \
tiffcrop-R90-minisblack-1c-16b.sh \
tiffcrop-R90-minisblack-1c-8b.sh \
tiffcrop-R90-minisblack-2c-8b-alpha.sh \
tiffcrop-R90-miniswhite-1c-1b.sh \
tiffcrop-R90-palette-1c-1b.sh \
tiffcrop-R90-palette-1c-4b.sh \
tiffcrop-R90-palette-1c-8b.sh \
tiffcrop-R90-rgb-3c-16b.sh \
tiffcrop-R90-rgb-3c-8b.sh \
tiff2rgba-logluv-3c-16b.sh \
tiff2rgba-minisblack-1c-16b.sh \
tiff2rgba-minisblack-1c-8b.sh \
tiff2rgba-minisblack-2c-8b-alpha.sh \
tiff2rgba-miniswhite-1c-1b.sh \
tiff2rgba-palette-1c-1b.sh \
tiff2rgba-palette-1c-4b.sh \
tiff2rgba-palette-1c-8b.sh \
tiff2rgba-rgb-3c-16b.sh \
tiff2rgba-rgb-3c-8b.sh \
tiff2rgba-quad-tile.jpg.sh
# This list should contain all of the TIFF files in the 'images'
# subdirectory which are intended to be used as input images for
# tests. All of these files should use the extension ".tiff".
TIFFIMAGES = \
images/logluv-3c-16b.tiff \
images/minisblack-1c-16b.tiff \
images/minisblack-1c-8b.tiff \
images/minisblack-2c-8b-alpha.tiff \
images/miniswhite-1c-1b.tiff \
images/palette-1c-1b.tiff \
images/palette-1c-4b.tiff \
images/palette-1c-8b.tiff \
images/rgb-3c-16b.tiff \
images/rgb-3c-8b.tiff \
images/quad-tile.jpg.tiff
BMPIMAGES = \
images/palette-1c-8b.bmp \
images/rgb-3c-8b.bmp
GIFIMAGES = \
images/palette-1c-8b.gif
PNMIMAGES = \
images/minisblack-1c-8b.pgm \
images/miniswhite-1c-1b.pbm \
images/rgb-3c-8b.ppm
# This list should include all of the files in the 'images'
# subdirectory which are intended to be distributed. This may include
# files which are not currently used by the tests.
IMAGES_EXTRA_DIST = \
images/README.txt \
$(BMPIMAGES) \
$(GIFIMAGES) \
$(PNMIMAGES) \
$(TIFFIMAGES)
noinst_HEADERS = tifftest.h
ascii_tag_SOURCES = ascii_tag.c
ascii_tag_LDADD = $(LIBTIFF)
long_tag_SOURCES = long_tag.c check_tag.c
long_tag_LDADD = $(LIBTIFF)
short_tag_SOURCES = short_tag.c check_tag.c
short_tag_LDADD = $(LIBTIFF)
strip_rw_SOURCES = strip_rw.c strip.c test_arrays.c test_arrays.h
strip_rw_LDADD = $(LIBTIFF)
rewrite_SOURCES = rewrite_tag.c
rewrite_LDADD = $(LIBTIFF)
raw_decode_SOURCES = raw_decode.c
raw_decode_LDADD = $(LIBTIFF)
custom_dir_SOURCES = custom_dir.c
custom_dir_LDADD = $(LIBTIFF)
AM_CPPFLAGS = -I$(top_srcdir)/libtiff
# memcheck: valgrind's memory access checker
memcheck:
$(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes --track-origins=yes --num-callers=12 --quiet $(VALGRIND_EXTRA_OPTS)' check
# ptrcheck: valgrind's experimental pointer checking tool.
ptrcheck:
$(MAKE) MEMCHECK='valgrind --tool=exp-ptrcheck --quiet $(VALGRIND_EXTRA_OPTS)' check
generate-tiff2rgba-tests:
for file in $(TIFFIMAGES) ; \
do \
base=`basename $$file .tiff` ; \
testscript=$(srcdir)/tiff2rgba-$$base.sh ; \
( \
echo "#!/bin/sh" ; \
echo "# Generated file, master is Makefile.am" ; \
echo ". \$${srcdir:-.}/common.sh" ; \
echo "infile=\"\$$srcdir/$$file\"" ; \
echo "outfile=\"o-tiff2rgba-$$base.tiff\"" ; \
echo "f_test_convert \"\$$TIFF2RGBA\" \$$infile \$$outfile" ; \
echo "f_tiffinfo_validate \$$outfile" ; \
) > $$testscript ; \
chmod +x $$testscript ; \
done
# Test rotations
generate-tiffcrop-R90-tests:
for file in $(TIFFIMAGES) ; \
do \
base=`basename $$file .tiff` ; \
testscript=$(srcdir)/tiffcrop-R90-$$base.sh ; \
( \
echo "#!/bin/sh" ; \
echo "# Generated file, master is Makefile.am" ; \
echo ". \$${srcdir:-.}/common.sh" ; \
echo "infile=\"\$$srcdir/$$file\"" ; \
echo "outfile=\"o-tiffcrop-R90-$$base.tiff\"" ; \
echo "f_test_convert \"\$$TIFFCROP -R90\" \$$infile \$$outfile" ; \
echo "f_tiffinfo_validate \$$outfile" ; \
) > $$testscript ; \
chmod +x $$testscript ; \
done
# Test flip (mirror)
generate-tiffcrop-doubleflip-tests:
for file in $(TIFFIMAGES) ; \
do \
base=`basename $$file .tiff` ; \
testscript=$(srcdir)/tiffcrop-doubleflip-$$base.sh ; \
( \
echo "#!/bin/sh" ; \
echo "# Generated file, master is Makefile.am" ; \
echo ". \$${srcdir:-.}/common.sh" ; \
echo "infile=\"\$$srcdir/$$file\"" ; \
echo "outfile=\"o-tiffcrop-doubleflip-$$base.tiff\"" ; \
echo "f_test_convert \"\$$TIFFCROP -F both\" \$$infile \$$outfile" ; \
echo "f_tiffinfo_validate \$$outfile" ; \
) > $$testscript ; \
chmod +x $$testscript ; \
done
# Test extracting a section 100 pixels wide and 100 pixels high
generate-tiffcrop-extract-tests:
for file in $(TIFFIMAGES) ; \
do \
base=`basename $$file .tiff` ; \
testscript=$(srcdir)/tiffcrop-extract-$$base.sh ; \
( \
echo "#!/bin/sh" ; \
echo "# Generated file, master is Makefile.am" ; \
echo ". \$${srcdir:-.}/common.sh" ; \
echo "infile=\"\$$srcdir/$$file\"" ; \
echo "outfile=\"o-tiffcrop-extract-$$base.tiff\"" ; \
echo "f_test_convert \"\$$TIFFCROP -U px -E top -X 60 -Y 60\" \$$infile \$$outfile" ; \
echo "f_tiffinfo_validate \$$outfile" ; \
) > $$testscript ; \
chmod +x $$testscript ; \
done
# Test extracting the first and fourth quarters from the left side.
generate-tiffcrop-extractz14-tests:
for file in $(TIFFIMAGES) ; \
do \
base=`basename $$file .tiff` ; \
testscript=$(srcdir)/tiffcrop-extractz14-$$base.sh ; \
( \
echo "#!/bin/sh" ; \
echo "# Generated file, master is Makefile.am" ; \
echo ". \$${srcdir:-.}/common.sh" ; \
echo "infile=\"\$$srcdir/$$file\"" ; \
echo "outfile=\"o-tiffcrop-extractz14-$$base.tiff\"" ; \
echo "f_test_convert \"\$$TIFFCROP -E left -Z1:4,2:4\" \$$infile \$$outfile" ; \
echo "f_tiffinfo_validate \$$outfile" ; \
) > $$testscript ; \
chmod +x $$testscript ; \
done
generate-tiffcrop-tests: \
generate-tiffcrop-R90-tests \
generate-tiffcrop-doubleflip-tests \
generate-tiffcrop-extract-tests \
generate-tiffcrop-extractz14-tests
generate-tests: \
generate-tiff2rgba-tests \
generate-tiffcrop-tests