2009-01-18 02:00: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.
|
|
|
|
|
2013-03-10 10:45:30 +00:00
|
|
|
SUBDIRS = include lib sanei backend frontend tools doc po testsuite
|
2009-01-18 02:00:25 +00:00
|
|
|
DIST_SUBDIRS = include lib sanei backend frontend tools doc po japi testsuite
|
|
|
|
|
2009-02-14 05:54:01 +00:00
|
|
|
dist_doc_DATA = AUTHORS ChangeLog COPYING LICENSE NEWS PROBLEMS PROJECTS \
|
|
|
|
README README.aix README.beos README.darwin README.djpeg README.freebsd \
|
2009-01-18 02:00:25 +00:00
|
|
|
README.hp-ux README.linux README.netbsd README.openbsd README.os2 \
|
|
|
|
README.solaris README.unixware2 README.unixware7 README.windows \
|
2009-02-14 05:54:01 +00:00
|
|
|
README.zeta
|
2017-05-22 15:16:40 +00:00
|
|
|
EXTRA_DIST = $(PACKAGE).lsm
|
2009-01-18 02:00:25 +00:00
|
|
|
|
|
|
|
#
|
2016-06-26 01:05:12 +00:00
|
|
|
# Keep the .gitignore files sorted, and use this target to do it.
|
|
|
|
# Note that git's negated ignore patterns introduce order dependency
|
|
|
|
# and should therefor be sorted with much more care than we do here.
|
|
|
|
# Until that has been taken care of, such files are best left alone.
|
2009-01-18 02:00:25 +00:00
|
|
|
#
|
|
|
|
PERL=perl
|
2016-06-26 01:05:12 +00:00
|
|
|
sort-gitignore:
|
|
|
|
for f in `find . -name .gitignore`; do \
|
|
|
|
if test -n "`sed -n '/^\!/p' $$f`"; then \
|
|
|
|
echo "$$f: skipping file with negated pattern" >&2; \
|
|
|
|
fi; \
|
2009-01-18 02:00:25 +00:00
|
|
|
$(PERL) -e 'print sort <>;' < $$f > $$f.tmptmp; \
|
|
|
|
mv $$f.tmptmp $$f; \
|
|
|
|
done
|
|
|
|
|
|
|
|
#
|
|
|
|
# Check to make sure only sane_ and sanei_ symbols are exported from
|
|
|
|
# the libraries
|
|
|
|
#
|
|
|
|
libcheck:
|
|
|
|
@echo "Libraries exporting 'illegal' symbols:"
|
2009-01-22 02:23:38 +00:00
|
|
|
@for lib in backend/.libs/*.so backend/.libs/*.a; do \
|
2009-01-18 02:00:25 +00:00
|
|
|
lines=`nm -g $$lib|grep '\( T \)\|\( D \)'|egrep -v ' _fini| _init'|egrep -v ' sane_| sanei_'`; \
|
|
|
|
if test -n "$$lines" ; then \
|
|
|
|
echo -e "*** $$lib:\n$$lines"; \
|
2009-01-22 02:23:38 +00:00
|
|
|
found_errors="yes"; \
|
2009-01-18 02:00:25 +00:00
|
|
|
fi \
|
2009-01-22 02:23:38 +00:00
|
|
|
done; \
|
|
|
|
echo; \
|
|
|
|
echo "Libraries exporting 'non-standard sane_*' symbols:"; \
|
|
|
|
for lib in backend/.libs/*.so backend/.libs/*.a; do \
|
2009-01-18 02:00:25 +00:00
|
|
|
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'` ; \
|
|
|
|
if test -n "$$lines" ; then \
|
|
|
|
echo -e "*** $$lib:\n$$lines"; \
|
|
|
|
found_errors="yes"; \
|
|
|
|
fi \
|
2009-01-22 02:23:38 +00:00
|
|
|
done;
|
|
|
|
if test ! -z $$found_errors ; then \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
2009-01-18 02:00:25 +00:00
|
|
|
|
2009-02-19 04:23:25 +00:00
|
|
|
# Verify that backends do not contain any unwanted public symbols
|
|
|
|
# anytime check or distcheck is ran.
|
|
|
|
# TODO: Currently this doesn't pass. Uncomment once symbols have
|
|
|
|
# been cleaned up.
|
2009-01-18 02:00:25 +00:00
|
|
|
#check-am: libcheck
|
|
|
|
|
2009-02-19 04:23:25 +00:00
|
|
|
# Run testsuite any time installcheck or distcheck is ran.
|
|
|
|
# Must run testsuite after install or else shared library backends
|
|
|
|
# will not be found (including test backend).
|
2009-02-19 18:10:12 +00:00
|
|
|
installcheck-local:
|
|
|
|
cd testsuite && $(MAKE) test.local
|
2009-02-19 04:23:25 +00:00
|
|
|
|
2009-01-18 02:00:25 +00:00
|
|
|
$(distdir).lsm: dist $(PACKAGE).lsm
|
|
|
|
( cat $(PACKAGE).lsm | \
|
|
|
|
sed -e "s|_DATE_|`date +%d%b%y`|g" |\
|
|
|
|
sed -e "s|_VERSION_|$(VERSION)|g" | \
|
|
|
|
sed -e "s|_T_S_|`find $(distdir).tar.gz -printf "%4k"`|g" |\
|
|
|
|
sed -e "s|_L_S_|`find $(PACKAGE).lsm -printf "%4k"`|g" >\
|
|
|
|
$(distdir).lsm \
|
|
|
|
)
|
|
|
|
lsm: $(distdir).lsm
|
|
|
|
|
|
|
|
md5: dist
|
|
|
|
md5sum $(distdir).tar.gz > $(distdir).tar.gz.md5
|
|
|
|
|
|
|
|
sane-backends: lsm md5
|
|
|
|
|
|
|
|
# Clean files created by custom targets in this file.
|
|
|
|
clean-local:
|
|
|
|
rm -f sane-backends-*.lsm
|
|
|
|
rm -f $(distdir).tar.gz.md5
|
|
|
|
|
|
|
|
# Clean files created by configure
|
|
|
|
distclean-local:
|
|
|
|
rm -f include/_stdint.h
|
|
|
|
rm -f include/byteorder.h
|
2016-02-12 11:52:57 +00:00
|
|
|
|
|
|
|
ACLOCAL_AMFLAGS = -I m4
|