autoconf/tests/Makefile.am
Akim Demaille b23061fafb Move all the language dependent macros into aclang.m4.
* aclang.m4: New file.
* autoconf.m4: Include it.
* autoheader.m4: Likewise.
* autoupdate.m4: Likewise.
* Makefile.am: Adjust.
* test/Makefile.am: Likewise.
* acgeneral.m4 (AC_LANG_CASE,AC_LANG_SAVE, _AC_LANG_DISPATCH,
AC_LANG, _AC_LANG_CURRENT, AC_LANG_SOURCE, AC_LANG_PROGRAM,
AC_LANG_CALL, AC_LANG(C), AC_LANG_SOURCE(C), AC_LANG_PROGRAM(C),
AC_LANG_CALL(C), AC_LANG(C++), AC_LANG_SOURCE(C++),
AC_LANG_PROGRAM(C++), AC_LANG_CALL(C++), AC_LANG(FORTRAN77),
AC_LANG_SOURCE(FORTRAN77), AC_LANG_PROGRAM(FORTRAN77),
AC_LANG_CALL(FORTRAN77): Move to...
* aclang.m4: here.
* acspecific.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77,
AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS, AC_PROG_F77_WORKS,
AC_PROG_CC_GNU, AC_PROG_CXX_GNU, AC_PROG_F77_GNU, AC_PROG_CC_G,
AC_PROG_CXX_G, AC_PROG_F77_G, AC_PROG_GCC_TRADITIONAL,
AC_PROG_CC_C_O, AC_PROG_F77_C_O, AC_PROG_CC_STDC, AC_PROG_CPP,
AC_PROG_CXXCPP, AC_REQUIRE_CPP, AC_PROG_LEX, AC_TYPE_MODE_T,
AC_C_CROSS, AC_C_CHAR_UNSIGNED, AC_C_LONG_DOUBLE, AC_C_BIGENDIAN,
AC_C_INLINE, AC_C_CONST, AC_C_VOLATILE, AC_C_STRINGIZE,
AC_C_PROTOTYPES, AC_F77_LIBRARY_LDFLAGS, AC_F77_NAME_MANGLING,
AC_F77_WRAPPERS): Move to...
* aclang.m4: here.
2000-03-27 12:26:33 +00:00

112 lines
3.7 KiB
Makefile

## Process this file with automake to create Makefile.in.
## Makefile for Autoconf testsuite.
## Copyright (C) 2000 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
AUTOMAKE_OPTIONS = gnits
SUITE = torture.m4 semantics.m4 syntax.m4 base.m4 tools.m4
# We don't actually distribute the testsuite, since one only
# needs m4 to build it, m4 being required anyway to install Autoconf.
EXTRA_DIST = atgeneral.m4 atspecific.m4 suite.m4 macros.m4 actest.m4 $(SUITE)
PERL = perl
check-local: atconfig testsuite
$(SHELL) testsuite
testsuite: atgeneral.m4 atspecific.m4 suite.m4 macros.m4 $(SUITE)
$(M4) -I $(srcdir) atspecific.m4 suite.m4 | \
sed -e 's/[ ]*$$//' | \
sed -e '/^$$/N;/\n$$/D' > $@-tmp
chmod +x $@-tmp
mv $@-tmp $@
# FILTER_MACROS
# -------------
# The test `syntax.m4' tries to run all the macros of Autoconf to check
# for syntax problems, etc. Not all the macros can be run without argument,
# and some are already tested elsewhere. EGREP_EXCLUDE must filter out
# the macros we don't want to test in syntax.m4.
#
# - AC_CHECK decl, file, func, header, lib, member, prog, sizeof, type
# Performed in the semantics tests.
# - AC_CONFIG
# They fail when the source does not exist.
# - AC_INIT
# AC_INIT includes all the AC_INIT macros. Note that there is an
# infinite m4 recursion if AC_INIT it used twice.
# - AC_LANG*
# Heavily used by other macros.
# - AC_PROG_(CC|CXX|F77)_(GNU|WORKS)
# are used in AC_PROG_CC etc.
# - AC_PATH_PROGS?
# They produce `= val' because $1, the variable used to store the result,
# is empty.
# - AC_TRY
# Used in many places.
# - _AC_
# Internal macros are used elsewhere.
#
# Multiple `-e' to egrep are not portable, so join all the patterns together.
# We use the fact that automake will replace all the `\\\n' with ` '.
FILTER_MACROS = egrep -v -e \
`echo '^AC_ARG_VAR$$\
^AC_CHECK_(DECL|FILE|FUNC|HEADER|LIB|MEMBER|PROG|SIZEOF|TYPE)S?$$\
^AC_CONFIG\
^AC_INIT\
^AC_LANG\
^AC_LINKER_OPTION$$\
^AC_LINK_FILES$$\
^AC_LIST_MEMBER_OF$$\
^AC_PATH_(TOOL|PROG)S?$$\
^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$$\
^AC_REPLACE_FUNCS$$\
^AC_SEARCH_LIBS$$\
^AC_TRY\
_AC_' | tr ' ' '|'`
# The files which contains macro we check for syntax.
MACRO_FILES = $(top_srcdir)/acgeneral.m4 $(top_srcdir)/acspecific.m4 \
$(top_srcdir)/aclang.m4
macros.m4: $(MACRO_FILES) $(srcdir)/Makefile.am
cat $(MACRO_FILES) | \
sed -ne 's/^A[CU]_DEFUN(\[*\([a-zA-Z0-9_]*\).*$$/\1/p' | \
sort | uniq | $(FILTER_MACROS) >defuns
# Get the list of macros that are required: there is little interest
# in testing them since they will be run but the guy who requires
# them.
cat $(MACRO_FILES) | \
sed -ne 's/dnl.*//;s/.*AC_REQUIRE(\[*\([a-zA-Z0-9_]*\).*$$/\1/p' | \
sort | uniq >requires
for macro in `cat defuns`; do \
if fgrep "$$macro" requires >/dev/null 2>&1; then :; else \
echo "AT_TEST_MACRO([$$macro])" >>$@-t; \
fi; \
done
rm defuns requires
mv $@-t $@
CLEANFILES = debug-*.sh macro configure configure.in config.status \
config.cache config.log config.h.in config.h
DISTCLEANFILES = atconfig testsuite