bash 2.01.1.
* automake.in (do_one_clean_target): Special-case config.status.
Report from Jeff Garzik.
1998-10-28 Tom Tromey <tromey@cygnus.com>
+ * Makefile.am (maintainer-check): Changed code to be acceptable to
+ bash 2.01.1.
+
+ * automake.in (do_one_clean_target): Special-case config.status.
+ Report from Jeff Garzik.
+
* m4/Makefile.am (m4data_DATA): Don't mention f77.m4.
* m4/f77.m4: Removed; macro now in autoconf proper.
$(PERL) -c -w aclocal
## expect no instances of '${...}'. However, $${...} is ok, since that
## is a shell construct, not a Makefile construct.
- @if test `fgrep '$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
+## The backslash in `$${' is needed for some versions of bash.
+ @if test `fgrep '\$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
echo "found too many uses of '\$${'" 1>&2; \
exit 1; \
else :; fi
fi
$(PERL) -c -w automake
$(PERL) -c -w aclocal
- @if test `fgrep '$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
+ @if test `fgrep '\$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
echo "found too many uses of '\$${'" 1>&2; \
exit 1; \
else :; fi
+* distclean must remove config.status
+ can't this cause problems for maintainer-clean?
+ shouldn't maintainer-clean print the message before running
+ any part of the make? (just to slow things down long enough
+ for the user to stop it)
+ (maybe doesn't matter since people who even know about
+ maintainer-clean already have a clue)
+
* There are probably more bugs in variable_conditions_sub along
the lines of the one that caused cond4.test to fail.
if ($generate_deps)
{
die "automake: Must specify --include-deps (or -i) when generating\n"
- if ($use_dependencies);
+ if $use_dependencies;
die "automake: Must provide --build-dir when generating\n"
- if (!$build_directory);
+ if ! $build_directory;
die "automake: Must provide --srcdir-name when generating\n"
- if (!$srcdir_name);
+ if ! $srcdir_name;
open (GDEP, ">$output_directory/.dep_segment")
- || die "automake: Could not open `$output_directory/.dep_segment': $!\n";
+ || die "automake: Could not open `$output_directory/.dep_segment': $!\n";
&handle_dependencies;
print GDEP $output_rules;
("\t\@echo \"This command is intended for maintainers to use;\"\n"
. "\t\@echo \"it deletes files that may require special "
. "tools to rebuild.\"\n");
-
- $output_rules .= "\t-rm -f config.status\n"
- if $relative_dir eq '.';
}
elsif ($name . $target eq 'distclean')
{
- $output_rules .= "\t-rm -f config.status\n";
$output_rules .= "\t-rm -f libtool\n" if $seen_libtool;
}
$output_rules .= "\n";
+
+ # Now generate the actual clean target.
$output_rules .= ($name . $target . ": " . $name . $target
. ($recursive_install ? '-recursive' : '-am')
- . "\n\n");
+ . "\n");
+
+ # We special-case config.status here. If we do it as part of the
+ # normal clean processing for this directory, then it might be
+ # removed before some subdir is cleaned. However, that subdir's
+ # Makefile depends on config.status.
+ if (($name . $target eq 'maintainer-clean'
+ || $name . $target eq 'distclean')
+ && $relative_dir eq '.')
+ {
+ $output_rules .= "\t-rm -f config.status\n";
+ }
+ $output_rules .= "\n";
}
# Handle .PHONY target.
$(PERL) -c -w aclocal
## expect no instances of '${...}'. However, $${...} is ok, since that
## is a shell construct, not a Makefile construct.
- @if test `fgrep '$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
+## The backslash in `$${' is needed for some versions of bash.
+ @if test `fgrep '\$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
echo "found too many uses of '\$${'" 1>&2; \
exit 1; \
else :; fi