Ethereal-dev: Re: [Ethereal-dev] [PATCH] minor ethereal build system fixes

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: 06 Jul 2002 22:51:10 +0100
On Sat, 6 Jul 2002, Guy Harris uttered the following:
> On Sat, Jul 06, 2002 at 11:35:17AM +0100, Nix wrote:
>> - prematurely expanding `PLUGIN_DIR' so that it doesn't move around
>>   if the user resets `prefix' at installation time --- obviously you
>>   need to expand it because it gets substituted into C code, so
>>   I've introduced a `plugindir' make variable which contains the
>>   unexpanded value.
> 
> If it's substituted into the C code, what happens if you reset "prefix"
> at installation time?  Does the resulting Ethereal - which is presumably
> looking for plugins in the directory specified at compile time - find
> the plugins?

Yes, but that's not a bug.

The point of changing prefix at installation time is to install in a
different directory from that in which the package will look for its
pieces. You might configure with prefix set to /usr/local, then
install with

make install prefix=/usr/local/stow/ethereal-0.9.5

and use stow (or one of the half-a-dozen similar tools) to make symlinks
from /usr/local/stow/ethereal-0.9.5/bin/ethereal to
/usr/local/bin/ethereal (and so on for everything else under
/usr/local/stow/ethereal-0.9.5). (Sites using AFS do this a lot, too.)

So when the binary looks for its pieces in
/usr/local/lib/ethereal/plugins/0.9.5, it'll find them, even though
they'll be symlinks (or one of those directories will be a symlink).

It might sound baroque, but it works: it makes for a nice simple package
manager for /usr/local with no databases to get corrupted :)

(hell, not necessarily just /usr/local: the machine I'm writing this on
is *entirely* managed that way, with 1830 symlinks in /usr/bin, and no
files at all...)

-- 
`What happened?'
                 `Nick shipped buggy code!'
                                             `Oh, no dinner for him...'