Monday, June 01, 2020

Re: games/ioquake3 cvs current diffs adding ppc support

On Mon, Jun 01, 2020 at 09:38:32AM +0200, Landry Breuil wrote:
> On Mon, Jun 01, 2020 at 09:27:25AM +0200, Charlene Wendling wrote:
> > On Mon, 1 Jun 2020 05:24:19 +0200
> > Alex Free wrote:
> <snip>
>
> > +.if ${MACHINE_ARCH} == "powerpc"
> > +QUAKE_ARCH= ppc
> > +.else
> > QUAKE_ARCH= ${ARCH:S/amd64/x86_64/:S/i386/x86/}
> > +.endif
> > SUBST_VARS+= QUAKE_ARCH
>
> Cosmetic comment here: i think instead of the .if .else dance, you can
> probably append :S/macppc/ppc to the existing QUAKE_ARCH assignation,
> since you already something similar in the patch-Makefile...
>
> other than that it also looks good to me.
>
>
I tend to prefer look-up tables for that, and with make internals they're even
slightly more efficient

QUAKE_ARCH-amd64 = x86_64
QUAKE_ARCH-i386 = x86
QUAKE_ARCH-powerpc = ppc
QUAKE_ARCH-${MACHINE_ARCH} ?= ${MACHINE_ARCH}
QUAKE_ARCH = ${QUAKE_ARCH-${MACHINE_ARCH}}

No comments:

Post a Comment