1## Makefile.am -- an automake template for Makefile.in file 2## Copyright (C) 2009 Chris Bagwell and Sane Developers. 3## 4## This file is part of the "Sane" build infra-structure. See 5## included LICENSE file for license information. 6 7SUBDIRS = include lib sanei backend frontend tools doc po testsuite 8DIST_SUBDIRS = include lib sanei backend frontend tools doc po japi testsuite 9 10dist_doc_DATA = AUTHORS COPYING LICENSE NEWS PROBLEMS PROJECTS \ 11 README README.aix README.beos README.darwin README.djpeg README.freebsd \ 12 README.hp-ux README.linux README.netbsd README.openbsd README.os2 \ 13 README.solaris README.unixware2 README.unixware7 README.windows \ 14 README.zeta 15 16dist_doc_DATA += ChangeLog 17changelogsdir = $(docdir)/ChangeLogs 18dist_changelogs_DATA = ChangeLogs/ChangeLog-1.0.28 19dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.27 20## sane-backends-1.0.26 was skipped 21dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.25 22dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.24 23dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.23 24dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.22 25dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.21 26dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.20 27dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.19 28dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.18 29dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.17 30dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.16 31dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.15 32dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.14 33dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.13 34dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.12 35dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.11 36dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.10 37dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.9 38dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.8 39dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.7 40dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.6 41dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.5 42dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.4 43dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.3 44dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.2 45dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.1 46dist_changelogs_DATA += ChangeLogs/ChangeLog-1.0.0 47 48EXTRA_DIST = .editorconfig 49EXTRA_DIST += INSTALL.linux 50EXTRA_DIST += autogen.sh 51EXTRA_DIST += po/README 52# Just in case these come in handy during development started from a 53# regular source tarball. They are not needed otherwise as they are 54# already applied to the files in the source tarball. 55EXTRA_DIST += patches/ltmain.sh.patch 56EXTRA_DIST += patches/Rules-quot.patch 57EXTRA_DIST += patches/ax_create_stdint_h.19-20.m4.patch 58EXTRA_DIST += patches/ax_create_stdint_h.20-21.m4.patch 59 60EXTRA_DIST += tools/git-version-gen 61EXTRA_DIST += $(top_srcdir)/.version 62BUILT_SOURCES = $(top_srcdir)/.version 63 64$(top_srcdir)/.version: 65 echo $(VERSION) > $@-t && mv $@-t $@ 66dist-hook: 67 echo $(VERSION) > $(distdir)/.tarball-version 68 69# 70# Keep the .gitignore files sorted, and use this target to do it. 71# Note that git's negated ignore patterns introduce order dependency 72# and should therefore be sorted with much more care than we do here. 73# Until that has been taken care of, such files are best left alone. 74# 75PERL=perl 76sort-gitignore: 77 for f in `find . -name .gitignore`; do \ 78 if test -n "`sed -n '/^\!/p' $$f`"; then \ 79 echo "$$f: skipping file with negated pattern" >&2; \ 80 fi; \ 81 $(PERL) -e 'print sort <>;' < $$f > $$f.tmptmp; \ 82 mv $$f.tmptmp $$f; \ 83 done 84 85# 86# Check to make sure only sane_ and sanei_ symbols are exported from 87# the libraries 88# 89libcheck: 90 @echo "Libraries exporting 'illegal' symbols:" 91 @for lib in backend/.libs/*.so backend/.libs/*.a; do \ 92 lines=`nm -g $$lib|grep '\( T \)\|\( D \)'|egrep -v ' _fini| _init'|egrep -v ' sane_| sanei_'`; \ 93 if test -n "$$lines" ; then \ 94 echo -e "*** $$lib:\n$$lines"; \ 95 found_errors="yes"; \ 96 fi \ 97 done; \ 98 echo; \ 99 echo "Libraries exporting 'non-standard sane_*' symbols:"; \ 100 for lib in backend/.libs/*.so backend/.libs/*.a; do \ 101 lines=`nm -g $$lib|grep '\( T \)\|\( D \)'|egrep ' sane_' | egrep -v 'sane_.*init|sane_.*exit|sane_.*get_devices|sane_.*open|sane_.*close|sane_.*get_option_descriptor|sane_.*control_option|sane_.*get_parameters|sane_.*start|sane_.*read|sane_.*cancel|sane_.*set_io_mode|sane_.*get_select_fd|sane_strstatus'` ; \ 102 if test -n "$$lines" ; then \ 103 echo -e "*** $$lib:\n$$lines"; \ 104 found_errors="yes"; \ 105 fi \ 106 done; 107 if test ! -z $$found_errors ; then \ 108 exit 1; \ 109 fi 110 111# Verify that backends do not contain any unwanted public symbols 112# anytime check or distcheck is run. 113# TODO: Currently this doesn't pass. Uncomment once symbols have 114# been cleaned up. 115#check-am: libcheck 116 117# Run testsuite any time installcheck or distcheck is run. 118# Must run testsuite after install or else shared library backends 119# will not be found (including test backend). 120installcheck-local: 121 cd testsuite && $(MAKE) test.local 122 123md5: dist 124 md5sum $(distdir).tar.gz > $(distdir).tar.gz.md5 125 126sane-backends: md5 127 128# Clean files created by custom targets in this file. 129clean-local: 130 rm -f $(distdir).tar.gz.md5 131 132# Clean files created by configure 133distclean-local: 134 rm -f include/_stdint.h 135 rm -f include/byteorder.h 136 137ACLOCAL_AMFLAGS = -I m4 138 139# Make potential issues stick out when running `make distcheck`. 140DISTCHECK_CONFIGURE_FLAGS = --enable-silent-rules 141