all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Eli Zaretskii <eliz@elta.co.il>, Kenichi Handa <handa@m17n.org>,
	emacs-devel@gnu.org
Subject: Re: [patch] leim/Makefile.in: make distclean should make clean
Date: 16 Feb 2004 09:39:35 -0500	[thread overview]
Message-ID: <jwvu11rnl75.fsf-monnier+emacs/devel@asado.iro.umontreal.ca> (raw)
In-Reply-To: <2832.62.160.59.178.1076935035.squirrel@webmail.nerim.net>

> 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 (<ENTRIES>) {
        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% 

  reply	other threads:[~2004-02-16 14:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-15 19:15 [patch] leim/Makefile.in: make distclean should make clean Jérôme Marant
2004-02-15 23:35 ` Kenichi Handa
2004-02-16  9:39   ` Eli Zaretskii
2004-02-16 11:42     ` Kenichi Handa
2004-02-16 16:25       ` Eli Zaretskii
2004-02-16 16:57         ` Stefan Monnier
2004-02-16 23:25           ` Kenichi Handa
2004-02-17  0:44             ` Stefan Monnier
2004-02-16 12:37     ` Jérôme Marant
2004-02-16 14:39       ` Stefan Monnier [this message]
2004-02-16 16:54         ` Jérôme Marant
2004-02-16 16:13       ` Eli Zaretskii
2004-02-16 17:07         ` Jérôme Marant
2004-02-16 19:54           ` Eli Zaretskii
2004-02-16 21:28             ` Jérôme Marant
2004-02-16 21:51               ` Jérôme Marant
2004-02-17  7:00               ` Eli Zaretskii
2004-02-17  8:13                 ` Jérôme Marant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvu11rnl75.fsf-monnier+emacs/devel@asado.iro.umontreal.ca \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@elta.co.il \
    --cc=emacs-devel@gnu.org \
    --cc=handa@m17n.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.