diff --git a/share/mk/bsd.compat.mk b/share/mk/bsd.compat.mk --- a/share/mk/bsd.compat.mk +++ b/share/mk/bsd.compat.mk @@ -3,7 +3,7 @@ .if !targets(__<${_this:T}>__) __<${_this:T}>__: -_ALL_LIBCOMPATS:= 32 +.include .if defined(_LIBCOMPATS) COMPAT_ARCH?= ${TARGET_ARCH} diff --git a/share/mk/bsd.compat.pre.mk b/share/mk/bsd.compat.pre.mk new file mode 100644 --- /dev/null +++ b/share/mk/bsd.compat.pre.mk @@ -0,0 +1,13 @@ +.if !targets(__<${_this:T}>__) +__<${_this:T}>__: + +_ALL_LIBCOMPATS:= 32 + +_ALL_libcompats:= ${_ALL_LIBCOMPATS:tl} + +# List of LIBCOMPAT libcompat pairs to avoid repeating this ugly expression. +# Can be used as: .for LIBCOMPAT libcompat in ${_ALL_LIBCOMPATS_libcompats} +_ALL_LIBCOMPATS_libcompats:= \ + ${_ALL_LIBCOMPATS:range:@i@${_ALL_LIBCOMPATS:[$i]} ${_ALL_libcompats:[$i]}@} + +.endif