Bläddra i källkod

HADOOP-1934. Replace spaces with underscores in the platform name so that
the c++ build works on Mac OS. (omalley)


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@581345 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 18 år sedan
förälder
incheckning
ff3e214aa3
2 ändrade filer med 9 tillägg och 1 borttagningar
  1. 3 0
      CHANGES.txt
  2. 6 1
      build.xml

+ 3 - 0
CHANGES.txt

@@ -218,6 +218,9 @@ Trunk (unreleased changes)
     HADOOP-1930.  Fix the blame for failed fetchs on the right host. (Arun C.
     Murthy via omalley)
 
+    HADOOP-1934.  Fix the platform name on Mac to use underscores rather than
+    spaces. (omalley)
+
   IMPROVEMENTS
 
     HADOOP-1908. Restructure data node code so that block sending and 

+ 6 - 1
build.xml

@@ -36,8 +36,13 @@
   <property name="build.examples" value="${build.dir}/examples"/>
   <property name="build.anttasks" value="${build.dir}/ant"/>
   <property name="build.libhdfs" value="${build.dir}/libhdfs"/>
+  <!-- convert spaces to _ so that mac os doesn't break things -->
+  <exec executable="sed" inputstring="${os.name}" 
+        outputproperty="nonspace.os">
+     <arg value="s/ /_/g"/>
+  </exec>
   <property name="build.platform" 
-            value="${os.name}-${os.arch}-${sun.arch.data.model}"/>
+            value="${nonspace.os}-${os.arch}-${sun.arch.data.model}"/>
   <property name="build.native" value="${build.dir}/native/${build.platform}"/>
   <property name="build.c++" value="${build.dir}/c++-build/${build.platform}"/>
   <property name="build.c++.utils" value="${build.c++}/utils"/>