[ooc-compiler] Search path inconsistent?
Brought to you by:
mva
|
From: Henk K. <H.A...@xs...> - 2007-10-22 11:03:56
|
Hi,
I'm using OO2C version 2.11 on Debian Gnu/Linux (Sid) and have encountered an
inconsistency in the way the compiler searches for source files when in some
local working directory (not any of the named repositories in oo2crc.xml).
I've also found a work-around, although I hesitate posting it here since I
don't have a Ph.D. in Computer Science... If readers find this message
superfluous or uninformed they should just ignore it.
Suppose I have source files One.Mod and Two.Mod, both placed in the src/
sub-directory of some current working directory (CWD), with Two.Mod importing
One.Mod. While in the CWD, when I compile
$ oo2c -M Two.Mod
the compiler finds src/Two.Mod but does not find src/One.Mod, apparently
because it is looking for src/src/One.Mod.
After some experimenting I've found the following work-around: put local
source files (One.Mod and Two.Mod in the example) in the "top-level" CWD, and
make src a symlink to it,
$ ln -s $PWD src
Now the compiler finds both source files, and will do so in general at any
level of nested imported files. The compiler will create sym/, obj/ and bin/
sub-directories, if necessary.
The above symlink trick is not needed for any of the named repositories, only
for the default CWD (".") repositories.
Actually, I prefer having source files in a "top level" working directory
rather than in a src/ sub-directory, so I'm not complaining about the
work-around.
--
Henk Koster
"Behavioral axioms are right, but agents make mistakes."
Attributed to L.J. Savage
|