Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Gnat Project file : object dir "fast clean" ?

2 views
Skip to first unread message

Jérôme Haguet

unread,
Nov 16, 2009, 5:10:11 AM11/16/09
to
Let's imagine I have several projects, each defined by a gpr file,
with a specific object_dir for each.
Quite common situation.

I was just wondering if there is an option in some tool (gnat*, *gpr*)
to perform an Object_Dir "fast clean" ?
I mean : "delete every .o/.ali that should not exist".

It may happen, for example :
- when I rename some package
- when I move a package from a project to an other project
I have to delete the old .ali/.o, otherwise it can be confusing for
gnatmake, gnatfind ....

Of course, I can delete the whole Object_Dir-s, and rebuild
everything.
But, some time, something faster can be helpful.

Georg Bauhaus

unread,
Nov 16, 2009, 5:55:13 AM11/16/09
to
J�r�me Haguet schrieb:

> Let's imagine I have several projects, each defined by a gpr file,
> with a specific object_dir for each.
> Quite common situation.
>
> I was just wondering if there is an option in some tool (gnat*, *gpr*)
> to perform an Object_Dir "fast clean" ?

Wouldn't gnatclean do the job?

Gautier write-only

unread,
Nov 16, 2009, 9:45:41 AM11/16/09
to
On 16 nov, 11:55, Georg Bauhaus <rm.dash-bauh...@futureapps.de> wrote:

> Wouldn't gnatclean do the job?

I guess Jérôme would like to delete exactly the files gnatclean
wouldn't.
In other words: keep the .ali/.o that are meaningful to the project,
and delete the other files.
A solution would be then (I just tried it with success on Windows):

gnatclean -n -P myproj | zip keepit -@
del dir_obj\*
move keepit.zip \
cd \
unzip keepit

Of course, this would be better included as an option in gnatclean.
_________________________________________________________
Gautier's Ada programming -- http://sf.net/users/gdemont/
NB: For a direct answer, e-mail address on the Web site!

0 new messages