On Oct 12, 2014, at 4:53 PM, Rainer Müller <[email protected]> wrote:

> On 2014-10-12 22:16, Mark Brethen wrote:
>> How does one setup a portfile to do a 'make clean' before a 'make all'? I 
>> thought of using
>> 
>>    pre-build {        
>>        system -W ${somedir} "${build.cmd} clean"
>>    }
> 
> You can just give make both targets:
> 
> build.target clean all

Note that, as Ryan and I found out in #45274, GNU Make (at least) doesn't 
sequentially run command-line goals to completion if it's told to operate in 
parallel. So there's no guarantee that the "clean" target will finish before 
the "all" target starts.

https://trac.macports.org/ticket/45274

A somewhat uglier (but more reliable) fix would be to patch the makefile to 
make "clean" a dependency of "all".

vq
_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to