[haiku-commits] Re: r42788 - in haiku/trunk/src: libs/linprog tests/servers/app

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 30 Sep 2011 23:18:37 +0200

Axel Dörfler wrote:
> Ingo Weinhold<ingo_weinhold@xxxxxx> wrote:
> > > I can't build the normal app_server anymore (only in the test
> > >  environment).
> > What's the error?
> 
> Target not found. When the "SetSubDirPlatform" rule is missing, then it works 
> for the normal build. When I add it with libbe_test alone (as done in several 
> places in the build system) it doesn't work anymore -- looks like this 
> affects only the build of static libraries.

SetSubDirPlatform is definitely the wrong rule in this case. It sets the 
platform for which the targets in this Jamfile are being built. In practice the 
only real application is for build tools to mark them as to be built for the 
host platform, though the BuildPlatform{Main,SharedLibrary,...} rules do that 
implicitly just for the target in question and are therefore generally 
preferrable. So SetSubDirPlatform exists basically for sake of completeness.

In case you mean the SetSubDirSupportedPlatforms rule, it really does exactly 
what its name tells you: It sets the supported platforms for the subdirectory 
to the ones you pass to it. If you only pass "libbe_test", then the targets can 
only be built for "libbe_test". There's an AddSubDirSupportedPlatforms rule, 
which also does exactly what one would expect from its name and which is 
probably the one you'd want to use in this case.

Regarding a possibly different handling of shared and static libraries, the 
SharedLibrary and StaticLibrary rules use exactly the same statement for 
checking the supported platform:

    if ! [ IsPlatformSupportedForTarget $(1) ] {
        return ;
    }

So at least from the code I wouldn't see how they could behave differently in 
this respect. If you have a concrete case, please feed it to the bug tracker.

CU, Ingo

Other related posts: