Re: [bakefile-devel] Subprojetc question.

Vaclav Slavik <[email protected]>
Newsgroups gmane.editors.poedit.user
Message-ID <200401291513.48280.vaclav.slavik__41804.6934683391$1077448169@matfyz.cz>
Hi,

Hans Van Leemputten wrote:
> [I hope this is the correct way for talking about bakefile related
> things]

Yes, absolutely.

> The issue; guidelib.bkl has a rule to make the lib and demo.bkl has
> a rule to make the demo.exe, but because demo.bkl depends on the
> guidelib it using <subproject id="guidelib">
>         <dir>../../</dir>
>         <dependency-of>all</dependency-of>
>     </subproject>
> This way the lib gets build if needed (just the same as the wxWin
> samples). But for some reason this doesn't work to well:

I think there's a misunderstanding of what <subproject> is. It's a way 
to build another set of targets that don't depend on targets in the 
"parent" makefile (and a makefile of its own is created for 
subproject). If you have an executable target that depends on a 
library, then you should do something like this instead:

<lib id="guidelib">
....
</lib>

<exe id="demo">
   <library>guidelib</library>
</exe>

The <library> tag makes guidelib a dependency of demo and ensures 
correct linker settings.

> - MSVC demo.dsw doesn't include the guidelib.dsp file, why? 

Because you can't make a .dsw depency of another .dsw file and at the 
time demo.dsw is generated, nothing is known about the content of 
guidelib bakefile so it can't infer what dsp files there will be (so 
that it could make all of them dependencies).

> - The makefile generated for OW works fine (In other words it
> builds the lib and the exe like I want) but for Borland it
> generates the following wrong demo makefile rule:

That's because there's no way (that I know) to save & restore current 
directory in Borland's make. Maybe it's possible to workaround it 
somehow, but I don't (yet) know how. The underlying cause is that 
<subproject> is meant to be used with subdirectories, not 
subdirectories of parent directories.

Regards,
Vaclav

---
PGP key: 0x465264C9, available from http://pgp.mit.edu/
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBAGRUcxDYa/UZSZMkRAug7AKCY8Ao6WUmUy6DmS8deyT/uQoZMoACfRAfF
XWuPYZKFAmG2izA5thBsdjM=
=PLwQ
-----END PGP SIGNATURE-----
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.