Subject: Re: custom CFLAGS not getting set
To: Jeremy C. Reed <>
From: Simon Gerraty <>
List: tech-pkg
Date: 12/02/2002 11:03:26
On Mon, 2 Dec 2002 10:38:45 -0800 (PST), "Jeremy C. Reed" writes:
>> Huh? is read before anything else, so Makefile settings should
>> not be impacted.  settings on the command line override anything, so
>> only CFLAGS set in the environment should be impacted?  Or is
>> something reading directly?

Yep pkgsrc/mk/ reads

# Preload all default values for CFLAGS, LDFLAGS, etc. before
# or a pkg Makefile modifies them.
.include <>

and does not protect itself from multiple inclusion and
is included by multiple *.mk: "../../mk/" Default: defaults for various machine_archs are set in mk/ Default: defaults for various machine_archs are set in mk/ "../../mk/" "../../mk/" exists(${.CURDIR}/mk/ "${.CURDIR}/mk/" exists(${.CURDIR}/../mk/ "${.CURDIR}/../mk/"        # exists(${.CURDIR}/../mk/        # exists(${.CURDIR}/mk/ "../../mk/" "../../mk/" "../../mk/" "../../mk/" "../../mk/" "../../mk/" "../../mk/" "../../mk/" "../../mk/"

This seems highly inefficient at best.

>I can provide entire 1835014 byte log (99889 bytes bzip2'd) of building
>simple net/gethost.

No need - the answer is above.  Changing will work around it,
but the fact that is getting read that many times is (I
suspect) a bug, the pkgsrc folk will likely know best why
allows multiple inclusion.