From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [patch] leim/Makefile.in: make distclean should make clean Date: 16 Feb 2004 09:39:35 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <87y8r4i27c.fsf@marant.org> <200402152335.IAA17134@etlken.m17n.org> <2914-Mon16Feb2004113906+0200-eliz@elta.co.il> <2832.62.160.59.178.1076935035.squirrel@webmail.nerim.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1076943552 16122 80.91.224.253 (16 Feb 2004 14:59:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Feb 2004 14:59:12 +0000 (UTC) Cc: Eli Zaretskii , Kenichi Handa , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Feb 16 15:59:02 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AskD7-0006ym-00 for ; Mon, 16 Feb 2004 15:59:01 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AskD7-0005e9-00 for ; Mon, 16 Feb 2004 15:59:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Asjuy-00070Y-Jg for emacs-devel@quimby.gnus.org; Mon, 16 Feb 2004 09:40:16 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Asjut-00070K-QK for emacs-devel@gnu.org; Mon, 16 Feb 2004 09:40:11 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AsjuN-0006y6-1Y for emacs-devel@gnu.org; Mon, 16 Feb 2004 09:40:10 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AsjuM-0006y3-Mw for emacs-devel@gnu.org; Mon, 16 Feb 2004 09:39:38 -0500 Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 9FF3720D40; Mon, 16 Feb 2004 09:39:36 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id A083E8C70D; Mon, 16 Feb 2004 09:39:35 -0500 (EST) Original-To: =?utf-8?b?SsOpcsO0bWUgTWFyYW50?= In-Reply-To: <2832.62.160.59.178.1076935035.squirrel@webmail.nerim.net> Original-Lines: 46 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-4.9, requis 5, BAYES_00 -4.90) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19975 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19975 > I understand your point. Nonetheless, I need to clean such > files, so would it be possible to keep such a target around, no > matter how it is called? To make things spotless, I use cvsclean. Stefan emacs/work-0% cat =cvsclean #!/usr/bin/perl sub cvsclean { my($path) = @_; my(%files) = (); my(@subdirs); print STDOUT "Cleaning $path\n"; opendir (DIR, "$path/") || die "No directory $path"; open (ENTRIES, "$path/CVS/Entries") || die "No $path/CVS/Entries file"; while () { if (m[^D/([^/]+)]) { push (@subdirs, "$path/$1"); } elsif (m[^/([^/]+)/[^/-]]) { $files{$1} = "managed"; } } foreach $entry (readdir(DIR)) { if (!exists ($files{$entry})) { $entry = "$path/$entry"; if (-f $entry) { print STDOUT "unlink $entry\n"; unlink $entry; } } } foreach $subdir (@subdirs) { &cvsclean ($subdir); } } &cvsclean ("."); emacs/work-0%