sysdeftools/joinsysdef.pl
branchHighFidelityModel
changeset 414 f503e8553dd5
parent 413 9bcf6c827202
--- a/sysdeftools/joinsysdef.pl	Mon Sep 13 17:07:54 2010 +0100
+++ b/sysdeftools/joinsysdef.pl	Tue Sep 14 11:04:37 2010 +0100
@@ -774,7 +774,11 @@
 		{
 		$inc.=" -I$i";
 		}
-	open(CPP,"cpp -dD$inc \"$file\" 2>&1 |");
+	my $CPP = $ENV{"SBS_HOME"} . "/win32/mingw/bin/cpp.exe";
+
+	$CPP =~ s/\\/\//g;
+
+	open(CPP,"$CPP -dD$inc \"$file\" 2>&1 |");
 	while(<CPP>)
 		{
 		s/\s+$//;
@@ -791,7 +795,10 @@
 			s/^\s+//;
 			$defines{$1}=$_;
 			}
-		else {die "cannot process $_";}
+		else
+			{
+			die "cannot process $_";
+			}
 		}
 	close CPP;
 	$? && die "Call to cpp produced an error";