Add a section on CC/CXX variables

Submitted by:	lioux
This commit is contained in:
Marc Fonvieille 2002-07-31 18:59:33 +00:00
parent 61183a1872
commit a20fc70d60
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=13757

View file

@ -5072,6 +5072,38 @@ drweb:*:426:426:Dr.Web Mail Scanner:/nonexistent:/sbin/nologin</programlisting>
+= --prefix=&dollar;{PREFIX}</literal>.</para>
</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>