This is very useful when iterating over kernel configurations, since
it avoids blowing away the build tree and all the existing built
objects. The Linux build system does the right thing when .config
changes and only rebuilds the affected bits.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
use Osstest::BuildSupport;
tsreadconfig();
+
+our $reuse = 0;
+while (@ARGV and $ARGV[0] =~ m/^-/) {
+ $_= shift @ARGV;
+ last if m/^--$/;
+ if (m/^--reuse$/) {
+ $reuse = 1;
+ } else {
+ die "$_ ?";
+ }
+}
+
selectbuildhost(\@ARGV);
builddirsprops();
sub enable_xen_config ();
sub checkout () {
+ return if $reuse;
+
prepbuilddirs();
build_clone($ho, 'linux', $builddir, 'linux');