Permalink
Browse files

Thrift-857: tests run by "make install" fail if generators are disabled

Client: build
Patch: jfarrell

removes --enable-gen* from configure and adds all generators by default.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1173436 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 18784d7 commit dec8c54f8e30f9b8cddcf6069647eb03ffb06d83 @jfarrell jfarrell committed Sep 21, 2011
Showing with 20 additions and 111 deletions.
  1. +0 −15 aclocal/ax_thrift_internal.m4
  2. +20 −57 compiler/cpp/Makefile.am
  3. +0 −39 configure.ac
View
15 aclocal/ax_thrift_internal.m4
@@ -15,21 +15,6 @@ dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright
dnl notice and this notice are preserved.
-AC_DEFUN([AX_THRIFT_GEN],
- [
- AC_ARG_ENABLE([gen-$1],
- AC_HELP_STRING([--enable-gen-$1], [enable the $2 compiler @<:@default=$3@:>@]),
- [ax_thrift_gen_$1="$enableval"],
- [ax_thrift_gen_$1=$3]
- )
- if test "x$ax_thrift_gen_$1" = "xyes" ; then
- thrift_generators="$thrift_generators $1"
- fi
- dnl I'd like to run the AM_CONDITIONAL here, but automake likes
- dnl all AM_CONDITIONALs to be nice and explicit in configure.ac.
- dnl AM_CONDITIONAL([THRIFT_GEN_$1], [test "$ax_thrift_gen_$1" = "yes"])
- ])
-
AC_DEFUN([AX_THRIFT_LIB],
[
AC_ARG_WITH($1,
View
77 compiler/cpp/Makefile.am
@@ -61,63 +61,26 @@ thrift_SOURCES = src/main.cc \
src/generate/t_generator.h \
src/generate/t_oop_generator.h
-if THRIFT_GEN_c_glib
-thrift_SOURCES += src/generate/t_c_glib_generator.cc
-endif
-if THRIFT_GEN_cpp
-thrift_SOURCES += src/generate/t_cpp_generator.cc
-endif
-if THRIFT_GEN_java
-thrift_SOURCES += src/generate/t_java_generator.cc
-endif
-if THRIFT_GEN_as3
-thrift_SOURCES += src/generate/t_as3_generator.cc
-endif
-if THRIFT_GEN_csharp
-thrift_SOURCES += src/generate/t_csharp_generator.cc
-endif
-if THRIFT_GEN_py
-thrift_SOURCES += src/generate/t_py_generator.cc
-endif
-if THRIFT_GEN_rb
-thrift_SOURCES += src/generate/t_rb_generator.cc
-endif
-if THRIFT_GEN_perl
-thrift_SOURCES += src/generate/t_perl_generator.cc
-endif
-if THRIFT_GEN_php
-thrift_SOURCES += src/generate/t_php_generator.cc
-endif
-if THRIFT_GEN_erl
-thrift_SOURCES += src/generate/t_erl_generator.cc
-endif
-if THRIFT_GEN_cocoa
-thrift_SOURCES += src/generate/t_cocoa_generator.cc
-endif
-if THRIFT_GEN_st
-thrift_SOURCES += src/generate/t_st_generator.cc
-endif
-if THRIFT_GEN_ocaml
-thrift_SOURCES += src/generate/t_ocaml_generator.cc
-endif
-if THRIFT_GEN_hs
-thrift_SOURCES += src/generate/t_hs_generator.cc
-endif
-if THRIFT_GEN_xsd
-thrift_SOURCES += src/generate/t_xsd_generator.cc
-endif
-if THRIFT_GEN_html
-thrift_SOURCES += src/generate/t_html_generator.cc
-endif
-if THRIFT_GEN_js
-thrift_SOURCES += src/generate/t_js_generator.cc
-endif
-if THRIFT_GEN_javame
-thrift_SOURCES += src/generate/t_javame_generator.cc
-endif
-if THRIFT_GEN_go
-thrift_SOURCES += src/generate/t_go_generator.cc
-endif
+# Specific client generator source
+thrift_SOURCES += src/generate/t_c_glib_generator.cc \
+ src/generate/t_cpp_generator.cc \
+ src/generate/t_java_generator.cc \
+ src/generate/t_as3_generator.cc \
+ src/generate/t_csharp_generator.cc \
+ src/generate/t_py_generator.cc \
+ src/generate/t_rb_generator.cc \
+ src/generate/t_perl_generator.cc \
+ src/generate/t_php_generator.cc \
+ src/generate/t_erl_generator.cc \
+ src/generate/t_cocoa_generator.cc \
+ src/generate/t_st_generator.cc \
+ src/generate/t_ocaml_generator.cc \
+ src/generate/t_hs_generator.cc \
+ src/generate/t_xsd_generator.cc \
+ src/generate/t_html_generator.cc \
+ src/generate/t_js_generator.cc \
+ src/generate/t_javame_generator.cc \
+ src/generate/t_go_generator.cc
thrift_CPPFLAGS = -I$(srcdir)/src
thrift_CXXFLAGS = -Wall
View
39 configure.ac
@@ -409,45 +409,6 @@ if false ; then
AC_FUNC_ERROR_AT_LINE
fi
-AX_THRIFT_GEN(cpp, [C++], yes)
-AM_CONDITIONAL([THRIFT_GEN_cpp], [test "$ax_thrift_gen_cpp" = "yes"])
-AX_THRIFT_GEN(c_glib, [C (GLib)], yes)
-AM_CONDITIONAL([THRIFT_GEN_c_glib], [test "$ax_thrift_gen_c_glib" = "yes"])
-AX_THRIFT_GEN(java, [Java], yes)
-AM_CONDITIONAL([THRIFT_GEN_java], [test "$ax_thrift_gen_java" = "yes"])
-AX_THRIFT_GEN(as3, [AS3], yes)
-AM_CONDITIONAL([THRIFT_GEN_as3], [test "$ax_thrift_gen_as3" = "yes"])
-AX_THRIFT_GEN(csharp, [C#], yes)
-AM_CONDITIONAL([THRIFT_GEN_csharp], [test "$ax_thrift_gen_csharp" = "yes"])
-AX_THRIFT_GEN(py, [Python], yes)
-AM_CONDITIONAL([THRIFT_GEN_py], [test "$ax_thrift_gen_py" = "yes"])
-AX_THRIFT_GEN(rb, [Ruby], yes)
-AM_CONDITIONAL([THRIFT_GEN_rb], [test "$ax_thrift_gen_rb" = "yes"])
-AX_THRIFT_GEN(perl, [Perl], yes)
-AM_CONDITIONAL([THRIFT_GEN_perl], [test "$ax_thrift_gen_perl" = "yes"])
-AX_THRIFT_GEN(php, [PHP], yes)
-AM_CONDITIONAL([THRIFT_GEN_php], [test "$ax_thrift_gen_php" = "yes"])
-AX_THRIFT_GEN(erl, [Erlang], yes)
-AM_CONDITIONAL([THRIFT_GEN_erl], [test "$ax_thrift_gen_erl" = "yes"])
-AX_THRIFT_GEN(cocoa, [Cocoa], yes)
-AM_CONDITIONAL([THRIFT_GEN_cocoa], [test "$ax_thrift_gen_cocoa" = "yes"])
-AX_THRIFT_GEN(st, [Smalltalk], yes)
-AM_CONDITIONAL([THRIFT_GEN_st], [test "$ax_thrift_gen_st" = "yes"])
-AX_THRIFT_GEN(ocaml, [OCaml], yes)
-AM_CONDITIONAL([THRIFT_GEN_ocaml], [test "$ax_thrift_gen_ocaml" = "yes"])
-AX_THRIFT_GEN(hs, [Haskell], yes)
-AM_CONDITIONAL([THRIFT_GEN_hs], [test "$ax_thrift_gen_hs" = "yes"])
-AX_THRIFT_GEN(xsd, [XSD], yes)
-AM_CONDITIONAL([THRIFT_GEN_xsd], [test "$ax_thrift_gen_xsd" = "yes"])
-AX_THRIFT_GEN(html, [HTML], yes)
-AM_CONDITIONAL([THRIFT_GEN_html], [test "$ax_thrift_gen_html" = "yes"])
-AX_THRIFT_GEN(js, [JavaScript], yes)
-AM_CONDITIONAL([THRIFT_GEN_js], [test "$ax_thrift_gen_js" = "yes"])
-AX_THRIFT_GEN(javame, [JavaME], yes)
-AM_CONDITIONAL([THRIFT_GEN_javame], [test "$ax_thrift_gen_javame" = "yes"])
-AX_THRIFT_GEN(go, [GO_C], yes)
-AM_CONDITIONAL([THRIFT_GEN_go], [test "$ax_thrift_gen_go" = "yes"])
-
# --- Coverage hooks ---
AC_ARG_ENABLE(coverage,

0 comments on commit dec8c54

Please sign in to comment.