build/jam: use ARFLAGS if set

Combined with a buildtools CL, this will change the AR variable
to be more in line with conventions, where AR points at the binary and
ARFLAGS are the arguments to AR, while keeping compatibility with the
original style of using the AR variable.

Change-Id: I2b9797b9e5ab35929970487b3d1b8dddb9476c1f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3227
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
Puck Meerburg 2020-09-16 13:10:27 +00:00 committed by Adrien Destugues
parent a99ae7f4a5
commit df63c15b9b

View File

@ -194,6 +194,7 @@ if $(HAIKU_HOST_USE_32BIT) = 1 {
# save jam's variables for the build platform
HOST_AR ?= $(AR) ;
HOST_ARFLAGS ?= $(ARFLAGS) ;
HOST_CC ?= $(CC) ;
HOST_C++ ?= $(HOST_CC) ;
HOST_LINK ?= $(HOST_CC) ;
@ -210,7 +211,7 @@ HOST_HDRS ?= $(HDRS) ;
# split up HOST_AR into the command name and flags
HOST_AR = [ Match "([^ ]*) *(.*)" : $(HOST_AR[1]) ]
$(HOST_AR[2-]) ;
HOST_ARFLAGS = $(HOST_AR[2-]) ;
HOST_ARFLAGS = $(HOST_AR[2-]) $(HOST_ARFLAGS) ;
HOST_AR = $(HOST_AR[1]) ;
HOST_UNARFLAGS ?= x ;