From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,5cb528c57f45645e,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!cleanfeed1-a.proxad.net!nnrp12-2.free.fr!not-for-mail Date: Fri, 31 Jul 2009 00:00:21 +0200 From: Damien Carbonne User-Agent: Thunderbird 2.0.0.22 (X11/20090605) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: gnatmake (GNAT GPL 2009): bug or feature? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4a7217f6$0$25376$426a34cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 31 Jul 2009 00:00:22 MEST NNTP-Posting-Host: 82.247.219.63 X-Trace: 1248991222 news-4.free.fr 25376 82.247.219.63:34282 X-Complaints-To: abuse@proxad.net Xref: g2news2.google.com comp.lang.ada:7472 Date: 2009-07-31T00:00:22+02:00 List-Id: 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