From 2e32813e36ac9322a522b22502f7f1e7e6bf729a Mon Sep 17 00:00:00 2001 From: Michael Pyne Date: Sun, 9 Oct 2011 20:34:24 -0400 Subject: [PATCH] Start tracking a "build type". Not doing anything with this yet as I want to reduce handle_build() in size which will require further refactoring. --- kdesrc-build | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/kdesrc-build b/kdesrc-build index 72880d3..ecdaa2b 100755 --- a/kdesrc-build +++ b/kdesrc-build @@ -1544,6 +1544,7 @@ HOME my $module = { name => $name, scm_type => undef, + build_type => undef, phases => $phases, context => $ctx, options => $ctx->{build_options}{$name}, @@ -1672,6 +1673,31 @@ EOF $self->{scm_type} = $scmType; } + # Current possible build system types: + # KDE (i.e. cmake), Qt, l10n (KDE language buildsystem), autotools (either + # configure or autogen.sh). A final possibility is 'pendingSource' which + # simply means that we don't know yet. + # + # If the build system type is not set ('pendingSource' counts as being + # set!) when this function is called then it will be autodetected if + # possible, but note that not all possible types will be detected this way. + # If in doubt use setBuildSystemType + sub buildSystemType + { + my $self = shift; + + return $self->{build_type} if $self->{build_type}; + + # If it needs a repo it's git. Everything else is svn for now. + return $self->{build_type}; + } + + sub setBuildSystemType + { + my ($self, $buildType) = @_; + $self->{build_type} = $buildType; + } + sub buildContext { my $self = shift;