public
Description: A powersetly awesome thrift
Clone URL: git://github.com/mojombo/powerset_thrift.git
 r1437@opsdev009 (orig r75927):  dreiss | 2007-12-28 10:25:33 -0800
 Thrift: Revamp build to use a single configure.ac.
 
 Summary:
 Ben Maurer suggested that it would make sense for Thrift to build as
 a single project, with one configure.ac and multiple Makefile.am.
 He was also kind enough to do the heavy lifting, and this commit
 is the application of his patch (with minor modifications).
 The most significant visible change from this diff is that
 in order to buidl one of the thrift sub-projects (i.e.: the compiler,
 the C++ library, or the Python library) you must run bootstrap.sh
 and configure in the Thrift root, then make in the specific project.
 Users who want to build and install the Python library but
 can't run configure because they don't have Boost can simply
 run setup.py directly.
 
 Reviewed By: mcslee
 
 Test Plan: Built Thrift from scratch.
 
 Revert Plan: ok
 


git-svn-id: http://svn.facebook.com/svnroot/thrift/trunk@737 
41a61cd8-c433-0410-bb1c-e256eeef9e11
(no author) (author)
Fri Dec 28 10:29:09 -0800 2007
commit  4f8d4e9cd3928c3ff437d59e93377ec0d85f13dd
tree    8fecf364acbfb94a60a1bcf929f8f891e5130510
parent  8d26c74424319a04a66aa8a7934c950b945bb0b9
...
 
 
 
1
2
3
...
1
2
3
4
5
6
0
@@ -1,3 +1,6 @@
0
+Ben Maurer <bmaurer@andrew.cmu.edu>
0
+-Restructuring the way Autoconf is used.
0
+
0
 Patrick Collison <patrick@collison.ie>
0
 -Smalltalk bindings.
0
 
...
1
 
 
 
2
3
4
5
6
 
...
 
1
2
3
4
5
6
 
 
7
0
@@ -1,6 +1,7 @@
0
-SUBDIRS = compiler/cpp lib/cpp lib/py if
0
+ACLOCAL_AMFLAGS = -I ./aclocal
0
+
0
+SUBDIRS = compiler/cpp lib if
0
 ## Don't run make dist from a subversion working copy
0
 ## because it will pull in your .svn directories.
0
 EXTRA_DIST = bootstrap.sh cleanup.sh doc test tutorial \
0
- thrift.el thrift.vim thrift.bnf CONTRIBUTORS LICENSE \
0
- lib/cocoa lib/erl lib/hs lib/java lib/ocaml lib/perl lib/php lib/rb
0
+ thrift.el thrift.vim thrift.bnf CONTRIBUTORS LICENSE
...
1
2
3
 
4
5
6
7
8
9
10
 
 
 
 
 
 
 
 
 
 
 
 
11
12
13
14
15
16
17
 
 
 
 
18
19
20
...
1
2
 
3
4
5
6
 
 
 
 
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
 
 
 
22
23
24
25
26
27
28
0
@@ -1,20 +1,28 @@
0
 #!/bin/sh
0
 
0
-subdirs="compiler/cpp lib/cpp lib/py if"
0
+subdirs=" if"
0
 
0
 ./cleanup.sh
0
 
0
-aclocal
0
-touch NEWS README AUTHORS ChangeLog
0
-autoconf
0
-automake -ac
0
+autoscan || exit 1
0
+autoheader || exit 1
0
+aclocal -I ./aclocal || exit 1
0
+
0
+if libtoolize --version 1 >/dev/null 2>/dev/null; then
0
+ libtoolize --automake || exit 1
0
+elif glibtoolize --version 1 >/dev/null 2>/dev/null; then
0
+ glibtoolize --automake || exit 1
0
+fi
0
+
0
+autoconf || exit 1
0
+automake -ac --add-missing --foreign || exit 1
0
 
0
 for subdir in ${subdirs}; do
0
     if [ -x "${subdir}/bootstrap.sh" ]; then
0
- cwd="`pwd`"
0
- cd "${subdir}"
0
- ./bootstrap.sh
0
- cd "${cwd}"
0
+ cwd="`pwd`"
0
+ cd "${subdir}"
0
+ ./bootstrap.sh
0
+ cd "${cwd}"
0
     fi
0
 done
0
 
...
32
33
34
35
36
37
38
 
 
 
 
39
40
...
32
33
34
 
 
 
 
35
36
37
38
39
40
0
@@ -32,9 +32,9 @@ if/gen-*
0
 
0
 for subdir in ${subdirs}; do
0
     if [ -x "${subdir}/cleanup.sh" ]; then
0
- cwd="`pwd`"
0
- cd "${subdir}"
0
- ./cleanup.sh
0
- cd "${cwd}"
0
+ cwd="`pwd`"
0
+ cd "${subdir}"
0
+ ./cleanup.sh
0
+ cd "${cwd}"
0
     fi
0
 done
...
20
21
22
23
 
24
25
26
...
57
58
59
60
 
61
62
63
64
65
 
66
67
68
...
20
21
22
 
23
24
25
26
...
57
58
59
 
60
61
62
63
64
 
65
66
67
68
0
@@ -20,7 +20,7 @@ thrift_SOURCES = src/thrifty.yy \
0
                  src/generate/t_erl_generator.cc \
0
                  src/generate/t_hs_generator.cc \
0
                  src/generate/t_cocoa_generator.cc \
0
- src/generate/t_st_generator.cc \
0
+ src/generate/t_st_generator.cc \
0
                  src/globals.h \
0
                  src/main.h \
0
                  src/md5.h \
0
@@ -57,12 +57,12 @@ thrift_SOURCES = src/thrifty.yy \
0
                  src/generate/t_cocoa_generator.h \
0
                  src/generate/t_st_generator.h
0
 
0
-thrift_CXXFLAGS = -Wall -Isrc $(BOOST_CPPFLAGS)
0
+thrift_CXXFLAGS = -Wall -I$(srcdir)/src $(BOOST_CPPFLAGS)
0
 thrift_LDFLAGS = -Wall $(BOOST_LDFLAGS)
0
 
0
 thrift_LDADD = @LEXLIB@
0
 
0
-EXTRA_DIST = bootstrap.sh cleanup.sh LICENSE
0
+EXTRA_DIST = README
0
 
0
 clean-local:
0
   rm -rf thriftl.cc thrifty.cc thrifty.h
...
371
372
373
374
 
375
376
 
377
378
379
380
381
 
382
383
384
...
456
457
458
459
 
460
461
462
...
500
501
502
503
 
504
505
506
...
544
545
546
547
 
548
549
550
...
749
750
751
752
 
753
754
755
...
371
372
373
 
374
375
 
376
377
378
379
380
 
381
382
383
384
...
456
457
458
 
459
460
461
462
...
500
501
502
 
503
504
505
506
...
544
545
546
 
547
548
549
550
...
749
750
751
 
752
753
754
755
0
@@ -371,14 +371,14 @@ bool t_st_generator::is_vowel(char c) {
0
 }
0
 
0
 string t_st_generator::a_type(t_type* type) {
0
- string prefix;
0
+ string prefix;
0
 
0
- if (is_vowel(type_name(type)[0]))
0
+ if (is_vowel(type_name(type)[0]))
0
     prefix = "an";
0
   else
0
     prefix = "a";
0
 
0
- return prefix + capitalize(type_name(type));
0
+ return prefix + capitalize(type_name(type));
0
 }
0
 
0
 void t_st_generator::generate_accessors(std::ofstream& out, t_struct* tstruct) {
0
@@ -456,7 +456,7 @@ string t_st_generator::map_reader(t_map *tmap) {
0
 
0
   out << "]." << endl <<
0
     indent() << "iprot readMapEnd." << endl <<
0
- indent() << val << "] value";
0
+ indent() << val << "] value";
0
   indent_down();
0
 
0
   return out.str();
0
@@ -500,7 +500,7 @@ string t_st_generator::list_reader(t_list *tlist) {
0
 
0
   out << "]." << endl <<
0
     indent() << "iprot readListEnd." << endl <<
0
- indent() << val << "] value";
0
+ indent() << val << "] value";
0
   indent_down();
0
 
0
   return out.str();
0
@@ -544,7 +544,7 @@ string t_st_generator::set_reader(t_set *tset) {
0
 
0
   out << "]." << endl <<
0
     indent() << "iprot readSetEnd." << endl <<
0
- indent() << val << "] value";
0
+ indent() << val << "] value";
0
   indent_down();
0
 
0
   return out.str();
0
@@ -749,7 +749,7 @@ void t_st_generator::generate_recv_method(t_function* function) {
0
   st_method(f_, client_class_name(), "recv" + capitalize(funname));
0
   f_ << "| f msg res | " << endl <<
0
     indent() << "msg := oprot readMessageBegin." << endl <<
0
- indent() << "self validateRemoteMessage: msg." << endl <<
0
+ indent() << "self validateRemoteMessage: msg." << endl <<
0
     indent() << "res := " << struct_reader(&result) << "." << endl <<
0
     indent() << "oprot readMessageEnd." << endl <<
0
     indent() << "oprot transport flush." << endl <<
...
12
13
14
15
 
16
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
19
...
12
13
14
 
15
16
 
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
0
@@ -12,8 +12,100 @@ AC_ARG_VAR([PY_PREFIX], [Prefix for installing Python modules.
0
                          Default = "/usr"])
0
 AS_IF([test "x$PY_PREFIX" == x], [PY_PREFIX="/usr"])
0
 
0
-AC_CONFIG_FILES([Makefile])
0
+AM_PATH_PYTHON(2.4,, :)
0
 
0
-AC_CONFIG_SUBDIRS([compiler/cpp lib/cpp lib/py if])
0
+
0
+AC_PROG_CC
0
+AC_PROG_CPP
0
+AC_PROG_CXX
0
+AC_PROG_INSTALL
0
+AC_PROG_LIBTOOL
0
+AC_PROG_MAKE_SET
0
+AC_PROG_YACC
0
+AC_PROG_LEX
0
+AM_PROG_LEX
0
+
0
+AC_LANG([C++])
0
+AX_BOOST_BASE([1.33.1])
0
+
0
+AX_LIB_EVENT([1.0])
0
+AM_CONDITIONAL([AMX_HAVE_LIBEVENT], [test "$success" = "yes"])
0
+
0
+AX_LIB_ZLIB([1.2.3])
0
+AM_CONDITIONAL([AMX_HAVE_ZLIB], [test "$success" = "yes"])
0
+
0
+AC_C_CONST
0
+AC_C_INLINE
0
+AC_C_VOLATILE
0
+
0
+AC_HEADER_STDBOOL
0
+AC_HEADER_STDC
0
+AC_HEADER_TIME
0
+AC_CHECK_HEADERS([arpa/inet.h])
0
+AC_CHECK_HEADERS([endian.h])
0
+AC_CHECK_HEADERS([fcntl.h])
0
+AC_CHECK_HEADERS([inttypes.h])
0
+AC_CHECK_HEADERS([netdb.h])
0
+AC_CHECK_HEADERS([netinet/in.h])
0
+AC_CHECK_HEADERS([pthread.h])
0
+AC_CHECK_HEADERS([stddef.h])
0
+AC_CHECK_HEADERS([sys/socket.h])
0
+AC_CHECK_HEADERS([sys/time.h])
0
+AC_CHECK_HEADERS([unistd.h])
0
+AC_CHECK_HEADERS([libintl.h])
0
+AC_CHECK_HEADERS([malloc.h])
0
+
0
+AC_CHECK_LIB(pthread, pthread_create)
0
+AC_CHECK_LIB(rt, sched_get_priority_min)
0
+
0
+AC_TYPE_INT16_T
0
+AC_TYPE_INT32_T
0
+AC_TYPE_INT64_T
0
+AC_TYPE_INT8_T
0
+AC_TYPE_MODE_T
0
+AC_TYPE_OFF_T
0
+AC_TYPE_SIZE_T
0
+AC_TYPE_UINT16_T
0
+AC_TYPE_UINT32_T
0
+AC_TYPE_UINT64_T
0
+AC_TYPE_UINT8_T
0
+
0
+AC_FUNC_ALLOCA
0
+AC_FUNC_MALLOC
0
+AC_FUNC_REALLOC
0
+AC_FUNC_SELECT_ARGTYPES
0
+AC_FUNC_STAT
0
+AC_FUNC_STRERROR_R
0
+AC_FUNC_VPRINTF
0
+AC_CHECK_FUNCS([strtoul])
0
+AC_CHECK_FUNCS([bzero])
0
+AC_CHECK_FUNCS([clock_gettime])
0
+AC_CHECK_FUNCS([gethostbyname])
0
+AC_CHECK_FUNCS([gettimeofday])
0
+AC_CHECK_FUNCS([memmove])
0
+AC_CHECK_FUNCS([memset])
0
+AC_CHECK_FUNCS([mkdir])
0
+AC_CHECK_FUNCS([realpath])
0
+AC_CHECK_FUNCS([select])
0
+AC_CHECK_FUNCS([socket])
0
+AC_CHECK_FUNCS([strchr])
0
+AC_CHECK_FUNCS([strdup])
0
+AC_CHECK_FUNCS([strstr])
0
+AC_CHECK_FUNCS([strtol])
0
+AC_CHECK_FUNCS([sqrt])
0
+
0
+AC_CONFIG_HEADERS(config.h:config.hin)
0
+
0
+AC_CONFIG_FILES([
0
+ Makefile
0
+ compiler/cpp/Makefile
0
+ lib/Makefile
0
+ lib/cpp/Makefile
0
+ lib/cpp/thrift.pc
0
+ lib/cpp/thrift-nb.pc
0
+ lib/cpp/thrift-z.pc
0
+ lib/py/Makefile
0
+ if/Makefile
0
+])
0
 
0
 AC_OUTPUT
...
1
2
3
4
 
...
1
2
3
 
4
0
@@ -1,4 +1,4 @@
0
 thrift_ifdir = $(datadir)/thrift/if
0
 dist_thrift_if_DATA = \
0
                       reflection_limited.thrift
0
-EXTRA_DIST = bootstrap.sh cleanup.sh regen.sh
0
+EXTRA_DIST = regen.sh
...
61
62
63
64
 
65
66
67
...
126
127
128
129
130
131
132
 
 
133
134
135
...
61
62
63
 
64
65
66
67
...
126
127
128
 
 
 
 
129
130
131
132
133
0
@@ -61,7 +61,7 @@ libthriftz_la_CPPFLAGS = $(ZLIB_CPPFLAGS)
0
 
0
 include_thriftdir = $(includedir)/thrift
0
 include_thrift_HEADERS = \
0
- config.h \
0
+ $(top_srcdir)/config.h \
0
                          src/Thrift.h \
0
                          src/TReflectionLocal.h \
0
                          src/reflection_limited_types.h \
0
@@ -126,10 +126,8 @@ concurrency_test_LDADD = libthrift.la
0
 concurrency_test_CXXFLAGS = $(common_cxxflags)
0
 concurrency_test_LDFLAGS = $(common_ldflags)
0
 
0
-EXTRA_DIST =
0
- bootstrap.sh \
0
- cleanup.sh \
0
- LICENSE \
0
+EXTRA_DIST = \
0
+ README \
0
   thrift-nb.pc.in \
0
   thrift.pc.in \
0
   thrift-z.pc.in
...
1
2
 
3
4
5
...
1
 
2
3
4
5
0
@@ -1,5 +1,5 @@
0
 DESTDIR ?= /
0
-EXTRA_DIST = bootstrap.sh cleanup.sh setup.py LICENSE src
0
+EXTRA_DIST = setup.py src
0
 
0
 all:
0
   $(PYTHON) setup.py build
...
19
20
21
 
22
23
24
...
19
20
21
22
23
24
25
0
@@ -19,6 +19,7 @@ target: all
0
 
0
 include_paths = $(thrift_home)/lib/cpp/src \
0
                 $(thrift_home)/lib/cpp \
0
+ $(thrift_home)/ \
0
                 $(boost_home)
0
 
0
 include_flags = $(patsubst %,-I%, $(include_paths))

Comments

    No one has commented yet.