make clean preceding make all

Ryan Schmidt ryandesign at macports.org
Mon Oct 13 14:13:13 PDT 2014


On Oct 12, 2014, at 3:16 PM, 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"
>    }

Usually one doesn't want to do this, but in the unusual situation where the distributed tarball includes incorrect pre-built content (e.g. a distfile distributed with already-build Linux object files, which I've encountered once...), your pre-build block above is a fine way to accomplish it. It also gives you a good place to insert a comment about why you're doing this.




More information about the macports-dev mailing list