Cleaning up after each compiled port



Reaction score: 24
Messages: 87

When using make install clean this will clean up the workdir of the port and its dependencies, once everything is installed.

Is there a way to do that after each individual port as well? So that once it is installed the workdir will be cleaned, before moving on to the next one? Maybe via some make.conf options that I currently don't seem to be able to find.

The background is that I am using ports on a very memory limited system, however I want to compile in memory, as it's running on flash cards.

I know I should probably do some cross compilation, but right now that's not really an option.



Reaction score: 444
Messages: 1,091

Other that understanding the build order and writing a script to build ports one at a time, there's no way to clean between commands other than use a proper building tool (which you can't because you're memory constrained).

Your other option is to build a repository on a powerful machine and install binaries from it onto the memory-constrained machine.