Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jun 2000 03:34:27 -0300
From:      lioux@uol.com.br
To:        freebsd-ports@freebsd.org
Subject:   New directive proposal (CC_SAFE ?)
Message-ID:  <20000610033427.A7359@Fedaykin.here>

next in thread | raw e-mail | index | archive | help
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




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