NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/55174: build.sh has trouble with CFLAGS on /etc/mk.conf if it was used "+=" instead of "="



The following reply was made to PR toolchain/55174; it has been noted by GNATS.

From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: toolchain/55174: build.sh has trouble with CFLAGS on
 /etc/mk.conf if it was used "+=" instead of "="
Date: Tue, 14 Apr 2020 15:29:10 +0300

 The netbsd guide and pkgsrc guide should tell to protect pkg-related
 settings with proper ifdefs.  I was pretty sure this is documented,
 but apparetnly it's not and is only in the lore.
 
 # /etc/mk.conf example
 .ifndef BSD_PKG_MK
 
 .if "${MACHINE_ARCH}" == "foo"
 CPUFLAGS = -mfancy-thing
 ...
 .endif
 
 .if "${MACHINE_ARCH}" == "bar"
 DBG = -Os
 ...
 .endif
 
 .else # pkgsrc
 
 PAPERSIZE=A4
 
 PKG_DEFAULT_OPTIONS = -doc
 
 PKG_OPTIONS.emacs = xaw
 PKG_OPTIONS.emacs += -dbus
 ...
 
 ACCEPTABLE_LICENSES+= free-as-in-beer
 ...
 
 .endif # pkgsrc
 
 -uwe
 


Home | Main Index | Thread Index | Old Index