compile additional files after build

Ryan Schmidt ryandesign at macports.org
Wed Nov 10 20:12:53 PST 2010


On Nov 10, 2010, at 19: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 ...."
> }
> 
> 
> Is there a better way?
> 
> Does anyone have an example port that does something similar for me to look at?

That's one way to do it (bearing in mind Rainer's improvements).
Another idea is to write your own Makefile, which itself calls the original Makefile and also does as many additional things as you need it to.
Most recently I've done this for the port convertlit (which just needed "make" to be run in two different directories).




More information about the macports-dev mailing list