2002-01-08 19:06:54 +00:00
|
|
|
VPATH = @srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
top_builddir = ..
|
|
|
|
|
|
|
|
PACKAGE = @PACKAGE@
|
|
|
|
VERSION = @VERSION@
|
2009-01-16 23:39:48 +00:00
|
|
|
distdir = $(top_srcdir)/$(PACKAGE)-$(VERSION)/testsuite
|
2002-01-08 19:06:54 +00:00
|
|
|
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
bindir = @bindir@
|
|
|
|
sbindir = @sbindir@
|
|
|
|
libexecdir = @libexecdir@
|
2008-02-03 06:59:36 +00:00
|
|
|
datarootdir = @datarootdir@
|
2002-01-08 19:06:54 +00:00
|
|
|
datadir = @datadir@
|
|
|
|
sysconfdir = @sysconfdir@
|
|
|
|
sharedstatedir = @sharedstatedir@
|
|
|
|
localstatedir = @localstatedir@
|
|
|
|
libdir = @libdir@
|
|
|
|
infodir = @infodir@
|
|
|
|
mandir = @mandir@
|
|
|
|
includedir = @includedir@
|
|
|
|
oldincludedir = /usr/include
|
|
|
|
configdir = ${sysconfdir}/sane.d
|
|
|
|
|
|
|
|
V_MAJOR = @V_MAJOR@
|
|
|
|
V_MINOR = @V_MINOR@
|
|
|
|
DLL_PRELOAD = @DLL_PRELOAD@
|
|
|
|
|
|
|
|
MKDIR = $(top_srcdir)/mkinstalldirs
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
RANLIB = @RANLIB@
|
|
|
|
|
2001-02-22 09:53:08 +00:00
|
|
|
SCANIMAGE = ../frontend/scanimage
|
|
|
|
TESTFILE = testfile.pnm
|
2006-01-05 18:52:22 +00:00
|
|
|
OUTFILE = outfile.pnm
|
|
|
|
DEVICE = test
|
|
|
|
OPTIONS = --mode Color --depth 16 --test-picture "Color pattern" --resolution 50 -y 20 -x 20 > $(OUTFILE)
|
2001-02-22 09:53:08 +00:00
|
|
|
|
2002-02-13 20:48:29 +00:00
|
|
|
DISTCLEAN_FILES = @DISTCLEAN_FILES@
|
|
|
|
|
2002-01-08 19:06:54 +00:00
|
|
|
DISTFILES = Makefile.in README testfile.pnm
|
|
|
|
|
2002-02-13 20:48:29 +00:00
|
|
|
.PHONY: all clean dist distclean test test.local
|
2002-01-08 19:06:54 +00:00
|
|
|
|
2001-02-22 09:53:08 +00:00
|
|
|
all: Makefile
|
2001-11-30 18:27:23 +00:00
|
|
|
@echo "Use 'make test' to run the tests."
|
2001-02-22 09:53:08 +00:00
|
|
|
|
|
|
|
test: Makefile test.local
|
|
|
|
|
|
|
|
test.local:
|
2006-01-05 18:52:22 +00:00
|
|
|
@echo "**** Testing $(SCANIMAGE) with device $(DEVICE)"
|
|
|
|
@if echo "---> Trying flatbed scanner" && \
|
|
|
|
$(SCANIMAGE) -d $(DEVICE) -T && \
|
|
|
|
echo "<--- Flatbed scanner succeded" && \
|
|
|
|
echo "---> Trying three pass flatbed scanner" && \
|
|
|
|
$(SCANIMAGE) -d $(DEVICE) --mode Color --three-pass=yes -T && \
|
|
|
|
echo "<--- Three pass scanner succeded" && \
|
|
|
|
echo "---> Trying hand scanner" && \
|
|
|
|
$(SCANIMAGE) -d $(DEVICE) --hand-scanner=yes -T && \
|
|
|
|
echo "<--- Hand scanner succeded" && \
|
|
|
|
echo "---> Checking 16 bit color mode" && \
|
|
|
|
$(SCANIMAGE) -d $(DEVICE) $(OPTIONS) && \
|
|
|
|
cmp -s $(TESTFILE) $(OUTFILE) && \
|
|
|
|
echo "<--- 16 bit color mode succeded" && \
|
|
|
|
rm $(OUTFILE) ; \
|
|
|
|
then echo ; echo ; echo "**** All tests passed" ; \
|
2001-11-30 18:27:23 +00:00
|
|
|
else echo ; echo; \
|
2006-01-05 18:52:22 +00:00
|
|
|
echo "**** Something failed (maybe test backend not enabled by configure?)";\
|
2001-11-30 18:27:23 +00:00
|
|
|
fi
|
2001-02-22 09:53:08 +00:00
|
|
|
|
|
|
|
# Generate new Makefile when something changes
|
|
|
|
Makefile: Makefile.in ../config.status
|
|
|
|
cd .. \
|
|
|
|
&& CONFIG_FILES=testsuite/Makefile CONFIG_HEADERS= /bin/sh ./config.status
|
2002-01-08 19:06:54 +00:00
|
|
|
|
2002-02-13 20:48:29 +00:00
|
|
|
clean:
|
2006-01-05 18:52:22 +00:00
|
|
|
rm -f $(OUTFILE)
|
2002-02-13 20:48:29 +00:00
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
rm -f $(DISTCLEAN_FILES)
|
|
|
|
rm -f Makefile
|
|
|
|
|
2009-01-16 23:39:48 +00:00
|
|
|
dist: distdir
|
|
|
|
distdir: $(DISTFILES)
|
2002-01-08 19:06:54 +00:00
|
|
|
for file in $(DISTFILES); do \
|
2009-01-16 23:39:48 +00:00
|
|
|
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|
|
|
|
|| cp -p $(srcdir)/$$file $(distdir) ; \
|
2002-01-08 19:06:54 +00:00
|
|
|
done
|
|
|
|
|
2009-01-16 23:39:48 +00:00
|
|
|
# Used by top level distcheck target
|
|
|
|
dvi:
|
|
|
|
check:
|
|
|
|
installcheck:
|
|
|
|
distuninstallcheck:
|