Re: Default clean files

2000-12-23 Thread Tom Tromey

> "Derek" == Derek R Price <[EMAIL PROTECTED]> writes:

Derek> Here's a patch that subtracts any generated files listed in
Derek> EXTRA_DIST from the mostlyclean-aminfo targets and adds them to
Derek> the maintainer-clean-aminfo targets.  It seems to me that this
Derek> might be more generalizable (anything in EXTRA_DIST, if it
Derek> exists in any clean target, should be moved into the
Derek> maintainer-clean targeet, but this patch does what I need.

I agree that removing cvs.ps in your case is wrong.  It does make
sense to include cvs.ps in the distribution.

However I'm reluctant to check in this patch because of its ad hoc
nature.  It might be that this is the only case where this
functionality makes sense.  But I'd rather not commit it until I'm
sure.

Another approach to what you want is to do more work in dist-hook:

  dist-hook:
$(MAKE) cvs.ps
... copy cvs.ps into position

This might interact poorly with `make distcheck', but you could add
cleanup code to account for that.

Ugly, I agree.

I submitted a PR for the full functionality.

Tom




Re: Default clean files

2000-11-15 Thread Derek R. Price

"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:[EMAIL PROTECTED] 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)
 {



Default clean files

2000-11-13 Thread Derek R. Price

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.

Derek

--
Derek Price  CVS Solutions Architect ( http://CVSHome.org )
mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com )
--
If genius is one percent inspiration and 99 percent perspiration, I
sure wind up sharing elevators with a lot of bright people.