Re: [bakefile-devel] Subprojetc question.
Vaclav Slavik <[email protected]> Thu, 29 Jan 2004 15:13:44 +0100
| Newsgroups | gmane.text.documancer.user |
|---|---|
| Message-ID | <[email protected]> |
--Boundary-02=_cURGAdIvxSn3plE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: signed data Content-Disposition: inline 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=3D"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=20 to build another set of targets that don't depend on targets in the=20 "parent" makefile (and a makefile of its own is created for=20 subproject). If you have an executable target that depends on a=20 library, then you should do something like this instead: <lib id=3D"guidelib"> =2E... </lib> <exe id=3D"demo"> <library>guidelib</library> </exe> The <library> tag makes guidelib a dependency of demo and ensures=20 correct linker settings. > - MSVC demo.dsw doesn't include the guidelib.dsp file, why?=20 Because you can't make a .dsw depency of another .dsw file and at the=20 time demo.dsw is generated, nothing is known about the content of=20 guidelib bakefile so it can't infer what dsp files there will be (so=20 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=20 directory in Borland's make. Maybe it's possible to workaround it=20 somehow, but I don't (yet) know how. The underlying cause is that=20 <subproject> is meant to be used with subdirectories, not=20 subdirectories of parent directories. Regards, Vaclav =2D-- PGP key: 0x465264C9, available from http://pgp.mit.edu/ --Boundary-02=_cURGAdIvxSn3plE Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBAGRUcxDYa/UZSZMkRAug7AKCY8Ao6WUmUy6DmS8deyT/uQoZMoACfRAfF XWuPYZKFAmG2izA5thBsdjM= =PLwQ -----END PGP SIGNATURE----- --Boundary-02=_cURGAdIvxSn3plE-- ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn