From: Akim Demaille Date: Mon, 7 Feb 2000 16:42:15 +0000 (+0000) Subject: * tests/atspecific.m4: New file, for AT macros specific to X-Git-Tag: autoconf-2.50~1232 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae593084aad3014d1fe1687609da319922be08be;p=thirdparty%2Fautoconf.git * tests/atspecific.m4: New file, for AT macros specific to Autoconf testing. * tests/suite.m4 (AT_TEST_MACRO): Moved to * tests/atspecific.m4 (AT_TEST_MACRO): here. * tests/syntax.m4 (TEST_MACRO): Moved to * tests/atspecific.m4 (TEST_MACRO): here. Don't test /^AC_INIT/, nor /^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$/: they are already tried elsewhere. * tests/Makefile.am: Adjusted. --- diff --git a/ChangeLog b/ChangeLog index 41a9c8516..76b4fc391 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2000-02-07 Akim Demaille + + * tests/atspecific.m4: New file, for AT macros specific to + Autoconf testing. + * tests/suite.m4 (AT_TEST_MACRO): Moved to + * tests/atspecific.m4 (AT_TEST_MACRO): here. + * tests/syntax.m4 (TEST_MACRO): Moved to + * tests/atspecific.m4 (TEST_MACRO): here. Don't test /^AC_INIT/, + nor /^AC_PROG_\(CC\|CXX\|F77\)_\(GNU\|WORKS\)$/: they are already + tried elsewhere. + * tests/Makefile.am: Adjusted. + 2000-02-07 Akim Demaille * acgeneral.m4 (m4_case): Fixed a typo and a bug: one shift was diff --git a/tests/Makefile.am b/tests/Makefile.am index 90e7db090..fb825ecef 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -24,7 +24,7 @@ SUITE = syntax.m4 semantics.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 suite.m4 macros.m4 actest.m4 $(SUITE) +EXTRA_DIST = atgeneral.m4 atspecific.m4 suite.m4 macros.m4 actest.m4 $(SUITE) PERL = perl @@ -33,8 +33,8 @@ all-local: atconfig testsuite check-local: atconfig testsuite $(SHELL) testsuite -testsuite: atgeneral.m4 suite.m4 macros.m4 $(SUITE) - m4 -I $(srcdir) atgeneral.m4 suite.m4 | cat -s > $@-tmp +testsuite: atgeneral.m4 atspecific.m4 suite.m4 macros.m4 $(SUITE) + m4 -I $(srcdir) atspecific.m4 suite.m4 | cat -s > $@-tmp chmod +x $@-tmp mv $@-tmp $@ diff --git a/tests/suite.m4 b/tests/suite.m4 index c72351e30..3280be1ee 100644 --- a/tests/suite.m4 +++ b/tests/suite.m4 @@ -14,38 +14,6 @@ Some tests might be ignored if you don't have the software which the macros are supposed to test (e.g., a Fortran compiler). EOF -dnl AT_TEST_MACRO(NAME-OF-THE-MACRO, [MACRO-USE], [ADDITIONAL-CMDS]) -dnl ---------------------------------------------------------------- -dnl Create a minimalist configure.in running the macro named -dnl NAME-OF-THE-MACRO, check that autoconf runs on that script, -dnl and that the shell runs correctly the configure. -AT_DEFINE(AT_TEST_MACRO, -[AT_SETUP([$1]) - -dnl Produce the configure.in -AT_DATA(configure.in, -[AC_INCLUDE(actest.m4) -AC_INIT -AC_CONFIG_HEADER(config.h) -AC_ENV_SAVE(expout) -ifelse([$2],,[$1], [$2]) -AC_ENV_SAVE(env-after) -AC_OUTPUT -]) - -dnl FIXME: Here we just don't consider the stderr from Autoconf. -dnl Maybe some day we could be more precise and filter out warnings. -dnl The problem is that currently some warnings are spread on several -dnl lines, so grepping -v warning is not enough. -AT_CHECK([../autoconf -m .. -l $at_srcdir], 0,, ignore) -AT_CHECK([../autoheader -m .. -l $at_srcdir], 0,, ignore) -AT_CHECK([./configure], 0, ignore, ignore) -AT_CHECK([cat env-after], 0, expout) -$3 -AT_CLEANUP(configure config.status config.log config.cache config.h.in config.h env-after)dnl -])dnl AT_TEST_MACRO - - dnl Run semantics before, since there are little chances that syntax dnl fails. diff --git a/tests/syntax.m4 b/tests/syntax.m4 index 11bdae176..1d3299580 100644 --- a/tests/syntax.m4 +++ b/tests/syntax.m4 @@ -1,33 +1,5 @@ # -*- autoconf -*- -dnl TEST_MACRO(NAME-OF-THE-MACRO) -dnl ----------------------------- -dnl Run AT_TEST_MACRO(NAME-OF-THE-MACRO) on selected macros only. -dnl There are macros which require argument. We cannot run them without. -dnl FIXME: AC_INIT creates an infinite loop in m4 when called twice. -dnl I inserted the exception here, not in Makefile.am, because it seems -dnl better to me. I did not use m4_case, since libm4 is not ready yet. -AT_DEFINE(TEST_MACRO, -[AT_CASE([$1], - [AC_ARG_VAR],, - [AC_CHECK_FUNCS],, - [AC_CHECK_HEADERS],, - [AC_CHECK_MEMBER],, - [AC_CHECK_MEMBERS],, - [AC_CHECK_PROGS],, - [AC_CONFIG_AUX_DIR],, - [AC_CONFIG_AUX_DIRS],, - [AC_INIT],, - [AC_INIT_PARSE_ARGS],, - [AC_LINKER_OPTION],, - [AC_LINK_FILES],, - [AC_LIST_MEMBER_OF],, - [AC_PATH_PROGS],, - [AC_REPLACE_FUNCS],, - [AC_SEARCH_LIBS],, - - [AT_TEST_MACRO([$1])])]) - cat <