+2001-08-05 Tom Tromey <tromey@redhat.com>
+
+ * tests/Makefile.am (TESTS): Added dejagnu2.test.
+ * tests/dejagnu2.test: New file.
+ * lib/am/dejagnu.am (site.exp): Don't conditionalize.
+ * automake.in (handle_scripts): Removed dead code.
+ (handle_tests_dejagnu): Don't handle site.exp generation
+ specially.
+
2001-08-04 Richard Boulton <richard@tartarus.org>
* tests/cond17.test: New file: test for being able to define an
&am_install_var ('-candist', 'scripts', 'SCRIPTS',
'bin', 'sbin', 'libexec', 'pkgdata',
'noinst', 'check');
-
- my $scripts_installed = 0;
- # Set $scripts_installed if appropriate. Make sure we only find
- # scripts which are actually installed -- this is why we can't
- # simply use the return value of am_install_var.
- my %valid = &am_primary_prefixes ('SCRIPTS', 1, 'bin', 'sbin',
- 'libexec', 'pkgdata',
- 'noinst', 'check');
- foreach my $key (keys %valid)
- {
- if ($key ne 'noinst'
- && $key ne 'check'
- && &variable_defined ($key . '_SCRIPTS'))
- {
- $scripts_installed = 1;
- # push (@check_tests, 'check-' . $key . 'SCRIPTS');
- }
- }
}
sub handle_tests_dejagnu
{
push (@check_tests, 'check-DEJAGNU');
-
- # Only create site.exp rule if user hasn't already written one.
- $output_rules .=
- file_contents ('dejagnu', ('SITE-EXP' => ! target_defined ('site.exp')));
+ $output_rules .= file_contents ('dejagnu');
}
## Note that in the rule we don't directly generate site.exp to avoid
## the possibility of a corrupted site.exp if make is interrupted.
## Jim Meyering has some useful text on this topic.
-if %?SITE-EXP%
site.exp: Makefile
@echo 'Making a new site.exp file...'
@echo '## these variables are automatically generated by make ##' >site.tmp
@-rm -f site.bak
@test ! -f site.exp || mv site.exp site.bak
@mv site.tmp site.exp
-endif %?SITE-EXP%
--- /dev/null
+#! /bin/sh
+
+# Make sure we don't override the user's site.exp rule.
+
+. $srcdir/defs || exit 1
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = dejagnu
+
+site.exp:
+ echo foo
+END
+
+$AUTOMAKE || exit 1
+
+grep site.exp Makefile.in
+test `grep '^site\.exp:' Makefile.in | wc -l` -eq 1