Malcolm Wallace <[EMAIL PROTECTED]> wrote,

> Can I propose a change to the -i / -I flags?  Currently, the -idir (or
> -Idir) options add a directory to the search path for imports.  This
> directory is either relative to the current dir, or absolute.  My
> suggestion is that it could also be used for "relative to a standard
> installation directory".  For instance, -Idata/edison would look first
> in ./data/edison if it exists, then in $prefix/data/edison, where
> $prefix has the value /usr/local/lib/ghc, or whatever.
> 
> I think this is a reasonably straightforward means to allow
> hierarchical library organisation.  Plus, as of about two weeks ago,
> nhc98 (in CVS) implements something similar to this feature.
> 
> However, -i / -I only covers imports, it doesn't cover linking.  Hence,
> I also propose to extend the -L flag in the same way.  -Ldir usually
> adds a relative or absolute directory to the link search path, so
> the same extension would allow "-Ldata/edison -ledison" to search for
> both ./data/edison/libedison.a and $prefix/data/edison/libedison.a.

The disadvantage of this scheme is that you can get into
trouble as soon as you (accidentally) name one of your local
directories the same as one of the system directories.  With
system directories like `posix', `lang', `num', `net', etc a
collision is only a matter of time, I think.

Cheers,
Manuel

Reply via email to