using subdirectories and $BDIR with :rule

Mathew Boorman <[email protected]>
Newsgroups gmane.comp.tools.aap.user
Message-ID <[email protected]>
Hi,

I am just trying to get an initial demo build working using aap, but I
am having trouble getting the path handling straight in my head.  In
particular I think the 'correct' usage of BDIR is my problem.

Basically I am generating source files from idl, the idl compiler
generates 4 files, the client and server side stubs.  My test aap recipe
is:

INCLUDE+=-Iutil

:program $(BDIR)/p1 : src/one.cpp $(BDIR)/src/util/blahS.cpp

:rule {sourceexists} %S.cpp %.hh %C.cpp %S.hh : %.idl
      :cat $source >! $(BDIR)/$(match)S.cpp 
      :cat $source >! $(BDIR)/$(match)C.cpp 
      :cat $source >! $(BDIR)/$(match).hh 
      :cat $source >! $(BDIR)/$(match)S.hh 


The problem with the above is that the output files are getting put
directly in $BDIR, $match does seem to include the path component. I
figure I can parse the $source to extract the path component and use
that in the output, but it does not seem right.


Am I doing something silly?  I really did not expect to have to put
$BDIR in so many places, but when it was not there the generated stuff
and the program itself got put in the current directory.

Thanks
m@





-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
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.