From: Damien Carbonne <damien.carbonne@free.fr>
Subject: gnatmake (GNAT GPL 2009): bug or feature?
Date: Fri, 31 Jul 2009 00:00:21 +0200
Date: 2009-07-31T00:00:22+02:00 [thread overview]
Message-ID: <4a7217f6$0$25376$426a34cc@news.free.fr> (raw)
Hi,
I have discovered a strange behaviour with GPS today. I think it is a
bug, but one never knows ...: an ALI file is removed in the lib
directory of a library project, and it shouldn't (IMO).
This happens on a Linux box, with GNAT GPL 2009 and the behaviour is the
same with GNAT GPL 2009 on windows XP (run through VirtualBox).
I managed to reproduce the problem quite simply.
Files are organised like this:
---------------------------------------------------------------------------
(rootdir)/
glada.gpr
gluada.gpr
Makefile
src/
gl/
gl.ads
glu/
glu.ads
Files are as follows:
---------------------------------------------------------------------------
glada.gpr:
project GLAda is
for Languages use ("Ada");
for Source_Dirs use ("src/gl/**");
for Object_Dir use "obj/gl";
for Library_Kind use "static";
for Library_Dir use "lib";
for Library_Name use "glada";
end GLAda;
---------------------------------------------------------------------------
gluada.gpr:
with "glada.gpr";
project GLUAda is
for Languages use ("Ada");
for Source_Dirs use ("src/glu/**");
for Object_Dir use "obj/glu";
for Library_Kind use "static";
for Library_Dir use "lib";
for Library_Name use "gluada";
end GLUAda;
---------------------------------------------------------------------------
gl.ads:
package GL is
pragma Pure;
end GL;
---------------------------------------------------------------------------
glu.ads
package GLU is
pragma Pure;
end GLU;
---------------------------------------------------------------------------
Makefile:
all:
rm -fr lib obj
gnatmake -p -Pglada.gpr
ls -R obj lib
gnatmake -p -Pgluada.gpr
ls -R obj lib
---------------------------------------------------------------------------
Now, execution of make (in root directory) gives:
rm -fr lib obj
gnatmake -p -Pglada.gpr
object directory "/home/damien/dev/ws/gprbug/obj/gl" created for project
glada
library directory "/home/damien/dev/ws/gprbug/lib" created for project glada
gcc -c -I- -gnatA /home/damien/dev/ws/gprbug/src/gl/gl.ads
building static library for project glada
ar cr /home/damien/dev/ws/gprbug/lib/libglada.a
/home/damien/dev/ws/gprbug/obj/gl/gl.o
ranlib /home/damien/dev/ws/gprbug/lib/libglada.a
ls -R obj lib
lib:
gl.ali libglada.a
obj:
gl
obj/gl:
gl.ali gl.o
gnatmake -p -Pgluada.gpr
object directory "/home/damien/dev/ws/gprbug/obj/glu" created for
project gluada
gcc -c -I- -gnatA /home/damien/dev/ws/gprbug/src/glu/glu.ads
building static library for project gluada
ar cr /home/damien/dev/ws/gprbug/lib/libgluada.a
/home/damien/dev/ws/gprbug/obj/glu/glu.o
ranlib /home/damien/dev/ws/gprbug/lib/libgluada.a
ls -R obj lib
lib:
glu.ali libglada.a libgluada.a
obj:
gl glu
obj/gl:
gl.ali gl.o
obj/glu:
glu.ali glu.o
---------------------------------------------------------------------------
The strange thing is that gl.ali has been created when glada project is
generated (as expected), but removed after generation of gluada (as
unexpected).
gl.ali is still present in obj/gl directory in the end.
So, did I make something wrong with GNAT projects?
If not, is this a known behaviour or a bug?
If you think it is a bug, I'll report it to AdaCore and try to analyse
gnatmake to see where it can come from (GNAT GPL 2010 is still in a long
time !)
Regards,
Damien Carbonne
next reply other threads:[~2009-07-30 22:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-30 22:00 Damien Carbonne [this message]
2009-07-31 10:04 ` gnatmake (GNAT GPL 2009): bug or feature? Damien Carbonne
[not found] ` <9fSdnSwo5cGqVO7XnZ2dnUVZ_rudnZ2d@earthlink.com>
2009-08-01 7:52 ` Damien Carbonne
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox