[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    [PATCH] Support for in-source builds in kdesvn-build
From:       Robert Zwerus <arzie () dds ! nl>
Date:       2008-09-26 15:52:42
Message-ID: 200809261752.43092.arzie () dds ! nl
[Download RAW message or body]

Hey people

I'd like to use kdesvn-build and Eclipse together. Unfortunately, Eclipse 
makes working with out-of-source builds a bit harder than necessary, so I opt 
for in-source builds.

I added support for it to the kdesvn-build script, a patch against the current 
SVN version is attached.

When it's okay with you, I'd like to commit it.
-- 
A Dieu,
 Robert Zwerus - WWW: http://www.arzie.net
 ICQ UIN: 3943443 - MSNM: robert_zwerus@hotmail.com

["kdesvn-build.with_insource-build.patch" (text/x-diff)]

Index: kdesvn-build
===================================================================
--- kdesvn-build	(revision 860408)
+++ kdesvn-build	(working copy)
@@ -313,6 +313,7 @@
     "binpath"             => $ENV{'PATH'},
     "branch"              => "",
     "build-dir"           => "build",
+    "insource-build"      => 0,
     "build-system-only"   => "",
     "checkout-only"       => "",
     "cmake-options"       => "",
@@ -856,11 +857,18 @@
     }
     else
     {
-        # Relative directory, tack it on to the end of $kdesvn.
+        # Relative directory, tack it on to the end of $kdesvn or $module/$kdesvn
+	# (for in-source builds).
         my $kdesvndir = get_kdesvn_dir();
-        $dir = "$kdesvndir/$dir";
+        if(get_option($module, 'insource-build') && $option eq "build-dir")
+        {
+            $dir = "$kdesvndir/$module/$dir";
+        }
+        else
+        {
+            $dir = "$kdesvndir/$dir";
+        }
     }
-
     return $dir;
 }
 
@@ -1377,9 +1385,17 @@
     my $type = shift;
     my $destdir = get_dest_dir($module);
     my $srcbase = get_kdesvn_dir();
+    my $combined;
     $srcbase = get_build_dir($module) if $type eq 'build';
 
-    my $combined = "$srcbase/$destdir";
+    if (get_option($module, 'insource-build') && $type eq "build")
+    {
+	    $combined = "$srcbase";
+    }
+    else
+    {
+	    $combined = "$srcbase/$destdir";
+    }
 
     # Remove dup //
     $combined =~ s/\/+/\//;
Index: kdesvn-buildrc-sample
===================================================================
--- kdesvn-buildrc-sample	(revision 860408)
+++ kdesvn-buildrc-sample	(working copy)
@@ -39,6 +39,11 @@
 # absolute path if you'd like (begin the path with a slash).
 #	build-dir build
 
+# This option controls whether the specified 'build-dir' is relative to the module
+# directory. If set to true, an in-source build is done, if set to false, the build
+# will be done out-of-source (default). 
+#	insource-build false
+
 # This is the directory that KDE will end up installed at.  The default is
 # appropriate for a single-user installation of KDE, which requires no root
 # permissions.  If you'd like, you can install and use the sudo program to
Index: kdesvn-buildrc.xml
===================================================================
--- kdesvn-buildrc.xml	(revision 860408)
+++ kdesvn-buildrc.xml	(working copy)
@@ -27,6 +27,7 @@
       <item>colorful-output</item>
       <item>debug</item>
       <item>disable-agent-check</item>
+      <item>insource-build</item>
       <item>manual-build</item>
       <item>manual-update</item>
       <item>no-svn</item>


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic