You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by sb...@apache.org on 2010/01/22 23:44:40 UTC
svn commit: r902301 - in /hadoop/avro/trunk: CHANGES.txt build.sh
lang/c++/MainPage.dox lang/c++/build.sh lang/c++/config/install-sh
lang/c++/configure lang/c++/configure.in
Author: sbanacho
Date: Fri Jan 22 22:44:39 2010
New Revision: 902301
URL: http://svn.apache.org/viewvc?rev=902301&view=rev
Log:
AVRO-349. Fix C++ build for post-AVRO-163.
Added:
hadoop/avro/trunk/lang/c++/build.sh (with props)
Modified:
hadoop/avro/trunk/CHANGES.txt
hadoop/avro/trunk/build.sh
hadoop/avro/trunk/lang/c++/MainPage.dox
hadoop/avro/trunk/lang/c++/config/install-sh (props changed)
hadoop/avro/trunk/lang/c++/configure
hadoop/avro/trunk/lang/c++/configure.in
Modified: hadoop/avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=902301&r1=902300&r2=902301&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Fri Jan 22 22:44:39 2010
@@ -32,6 +32,8 @@
AVRO-344. Complete rewrite of C implementation (massie)
+ AVRO-349. Fix C++ build for post-AVRO-163. (sbanacho)
+
NEW FEATURES
AVRO-151. Validating Avro schema parser for C (massie)
Modified: hadoop/avro/trunk/build.sh
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/build.sh?rev=902301&r1=902300&r2=902301&view=diff
==============================================================================
--- hadoop/avro/trunk/build.sh (original)
+++ hadoop/avro/trunk/build.sh Fri Jan 22 22:44:39 2010
@@ -43,7 +43,7 @@
(cd lang/java; ant test)
(cd lang/py; ant test)
(cd lang/c; ./build.sh test)
- # (cd lang/c++; make test)
+ (cd lang/c++; ./build.sh test)
# (cd lang/ruby; rake test)
# create interop test data
@@ -77,10 +77,9 @@
(cd lang/py; ant dist)
- # (cd lang/c; make dist)
- (cd lang/c; ./build.sh dist)
+ #(cd lang/c; ./build.sh dist)
- # (cd lang/c++; make dist)
+ (cd lang/c++; ./build.sh dist)
# build docs
(cd doc; ant)
@@ -95,10 +94,9 @@
(cd lang/py; ant clean)
- # (cd lang/c; make clean)
- (cd lang/c; ./build.sh clean)
+ (cd lang/c; ./build.sh clean)
- # (cd lang/c++; make clean)
+ (cd lang/c++; ./build.sh clean)
;;
*)
Modified: hadoop/avro/trunk/lang/c++/MainPage.dox
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/c%2B%2B/MainPage.dox?rev=902301&r1=902300&r2=902301&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/c++/MainPage.dox (original)
+++ hadoop/avro/trunk/lang/c++/MainPage.dox Fri Jan 22 22:44:39 2010
@@ -241,11 +241,8 @@
std::istringstream is(myData);
avro::Istreamer istreamer(is);
- // ValidatingReader is the object that will do the actual I/O
- avro::ValidatingReader reader(istreamer);
-
// Manually parse data, the Parser object binds the data to the schema
- avro::Parser<ValidatingReader> parser(mySchema, reader);
+ avro::Parser<ValidatingReader> parser(mySchema, istreamer);
assert( parser.nextType() == AVRO_READER);
@@ -350,8 +347,8 @@
compatible, because floats are promotable to doubles. As long as
both the old and the new schemas are available, a dynamic parser may
be created that reads the data to the code generated structure.</P>
-<PRE>void dynamicCast(const avro::ValidSchema &writerSchema,
- const avro::ValidSchema &readerSchema) {
+<PRE>void dynamicParse(const avro::ValidSchema &writerSchema,
+ const avro::ValidSchema &readerSchema) {
// Instantiate the Layout object
Math::complex_Layout layout;
Added: hadoop/avro/trunk/lang/c++/build.sh
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/c%2B%2B/build.sh?rev=902301&view=auto
==============================================================================
--- hadoop/avro/trunk/lang/c++/build.sh (added)
+++ hadoop/avro/trunk/lang/c++/build.sh Fri Jan 22 22:44:39 2010
@@ -0,0 +1,132 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e # exit on error
+
+cd `dirname "$0"` # connect to root
+
+VERSION=`cat ../../share/VERSION.txt`
+
+root_dir=$(pwd)
+build_dir="../../build/avro-cpp-$VERSION"
+dist_dir="../../dist"
+doc_dir="../../build/avro-doc-$VERSION/api/cpp"
+
+tarfile=avro-cpp-$VERSION.tar.gz
+
+set -x # echo commands
+
+for target in "$@"
+do
+
+function do_autoreconf {
+ autoreconf -f -i
+}
+
+function check_dir {
+ if [ ! -d $1 ]; then
+ mkdir -p $1
+ fi
+ if [ ! -d $1 ]; then
+ exit 1
+ fi
+}
+
+function do_configure {
+
+ do_autoreconf
+
+ check_dir $build_dir
+
+ if [ ! -f $build_dir/Makefile ]; then
+ (cd $build_dir && $root_dir/configure)
+ fi
+
+ if [ ! -f $build_dir/Makefile ]; then
+ exit 1
+ fi
+}
+
+function do_build {
+ (cd $build_dir && make)
+ (cd $build_dir && make check)
+}
+
+function do_docs {
+ check_dir $doc_dir
+ (cd $build_dir && make doc)
+ if [ ! -f $build_dir/doc/html/index.html ]; then
+ exit 1
+ fi
+ cp -rf $build_dir/doc/html/* $doc_dir/
+}
+
+function do_tar_file {
+ check_dir $dist_dir
+ (cd $build_dir && make dist)
+ if [ ! -f $build_dir/$tarfile ]; then
+ exit 1
+ fi
+ cp -f $build_dir/$tarfile $dist_dir/$tarfile
+ md5sum $dist_dir/$tarfile > $dist_dir/$tarfile.md5
+}
+
+function do_dist {
+ (cd $build_dir && make)
+ (cd $build_dir && make check)
+ do_docs
+ do_tar_file
+}
+
+function do_clean {
+
+ if [ -d $build_dir ]; then
+ rm -rf $build_dir
+ fi
+ if [ -d $doc_dir ]; then
+ rm -rf $doc_dir
+ fi
+ rm -rf $dist_dir/$tarfile
+ rm -rf $dist_dir/$tarfile.md5
+
+}
+
+case "$target" in
+
+
+ test)
+ do_configure
+ do_build
+ ;;
+
+ dist)
+ #do_configure
+ do_dist
+ ;;
+
+ clean)
+ do_clean
+ ;;
+
+ *)
+ echo "Usage: $0 {test|dist|clean}"
+ exit 1
+esac
+
+done
+
+exit 0
Propchange: hadoop/avro/trunk/lang/c++/build.sh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: hadoop/avro/trunk/lang/c++/build.sh
------------------------------------------------------------------------------
svn:executable = *
Propchange: hadoop/avro/trunk/lang/c++/config/install-sh
------------------------------------------------------------------------------
svn:executable = *
Modified: hadoop/avro/trunk/lang/c++/configure
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/c%2B%2B/configure?rev=902301&r1=902300&r2=902301&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/c++/configure (original)
+++ hadoop/avro/trunk/lang/c++/configure Fri Jan 22 22:44:39 2010
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for avro 1.2.
+# Generated by GNU Autoconf 2.61 for avro-cpp 1.2.0-dev.
#
# Report bugs to <av...@apache.org>.
#
@@ -726,10 +726,10 @@
SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
-PACKAGE_NAME='avro'
-PACKAGE_TARNAME='avro'
-PACKAGE_VERSION='1.2'
-PACKAGE_STRING='avro 1.2'
+PACKAGE_NAME='avro-cpp'
+PACKAGE_TARNAME='avro-cpp'
+PACKAGE_VERSION='1.2.0-dev'
+PACKAGE_STRING='avro-cpp 1.2.0-dev'
PACKAGE_BUGREPORT='avro-devel@apache.org'
ac_unique_file="api/AvroParse.hh"
@@ -1403,7 +1403,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures avro 1.2 to adapt to many kinds of systems.
+\`configure' configures avro-cpp 1.2.0-dev to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1451,7 +1451,7 @@
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/avro]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/avro-cpp]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1473,7 +1473,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of avro 1.2:";;
+ short | recursive ) echo "Configuration of avro-cpp 1.2.0-dev:";;
esac
cat <<\_ACEOF
@@ -1592,7 +1592,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-avro configure 1.2
+avro-cpp configure 1.2.0-dev
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1606,7 +1606,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by avro $as_me 1.2, which was
+It was created by avro-cpp $as_me 1.2.0-dev, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2295,8 +2295,8 @@
# Define the identity of the package.
- PACKAGE='avro'
- VERSION='1.2'
+ PACKAGE='avro-cpp'
+ VERSION='1.2.0-dev'
cat >>confdefs.h <<_ACEOF
@@ -23022,7 +23022,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by avro $as_me 1.2, which was
+This file was extended by avro-cpp $as_me 1.2.0-dev, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -23069,7 +23069,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-avro config.status 1.2
+avro-cpp config.status 1.2.0-dev
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Modified: hadoop/avro/trunk/lang/c++/configure.in
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/c%2B%2B/configure.in?rev=902301&r1=902300&r2=902301&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/c++/configure.in (original)
+++ hadoop/avro/trunk/lang/c++/configure.in Fri Jan 22 22:44:39 2010
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT([avro], [1.2], [avro-devel@apache.org])
+AC_INIT([avro-cpp], m4_esyscmd([cat ../../share/VERSION.txt]), [avro-devel@apache.org])
AC_CONFIG_AUX_DIR([config])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([api/AvroParse.hh])