hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r449854 - in /lucene/hadoop/trunk: CHANGES.txt build.xml src/c++/libhdfs/Makefile src/c++/libhdfs/docs/Doxyfile
Date Mon, 25 Sep 2006 23:12:19 GMT
Author: cutting
Date: Mon Sep 25 16:12:18 2006
New Revision: 449854

URL: http://svn.apache.org/viewvc?view=rev&rev=449854
Log:
HADOOP-537.  Fix libhdfs build to create files in build/, not in the src tree.  Contributed
by Arun.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/build.xml
    lucene/hadoop/trunk/src/c++/libhdfs/Makefile
    lucene/hadoop/trunk/src/c++/libhdfs/docs/Doxyfile

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=449854&r1=449853&r2=449854
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Mon Sep 25 16:12:18 2006
@@ -69,6 +69,10 @@
     data, rather than only between copies, avoiding task timeouts.
     (Sanjay Dahiya via cutting)
 
+18. HADOOP-537.  Fix src/c++/libhdfs build process to create files in
+    build/, no longer modifying the source tree.
+    (Arun C Murthy via cutting)
+
 
 Release 0.6.2 (unreleased)
 

Modified: lucene/hadoop/trunk/build.xml
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/build.xml?view=diff&rev=449854&r1=449853&r2=449854
==============================================================================
--- lucene/hadoop/trunk/build.xml (original)
+++ lucene/hadoop/trunk/build.xml Mon Sep 25 16:12:18 2006
@@ -445,8 +445,8 @@
   <!-- ================================================================== -->
   <!-- Clean.  Delete the build files, and their directories              -->
   <!-- ================================================================== -->
-  <target name="clean" depends="clean-contrib, clean-libhdfs">
-    <delete dir="${build.dir}"/>
+  <target name="clean" depends="clean-contrib">
+  	<delete dir="${build.dir}"/>
   </target>
 
   <!-- ================================================================== -->
@@ -501,16 +501,22 @@
     </exec>
   </target>
 
-  <target name="doc-libhdfs">
+  <target name="doc-libhdfs" depends="compile-libhdfs">
 	<exec dir="${libhdfs.src}" executable="make">
 	  <arg value="doc"/>
 	</exec>
   </target>
 	
-  <target name="package-libhdfs" depends="compile-libhdfs, doc-libhdfs">
+  <target name="package-libhdfs" depends="compile-libhdfs, doc-libhdfs, package">
   	<mkdir dir="${dist.dir}/libhdfs"/>
   	<copy todir="${dist.dir}/libhdfs">
-  	  <fileset dir="${build.libhdfs}" followsymlinks="false"/>
+  	  <fileset dir="${build.libhdfs}" 
+  	  	casesensitive="yes" 
+  	  	followsymlinks="false">
+  	  	<exclude name="**/tests/**"/>
+  	  	<exclude name="*.so"/>
+  	  	<exclude name="*.o"/>
+  	  </fileset>
   	</copy>
   	<chmod perm="ugo+x" type="file">
   	    <fileset dir="${dist.dir}/libhdfs"/>

Modified: lucene/hadoop/trunk/src/c++/libhdfs/Makefile
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/c%2B%2B/libhdfs/Makefile?view=diff&rev=449854&r1=449853&r2=449854
==============================================================================
--- lucene/hadoop/trunk/src/c++/libhdfs/Makefile (original)
+++ lucene/hadoop/trunk/src/c++/libhdfs/Makefile Mon Sep 25 16:12:18 2006
@@ -25,47 +25,49 @@
 
 CC = gcc
 LD = gcc
-CFLAGS =  -m32 -g -W -fPIC
+CFLAGS =  -g -W -fPIC
 LDFLAGS = -L$(JAVA_HOME)/jre/lib/$(OS_ARCH)/server -ljvm -m32 -shared -Wl,-x 
-PLATFORM = `echo $$OS_NAME | tr [A-Z] [a-z]`
-LINC = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(PLATFORM)
-HDFS_TEST = hdfs_test
-HDFS_READ_TEST = hdfs_read
-HDFS_WRITE_TEST = hdfs_write
+PLATFORM = $(shell echo $$OS_NAME | tr [A-Z] [a-z])
+CPPFLAGS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(PLATFORM)
+
 LIB_NAME = hdfs
-SO_TARGET = lib$(LIB_NAME).so.$(SHLIB_VERSION)
-SO = lib$(LIB_NAME).so
-OBJS = hdfs.o
+SO_TARGET = $(LIBHDFS_BUILD_DIR)/lib$(LIB_NAME).so.$(SHLIB_VERSION)
+SO = $(LIBHDFS_BUILD_DIR)/lib$(LIB_NAME).so
+
 RM = rm -rf
 LINK = ln -sf
 DOXYGEN = doxygen
 
-all: $(SO_TARGET) $(HDFS_TEST) $(HDFS_READ_TEST) $(HDFS_WRITE_TEST)
+CSRC = \
+	hdfs.c \
+	$(NONE)
+
+COBJS = $(addprefix $(LIBHDFS_BUILD_DIR)/,$(patsubst %,%.o,$(basename $(CSRC))))
+
+HDFS_TEST = $(LIBHDFS_BUILD_DIR)/hdfs_test
+HDFS_READ_TEST = $(LIBHDFS_BUILD_DIR)/hdfs_read
+HDFS_WRITE_TEST = $(LIBHDFS_BUILD_DIR)/hdfs_write
 
-$(SO_TARGET): $(OBJS)
-	$(LD) $(LDFLAGS) -o $(SO_TARGET) -Wl,-soname,$(SO_TARGET) $(OBJS) \
-	&& $(LINK) $(SO_TARGET) $(SO) \
-	&& cp ./$(SO_TARGET) $(LIBHDFS_BUILD_DIR)/ \
-	&& $(LINK) $(LIBHDFS_BUILD_DIR)/$(SO_TARGET) $(LIBHDFS_BUILD_DIR)/$(SO)
+all: $(SO_TARGET) $(HDFS_TEST) $(HDFS_READ_TEST) $(HDFS_WRITE_TEST)
 
-$(OBJS): hdfs.c
-	$(CC) $(CFLAGS) $(LINC) -c hdfs.c
+$(SO_TARGET): $(COBJS)
+	$(LD) $(LDFLAGS) -o $(SO_TARGET) -Wl,-soname,$(SO_TARGET) $(COBJS) \
+	&& $(LINK) $(SO_TARGET) $(SO)
+	
+$(LIBHDFS_BUILD_DIR)/%.o: %.c
+	$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
 
 $(HDFS_TEST): hdfs_test.c
-	$(CC) $(HDFS_TEST).c $(LINC) -L. -l$(LIB_NAME) -m32 -o $(HDFS_TEST) \
-	&& cp $(HDFS_TEST) $(LIBHDFS_BUILD_DIR)/
+	$(CC) $(CPPFLAGS) $< -L$(LIBHDFS_BUILD_DIR) -l$(LIB_NAME) -o $@
 
 $(HDFS_READ_TEST): hdfs_read.c
-	$(CC) $(HDFS_READ_TEST).c $(LINC) -m32 -Wl,-rpath,. -L. -l$(LIB_NAME) -o $(HDFS_READ_TEST)
\
-	&& cp $(HDFS_READ_TEST) $(LIBHDFS_BUILD_DIR)/ 
+	$(CC) $(CPPFLAGS) $< -Wl,-rpath,. -L$(LIBHDFS_BUILD_DIR) -l$(LIB_NAME) -o $@ 
 
 $(HDFS_WRITE_TEST): hdfs_write.c
-	$(CC) $(HDFS_WRITE_TEST).c $(LINC) -m32 -Wl,-rpath,. -L. -l$(LIB_NAME) -o $(HDFS_WRITE_TEST)
\
-	&& cp $(HDFS_WRITE_TEST) $(LIBHDFS_BUILD_DIR)/ 
+	$(CC) $(CPPFLAGS) $< -Wl,-rpath,. -L$(LIBHDFS_BUILD_DIR) -l$(LIB_NAME) -o $@
 
 clean:
-	$(RM) *.o *.so* $(HDFS_TEST) $(HDFS_READ_TEST) $(HDFS_WRITE_TEST) \
-	$(LIBHDFS_BUILD_DIR)/* ./docs/api 
+	$(RM) $(LIBHDFS_BUILD_DIR)/* 
 
 doc:
 	$(DOXYGEN) docs/Doxyfile
@@ -74,3 +76,4 @@
 	./tests/test-libhdfs.sh	
 
 # vim: sw=4: ts=4: noet
+

Modified: lucene/hadoop/trunk/src/c++/libhdfs/docs/Doxyfile
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/c%2B%2B/libhdfs/docs/Doxyfile?view=diff&rev=449854&r1=449853&r2=449854
==============================================================================
--- lucene/hadoop/trunk/src/c++/libhdfs/docs/Doxyfile (original)
+++ lucene/hadoop/trunk/src/c++/libhdfs/docs/Doxyfile Mon Sep 25 16:12:18 2006
@@ -46,7 +46,7 @@
 # If a relative path is entered, it will be relative to the location 
 # where doxygen was started. If left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       = ./docs/api
+OUTPUT_DIRECTORY       = ../../../build/libhdfs/docs
 
 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
 # 4096 sub-directories (in 2 levels) under the output directory of each output 
@@ -622,7 +622,7 @@
 # If a relative path is entered the value of OUTPUT_DIRECTORY will be 
 # put in front of it. If left blank `html' will be used as the default path.
 
-HTML_OUTPUT            = html
+HTML_OUTPUT            = api 
 
 # The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
 # each generated HTML page (for example: .htm,.php,.asp). If it is left blank 



Mime
View raw message