1# Make Autoscan library.
2
3# Copyright (C) 2001-2002, 2009-2012 Free Software Foundation, Inc.
4
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14
15# You should have received a copy of the GNU General Public License
16# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18autoscanlibdir = $(pkgdatadir)/autoscan
19
20EXTRA_DIST = autoscan.pre
21nodist_autoscanlib_DATA = autoscan.list
22CLEANFILES = autoscan.list
23
24## ------------------------ ##
25## Building autoscan.list.  ##
26## ------------------------ ##
27
28## autoscan.list might change when autoconf.m4f sources change.
29## Therefore we want the same dependencies as autoconf.m4f, which
30## are listed in freeze.mk.  It also ensure that tests/autom4te
31## is built (we need it in the command below).
32include ../freeze.mk
33
34autoscan.list: $(srcdir)/autoscan.pre $(autoconf_m4f_dependencies) Makefile.am
35	echo '# Automatically Generated: do not edit this file' >autoscan.list
36	sed '/^[#]/!q' $(srcdir)/autoscan.pre                  >>autoscan.list
37	( \
38	  sed -n '/^[^#]/p' $(srcdir)/autoscan.pre; \
39	  $(MY_AUTOM4TE) --cache '' -M -l autoconf -t'AN_OUTPUT:$$1: $$2		$$3' \
40	) | LC_ALL=C sort                                      >>autoscan.list
41