2000-01-29 20:18:40 +08:00
|
|
|
## 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
|
|
|
|
|
2000-02-08 21:54:48 +08:00
|
|
|
SUITE = torture.m4 semantics.m4 syntax.m4 base.m4 tools.m4
|
2000-01-29 20:18:40 +08:00
|
|
|
|
|
|
|
# We don't actually distribute the testsuite, since one only
|
|
|
|
# needs m4 to build it, m4 being required anyway to install Autoconf.
|
2000-02-08 00:42:15 +08:00
|
|
|
EXTRA_DIST = atgeneral.m4 atspecific.m4 suite.m4 macros.m4 actest.m4 $(SUITE)
|
2000-01-29 20:18:40 +08:00
|
|
|
|
|
|
|
PERL = perl
|
|
|
|
|
Test that the macros respect the user variable name space.
* acgeneral.m4 (AC_CANONICAL_THING): define, not AC_DEFUN.
Don't AC_PROVIDE, there is no need.
When calling `config.sub`, also || exit 1, to catch failures from
config.sub.
* acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Use ac_val, not val.
(AC_EXEEXT): Use ac_file, not file.
* tests/actest.m4: New file, holding extra Autoconf macros used
during the testing.
(AC_ENV_SAVE): New macro, save the sh variables in a file.
* tests/suite.m4 (AT_TEST_MACRO, Generation of configure.in):
include actest.m4, and call twice AC_ENV_SAVE to compare the
variables before and after the macro.
* tests/Makefile.am (macro.m4): Don't test macros that are
required: they will be tested somewhere else.
2000-02-07 21:25:35 +08:00
|
|
|
all-local: atconfig testsuite
|
2000-01-29 20:18:40 +08:00
|
|
|
|
Test that the macros respect the user variable name space.
* acgeneral.m4 (AC_CANONICAL_THING): define, not AC_DEFUN.
Don't AC_PROVIDE, there is no need.
When calling `config.sub`, also || exit 1, to catch failures from
config.sub.
* acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Use ac_val, not val.
(AC_EXEEXT): Use ac_file, not file.
* tests/actest.m4: New file, holding extra Autoconf macros used
during the testing.
(AC_ENV_SAVE): New macro, save the sh variables in a file.
* tests/suite.m4 (AT_TEST_MACRO, Generation of configure.in):
include actest.m4, and call twice AC_ENV_SAVE to compare the
variables before and after the macro.
* tests/Makefile.am (macro.m4): Don't test macros that are
required: they will be tested somewhere else.
2000-02-07 21:25:35 +08:00
|
|
|
check-local: atconfig testsuite
|
2000-01-29 20:18:40 +08:00
|
|
|
$(SHELL) testsuite
|
|
|
|
|
2000-02-08 00:42:15 +08:00
|
|
|
testsuite: atgeneral.m4 atspecific.m4 suite.m4 macros.m4 $(SUITE)
|
|
|
|
m4 -I $(srcdir) atspecific.m4 suite.m4 | cat -s > $@-tmp
|
2000-01-29 20:18:40 +08:00
|
|
|
chmod +x $@-tmp
|
|
|
|
mv $@-tmp $@
|
|
|
|
|
2000-02-11 00:30:17 +08:00
|
|
|
macros.m4: $(top_srcdir)/acgeneral.m4 $(top_srcdir)/acspecific.m4 $(srcdir)/Makefile.am
|
2000-02-04 20:44:56 +08:00
|
|
|
cat $(top_srcdir)/acgeneral.m4 $(top_srcdir)/acspecific.m4 | \
|
2000-02-11 00:30:17 +08:00
|
|
|
sed -ne 's/^AC_DEFUN(\[*\([a-zA-Z0-9_]*\).*$$/\1/p' | \
|
Test that the macros respect the user variable name space.
* acgeneral.m4 (AC_CANONICAL_THING): define, not AC_DEFUN.
Don't AC_PROVIDE, there is no need.
When calling `config.sub`, also || exit 1, to catch failures from
config.sub.
* acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Use ac_val, not val.
(AC_EXEEXT): Use ac_file, not file.
* tests/actest.m4: New file, holding extra Autoconf macros used
during the testing.
(AC_ENV_SAVE): New macro, save the sh variables in a file.
* tests/suite.m4 (AT_TEST_MACRO, Generation of configure.in):
include actest.m4, and call twice AC_ENV_SAVE to compare the
variables before and after the macro.
* tests/Makefile.am (macro.m4): Don't test macros that are
required: they will be tested somewhere else.
2000-02-07 21:25:35 +08:00
|
|
|
sort >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 $(top_srcdir)/acgeneral.m4 $(top_srcdir)/acspecific.m4 | \
|
|
|
|
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 "TEST_MACRO([$$macro])" >>$@-t; \
|
|
|
|
fi; \
|
2000-01-29 20:18:40 +08:00
|
|
|
done
|
Test that the macros respect the user variable name space.
* acgeneral.m4 (AC_CANONICAL_THING): define, not AC_DEFUN.
Don't AC_PROVIDE, there is no need.
When calling `config.sub`, also || exit 1, to catch failures from
config.sub.
* acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Use ac_val, not val.
(AC_EXEEXT): Use ac_file, not file.
* tests/actest.m4: New file, holding extra Autoconf macros used
during the testing.
(AC_ENV_SAVE): New macro, save the sh variables in a file.
* tests/suite.m4 (AT_TEST_MACRO, Generation of configure.in):
include actest.m4, and call twice AC_ENV_SAVE to compare the
variables before and after the macro.
* tests/Makefile.am (macro.m4): Don't test macros that are
required: they will be tested somewhere else.
2000-02-07 21:25:35 +08:00
|
|
|
rm defuns requires
|
2000-02-04 22:02:57 +08:00
|
|
|
mv $@-t $@
|
2000-01-29 20:18:40 +08:00
|
|
|
|
2000-02-04 22:02:57 +08:00
|
|
|
CLEANFILES = debug-*.sh macro configure configure.in config.status \
|
|
|
|
config.cache config.log config.h.in config.h
|
|
|
|
DISTCLEANFILES = atconfig testsuite
|