Adriaan de Groot | 24 Sep 2003 10:27
Picon
Picon

some $BDIR/target query

1) Why does AAP build targets in the recipe dir, not in $BDIR? In particular, 
this recipe:

:program foo : bar.c

builds $BDIR/bar.o and then foo. Why not $BDIR/foo? Suppose I organize my 
sources into directories:

:program foo : foo/bar.c

now AAP will try to build $BDIR/foo/bar.o, and then foo -- which is a 
directory, and will fail.

--

-- 
pub  1024D/FEA2A3FE 2002-06-18 Adriaan de Groot <groot@...>
     Key fingerprint = 934E 31AA 80A7 723F 54F9  50ED 76AC EE01 FEA2 A3FE

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Bram Moolenaar | 25 Sep 2003 11:03
Picon

Re: some $BDIR/target query


Adriaan de Groot wrote:

> 1) Why does AAP build targets in the recipe dir, not in $BDIR? In particular, 
> this recipe:
> 
> :program foo : bar.c
> 
> builds $BDIR/bar.o and then foo. Why not $BDIR/foo? Suppose I organize my 
> sources into directories:
> 
> :program foo : foo/bar.c
> 
> now AAP will try to build $BDIR/foo/bar.o, and then foo -- which is a 
> directory, and will fail.

The idea behind this is that intermediate results can be put anywhere,
you don't need to know where.  Since $BDIR differs from system to system
there is no fixed location where they are stored.

The resulting program is the final result, thus it must be in the place
where the user expects it.  You could argue that $BDIR/foo is that
place, but after typing "aap" to build your program, a user doesn't know
if it ended up in build-FreeBSD4_8_RELEASE or build-OtherSystem_8, thus
you can't execute the program without looking carefully where it is.

If you have a different situation it's very easy to specify the
directory where you want your executable to be stored.  You could use:

	:program $BDIR/foo : foo/bar.c
(Continue reading)


Gmane