default `site.exp' into...
* dejagnu.am (site.exp): here.
Use DOS compliant file names.
+2001-02-21 Akim Demaille <akim@epita.fr>
+
+ * automake.in (&handle_tests_dejagnu): Move the definition of a
+ default `site.exp' into...
+ * dejagnu.am (site.exp): here.
+ Use DOS compliant file names.
+
+
2001-02-21 Akim Demaille <akim@epita.fr>
* automake.in (&dist_cmp): New.
{
push (@check_tests, 'check-DEJAGNU');
- $output_rules .= &file_contents ('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');
# 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"
- . "\t\@echo 'Making a new site.exp file...'\n"
- . "\t\@test ! -f site.bak || rm -f site.bak\n"
- . "\t\@echo '## these variables are automatically generated by make ##' > \$\@-t\n"
- . "\t\@echo '# Do not edit here. If you wish to override these values' >> \$\@-t\n"
- . "\t\@echo '# edit the last section' >> \$\@-t\n"
- . "\t\@echo 'set tool \$(DEJATOOL)' >> \$\@-t\n"
- . "\t\@echo 'set srcdir \$(srcdir)' >> \$\@-t\n"
- . "\t\@echo 'set objdir' \`pwd\` >> \$\@-t\n");
-
- # 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 .= "\t\@echo 'set ${c1}_${c2} \$(${c1}_${c2})' >> \$\@-t\n";
- }
- }
-
- $output_rules .= ("\t\@echo '## All variables above are generated by configure. Do Not Edit ##' >> \$\@-t\n"
- . "\t\@test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> \$\@-t\n"
- . "\t\@test ! -f site.exp || mv site.exp site.bak\n"
- . "\t\@mv \$\@-t site.exp\n");
- }
+ $output_rules .=
+ &file_contents ('dejagnu',
+ &transform_cond
+ ('SITE-EXP' => ! &target_defined ('site.exp'),
+ 'BUILD' => $seen_canonical == $AC_CANONICAL_SYSTEM,
+ 'HOST' => $seen_canonical,
+ 'TARGET' => $seen_canonical == $AC_CANONICAL_SYSTEM));
}
## automake - create Makefile.in from Makefile.am
-## Copyright 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+## Copyright 1994, 1995, 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
done; \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
+
+
+## ------------------- ##
+## Building 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.
+?SITE-EXP?site.exp: Makefile
+?SITE-EXP? @echo 'Making a new site.exp file...'
+?SITE-EXP? @echo '## these variables are automatically generated by make ##' >site.tmp
+?SITE-EXP? @echo '# Do not edit here. If you wish to override these values' >>site.tmp
+?SITE-EXP? @echo '# edit the last section' >>site.tmp
+?SITE-EXP? @echo 'set tool $(DEJATOOL)' >>site.tmp
+?SITE-EXP? @echo 'set srcdir $(srcdir)' >>site.tmp
+?SITE-EXP? @echo "set objdir `pwd`" >>site.tmp
+?SITE-EXP??BUILD? @echo 'set build_alias $(build_alias)' >>site.tmp
+?SITE-EXP??BUILD? @echo 'set build_triplet $(build_triplet)' >>site.tmp
+?SITE-EXP??HOST? @echo 'set host_alias $(host_alias)' >>site.tmp
+?SITE-EXP??HOST? @echo 'set host_triplet $(host_triplet)' >>site.tmp
+?SITE-EXP??TARGET? @echo 'set target_alias $(target_alias)' >>site.tmp
+?SITE-EXP??TARGET? @echo 'set target_triplet $(target_triplet)' >>site.tmp
+?SITE-EXP? @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
+?SITE-EXP? @test ! -f site.exp || \
+?SITE-EXP? sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
+?SITE-EXP? @-rm -f site.bak
+?SITE-EXP? @test ! -f site.exp || mv site.exp site.bak
+?SITE-EXP? @mv site.tmp site.exp
## automake - create Makefile.in from Makefile.am
-## Copyright 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+## Copyright 1994, 1995, 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
done; \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
+
+
+## ------------------- ##
+## Building 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.
+?SITE-EXP?site.exp: Makefile
+?SITE-EXP? @echo 'Making a new site.exp file...'
+?SITE-EXP? @echo '## these variables are automatically generated by make ##' >site.tmp
+?SITE-EXP? @echo '# Do not edit here. If you wish to override these values' >>site.tmp
+?SITE-EXP? @echo '# edit the last section' >>site.tmp
+?SITE-EXP? @echo 'set tool $(DEJATOOL)' >>site.tmp
+?SITE-EXP? @echo 'set srcdir $(srcdir)' >>site.tmp
+?SITE-EXP? @echo "set objdir `pwd`" >>site.tmp
+?SITE-EXP??BUILD? @echo 'set build_alias $(build_alias)' >>site.tmp
+?SITE-EXP??BUILD? @echo 'set build_triplet $(build_triplet)' >>site.tmp
+?SITE-EXP??HOST? @echo 'set host_alias $(host_alias)' >>site.tmp
+?SITE-EXP??HOST? @echo 'set host_triplet $(host_triplet)' >>site.tmp
+?SITE-EXP??TARGET? @echo 'set target_alias $(target_alias)' >>site.tmp
+?SITE-EXP??TARGET? @echo 'set target_triplet $(target_triplet)' >>site.tmp
+?SITE-EXP? @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
+?SITE-EXP? @test ! -f site.exp || \
+?SITE-EXP? sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
+?SITE-EXP? @-rm -f site.bak
+?SITE-EXP? @test ! -f site.exp || mv site.exp site.bak
+?SITE-EXP? @mv site.tmp site.exp
# Build appropriate environment in test directory. Eg create
# configure.in, touch all necessary files, etc.
cat > configure.in << 'END'
+AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
PACKAGE=nonesuch
VERSION=nonesuch
$AUTOMAKE || exit 1
-grep '^check-TESTS' Makefile.in && grep '^check-DEJAGNU' Makefile.in
+grep '^check-TESTS' Makefile.in
+grep '^check-DEJAGNU' Makefile.in