[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Default clean files
From: |
Derek R. Price |
Subject: |
Re: Default clean files |
Date: |
Wed, 15 Nov 2000 18:02:11 -0500 |
"Derek R. Price" wrote:
> I'm in the middle of an attempt to convert CVS to use automake but I'm
> having some trouble. Is there some way to selectively override clean
> targets created by default for info targets without having to specify
> the entire clean target manually?
>
> I specified
>
> info_TEXINFOS = cvs.texinfo cvsclient.texi
>
> and it seems to be creating a clean target that removes the 'cvs.ps'
> file despite the fact that 'cvs.ps' is listed in EXTRA_DIST.
Here's a patch that subtracts any generated files listed in EXTRA_DIST from the
mostlyclean-aminfo targets and adds them to the maintainer-clean-aminfo targets.
It seems to me that this might be more generalizable (anything in EXTRA_DIST, if
it exists in any clean target, should be moved into the maintainer-clean
targeet,
but this patch does what I need.
Derek
--
Derek Price CVS Solutions Architect ( http://CVSHome.org )
mailto:address@hidden OpenAvenue ( http://OpenAvenue.com )
--
Boy: A noise with dirt on it
--- /usr/bin/automake Wed Jul 12 05:40:03 2000
+++ /tmp/automake Tue Nov 14 16:01:58 2000
@@ -1984,7 +1984,25 @@
'ky', 'kys', 'ps', 'log', 'pg', 'toc', 'tp', 'tps',
'vr', 'vrs', 'op', 'tr', 'cv', 'cn')
{
- push (@texi_cleans, $infobase . '.' . $tc_cursor);
+ if (&variable_defined ('EXTRA_DIST'))
+ {
+ local $temp_clean = $infobase . '.' . $tc_cursor;
+ local @extra_dist = &variable_value_as_list ('EXTRA_DIST', '');
+ $temp_clean =~ s/\W/\\$&/g;
+ $temp_clean = '^' . $temp_clean . '$';
+ if (grep /$temp_clean/, @extra_dist)
+ {
+ push (@texi_maintainercleans, $infobase . '.' . $tc_cursor);
+ }
+ else
+ {
+ push (@texi_cleans, $infobase . '.' . $tc_cursor);
+ }
+ }
+ else
+ {
+ push (@texi_cleans, $infobase . '.' . $tc_cursor);
+ }
}
}
@@ -2047,7 +2065,8 @@
# How to clean. The funny name is due to --cygnus influence; in
# Cygnus mode, `clean-info' is a target that users can use.
$output_rules .= "\nmostlyclean-aminfo:\n";
- &pretty_print_rule ("\t-rm -f", "\t ", @texi_cleans);
+ &pretty_print_rule ("\t-rm -f", "\t ", @texi_cleans)
+ if (scalar @texi_cleans);
$output_rules .= ("\nclean-aminfo:\n\ndistclean-aminfo:\n\n"
. "maintainer-clean-aminfo:\n\t"
# Eww. But how else can we find all the output
@@ -2059,6 +2078,9 @@
. "\t" . ' rm -f $$i-[0-9]*;' . " \\\n"
. "\t" . ' fi;' . " \\\n"
. "\tdone\n");
+ &pretty_print_rule ("\t-rm -f", "\t ", @texi_maintainercleans)
+ if (scalar @texi_maintainercleans);
+ $output_rules .= "\n";
&push_phony_cleaners ('aminfo');
if ($cygnus_mode)
{