On Wed, 26 Jun 2002, David Reid wrote: > We really need to get this autodetected as it's causing a few comments and > people to get annoyed... Is there an algorithm for this, or do you think of something simple like this: if $(OS) = BEOS { LIBGCCBASEDIRS = /boot/develop/tools/gnupro/lib/gcc-lib ; } else if $(OS) = LINUX { LIBGCCBASEDIRS = /usr/lib/gcc-lib /usr/local/lib/gcc-lib ; } # else... { # actually it should be something like #local libdirs = $(LIBGCCBASEDIRS)/$(OSTARGET)/$(GCCVERSION) ; # but I have no idea how to determine OSTARGET and GCCVERSION # (the latter is simple in theory: gcc -version, but can't be done # inside a Jambase/Jamfile). We could supply these variables to the # jam command though. Or we extend jam itself by a command invocation # rule. # work-around: # target local libdirs = [ GLOB $(LIBGCCBASEDIRS) : * ] ; # gcc version libdirs = [ GLOB $(libdirs) : * ] ; # filter those containing a libgcc.a local libs = [ GLOB $(libdirs) : libgcc.a ] ; libdirs = $(libs:D) ; # pick the first one?! LIBGCCDIR = $(libdirs[1]) ; } # ... use $(LIBGCCDIR)... Note: this uses the GLOB rule, which is a Jam 2.4 feature. > We also need a how-to for the build ASAP... Err, currently it would only contain `type: cd openbeos; jam'. Or do I miss something? Portability stuff? CU, Ingo