compile additional files after build

Rainer Müller raimue at macports.org
Wed Nov 10 17:56:46 PST 2010


On 2010-11-11 02:32 , Bradley Giesbrecht wrote:
> After build I need to:
> 
> cd ${worksrcpat}/driver
> /usr/bin/gcc blah blah
> 
> I'm currently doing:
> 
> post-build {
>    system "cd ${worksrcpath}/driver"
>    system "CC=/usr/bin/gcc \$CC -bundle ...."
> }

You should be using ${configure.cc} and also ${configure.cppflags},
${configure.cflags} and ${configure.ldflags} to get the arch correctly.
See also http://trac.macports.org/wiki/UsingTheRightCompiler

> Is there a better way?

> Does anyone have an example port that does something similar for me to  
> look at?

For example glxinfo or glxgears, although they replace the build phase
completely. afsctool also does something similar.

Rainer


More information about the macports-dev mailing list