environment variables ...

Joshua Root jmr at macports.org
Mon Sep 30 08:08:11 PDT 2013


On 2013-10-1 00:17 , Peter Danecek wrote:
> 
> Hi all,
> 
> I am currently trying to setup a port. The "configure script" (not a standard GNU approach) does set makefile variables for CC, AR, PERL, etc., but does not respect the setting for environment variables.
> 
> During configure phase macports sets such environment variables, right? In particular I am aware of the ones for the compilers to use. However, searching the documentation I have not found a comprehensive. Does such a list appear in the documentation / Wiki somewhere? Can anyone provide some pointer?
> 
> I am particularly interested in
> - CC / CCFLAGS / linker 
> - PERL
> - RANDLIB / AR

It's fairly well documented in portfile(7) under CONFIGURE OPTIONS and
in the Guide: <http://guide.macports.org/#reference.phases.configure>.

As cal said you can directly check what's being passed by default by
looking at the debug log. When dealing with non-autotools build systems
you often need to use some different variable names though.

If anything's missing from the docs we would welcome patches. :-)
The configure environment is set up in portconfigure::configure_main:
<https://trac.macports.org/browser/trunk/base/src/port1.0/portconfigure.tcl#L625>
and some variables are added for all commands in command_exec:
<https://trac.macports.org/browser/trunk/base/src/port1.0/portutil.tcl#L356>

- Josh


More information about the macports-dev mailing list