I've got a directory with the same name as the target to be generated in
that directory. This doesn't seem to work.
What am I doing wrong?
$ ls
Jamfile foo/
$ ls foo
Jamfile foo1.cpp foo1.h foo2.cpp foo2.h
$ cat Jamfile
SubDir TOP ;
SubInclude TOP foo ;
$ cat foo/Jamfile
SubDir TOP foo ;
Main foo : foo1.cpp foo2.cpp ;
I get:
$ jam
Jamrules: No such file or directory
warning: foo depends on itself
warning: foo depends on itself
warning: foo depends on itself
...found 14 target(s)...
...updating 3 target(s)...
C++ foo/foo1.o
C++ foo/foo2.o
MkDir1 foo/foo
Link foo/foo
/usr/bin/ld: cannot open output file foo/foo: Is a directory
collect2: ld returned 1 exit status
cc -o foo/foo foo/foo1.o foo/foo2.o
...failed Link foo/foo ...
...failed updating 1 target(s)...
...updated 2 target(s)...
$ jam clean
Jamrules: No such file or directory
...found 1 target(s)...
...updating 1 target(s)...
Clean clean
rm: `foo/foo' is a directory
rm -f foo/foo foo/foo1.o foo/foo2.o
...failed Clean clean ...
...failed updating 1 target(s)...
The Jamrules line is harmless, I know. The question is: why the MkDir1
foo/foo? Am I allowed to do this kind of thing?
Cheers,
Roger.