This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "make distclean"...


> Date: Tue, 8 Jan 2002 11:09:20 -0800
> To: gcc@gcc.gnu.org
> From: Zack Weinberg <zack@codesourcery.com>

> If srcdir!=objdir, "make distclean" in the gcc subdirectory ought to
> leave you with an empty directory - at least, at first glance.  It
> doesn't.  Here is what is left:

> $ ls -Ra
> .:
> .  ..  po  testsuite

> ./po:
> .  ..  da.gmo  es.gmo  fr.gmo  ja.gmo  sv.gmo

When I see these types of errors, I just jump into the right makefile,
put them in the cleaan rule, as long as it has a -f on it...  That can
be done here.  People can clean and reorganize them to be in better
places if they care.

> ./testsuite:
> .              g++-mike-p7325-C.exe    instantiate4.o    loop-3c.x7  repo3.rpo
> ..             g++-oliva-expr2-C.exe   instantiate4.rpo  objc.sum    repo4.o
> 20011223-1.x2  g++-oliva-ext1-C.exe    instantiate6.o    objfmtst.c  repo4.rpo
> 20011223-1.x3  g++-other-empty1-C.exe  instantiate6.rpo  paste4.i    tmp.o
> 20011223-1.x4  g++-other-init5-C.exe   linkage-x.o       repo1.o     x
> 20011223-1.x5  g++.sum                 linkage-y.o       repo1.rpo
> direct2s.i     g77.sum                 loop-2c.x7        repo2.o
> eb83.bb        gcc.sum                 loop-2d.x7        repo2.rpo
> eb83.bbg       gmon.out                loop-2e.x7        repo3.o

> Now, the files in the po directory would be included in the
> distribution if this were a build from release instead of CVS.
> However, in that case they'd be in the source directory.  I think the
> appropriate thing to do is delete the build po directory when
> srcdir!=objdir.

I don't like rm -rf . in general.  Imagine someone put something
important in the directory, and you don't want to remove it.  Rather,
remove the things you know about, any leftovers, leave.

> All the stuff in the testsuite directory ought to have gone away.
> Here the problem is how to enumerate them.  Some of these files
> should've been deleted after the testsuite completed;

Yes, the testsuite should clean up after itself.

> others are kept around because the relevant test failed.

We can fix the failures to make these go away.  :-)

> I don't know how to tell the difference, though (and I'm not sure it
> is useful to keep around files generated by failed tests - generally
> the first step in investigating a failure is "repeat test by
> hand"...)

We should reasonably just clean up after a testcase runs.  Anyway, the
testsuite can clean, does sometimes clean, and can be fixed to clean
more often.  I prefer that.

We could put in rm *.x[2-7] *.rpo *.o *.exe paste4.i direct2s.i *.bbg
*.bb objfmtst.c x in the makefile, but I would resist the temptation,
though, it isn't completely wrong.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]