[Bf-committers] Tinderbox with autotools hack

LarstiQ bf-committers@blender.org
Wed, 15 Jan 2003 02:40:08 +0100


--p4qYPpj5QlsIQJ0K
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline

Before I go to sleep, I provide a slightly reworked patch. It now
defaults to the traditional build system, sends in a description of
which system is used, but doesn't yet use a configuration file.

I'm not committing this at this hour, and I'd like to know what
$BuildClassic was used for, it looks a bit senseless right now, and
mayb be fir for recycling.

If no one comments overnight, I'll commit it first thing in the morning.

LarstiQ

--p4qYPpj5QlsIQJ0K
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment; filename="tinderbox-blender.diff"

Index: intern/tools/tinderbox/tinderbox-blender.pl
===================================================================
RCS file: /cvsroot/bf-blender/blender/intern/tools/tinderbox/tinderbox-blender.pl,v
retrieving revision 1.9
diff -u -b -B -r1.9 tinderbox-blender.pl
--- intern/tools/tinderbox/tinderbox-blender.pl	14 Jan 2003 21:41:02 -0000	1.9
+++ intern/tools/tinderbox/tinderbox-blender.pl	15 Jan 2003 01:31:51 -0000
@@ -85,6 +85,8 @@
     $ReportStatus = 1;  # Send results to server or not
     $BuildOnce = 0;     # Build once, don't send results to server
     $BuildClassic = 0;  # Build classic source
+    $BuildAutotools = 0;# Build with the autotools
+    $BuildType = 'traditional'; # Description for the traditional build
 
     #relative path to binary
 	if ($UNAME eq 'Darwin') {
@@ -106,6 +108,10 @@
 #		$BinaryName{'blenderplugin'} = 'npBlender3DPlugin.so';
 #		$BinaryName{'blenderpluginXPCOM'} = 'Blender3DPlugin.so';
 	}
+	if ($BuildAutotools) {
+		$BinaryName{'blendercreator'} = 'blender';
+		$BuildType = 'autotoolized';
+	}
 
     # Set these to what makes sense for your system
 	if ($UNAME eq 'FreeBSD') {
@@ -297,7 +303,11 @@
 
 	# Set GuessConfig and ConfigGuess
 	print LOG "ConfigGuess = $ConfigGuess\n";
+	if ($BuildAutotools) {
+		$BuildObjDir = "$ENV{'HOME'}/develop/";
+	} else {
 	$BuildObjDir = "$ENV{'HOME'}/develop/blender/obj/";
+	}
 	open (GETOBJ, "$ConfigGuess 2>&1 |") || die "$ConfigGuess: $!\n";
 	while (<GETOBJ>) {
 	    $GuessConfig = $_;
@@ -320,6 +330,16 @@
 		close(PULL);
 	}
 
+	if ($BuildAutotools) {
+		chdir("blender") || die "chdir(blender): $!\n";
+		print `pwd` . " -> chdir(blender)\n";
+		system("./bootstrap");
+		$Topsrcdir = $BuildObjName;
+		mkdir($Topsrcdir, 0777);
+		chdir($Topsrcdir) || die "chdir($Topsrcdir): $1\n";
+		print `pwd` . " -> chdir($Topsrcdir)\n";
+		system("../blender/configure");
+	} else {
 	chdir($Topinterndir) || die "chdir($Topinterndir): $!\n";
 	print `pwd` . " -> chdir($Topinterndir)\n";
 
@@ -338,6 +358,7 @@
 
 	chdir($Topsrcdir) || die "chdir($Topsrcdir): $!\n";
 	print `pwd` . " -> chdir($Topsrcdir)\n";
+	}
 
 	@felist = split(/,/, $FE);
 
@@ -415,7 +436,7 @@
 	    print LOG "tinderbox: tree: $BuildTree\n";
 	    print LOG "tinderbox: builddate: $StartTime\n";
 	    print LOG "tinderbox: status: $BuildStatusStr\n";
-	    print LOG "tinderbox: build: $BuildName ($Hostname) $fe\n";
+	    print LOG "tinderbox: build: $BuildName ($Hostname) $BuildType $fe\n";
 	    print LOG "tinderbox: errorparser: unix\n";
 	    print LOG "tinderbox: buildfamily: unix\n";
 	    print LOG "tinderbox: END\n\n";	    
@@ -519,7 +540,7 @@
 		print $fh "tinderbox: tree: $BuildTree\n";
 		print $fh "tinderbox: builddate: $StartTime\n";
 		print $fh "tinderbox: status: building\n";
-		print $fh "tinderbox: build: $BuildName ($Hostname) $fe\n";
+		print $fh "tinderbox: build: $BuildName ($Hostname) $BuildType $fe\n";
 		print $fh "tinderbox: errorparser: unix\n";
 		print $fh "tinderbox: buildfamily: unix\n";
 		print $fh "tinderbox: END\n";

--p4qYPpj5QlsIQJ0K--