561 |
# We use aclocal (via autoreconf). |
# We use aclocal (via autoreconf). |
562 |
AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore]) |
AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore]) |
563 |
|
|
|
# Move into a fresh testSubDir. But Autotest is not ready for such |
|
|
# tricks, albeit most useful :( It expects to find its files |
|
|
# (at-setup-line and so on) in the original `.', and it will complain |
|
|
# not to find even one. So just run mkdir as if it were a test. This |
|
|
# will create at-setup-line blah blah, and Autotest will leave us in |
|
|
# peace. |
|
|
# |
|
|
# FIXME: The more I think about it, the more I am tempted to *always* |
|
|
# have test groups run in a subdir, a` la Automake. |
|
|
AT_CHECK([AS_MKDIR_P([testSubDir])]) |
|
|
cd testSubDir |
|
|
|
|
564 |
# The contents of `inner/', and `inner/innermost/'. |
# The contents of `inner/', and `inner/innermost/'. |
565 |
AS_MKDIR_P([inner/innermost]) |
AS_MKDIR_P([inner/innermost]) |
566 |
|
|
568 |
# be compatible with Automake 1.4: aclocal (run by autoreconf) would |
# be compatible with Automake 1.4: aclocal (run by autoreconf) would |
569 |
# die because it can't find configure.in. |
# die because it can't find configure.in. |
570 |
AT_DATA([inner/configure.in], |
AT_DATA([inner/configure.in], |
571 |
[AC_INIT(GNU Inner, 1.0) |
[[AC_INIT(GNU Inner, 1.0) |
572 |
AC_CONFIG_SRCDIR([innermost/config.in]) |
AC_CONFIG_SRCDIR([innermost/config.in]) |
573 |
AC_ARG_VAR([INNER], [an inner variable]) |
AC_ARG_VAR([INNER], [an inner variable]) |
574 |
AC_SUBST([INNER]) |
AC_SUBST([INNER]) |
577 |
fi |
fi |
578 |
AC_CONFIG_FILES([innermost/config]) |
AC_CONFIG_FILES([innermost/config]) |
579 |
AC_OUTPUT |
AC_OUTPUT |
580 |
]) |
]]) |
581 |
|
|
582 |
AT_DATA([inner/innermost/config.in], |
AT_DATA([inner/innermost/config.in], |
583 |
[INNER=@INNER@ |
[INNER=@INNER@ |
591 |
|
|
592 |
# nonexistent is allowed not to exist. |
# nonexistent is allowed not to exist. |
593 |
AT_DATA([configure.in], |
AT_DATA([configure.in], |
594 |
[AC_INIT(GNU Outer, 1.0) |
[[AC_INIT(GNU Outer, 1.0) |
595 |
AC_ARG_VAR([OUTER], [an outer variable]) |
AC_ARG_VAR([OUTER], [an outer variable]) |
596 |
if false; then |
if false; then |
597 |
AC_CONFIG_SUBDIRS([nonexistent]) |
AC_CONFIG_SUBDIRS([nonexistent]) |
598 |
fi |
fi |
599 |
AC_CONFIG_SUBDIRS([inner]) |
AC_CONFIG_SUBDIRS([inner]) |
600 |
AC_OUTPUT |
AC_OUTPUT |
601 |
]) |
]]) |
602 |
|
|
603 |
AT_CHECK([autoreconf]) |
AT_CHECK([autoreconf]) |
604 |
AT_CHECK([test -f inner/configure]) |
AT_CHECK([test -f inner/configure]) |
640 |
]) |
]) |
641 |
|
|
642 |
AT_CLEANUP |
AT_CLEANUP |
643 |
|
|
644 |
|
|
645 |
|
|
646 |
|
## -------------- ## |
647 |
|
## Deep Package. ## |
648 |
|
## -------------- ## |
649 |
|
|
650 |
|
AT_SETUP([Deep Package]) |
651 |
|
AT_KEYWORDS(autoreconf) |
652 |
|
|
653 |
|
# We use aclocal (via autoreconf). |
654 |
|
AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore]) |
655 |
|
|
656 |
|
# The contents of `.' |
657 |
|
AT_DATA([install-sh], []) |
658 |
|
AT_DATA([configure.in], |
659 |
|
[[AC_INIT(GNU Outer, 1.0) |
660 |
|
AC_ARG_VAR([OUTER], [an outer variable]) |
661 |
|
AC_CONFIG_SUBDIRS([inner]) |
662 |
|
AC_OUTPUT |
663 |
|
]]) |
664 |
|
|
665 |
|
# The contents of `inner/', and `inner/innermost/'. |
666 |
|
AS_MKDIR_P([inner/innermost]) |
667 |
|
|
668 |
|
AT_DATA([inner/configure.ac], |
669 |
|
[[AC_INIT(GNU Inner, 1.0) |
670 |
|
AC_ARG_VAR([INNER], [an inner variable]) |
671 |
|
AC_CONFIG_SUBDIRS(innermost) |
672 |
|
AC_OUTPUT |
673 |
|
]]) |
674 |
|
|
675 |
|
AT_DATA([inner/innermost/configure.ac], |
676 |
|
[[AC_INIT(GNU Innermost, 1.0) |
677 |
|
AC_ARG_VAR([INNERMOST], [an innermost variable]) |
678 |
|
AC_CONFIG_HEADERS(config.h:config.hin) |
679 |
|
AC_DEFINE_UNQUOTED([INNERMOST], [$INNERMOST], [an innermost variable]) |
680 |
|
AC_OUTPUT |
681 |
|
]]) |
682 |
|
|
683 |
|
AT_CHECK([autoreconf -Wall -v], [0], [ignore], [ignore]) |
684 |
|
AT_CHECK([test -f inner/configure]) |
685 |
|
AT_CHECK([test -f inner/innermost/configure]) |
686 |
|
AT_CHECK([test -f inner/innermost/config.hin]) |
687 |
|
|
688 |
|
# Running the outer configure recursively should provide the innermost |
689 |
|
# help strings. |
690 |
|
AT_CHECK([./configure --help=recursive | grep -w INNER], 0, [ignore]) |
691 |
|
AT_CHECK([./configure --help=recursive | grep -w INNERMOST], 0, [ignore]) |
692 |
|
|
693 |
|
# Running the outer configure should trigger the inner. |
694 |
|
AT_CHECK_CONFIGURE([INNERMOST=tsomrenni]) |
695 |
|
AT_CHECK([grep INNERMOST inner/innermost/config.h], 0, |
696 |
|
[[#define INNERMOST tsomrenni |
697 |
|
]]) |
698 |
|
|
699 |
|
# The same, but from a builddir. |
700 |
|
AS_MKDIR_P([builddir]) |
701 |
|
AT_CHECK([cd builddir && ../configure INNERMOST=build/tsomrenni], 0, [ignore]) |
702 |
|
AT_CHECK([grep INNERMOST builddir/inner/innermost/config.h], 0, |
703 |
|
[[#define INNERMOST build/tsomrenni |
704 |
|
]]) |
705 |
|
|
706 |
|
AT_CLEANUP |