comp.lang.ada
 help / color / mirror / Atom feed
* adding include path in linux
@ 2009-05-17 19:02 Massimo M.
  2009-05-17 20:04 ` John B. Matthews
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Massimo M. @ 2009-05-17 19:02 UTC (permalink / raw)


good morning, and sorry for my english.
how can i add an include path in default configuration of ada?

i try to explain.
i use linux, and i want to use ncurses includes in
/usr/lib/ada/adainclude, in the same way the compiler gets the include in
/usr/lib/gcc/i486-slackware-linux/4.2.4/adainclude/.
i don't want to put every time an option in compiler, but i want the
compiler to search the include in /usr/lib/ada/adainclude.

how can i do this?

thanks in advance

-- 
Spolvera la mia email per rispondermi

"Storia del Mondo. I vulcani eruttarono. Gli oceani ribollirono.
L'universo era in tumulto. Poi venne il cane."
Snoopy

maxy04.splinder.com

questo articolo e` stato inviato via web dal servizio gratuito 
http://www.newsland.it/news segnala gli abusi ad abuse@newsland.it





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: adding include path in linux
  2009-05-17 19:02 adding include path in linux Massimo M.
@ 2009-05-17 20:04 ` John B. Matthews
  2009-05-17 20:49 ` sjw
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: John B. Matthews @ 2009-05-17 20:04 UTC (permalink / raw)


In article <gupmvq$32o$1@news.newsland.it>,
 maxy04polvere40yxam@yahoo.it (Massimo M.) wrote:

> good morning, and sorry for my english.
> how can i add an include path in default configuration of ada?

You did not say which Ada compiler. I use GNAT:

<http://gcc.gnu.org/onlinedocs/>

> i try to explain.
> i use linux, and i want to use ncurses includes in
> /usr/lib/ada/adainclude, in the same way the compiler gets the include in
> /usr/lib/gcc/i486-slackware-linux/4.2.4/adainclude/.
> i don't want to put every time an option in compiler, but i want the
> compiler to search the include in /usr/lib/ada/adainclude.
> 
> how can i do this?

If you are using GNAT, use the -aI<dir> option. See the "GNAT User's 
Guide", section 6.2, "Switches for gnatmake". For example:

gnatmake main -aI/usr/lib/ada/adainclude ...

You can use gnatls, section 17, to see the search paths:

gnatls -v

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: adding include path in linux
  2009-05-17 19:02 adding include path in linux Massimo M.
  2009-05-17 20:04 ` John B. Matthews
@ 2009-05-17 20:49 ` sjw
  2009-05-18  8:48 ` Ludovic Brenta
  2009-05-18  9:53 ` Dmitry A. Kazakov
  3 siblings, 0 replies; 9+ messages in thread
From: sjw @ 2009-05-17 20:49 UTC (permalink / raw)


On May 17, 8:02 pm, maxy04polvere40y...@yahoo.it (Massimo M.) wrote:
> good morning, and sorry for my english.
> how can i add an include path in default configuration of ada?

Add these to your ~/.bashrc (or equivalent) -- having replaced
the ??????? with the place where your ncurses installation puts
its .ali and .o/.a/.so files:

ADA_INCLUDE_PATH=/usr/lib/ada/adainclude; export ADA_INCLUDE_PATH
ADA_OBJECTS_PATH=/usr/lib/ada/????????; export ADA_OBJECTS_PATH




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: adding include path in linux
  2009-05-17 19:02 adding include path in linux Massimo M.
  2009-05-17 20:04 ` John B. Matthews
  2009-05-17 20:49 ` sjw
@ 2009-05-18  8:48 ` Ludovic Brenta
  2009-05-18  9:53 ` Dmitry A. Kazakov
  3 siblings, 0 replies; 9+ messages in thread
From: Ludovic Brenta @ 2009-05-18  8:48 UTC (permalink / raw)


Add the paths to be searched in the text files:

/usr/lib/gcc/i486-slackware-linux/4.2.4/ada_source_path
/usr/lib/gcc/i486-slackware-linux/4.2.4/ada_object_path

as per the GNAT User's Guide, section 19.2.2, "Installing a library".

--
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: adding include path in linux
  2009-05-17 19:02 adding include path in linux Massimo M.
                   ` (2 preceding siblings ...)
  2009-05-18  8:48 ` Ludovic Brenta
@ 2009-05-18  9:53 ` Dmitry A. Kazakov
  2009-05-18 10:00   ` Ludovic Brenta
  3 siblings, 1 reply; 9+ messages in thread
From: Dmitry A. Kazakov @ 2009-05-18  9:53 UTC (permalink / raw)


Maybe, it would appropriate here.

I am going to write a small portable GtkAda-based installer program for
GNAT library gpr projects. The basic idea is to get rid of ugly makefiles,
which never work as expected.

The thingy should do everything just per reading lists of files to install
from a directory of sources. Then according to the file names and
extensions it will shuffle the files here and there.

Some mangling of the gpr files is planned. In particular modifying "with"
paths and "for Object_Dir use" stuff etc.

Generation of a messy python plug-in script is also in plan. 

Any suggestions?

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: adding include path in linux
  2009-05-18  9:53 ` Dmitry A. Kazakov
@ 2009-05-18 10:00   ` Ludovic Brenta
  2009-05-18 10:10     ` Dmitry A. Kazakov
  0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Brenta @ 2009-05-18 10:00 UTC (permalink / raw)


On May 18, 11:53 am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:
> Maybe, it would appropriate here.
>
> I am going to write a small portable GtkAda-based installer program for
> GNAT library gpr projects. The basic idea is to get rid of ugly makefiles,
> which never work as expected.
>
> The thingy should do everything just per reading lists of files to install
> from a directory of sources. Then according to the file names and
> extensions it will shuffle the files here and there.
>
> Some mangling of the gpr files is planned. In particular modifying "with"
> paths and "for Object_Dir use" stuff etc.
>
> Generation of a messy python plug-in script is also in plan.
>
> Any suggestions?

Please define "portable"?

Debian for one does not need a GtkAda-based installer because it
already has one, called Synaptic (as well as a text-based installer
called Aptitude). Most other self-respecting distributions come with
both installers and a proper package management system. So, what
platform are you targetting that does not already have these? And why
do you still use that platform?

--
Ludovic Brenta.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: adding include path in linux
  2009-05-18 10:00   ` Ludovic Brenta
@ 2009-05-18 10:10     ` Dmitry A. Kazakov
  2009-05-18 11:01       ` Ludovic Brenta
  0 siblings, 1 reply; 9+ messages in thread
From: Dmitry A. Kazakov @ 2009-05-18 10:10 UTC (permalink / raw)


On Mon, 18 May 2009 03:00:52 -0700 (PDT), Ludovic Brenta wrote:

> On May 18, 11:53�am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
> wrote:

>> Maybe, it would appropriate here.
>>
>> I am going to write a small portable GtkAda-based installer program for
>> GNAT library gpr projects. The basic idea is to get rid of ugly makefiles,
>> which never work as expected.
>>
>> The thingy should do everything just per reading lists of files to install
>> from a directory of sources. Then according to the file names and
>> extensions it will shuffle the files here and there.
>>
>> Some mangling of the gpr files is planned. In particular modifying "with"
>> paths and "for Object_Dir use" stuff etc.
>>
>> Generation of a messy python plug-in script is also in plan.
>>
>> Any suggestions?
> 
> Please define "portable"?

Minimally: working under Windows and Linux.

> Debian for one does not need a GtkAda-based installer because it
> already has one, called Synaptic (as well as a text-based installer
> called Aptitude). Most other self-respecting distributions come with
> both installers and a proper package management system.

Yes, a system working only on the platform in question, like rpm.

> So, what
> platform are you targetting that does not already have these?

Technically speaking GNAT GPS.

> And why do you still use that platform?

Because of Ada.

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: adding include path in linux
  2009-05-18 10:10     ` Dmitry A. Kazakov
@ 2009-05-18 11:01       ` Ludovic Brenta
  2009-05-18 11:45         ` Dmitry A. Kazakov
  0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Brenta @ 2009-05-18 11:01 UTC (permalink / raw)


Dmitry A. Kazakov wrote on cpmp.lang.ada:
> On Mon, 18 May 2009 03:00:52 -0700 (PDT), Ludovic Brenta wrote:
> > On May 18, 11:53 am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
> > wrote:
> >> Maybe, it would appropriate here.
>
> >> I am going to write a small portable GtkAda-based installer program for
> >> GNAT library gpr projects. The basic idea is to get rid of ugly makefiles,
> >> which never work as expected.
>
> >> The thingy should do everything just per reading lists of files to install
> >> from a directory of sources. Then according to the file names and
> >> extensions it will shuffle the files here and there.
>
> >> Some mangling of the gpr files is planned. In particular modifying "with"
> >> paths and "for Object_Dir use" stuff etc.
>
> >> Generation of a messy python plug-in script is also in plan.
>
> >> Any suggestions?
>
> > Please define "portable"?
>
> Minimally: working under Windows and Linux.
>
> > Debian for one does not need a GtkAda-based installer because it
> > already has one, called Synaptic (as well as a text-based installer
> > called Aptitude). Most other self-respecting distributions come with
> > both installers and a proper package management system.
>
> Yes, a system working only on the platform in question, like rpm.
>
> > So, what
> > platform are you targetting that does not already have these?
>
> Technically speaking GNAT GPS.

GNAT GPS is not a platform. It runs on a platform that you have
identified as "Windows and Linux". The platform provides a package
management system (including installation and configuration
subsystem). It would be harmful for GNAT GPS to provide another
incompatible system.

I suggest that the best use of resources, if packaging/installation is
a problem, is to provide native installers for a selection of target
platforms, and to make the libraries thus packaged highly visible to
users of those platforms. For example, installers for libraries that
use Window's or Red Hat's (since you mentioned RPM) package management
system. That's what I do (successfully) in Debian and I have been
encouraging others to do the same on other platforms for several
years.

This is in fact one area where, IMHO, portability is NOT desirable.
The closest thing in existence is the GNU Ada Project which provides
native packages of several libraries (and versions of GNAT) for
multiple platforms, from a common base. But the binary packages are
themselves platform-dependent.

--
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: adding include path in linux
  2009-05-18 11:01       ` Ludovic Brenta
@ 2009-05-18 11:45         ` Dmitry A. Kazakov
  0 siblings, 0 replies; 9+ messages in thread
From: Dmitry A. Kazakov @ 2009-05-18 11:45 UTC (permalink / raw)


On Mon, 18 May 2009 04:01:58 -0700 (PDT), Ludovic Brenta wrote:

> Dmitry A. Kazakov wrote on cpmp.lang.ada:
>> On Mon, 18 May 2009 03:00:52 -0700 (PDT), Ludovic Brenta wrote:
>>> On May 18, 11:53�am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
>>> wrote:
>>>> Maybe, it would appropriate here.
>>
>>>> I am going to write a small portable GtkAda-based installer program for
>>>> GNAT library gpr projects. The basic idea is to get rid of ugly makefiles,
>>>> which never work as expected.
>>
>>>> The thingy should do everything just per reading lists of files to install
>>>> from a directory of sources. Then according to the file names and
>>>> extensions it will shuffle the files here and there.
>>
>>>> Some mangling of the gpr files is planned. In particular modifying "with"
>>>> paths and "for Object_Dir use" stuff etc.
>>
>>>> Generation of a messy python plug-in script is also in plan.
>>
>>>> Any suggestions?
>>
>>> Please define "portable"?
>>
>> Minimally: working under Windows and Linux.
>>
>>> Debian for one does not need a GtkAda-based installer because it
>>> already has one, called Synaptic (as well as a text-based installer
>>> called Aptitude). Most other self-respecting distributions come with
>>> both installers and a proper package management system.
>>
>> Yes, a system working only on the platform in question, like rpm.
>>
>>> So, what
>>> platform are you targetting that does not already have these?
>>
>> Technically speaking GNAT GPS.
> 
> GNAT GPS is not a platform. It runs on a platform that you have
> identified as "Windows and Linux".

In this case it is, because the library is to be integrated into GPS /
GPRBuild. Whatever runs underneath is of no interest.

> The platform provides a package
> management system (including installation and configuration
> subsystem). It would be harmful for GNAT GPS to provide another
> incompatible system.

I don't think so, because:

1. there is no packaging system covering the platform span supported by
GPS.

2. GNAT itself as well as its libraries like GtkAda are not distributed by
AdaCore using packaging systems.

3. The intended use targets low profile libraries, which are not archived
in public repositories.

> I suggest that the best use of resources, if packaging/installation is
> a problem, is to provide native installers for a selection of target
> platforms, and to make the libraries thus packaged highly visible to
> users of those platforms. For example, installers for libraries that
> use Window's or Red Hat's (since you mentioned RPM) package management
> system. That's what I do (successfully) in Debian and I have been
> encouraging others to do the same on other platforms for several
> years.

"Native installer" is exactly what I don't want. Experience shows that this
does not work. People do not care to write 100+ installers for a small
library. Should a library reach the level of use that would capture
interest of Debian distributors, then nothing should prevent you or someone
else to package it. It seems that we are talking about different
"ecological niches".

> This is in fact one area where, IMHO, portability is NOT desirable.
> The closest thing in existence is the GNU Ada Project which provides
> native packages of several libraries (and versions of GNAT) for
> multiple platforms, from a common base. But the binary packages are
> themselves platform-dependent.

That is IMO not an Ada way and not an intended use of what I am going to
write.

I think that one of the great advantages of GPS / GPRBuild is that they
finally freed us from that make-madness. (gnatmake was the first step in
that direction). I can have (and do have) Ada projects compilable on any
platform where GNAT is installed. When using GPRBuild I do not need to
patch files anymore. It is advisable for any Ada developer to design his
projects in an OS-independent manner. From what I have learnt about GNAT
installation, it seems that integration of a user library into GPS /
GPRBuild can be performed independently on that
OS-packaging-repository-configure-make nightmare.

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-05-18 11:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-17 19:02 adding include path in linux Massimo M.
2009-05-17 20:04 ` John B. Matthews
2009-05-17 20:49 ` sjw
2009-05-18  8:48 ` Ludovic Brenta
2009-05-18  9:53 ` Dmitry A. Kazakov
2009-05-18 10:00   ` Ludovic Brenta
2009-05-18 10:10     ` Dmitry A. Kazakov
2009-05-18 11:01       ` Ludovic Brenta
2009-05-18 11:45         ` Dmitry A. Kazakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox