On Wed, 12 Feb 2020 at 22:26:24 -0500, Raymond E. Pasco wrote:
> On Mon Feb 10, 2020 at 9:10 AM, Aaron Bieber wrote:
> > It looks good to me. I'd like to pass in MODGO_FLAGS so we can have
> > verbose
> > info when DEBUG is set. Something like:
> > MAKE_ENV += GOFLAGS="${MODGO_FLAGS}"
> >
> > 
> > But it seems the "-p ${MAKE_JOBS}" bit from go.port.mk isn't getting
> > parsed
> > properly in this case.
> 
> Go is being a real pain here. It seems to want the syntax to be -p=1
> rather than -p 1 - however, it only cares to *enforce* this when it's in
> the GOFLAGS environment variable and not when it's regular command line
> flags, as MODGO_FLAGS ordinarily are by go.port.mk. The below diff to
> go.port.mk makes it work, and doesn't break the couple other lang/go
> ports I tried; combined with the attached port it respects the flags.
> 
> diff --git a/lang/go/go.port.mk b/lang/go/go.port.mk
> index 983c3990706..21bccbd7053 100644
> --- a/lang/go/go.port.mk
> +++ b/lang/go/go.port.mk
> @@ -67,7 +67,7 @@ MODGO_SETUP_WORKSPACE =       mkdir -p ${WRKSRC:H}; mv
> ${MODGO_SUBDIR} ${WRKSRC};
>  CATEGORIES +=          lang/go
>  
>  MODGO_BUILD_TARGET =   ${MODGO_BUILD_CMD} ${ALL_TARGET}
> -MODGO_FLAGS +=         -v -p ${MAKE_JOBS}
> +MODGO_FLAGS +=         -v -p=${MAKE_JOBS}
>  
>  .if empty(DEBUG)
>  # by default omit symbol table, debug information and DWARF symbol
> table
> 

Tested a few ports with this (dnscontrol, gopass, ogvt, go-tools and a few
others that set MODGO_FLAGS), no issues found.

OK abieber@

-- 
PGP: 0x1F81112D62A9ADCE / 3586 3350 BFEA C101 DB1A  4AF0 1F81 112D 62A9 ADCE

Reply via email to