* [RFA/testsuite/ada] re-implement make clean & distclean
@ 2006-12-31 10:08 Joel Brobecker
2006-12-31 13:12 ` Mark Kettenis
0 siblings, 1 reply; 8+ messages in thread
From: Joel Brobecker @ 2006-12-31 10:08 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 761 bytes --]
Hello,
The current implementation for make clean requires us that we update
the EXECUTABLES list each time we add a new testcase. It was a vague
copy/paste of some code I probably found in one of the nearby Makefiles...
It was causing me a bit of grief that certain files would not be deleted
when I did a "make clean", in particular the executables produced by
gnatmake. I decided to replace this with an approach we have been using
with great success in our own testsuite for years...
2006-12-31 Joel Brobecker <brobecker@adacore.com>
* gdb.ada/Makefile.in (EXECUTABLES): Delete.
(MISCELLANEOUS): Delete.
(clean): Re-implement.
(mostlyclean): Likewise.
Tested on my x86-linux laptop. Any objection?
Thank you,
--
Joel
[-- Attachment #2: gdb.ada.clean.dif --]
[-- Type: text/plain, Size: 1306 bytes --]
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.ada/Makefile.in,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile.in
--- Makefile.in 3 Feb 2005 03:58:52 -0000 1.2
+++ Makefile.in 31 Dec 2006 10:00:46 -0000
@@ -1,24 +1,16 @@
VPATH = @srcdir@
srcdir = @srcdir@
-EXECUTABLES = null_record/null_record fixed_points/fixed_points
-
-MISCELLANEOUS =
-
all info install-info dvi install uninstall installcheck check:
@echo "Nothing to be done for $@..."
clean mostlyclean:
- -find . -name '*.o' -print | xargs rm -f
- -find . -name '*.ali' -print | xargs rm -f
- -find . -name 'b~*.ad[sb]' -print | xargs rm -f
- -rm -f *~ a.out xgdb *.x *.ci *.tmp
- -rm -f *~ *.o a.out xgdb *.x *.ci *.tmp
- -rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
- -rm -f $(MISCELLANEOUS) twice-tmp.c
+ -find . ! \( -name CVS -prune \) ! -type d \
+ ! -name '*.ad[sb]' ! -name '*.[hc]' ! -name '*.gpr' \
+ ! -name '*.exp' \
+ ! -name 'Makefile*' \
+ -exec rm -f {} \;
+ -find . -name 'b~*.ad[sb]' -exec rm -f {} \;
distclean maintainer-clean realclean: clean
- -rm -f *~ core
- -rm -f Makefile config.status config.log
- -rm -f *-init.exp
- -rm -fr *.log summary detail *.plog *.sum *.psum site.*
+ -rm -f Makefile
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA/testsuite/ada] re-implement make clean & distclean
2006-12-31 10:08 [RFA/testsuite/ada] re-implement make clean & distclean Joel Brobecker
@ 2006-12-31 13:12 ` Mark Kettenis
2006-12-31 14:31 ` Joel Brobecker
0 siblings, 1 reply; 8+ messages in thread
From: Mark Kettenis @ 2006-12-31 13:12 UTC (permalink / raw)
To: brobecker; +Cc: gdb-patches
> Date: Sun, 31 Dec 2006 14:07:55 +0400
> From: Joel Brobecker <brobecker@adacore.com>
>
> Hello,
>
> The current implementation for make clean requires us that we update
> the EXECUTABLES list each time we add a new testcase. It was a vague
> copy/paste of some code I probably found in one of the nearby Makefiles...
> It was causing me a bit of grief that certain files would not be deleted
> when I did a "make clean", in particular the executables produced by
> gnatmake. I decided to replace this with an approach we have been using
> with great success in our own testsuite for years...
>
> 2006-12-31 Joel Brobecker <brobecker@adacore.com>
>
> * gdb.ada/Makefile.in (EXECUTABLES): Delete.
> (MISCELLANEOUS): Delete.
> (clean): Re-implement.
> (mostlyclean): Likewise.
>
> Tested on my x86-linux laptop. Any objection?
Hmm, seems a bit scary to me. If I read this correctly, a file named
NOTES would be wiped isn't it? I'm using a seperate object dir, so I
probably won't care, but others might...
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA/testsuite/ada] re-implement make clean & distclean
2006-12-31 13:12 ` Mark Kettenis
@ 2006-12-31 14:31 ` Joel Brobecker
2006-12-31 14:54 ` Jim Blandy
2006-12-31 15:19 ` Daniel Jacobowitz
0 siblings, 2 replies; 8+ messages in thread
From: Joel Brobecker @ 2006-12-31 14:31 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
> > 2006-12-31 Joel Brobecker <brobecker@adacore.com>
> >
> > * gdb.ada/Makefile.in (EXECUTABLES): Delete.
> > (MISCELLANEOUS): Delete.
> > (clean): Re-implement.
> > (mostlyclean): Likewise.
> >
> > Tested on my x86-linux laptop. Any objection?
>
> Hmm, seems a bit scary to me. If I read this correctly, a file named
> NOTES would be wiped isn't it? I'm using a seperate object dir, so I
> probably won't care, but others might...
The thing is that we very rarely add files other than the exp files
and the source code. If we add a file called NOTES in gdb.ada, then
we can adjust the exclusion list in the find command. Doing it the
other way around is a lot more work.
--
Joel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA/testsuite/ada] re-implement make clean & distclean
2006-12-31 14:31 ` Joel Brobecker
@ 2006-12-31 14:54 ` Jim Blandy
2006-12-31 15:19 ` Daniel Jacobowitz
1 sibling, 0 replies; 8+ messages in thread
From: Jim Blandy @ 2006-12-31 14:54 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Mark Kettenis, gdb-patches
Joel Brobecker <brobecker@adacore.com> writes:
>> > 2006-12-31 Joel Brobecker <brobecker@adacore.com>
>> >
>> > * gdb.ada/Makefile.in (EXECUTABLES): Delete.
>> > (MISCELLANEOUS): Delete.
>> > (clean): Re-implement.
>> > (mostlyclean): Likewise.
>> >
>> > Tested on my x86-linux laptop. Any objection?
>>
>> Hmm, seems a bit scary to me. If I read this correctly, a file named
>> NOTES would be wiped isn't it? I'm using a seperate object dir, so I
>> probably won't care, but others might...
>
> The thing is that we very rarely add files other than the exp files
> and the source code. If we add a file called NOTES in gdb.ada, then
> we can adjust the exclusion list in the find command. Doing it the
> other way around is a lot more work.
Mistakes in Joel's suggested new procedure would be caught by CVS ---
another point in its favor.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA/testsuite/ada] re-implement make clean & distclean
2006-12-31 14:31 ` Joel Brobecker
2006-12-31 14:54 ` Jim Blandy
@ 2006-12-31 15:19 ` Daniel Jacobowitz
2006-12-31 15:27 ` Joel Brobecker
1 sibling, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2006-12-31 15:19 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Mark Kettenis, gdb-patches
On Sun, Dec 31, 2006 at 06:32:37PM +0400, Joel Brobecker wrote:
> > > 2006-12-31 Joel Brobecker <brobecker@adacore.com>
> > >
> > > * gdb.ada/Makefile.in (EXECUTABLES): Delete.
> > > (MISCELLANEOUS): Delete.
> > > (clean): Re-implement.
> > > (mostlyclean): Likewise.
> > >
> > > Tested on my x86-linux laptop. Any objection?
> >
> > Hmm, seems a bit scary to me. If I read this correctly, a file named
> > NOTES would be wiped isn't it? I'm using a seperate object dir, so I
> > probably won't care, but others might...
>
> The thing is that we very rarely add files other than the exp files
> and the source code. If we add a file called NOTES in gdb.ada, then
> we can adjust the exclusion list in the find command. Doing it the
> other way around is a lot more work.
Except that, like Mark implies, I tend to keep my notes in my working
directory. If I'm debugging a bunch of testcases and I needed to keep
notes about what was going on, I'd be quite surprised if make clean
deleted my notes!
I don't object too strongly, though, if others like this approach.
I wouldn't put them in that directory anyway, just in gdb/testsuite/.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA/testsuite/ada] re-implement make clean & distclean
2006-12-31 15:19 ` Daniel Jacobowitz
@ 2006-12-31 15:27 ` Joel Brobecker
2006-12-31 18:05 ` Daniel Jacobowitz
0 siblings, 1 reply; 8+ messages in thread
From: Joel Brobecker @ 2006-12-31 15:27 UTC (permalink / raw)
To: Mark Kettenis, gdb-patches
> Except that, like Mark implies, I tend to keep my notes in my working
> directory. If I'm debugging a bunch of testcases and I needed to keep
> notes about what was going on, I'd be quite surprised if make clean
> deleted my notes!
Hum, I hadn't thought about that. I keep my own notes in one central
directory - mostly to avoid losing them more than anything, it's hard
to keep track of what is in my hard drive sometimes...
I don't know how else to solve our issue. Maintaining a list of files
to delete is a royal pain :-(.
> I don't object too strongly, though, if others like this approach.
> I wouldn't put them in that directory anyway, just in gdb/testsuite/.
Fortunately, I only suggest this for gdb.ada, so very few people would
be impacted. Perhaps the lack of consistency is a bad thing?
--
Joel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA/testsuite/ada] re-implement make clean & distclean
2006-12-31 15:27 ` Joel Brobecker
@ 2006-12-31 18:05 ` Daniel Jacobowitz
2007-01-01 14:14 ` Joel Brobecker
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2006-12-31 18:05 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Mark Kettenis, gdb-patches
On Sun, Dec 31, 2006 at 07:27:43PM +0400, Joel Brobecker wrote:
> > I don't object too strongly, though, if others like this approach.
> > I wouldn't put them in that directory anyway, just in gdb/testsuite/.
>
> Fortunately, I only suggest this for gdb.ada, so very few people would
> be impacted. Perhaps the lack of consistency is a bad thing?
We have the same problem all over the testsuite, really - no one keeps
the makefiles up to date any more.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA/testsuite/ada] re-implement make clean & distclean
2006-12-31 18:05 ` Daniel Jacobowitz
@ 2007-01-01 14:14 ` Joel Brobecker
0 siblings, 0 replies; 8+ messages in thread
From: Joel Brobecker @ 2007-01-01 14:14 UTC (permalink / raw)
To: gdb-patches
> > Fortunately, I only suggest this for gdb.ada, so very few people would
> > be impacted. Perhaps the lack of consistency is a bad thing?
>
> We have the same problem all over the testsuite, really - no one keeps
> the makefiles up to date any more.
Just to be clear, given the legitimate objections I've heard, I am
withdrawing this patch. I'll see how to clean the Makefile up. Thanks
to everyone for their feedback.
--
Joel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-01-01 14:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-31 10:08 [RFA/testsuite/ada] re-implement make clean & distclean Joel Brobecker
2006-12-31 13:12 ` Mark Kettenis
2006-12-31 14:31 ` Joel Brobecker
2006-12-31 14:54 ` Jim Blandy
2006-12-31 15:19 ` Daniel Jacobowitz
2006-12-31 15:27 ` Joel Brobecker
2006-12-31 18:05 ` Daniel Jacobowitz
2007-01-01 14:14 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox