On Oct 3, 2014, at 8:52 PM, Mark Brethen wrote:

> If I have to set a variable using a shell script included in the 
> ${distfiles}, for example:
> 
> set builddir [exec ${worksrcpath}/scripts/findhost.sh [exec 
> ${worksrcpath}/config.guess]]
> 
> and the variable is used in both build and destroot phases, can I set it just 
> once? or do I have to set it twice? In other words can I make it a global 
> variable?

The tricky part is that phases can be run separately:

sudo port build theport
sudo port destroot theport

You want to make sure that that scenario works. So you either have to set it in 
each phase. If the script is time-consuming, you could optimize by making it a 
global variable and setting it only if it isn't set yet.


_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to