comp.lang.ada
 help / color / mirror / Atom feed
From: Tapio Kelloniemi <spam18@thack.org>
Subject: Re: Library file locations (was: Debian Policy for Ada, Second Edition)
Date: Tue, 21 Mar 2006 20:11:43 GMT
Date: 2006-03-21T20:11:43+00:00	[thread overview]
Message-ID: <36ZTf.1851$ay4.142@reader1.news.jippii.net> (raw)
In-Reply-To: 87acbl8hc9.fsf@ludovic-brenta.org

Ludovic Brenta <ludovic@ludovic-brenta.org> wrote:
>Tapio Kelloniemi <spam18@thack.org> writes:
>>>In particular, /usr/local is, by definition, for use by the system
>>>administrator, and therefore falls outside the scope of any policy
>>>defined by the operating system.
>>
>> Why GCC then looks for headers in /usr/local/include? Because many packages
>> are installed in /usr/local by sysadmins and because /usr/local/include
>> is in GCC's default search path, other packages can link against
>> packages installed by admin without using absolute paths. Has anyone ever
>> seen C code like:
>> #include "/usr/local/include/readline/readline.h"
>
>No but I often see:
>
>gcc -c -I/usr/local/include foo.c

This -I is redundant and must be treated as somebody else's problem.

>> What comes to setting ADA_PROJECT_PATH, I think it is just setting
>> one more redundant environment variable. Editing a text file is much
>> more elegant solution.
>
>But you would normally set ADA_PROJECT_PATH from within a Makefile, so
>your objection is weak.

I don't think that /usr/local is very non-standard location for installing
software. Actually if I daily used a system where there is a package manager 
provided by the distro, I would not install programs compiled by myself in the 
/usr hierarchy. You know better than I what happens if a sysadmin installs a 
package in /usr which overwrites a file already installed by the distro. 
Therefore it is good practice to install under /usr/local to prevent messing 
up the system's package management, and for other reasons as well.
This is why /usr/local should be supported automatically or at least easily.
What comes to setting ADA_PROJECT_PATH in a Makefile:
Imagine that I have installed some Ada library under /usr/local (the distro 
provides a precompiled binary, but I want to enable a feature X required by 
package A). Then I compile A. If the library and the package A were written in 
C, I would do the following to compile A:
./configure && make && make install

As they are written in Ada, I do:
./configure --with-additional-ada-project-path=/usr/local/share/ada/adainclude

And what if the configure script does not support the above mentioned option?
I would have to edit Makefiles, possibly run automake, etc. If the 
compilation process happens to be automated, I must write some nasty sed 
scripts to do the job.

-- 
Tapio



  reply	other threads:[~2006-03-21 20:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-18  1:15 Debian Policy for Ada, Second Edition Ludovic Brenta
2006-03-18 13:36 ` Pascal Obry
2006-03-18 14:39   ` Ludovic Brenta
2006-03-18 16:32     ` Pascal Obry
2006-03-18 17:13       ` Ludovic Brenta
2006-03-18 19:10         ` Pascal Obry
2006-03-18 19:49           ` Georg Bauhaus
2006-03-18 21:16       ` Tapio Kelloniemi
2006-03-19  2:04         ` Library file locations (was: Debian Policy for Ada, Second Edition) Björn Persson
2006-03-19  7:48           ` Tapio Kelloniemi
2006-03-19 13:00             ` Björn Persson
2006-03-19 15:31             ` Pascal Obry
2006-03-19 16:48               ` Björn Persson
2006-03-19 20:21               ` Tapio Kelloniemi
2006-03-19 22:24                 ` Ludovic Brenta
2006-03-20  9:07                   ` Tapio Kelloniemi
2006-03-20 11:51                     ` Ludovic Brenta
2006-03-21 20:11                       ` Tapio Kelloniemi [this message]
2006-03-21 22:30                         ` Library file locations Ludovic Brenta
2006-03-22 11:57                         ` Library file locations (was: Debian Policy for Ada, Second Edition) Georg Bauhaus
2006-03-20  6:52                 ` Pascal Obry
2006-03-20  9:10                   ` Tapio Kelloniemi
replies disabled

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