From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH OSSTEST v2 12/19] ts-kernel-build: Support --reuse to keep same build tree Date: Thu, 18 Jun 2015 17:25:03 +0100 Message-ID: <1434644710-28881-12-git-send-email-ian.campbell@citrix.com> References: <1434644687.28264.53.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1434644687.28264.53.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.jackson@eu.citrix.com Cc: Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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 --- ts-kernel-build | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ts-kernel-build b/ts-kernel-build index 4014a6c..55c8acf 100755 --- a/ts-kernel-build +++ b/ts-kernel-build @@ -22,6 +22,18 @@ use Osstest::TestSupport; 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(); @@ -35,6 +47,8 @@ my $archparms = { sub enable_xen_config (); sub checkout () { + return if $reuse; + prepbuilddirs(); build_clone($ho, 'linux', $builddir, 'linux'); -- 2.1.4