From owner-freebsd-ports Fri Jun 9 23:34:12 2000 Delivered-To: freebsd-ports@freebsd.org Received: from 200-191-152-54-as.acessonet.com.br (200-191-152-54-as.acessonet.com.br [200.191.152.54]) by hub.freebsd.org (Postfix) with ESMTP id 6F35C37B6FD for ; Fri, 9 Jun 2000 23:34:08 -0700 (PDT) (envelope-from lioux@uol.com.br) Received: (qmail 9622 invoked by uid 1001); 10 Jun 2000 06:34:27 -0000 From: lioux@uol.com.br Date: Sat, 10 Jun 2000 03:34:27 -0300 To: freebsd-ports@freebsd.org Subject: New directive proposal (CC_SAFE ?) Message-ID: <20000610033427.A7359@Fedaykin.here> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Dear Guys, (specially Satoshi:) Does the following make sense? The directive name needs polishing and the informational text too. However, does it cut it? At least, it might help decrease the amount of patching needed around. Besides, the best part, being optional. Furthermore, I really think -e should be avoided for both gmake and make. MAKE(1) -e Specify that environment values override macro assignments within makefiles for all variables. MAKE(1L) -e Give variables taken from the environment precedence over variables from makefiles. It might touch things we do not want touched. Just a thought. --- /usr/ports/Mk/bsd.port.mk Mon May 29 15:31:51 2000 +++ ./bsd.port.mk Sat Jun 10 03:29:29 2000 @@ -122,6 +122,9 @@ # compression. # USE_ZIP - Says that the port distfile uses zip, not tar w/[bg]zip # for compression. +# CC_SAFE - Makes sure that all references to CC and CXX +# safe. Whenever the port uses them, they refer +# to our CC and CXX definitions. # USE_NEWGCC - Says that the port requirest the latest gcc, either in # the system or installed from a port. # USE_GMAKE - Says that the port uses gmake. @@ -738,6 +741,19 @@ LIB_DEPENDS+= Xpm.4:${PORTSDIR}/graphics/xpm .if defined(PARALLEL_PACKAGE_BUILD) BUILD_DEPENDS+= ${X11BASE}/lib/libXm.a:${PORTSDIR}/x11-toolkits/Motif-dummy +.endif +.endif + +.if defined(CC_SAFE) +# does not use -e because I don't want to break +# other things in the makefile hierarchy of the +# the port. Who knows, maybe it can't be made CFLAGS safe. +# For example, x11-toolkits/jx. +.if defined(USE_GMAKE) +MAKE_ARGS+= CC="${CC}" CXX="${CXX}" +.else +MAKE_ENV+= CC="${CC}" CXX="${CXX}" +MAKE_ARGS+= -E CC -E CXX .endif .endif To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message