/[autoconf]/autoconf/tests/torture.at
ViewVC logotype

Diff of /autoconf/tests/torture.at

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.37 by akim, Fri Oct 11 12:05:40 2002 UTC revision 1.38 by akim, Tue Oct 29 08:09:40 2002 UTC
# Line 561  AT_KEYWORDS(autoreconf) Line 561  AT_KEYWORDS(autoreconf)
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    
# Line 580  AS_MKDIR_P([inner/innermost]) Line 568  AS_MKDIR_P([inner/innermost])
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])
# Line 589  if test "x$INNER" = x; then Line 577  if test "x$INNER" = x; then
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@
# Line 603  AT_DATA([install-sh], []) Line 591  AT_DATA([install-sh], [])
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])
# Line 652  prefix=/good Line 640  prefix=/good
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

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26