[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
12-handle-tests-dejagnu.patch
From: |
Akim Demaille |
Subject: |
12-handle-tests-dejagnu.patch |
Date: |
Sun, 28 Jan 2001 17:15:21 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* automake.in (handle_tests_dejagnu): New, extracted from...
(handle_tests): here. Use `.PHONY:'.
Index: automake.in
--- automake.in Sun, 28 Jan 2001 15:51:12 +0100 akim (am/f/39_automake.i 1.15
755)
+++ automake.in Sun, 28 Jan 2001 15:51:15 +0100 akim (am/f/39_automake.i 1.15
755)
@@ -4053,75 +4053,83 @@ sub handle_phony
$output_rules .= "\n";
}
+
+# handle_tests_dejagnu()
+# ----------------------
+sub handle_tests_dejagnu
+{
+ push (@check_tests, 'check-DEJAGNU');
+
+ local ($xform);
+ if ($cygnus_mode)
+ {
+ $xform = 's/^CYGNUS//;';
+ }
+ else
+ {
+ $xform = 's/^CYGNUS.*$//;';
+ }
+ $output_rules .= &file_contents_with_transform ($xform, 'dejagnu');
+
+ # In Cygnus mode, these are found in the build tree.
+ # Otherwise they are looked for in $PATH.
+ &define_program_variable ('EXPECT', 'build', 'expect', 'expect');
+ &define_program_variable ('RUNTEST', 'src', 'dejagnu', 'runtest');
+
+ # Only create site.exp rule if user hasn't already written
+ # one.
+ if (! &target_defined ('site.exp'))
+ {
+ # 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.
+ $output_rules .= ("site.exp: Makefile\n"
+ . "address@hidden 'Making a new site.exp file...'\n"
+ . "address@hidden ! -f site.bak || rm -f site.bak\n"
+ . "address@hidden '## these variables are
automatically generated by make ##' > address@hidden"
+ . "address@hidden '# Do not edit here. If you wish
to override these values' >> address@hidden"
+ . "address@hidden '# edit the last section' >>
address@hidden"
+ . "address@hidden 'set tool \$(DEJATOOL)' >>
address@hidden"
+ . "address@hidden 'set srcdir \$(srcdir)' >>
address@hidden"
+ . "address@hidden 'set objdir' \`pwd\` >>
address@hidden");
+
+ # Extra stuff for AC_CANONICAL_*
+ local (@whatlist) = ();
+ if ($seen_canonical)
+ {
+ push (@whatlist, 'host');
+ }
+
+ # Extra stuff only for AC_CANONICAL_SYSTEM.
+ if ($seen_canonical == $AC_CANONICAL_SYSTEM)
+ {
+ push (@whatlist, 'target', 'build');
+ }
+
+ local ($c1, $c2);
+ foreach $c1 (@whatlist)
+ {
+ foreach $c2 ('alias', 'triplet')
+ {
+ $output_rules .= "address@hidden 'set ${c1}_${c2}
\$(${c1}_${c2})' >> address@hidden";
+ }
+ }
+
+ $output_rules .= ("address@hidden '## All variables above are
generated by configure. Do Not Edit ##' >> address@hidden"
+ . "address@hidden ! -f site.exp || sed '1,/^## All
variables above are.*##/ d' site.exp >> address@hidden"
+ . "address@hidden ! -f site.exp || mv site.exp
site.bak\n"
+ . "address@hidden address@hidden site.exp\n");
+ }
+}
+
+
# Handle TESTS variable and other checks.
sub handle_tests
{
if (defined $options{'dejagnu'})
{
- push (@check_tests, 'check-DEJAGNU');
- push (@phony, 'check-DEJAGNU');
-
- local ($xform);
- if ($cygnus_mode)
- {
- $xform = 's/^CYGNUS//;';
- }
- else
- {
- $xform = 's/^CYGNUS.*$//;';
- }
- $output_rules .= &file_contents_with_transform ($xform, 'dejagnu');
-
- # In Cygnus mode, these are found in the build tree.
- # Otherwise they are looked for in $PATH.
- &define_program_variable ('EXPECT', 'build', 'expect', 'expect');
- &define_program_variable ('RUNTEST', 'src', 'dejagnu', 'runtest');
-
- # Only create site.exp rule if user hasn't already written
- # one.
- if (! &target_defined ('site.exp'))
- {
- # 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.
- $output_rules .= ("site.exp: Makefile\n"
- . "address@hidden 'Making a new site.exp
file...'\n"
- . "address@hidden ! -f site.bak || rm -f
site.bak\n"
- . "address@hidden '## these variables are
automatically generated by make ##' > address@hidden"
- . "address@hidden '# Do not edit here. If you
wish to override these values' >> address@hidden"
- . "address@hidden '# edit the last section' >>
address@hidden"
- . "address@hidden 'set tool \$(DEJATOOL)' >>
address@hidden"
- . "address@hidden 'set srcdir \$(srcdir)' >>
address@hidden"
- . "address@hidden 'set objdir' \`pwd\` >>
address@hidden");
-
- # Extra stuff for AC_CANONICAL_*
- local (@whatlist) = ();
- if ($seen_canonical)
- {
- push (@whatlist, 'host');
- }
-
- # Extra stuff only for AC_CANONICAL_SYSTEM.
- if ($seen_canonical == $AC_CANONICAL_SYSTEM)
- {
- push (@whatlist, 'target', 'build');
- }
-
- local ($c1, $c2);
- foreach $c1 (@whatlist)
- {
- foreach $c2 ('alias', 'triplet')
- {
- $output_rules .= "address@hidden 'set ${c1}_${c2}
\$(${c1}_${c2})' >> address@hidden";
- }
- }
-
- $output_rules .= ("address@hidden '## All variables above are
generated by configure. Do Not Edit ##' >> address@hidden"
- . "address@hidden ! -f site.exp || sed '1,/^##
All variables above are.*##/ d' site.exp >> address@hidden"
- . "address@hidden ! -f site.exp || mv site.exp
site.bak\n"
- . "address@hidden address@hidden site.exp\n");
- }
+ &handle_tests_dejagnu;
}
else
{
- 12-handle-tests-dejagnu.patch,
Akim Demaille <=