Re: [A-a-p-user] dependencies in generated C++ files

Bram Moolenaar <[email protected]>
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Adriaan de Groot wrote:

> On Sunday 05 October 2003 13:31, Bram Moolenaar wrote:
> > No, there was no intention to do this.  The code is obviously not
> > prepared for this situation.  The "build-" dir should be removed when
> > making the file name to store the automatic dependencies in.
> 
> I'll add it to my todo list as well. I've been meaning to add a function 
> bdir() that prepends $BDIR if needed, so that you can do
> 
> :action foo default
> 	:sys program < $-source > `bdir(target)`
> 
> and know that the output goes to $BDIR and not $BDIR/$BDIR or
> something else odd.

That is a possible solution.  But we already have src2obj(), which does
something very similar.

Another way to go would be to offer a function that removes "build-*"
from a file name.  This actually already exists internally, since it is
used to find sources for rules.  It's locate_bdir() in DoBuild.py.

This assumes you know when a file could be in a build directory.  You
could then do:

	with_new_bdir = $BDIR/`strip_bdir(_no.with_old_bdir)`

It's a bit longer than your proposed bdir() function though...

-- 
From "know your smileys":
 %	Bike accident (a bit far-fetched, I suppose)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.