Re: [bakefile-devel] Subprojetc question.

Vaclav Slavik <[email protected]>
Newsgroups gmane.editors.poedit.user
Message-ID <200402052117.16311.vaclav.slavik__5311.97674940831$1077448175@matfyz.cz>
Hi,

Hans Van Leemputten wrote:
> Before mailing here I already reported a bakefile bug on the
> wxWindows SF page, should I duplicate it on the bakefile SF page as
> it is not specific to wxWin?

Yes, please. BTW, I think it's not specific to Watcom...

> No I understand (well I think I do) what subproject is for and what
> the bakefile exe,lib,dll rule is for. The first version of my
> bakefile did it the way you suggest above, but there are some
> problems doing it this way: 
> - The guidelib and demo dsp file will
> both be in the demo directory. 

On the contrary, if you use a subproject, there will be two makefiles. 
That's the very point of subprojects.

> - [I'm not sure the next issue is true, I don't remember correctly]
> Because of the above issue also the object files etc get put into
> the sample directory... meaning a rebuild is needed form the
> guidelib for every application using it. A lot of space wasted...

No, this is not true, object files are put into the directory where 
the makefile is (unles overriden by you).

> * Because both the exe and the lib bakefile included the common
> part and the exe bakefile included the lib bakefile it gave parse
> errors (bakefile couldn't handle me defining the same set of
> options again).

Yes, but that makes sense, doesn't it? But I don't see why are you 
including the common parts twice (this is not caused by using 
<subproject>). Are you sure you are not using <include> instead of 
<subproject> by mistake?

> *Also if I include a bakefile that has a list of files relative to
> that bakefile in it I would end-up with wrong file paths. For
> example if the master bakefile is not in the same directory as the
> sub bakefile the files will not be found...

The filenames are relative to SRCDIR.

> So that is why I want to use subproject instead of what you
> suggest. But as I already reported this is OK for the makefiles but
> not for the MSVC6prj files. Any other suggestions?

No.

> Aha ok. I did some googling around and found-out the following that
> may help: - The borland make file could use PUSHD and POPD command
> to change directory. Unfortunately this will only work on NT based
> systems.

...and so I cannot use it.

> - Another dirty workaround would be to output a batch file that
> does the following (note: not very well tested!)
>
> guidelib:
>     @echo cd ..\.. > %temp%\$<.bat
>     @echo $(MAKE) -f makefile.bcc $(MAKEARGS) all >> %temp%\$<.bat
>     call %temp%\$<.bat
>     @del %temp%\$<.bat

You're right, it _is_ dirty ;) It could work as last resolt, but let 
me repeat once again that <subproject> should be used with 
subdirectories only.

> BTW. Would it be possible to also foresee a clean rule for the
> subprojects? I was thinking of a cleanall or veryclean rule... just
> so there is a way to do clean action for all subprojects as well.

"make clean" does that.

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)

iD8DBQBAIqTMxDYa/UZSZMkRArrBAKCE9z638juQ6eovqbxnCyq2zyjxUACfXINg
MUKZjI9TP1zxDG/IK3KtXSI=
=8N6c
-----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.