2009-02-19 04:23:25 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								##  Makefile.am -- an automake template for Makefile.in file
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								##  Copyright (C) 2009 Chris Bagwell and Sane Developers.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								##
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								##  This file is part of the "Sane" build infra-structure.  See
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								##  included LICENSE file for license information.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2019-07-22 23:00:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								SUBDIRS = backend sanei tools
							 | 
						
					
						
							
								
									
										
										
										
											2013-03-10 10:45:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-11-06 22:43:49 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								SCANIMAGE = ../frontend/scanimage$(EXEEXT)
							 | 
						
					
						
							
								
									
										
										
										
											2009-02-19 18:10:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								TESTFILE  = $(srcdir)/testfile.pnm
							 | 
						
					
						
							
								
									
										
										
										
											2009-02-19 04:23:25 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								OUTFILE   = outfile.pnm
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								DEVICE    = test
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								OPTIONS   = --mode Color --depth 16 --test-picture "Color pattern" --resolution 50 -y 20 -x 20 > $(OUTFILE)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								EXTRA_DIST = README testfile.pnm
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								CLEANFILES = $(OUTFILE)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								all: help
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								help:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@echo "Use 'make test' to run the tests."
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								test: test.local
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2017-05-27 05:27:22 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								test.local:
							 | 
						
					
						
							
								
									
										
										
										
											2009-02-19 04:23:25 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@echo "**** Testing $(SCANIMAGE) with device $(DEVICE)"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@if echo "---> Trying flatbed scanner" && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  $(SCANIMAGE) -d $(DEVICE) -T && \
							 | 
						
					
						
							
								
									
										
										
										
											2019-06-30 02:17:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									  echo "<--- Flatbed scanner succeeded" && \
							 | 
						
					
						
							
								
									
										
										
										
											2009-02-19 04:23:25 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  echo "---> Trying three pass flatbed scanner" && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  $(SCANIMAGE) -d $(DEVICE) --mode Color --three-pass=yes   -T && \
							 | 
						
					
						
							
								
									
										
										
										
											2019-06-30 02:17:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									  echo "<--- Three pass scanner succeeded" && \
							 | 
						
					
						
							
								
									
										
										
										
											2009-02-19 04:23:25 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  echo "---> Trying hand scanner" && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  $(SCANIMAGE) -d $(DEVICE) --hand-scanner=yes -T && \
							 | 
						
					
						
							
								
									
										
										
										
											2019-06-30 02:17:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									  echo "<--- Hand scanner succeeded" && \
							 | 
						
					
						
							
								
									
										
										
										
											2009-02-19 04:23:25 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  echo "---> Checking 16 bit color mode" && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  $(SCANIMAGE) -d $(DEVICE) $(OPTIONS) && \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  cmp -s $(TESTFILE) $(OUTFILE) && \
							 | 
						
					
						
							
								
									
										
										
										
											2019-06-30 02:17:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									  echo "<--- 16 bit color mode succeeded" && \
							 | 
						
					
						
							
								
									
										
										
										
											2009-02-19 04:23:25 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  rm $(OUTFILE) ; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									then echo ; echo ; echo "**** All tests passed" ; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									else echo ; echo; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									echo "**** Something failed (maybe test backend not enabled by configure?)";\
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									exit 1; \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fi
							 |