Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jan 2000 23:22:21 -0800 (PST)
From:      reg@shale.csir.co.za
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/16343: bsd.port.mk cannot override make.conf.
Message-ID:  <200001250722.XAA57310@granite.hip.berkeley.edu>

next in thread | raw e-mail | index | archive | help

>Number:         16343
>Category:       ports
>Synopsis:       bsd.port.mk cannot override make.conf.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 24 23:30:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Jeremy Lea
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Arb's Inc.
>Environment:

	Standard bsd.port.mk, and /usr/share/mk/*.  CFLAGS set in
	/etc/make.conf.

>Description:

	bsd.port.mk tries to pass CFLAGS to a port's distribution Makefile
	via MAKE_ENV, but any CFLAGS set in the system makefiles (including
	/etc/make.conf) override the the environment.

>How-To-Repeat:

	Try to do a 'CFLAGS+= -DJUNK' in port makefile with CFLAGS set in
	make.conf and see it not appear in the commandline in the port.

>Fix:

	Setting CFLAGS in MAKE_ARGS or passing '-e' in MAKE_FLAGS prevents
	the port's makefile from adding to CFLAGS; so this is not a
	solution.

	There are four possible solutions I can think of:

	1.  Ensure that sytem makefiles always use ?= instead of =, and
	change sys.mk to include /etc/make.conf then /etc/defaults/make.conf
	first rather than last.

	2.  Have a flag passed in MAKE_ENV and checked in sys.mk to prevent
	the inclusion of /etc/make.conf.

	3.  Have a copy of sys.mk which is non-FreeBSD specific in
	/usr/ports/Mk/ and add '-m ${PORTSDIR}/Mk' to MAKE_FLAGS in
	bsd.port.mk.

	4.  Change make(1) to have an additional flag like -e which would
	cause environment variables to overright anything set in the system
	makefiles.

	This is a bookmark PR so that this isn't forgotten.

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001250722.XAA57310>