[haiku-gsoc] Re: [patch] Locale kit : cross-tools, step 1/ build system questions

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Sun, 28 Jun 2009 14:43:31 +0200

On 2009-06-27 at 21:36:10 [+0200], PulkoMandy <pulkomandy@xxxxxxxxx> wrote:
> I've been working on the cross tools for the locale kit. I would like
> to know if I got it right. Do these jamfiles look correct ?

Besides violating the 80 columns limit rule, they look OK.

> The liblocale won't build right now, it will fail in Collator.cpp
> because of missing BApplication::GetAppInfo in the host-side libbe. Is
> it possible to add this method easily, or should I separate the
> liblocale and build only a subset of it ? (I don't need the collator
> stuff in the cross tools, but GetAppInfo is also used in the catalogs
> I need... However, it's in a part of the code I don't use, so maybe I
> could manage to avoid it.

GetAppInfo() is easy to add, but less easy to implement. If I understand 
you correctly that it's used in a code path you don't need, then adding a 
stub that returns an error would be the easiest solution.

> Is there a way to detect the file is being
> built for host or target ? some #define for that ?
> Note : this patch is independant from the other one.

There are two sets of macros: HAIKU_HOST_PLATFORM_* and 
HAIKU_TARGET_PLATFORM_*. One of the former is always defined, identifying 
the host platform. One of the second set is defined when building for the 
target platform (i.e. not with BuildPlatform* rules). You could e.g. check 
for HAIKU_TARGET_PLATFORM_HAIKU.

CU, Ingo

Other related posts: