Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jul 2002 15:18:45 -0300
From:      Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
To:        Alexey Zelkin <phantom@FreeBSD.ORG>
Cc:        freebsd-doc@FreeBSD.org
Subject:   Addition to porters-handbook (CC/CXX rule)
Message-ID:  <20020731181907.94567.qmail@exxodus.fedaykin.here>

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

--T4sUOijqQbZv57TR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

	This is a patch against porters-handbook
doc/en_US.ISO8859-1/books/porters-handbook/book.sgml

	I think we should add a section for both CC and CXX variables
just like the one we have for the CFLAGS one. After all, this is
de facto practice. It just was not documented yet.

	It will be good so that we can point ppl at documentation.
As always, please check tagging, text and grammar. I tested it but
who ever knows.

	Regards,

-- 
Mario S F Ferreira - DF - Brazil - "I guess this is a signature."
Computer Science Undergraduate | FreeBSD Committer | CS Developer
flames to beloved devnull@someotherworldbeloworabove.org
feature, n: a documented bug | bug, n: an undocumented feature

--T4sUOijqQbZv57TR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="patch-book.sgml"

--- book.sgml.orig	Wed Jul 31 14:13:34 2002
+++ book.sgml	Wed Jul 31 14:53:50 2002
@@ -5073,6 +5073,38 @@
       </sect1>
 
       <sect1>
+	<title>Respect both <makevar>CC</makevar> and
+	  <makevar>CXX</makevar></title>
+
+	<para>The port should respect both <makevar>CC</makevar>
+	  and <makevar>CXX</makevar> variables.  If it does not,
+	  please add <literal>NO_PACKAGE=ignores either cc or
+	  cxx</literal> to the <filename>Makefile</filename>.</para>
+
+	<para>An example of a <filename>Makefile</filename> respecting
+	  both <makevar>CC</makevar> and <makevar>CXX</makevar>
+	  variables follows.  Note the <makevar>?=</makevar>:</para>
+
+	<programlisting>CC ?= gcc</programlisting>
+	<programlisting>CXX ?= g++</programlisting>
+
+	<para>Here is an example which respects neither
+	  <makevar>CC</makevar> nor <makevar>CXX</makevar>
+	  variables:</para>
+      
+	<programlisting>CC = gcc</programlisting>
+	<programlisting>CXX = g++</programlisting>
+
+	<para>Both <makevar>CC</makevar> and <makevar>CFLAGS</makevar>
+	  variables can be defined on FreeBSD systems in
+	  <filename>/etc/make.conf</filename>.  The first example
+	  defines a value if it was not previously set in
+	  <filename>/etc/make.conf</filename>, preserving any
+	  system-wide definitions.  The second example clobbers
+	  anything previously defined.</para>
+      </sect1>
+
+      <sect1>
         <title>Respect <makevar>CFLAGS</makevar></title>
 
         <para>The port should respect the <makevar>CFLAGS</makevar> variable.

--T4sUOijqQbZv57TR--

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




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