From: anon@anon.org (anon)
Subject: Re: architecture-independent GNAT project files?
Date: Mon, 27 Apr 2009 12:06:50 GMT
Date: 2009-04-27T12:06:50+00:00 [thread overview]
Message-ID: <udhJl.12182$941.4703@bgtnsc04-news.ops.worldnet.att.net> (raw)
In-Reply-To: 75l5ceF18samiU1@mid.individual.net
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1764 bytes --]
You could use: -gnateD on your command line or GPS options list
-gnateD? Define or redefine preprocessing symbol, e.g. -gnateDsym=val
Where use could set a variable to the architecture path you wish to use
such as for a 32-bit arch
gnat make -gnateDArchLib="/usr/lib/' <filename>
then for the 64 bit arch use
gnat make -gnateDArchLib="/usr/lib64/' <filename>
--
-- ArchLib is define in commnd line options. if not present an error
-- will be generated.
--
Libs_Path : String := ArchLib ;
...
open ( File => LibFlile,
Name => Libs_Path & FileName,
Mode => In_File ) ;
In <75l5ceF18samiU1@mid.individual.net>, =?ISO-8859-1?Q?Bj=F6rn?= Persson <bjorn@xn--rombobjrn-67a.se> writes:
>When I write GNAT project files for shared libraries I find that I have to
>hardcode the paths to some architecture-specific directories. 32-bit
>libraries are in /usr/lib/ while 64-bit libraries are in /usr/lib64/, and I
>would like to have a single project file that works for both cases.
>
>The way to find out the architecture of a Unix-like system appears to be to
>invoke uname, but GNAT project files don't seem to have a shell-out
>feature. As far as I can see in the manual the only ways they can get input
>is by environment variables and command line parameters. I don't suppose
>Gnatmake provides some variable to project files that shows what the
>architecture is?
>
>I could define an environment variable in the systemwide profile, but that's
>not really a good solution. That variable would contain the host
>architecture but it's the target architecture I really need to test for. I
>also don't like polluting the environment.
>
>Does anyone have a better idea?
>
>--
>Bj�rn Persson
>PGP key A88682FD
next prev parent reply other threads:[~2009-04-27 12:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-27 7:32 architecture-independent GNAT project files? Björn Persson
2009-04-27 8:02 ` Dmitry A. Kazakov
2009-04-27 21:16 ` Björn Persson
2009-04-27 21:55 ` Ludovic Brenta
2009-04-28 21:41 ` Björn Persson
2009-04-28 7:24 ` Dmitry A. Kazakov
2009-04-28 20:56 ` sjw
2009-04-30 12:17 ` Björn Persson
2009-04-30 12:31 ` Ludovic Brenta
2009-04-27 12:06 ` anon [this message]
2009-04-27 19:10 ` sjw
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox