[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch: miscellaneous cleanups
From: |
Tom Tromey |
Subject: |
Patch: miscellaneous cleanups |
Date: |
05 Aug 2001 16:29:18 -0600 |
I'm checking this in. It cleans up a couple pieces of code.
Tom
Index: ChangeLog
from Tom Tromey <address@hidden>
* 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.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1167
diff -u -r1.1167 automake.in
--- automake.in 2001/08/04 04:02:41 1.1167
+++ automake.in 2001/08/05 21:59:10
@@ -2770,24 +2770,6 @@
&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');
- }
- }
}
@@ -4158,10 +4140,7 @@
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');
}
Index: lib/am/dejagnu.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/dejagnu.am,v
retrieving revision 1.14
diff -u -r1.14 dejagnu.am
--- lib/am/dejagnu.am 2001/06/04 15:53:03 1.14
+++ lib/am/dejagnu.am 2001/08/05 21:59:10
@@ -74,7 +74,6 @@
## 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
@@ -95,4 +94,3 @@
@-rm -f site.bak
@test ! -f site.exp || mv site.exp site.bak
@mv site.tmp site.exp
-endif %?SITE-EXP%
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.338
diff -u -r1.338 Makefile.am
--- tests/Makefile.am 2001/08/04 04:02:42 1.338
+++ tests/Makefile.am 2001/08/05 21:59:10
@@ -99,6 +99,7 @@
defun.test \
defun2.test \
dejagnu.test \
+dejagnu2.test \
depacl.test \
depacl2.test \
depcomp.test \
Index: tests/dejagnu2.test
===================================================================
RCS file: dejagnu2.test
diff -N dejagnu2.test
--- /dev/null Tue May 5 13:32:27 1998
+++ tests/dejagnu2.test Sun Aug 5 14:59:10 2001
@@ -0,0 +1,17 @@
+#! /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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Patch: miscellaneous cleanups,
Tom Tromey <=