Author: jfrederic.clere(a)jboss.com
Date: 2008-01-29 10:27:45 -0500 (Tue, 29 Jan 2008)
New Revision: 1308
Added:
trunk/build/windows/cut_path.sh
Modified:
trunk/build/windows/build.bat
Log:
Improve the detection of bufferoverflowu.lib.
Modified: trunk/build/windows/build.bat
===================================================================
--- trunk/build/windows/build.bat 2008-01-28 17:32:15 UTC (rev 1307)
+++ trunk/build/windows/build.bat 2008-01-29 15:27:45 UTC (rev 1308)
@@ -141,11 +141,17 @@
:cmdBuild
-@for /F %%i IN ('echo %INCLUDE%') DO (
+echo %INCLUDE% > cut_path.dat
+bash cut_path.sh
+call cut_path.bat
+@for %%i IN (%cut_path%) DO (
@if exist "%%i\PRE64PRA.H" set INCLUDE_PRE64PRA=1
)
-@for /F %%i IN ('echo %LIB%') DO (
+echo %LIB% > cut_path.dat
+bash cut_path.sh
+call cut_path.bat
+@for %%i IN (%cut_path%) DO (
@if exist "%%i\bufferoverflowu.lib" set INCLUDE_BUFFEROVERFLOWU=1
)
Added: trunk/build/windows/cut_path.sh
===================================================================
--- trunk/build/windows/cut_path.sh (rev 0)
+++ trunk/build/windows/cut_path.sh 2008-01-29 15:27:45 UTC (rev 1308)
@@ -0,0 +1,35 @@
+#!/bin/sh
+# Copyright(c) 2008 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+#
+
+#
+# Helper to cut a windoze path like value in the "" list.
+c=""
+for a in `cat cut_path.dat | sed 's: :|:g' | sed 's:;: :g'`
+do
+ b=`echo $a | sed 's:|: :g'`
+ echo $b
+ c=${c}`echo "\"$b\" "`
+done
+echo "set cut_path=$c" > cut_path.bat
+chmod a+x cut_path.bat