Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
gnat Project files
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
RasikaSrinivasan@gmail.co m  
View profile  
 More options Nov 4, 1:02 pm
Newsgroups: comp.lang.ada
From: "RasikaSriniva...@gmail.com" <rasikasriniva...@gmail.com>
Date: Tue, 3 Nov 2009 18:02:21 -0800 (PST)
Local: Wed, Nov 4 2009 1:02 pm
Subject: gnat Project files
I have a "common.gpr" for a number of projects. I was hoping I could
define Exec_Dir, Object_Dir etc in just in the common.gpr. But it does
not appear to be inherited in the lower level gprs. Am I missing
something?

thanks, srini


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitry A. Kazakov  
View profile  
 More options Nov 4, 8:09 pm
Newsgroups: comp.lang.ada
From: "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
Date: Wed, 4 Nov 2009 10:09:47 +0100
Local: Wed, Nov 4 2009 8:09 pm
Subject: Re: gnat Project files

On Tue, 3 Nov 2009 18:02:21 -0800 (PST), RasikaSriniva...@gmail.com wrote:
> I have a "common.gpr" for a number of projects. I was hoping I could
> define Exec_Dir, Object_Dir etc in just in the common.gpr. But it does
> not appear to be inherited in the lower level gprs.

Yes, I have the same problem too. So far the best solution I know is:

with "common.gpr";
project Dependent is
   for Object_Dir use Common'Object_Dir;
   ...

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
AdaMagica  
View profile  
 More options Nov 5, 12:23 am
Newsgroups: comp.lang.ada
From: AdaMagica <christoph.gr...@eurocopter.com>
Date: Wed, 4 Nov 2009 05:23:53 -0800 (PST)
Local: Thurs, Nov 5 2009 12:23 am
Subject: Re: gnat Project files

> Yes, I have the same problem too. So far the best solution I know is:

> with "common.gpr";
> project Dependent is
>    for Object_Dir use Common'Object_Dir;

This is not the best solution, it's *the* solution AdaCore has in mind.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yannick Duchêne Hibou57  
View profile  
 More options Nov 5, 1:20 am
Newsgroups: comp.lang.ada
From: Hibou57 (Yannick Duchêne) <yannick_duch...@yahoo.fr>
Date: Wed, 4 Nov 2009 06:20:32 -0800 (PST)
Local: Thurs, Nov 5 2009 1:20 am
Subject: Re: gnat Project files
On 4 nov, 14:23, AdaMagica <christoph.gr...@eurocopter.com> wrote:

> > Yes, I have the same problem too. So far the best solution I know is:

> > with "common.gpr";
> > project Dependent is
> >    for Object_Dir use Common'Object_Dir;

> This is not the best solution, it's *the* solution AdaCore has in mind.

Currently, I do not use GPS, nor the GNAT project facilities, but
still have a question : is it possible to use a relative path for this
common path ? I mean, a relative path which would be interpreted
relatively to another path specific to each project.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
AdaMagica  
View profile  
 More options Nov 5, 1:39 am
Newsgroups: comp.lang.ada
From: AdaMagica <christoph.gr...@eurocopter.com>
Date: Wed, 4 Nov 2009 06:39:26 -0800 (PST)
Local: Thurs, Nov 5 2009 1:39 am
Subject: Re: gnat Project files
On 4 Nov., 15:20, Hibou57 (Yannick Duchêne) <yannick_duch...@yahoo.fr>
wrote:

> Currently, I do not use GPS, nor the GNAT project facilities, but
> still have a question : is it possible to use a relative path for this
> common path ? I mean, a relative path which would be interpreted
> relatively to another path specific to each project.

You can specify an abolute or releative path, or you can use an
environment variable for project file paths.

with "../Relative_Path/common";
with "/Absolute_Path/something";
project Dependent is ...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitry A. Kazakov  
View profile  
 More options Nov 5, 1:50 am
Newsgroups: comp.lang.ada
From: "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
Date: Wed, 4 Nov 2009 15:50:59 +0100
Local: Thurs, Nov 5 2009 1:50 am
Subject: Re: gnat Project files

On Wed, 4 Nov 2009 06:20:32 -0800 (PST), Hibou57 (Yannick Duchêne) wrote:
> On 4 nov, 14:23, AdaMagica <christoph.gr...@eurocopter.com> wrote:
>>> Yes, I have the same problem too. So far the best solution I know is:

>>> with "common.gpr";
>>> project Dependent is
>>>    for Object_Dir use Common'Object_Dir;

>> This is not the best solution, it's *the* solution AdaCore has in mind.

> Currently, I do not use GPS, nor the GNAT project facilities, but
> still have a question : is it possible to use a relative path for this
> common path ? I mean, a relative path which would be interpreted
> relatively to another path specific to each project.

Sure. For example:

   for Object_Dir use "../../" & Common'Object_Dir;

P.S. '/' works under Windows as if it were '\'. Also you should better use
all quoted file names in lower case to make it working under both Linux and
Windows.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yannick Duchêne Hibou57  
View profile  
 More options Nov 5, 2:29 am
Newsgroups: comp.lang.ada
From: Hibou57 (Yannick Duchêne) <yannick_duch...@yahoo.fr>
Date: Wed, 4 Nov 2009 07:29:56 -0800 (PST)
Local: Thurs, Nov 5 2009 2:29 am
Subject: Re: gnat Project files
Thanks to you both for the tips

On 4 nov, 15:50, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:

> P.S. '/' works under Windows as if it were '\'. Also you should better use
> all quoted file names in lower case to make it working under both Linux and
> Windows.

If I may add something about general path format : on Windows, spaces
must be avoided in paths, otherwise the debugger will not work (I do
not really use it as well, but I've tried it in a near past). Note :
the GNAT compiler (on Windows) does not requires this, just the
debugger do.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert A Duff  
View profile  
 More options Nov 5, 4:51 am
Newsgroups: comp.lang.ada
From: Robert A Duff <bobd...@shell01.TheWorld.com>
Date: Wed, 04 Nov 2009 12:51:28 -0500
Local: Thurs, Nov 5 2009 4:51 am
Subject: Re: gnat Project files

AdaMagica <christoph.gr...@eurocopter.com> writes:
> You can specify an abolute or releative path, or you can use an
> environment variable for project file paths.

> with "../Relative_Path/common";
> with "/Absolute_Path/something";
> project Dependent is ...

Relative paths are relative to the directory where the project file is,
not (necessarily) relative to the current directory where you're running
the compiler.

- Bob


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen Leake  
View profile  
 More options Nov 5, 9:22 pm
Newsgroups: comp.lang.ada
From: Stephen Leake <stephen_le...@stephe-leake.org>
Date: Thu, 05 Nov 2009 05:22:50 -0500
Local: Thurs, Nov 5 2009 9:22 pm
Subject: Re: gnat Project files

"RasikaSriniva...@gmail.com" <rasikasriniva...@gmail.com> writes:
> I have a "common.gpr" for a number of projects. I was hoping I could
> define Exec_Dir, Object_Dir etc in just in the common.gpr. But it does
> not appear to be inherited in the lower level gprs. Am I missing
> something?

Yes :).

One use of project files is to keep separate sets of sources and build
directories for each project, so higher-level projects can share
lower-level projects.

For example, I have this directory structure:

GDS -- top level
    sal -- math and other utilities
        build
            x86_gnu_windows     -- native Windows
            x86_gnu_lynx_linux  -- cross target Linux to Lynx
            x86_gnu_linux       -- native Linux
        source -- *.ad[sb]

    common -- core GDS stuff
       build
            x86_gnu_windows     -- native Windows
            x86_gnu_lynx_linux  -- cross target Linux to Lynx
            x86_gnu_linux       -- native Linux
        source -- *.ad[sb]

    smm -- music manager
        build
            x86_gnu_windows     -- native Windows

Each x86_* directory has a project file, and local obj subdirectory.
Exec_Dir has the default value of the x86_* directory; that's where
test executables get built.

smm and common both use sal, but they have nothing else in common. The
compiler only has to compile sal once, when compiling smm or common.

You can also set compiler options in a common gpr file, and then use
renames on the compiler package:

project Shared is

    package Compiler is
        for Default_Switches ("Ada") use ("-gnat05");

        -- other switches
    end Compiler;
end Shared;

with "shared";
project Common is

    package Compiler renames Shared.Compiler;

end Common;

--
-- Stephe


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google