Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
30 ashish 1
#
2
# Licensed to the Apache Software Foundation (ASF) under one
3
# or more contributor license agreements. See the NOTICE file
4
# distributed with this work for additional information
5
# regarding copyright ownership. The ASF licenses this file
6
# to you under the Apache License, Version 2.0 (the
7
# "License"); you may not use this file except in compliance
8
# with the License. You may obtain a copy of the License at
9
#
10
#   http://www.apache.org/licenses/LICENSE-2.0
11
#
12
# Unless required by applicable law or agreed to in writing,
13
# software distributed under the License is distributed on an
14
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
# KIND, either express or implied. See the License for the
16
# specific language governing permissions and limitations
17
# under the License.
18
#
19
#
20
# Contains some contributions under the Thrift Software License.
21
# Please see doc/old-thrift-license.txt in the Thrift distribution for
22
# details.
23
 
24
AM_YFLAGS = -d
25
BUILT_SOURCES =
26
 
27
bin_PROGRAMS = thrift
28
 
29
thrift_OBJDIR = obj
30
 
31
thrift_SOURCES = src/thrifty.yy \
32
                 src/thriftl.ll \
33
                 src/main.cc \
34
                 src/md5.c \
35
                 src/generate/t_generator.cc \
36
                 src/globals.h \
37
                 src/main.h \
38
                 src/platform.h \
39
                 src/md5.h \
40
                 src/parse/t_doc.h \
41
                 src/parse/t_type.h \
42
                 src/parse/t_base_type.h \
43
                 src/parse/t_enum.h \
44
                 src/parse/t_enum_value.h \
45
                 src/parse/t_typedef.h \
46
                 src/parse/t_container.h \
47
                 src/parse/t_list.h \
48
                 src/parse/t_set.h \
49
                 src/parse/t_map.h \
50
                 src/parse/t_struct.h \
51
                 src/parse/t_field.h \
52
                 src/parse/t_service.h \
53
                 src/parse/t_function.h \
54
                 src/parse/t_program.h \
55
                 src/parse/t_scope.h \
56
                 src/parse/t_const.h \
57
                 src/parse/t_const_value.h \
58
                 src/generate/t_generator.h \
59
                 src/generate/t_oop_generator.h
60
 
61
if THRIFT_GEN_cpp
62
thrift_SOURCES += src/generate/t_cpp_generator.cc
63
endif
64
if THRIFT_GEN_java
65
thrift_SOURCES += src/generate/t_java_generator.cc
66
endif
67
if THRIFT_GEN_csharp
68
thrift_SOURCES += src/generate/t_csharp_generator.cc
69
endif
70
if THRIFT_GEN_py
71
thrift_SOURCES += src/generate/t_py_generator.cc
72
endif
73
if THRIFT_GEN_rb
74
thrift_SOURCES += src/generate/t_rb_generator.cc
75
endif
76
if THRIFT_GEN_perl
77
thrift_SOURCES += src/generate/t_perl_generator.cc
78
endif
79
if THRIFT_GEN_php
80
thrift_SOURCES += src/generate/t_php_generator.cc
81
endif
82
if THRIFT_GEN_erl
83
thrift_SOURCES += src/generate/t_erl_generator.cc
84
endif
85
if THRIFT_GEN_cocoa
86
thrift_SOURCES += src/generate/t_cocoa_generator.cc
87
endif
88
if THRIFT_GEN_st
89
thrift_SOURCES += src/generate/t_st_generator.cc
90
endif
91
if THRIFT_GEN_ocaml
92
thrift_SOURCES += src/generate/t_ocaml_generator.cc
93
endif
94
if THRIFT_GEN_hs
95
thrift_SOURCES += src/generate/t_hs_generator.cc
96
endif
97
if THRIFT_GEN_xsd
98
thrift_SOURCES += src/generate/t_xsd_generator.cc
99
endif
100
if THRIFT_GEN_html
101
thrift_SOURCES += src/generate/t_html_generator.cc
102
endif
103
 
104
thrift_CXXFLAGS = -Wall -I$(srcdir)/src $(BOOST_CPPFLAGS)
105
thrift_LDFLAGS = -Wall $(BOOST_LDFLAGS)
106
 
107
thrift_LDADD = @LEXLIB@
108
 
109
EXTRA_DIST = README
110
 
111
clean-local:
112
	$(RM) thriftl.cc thrifty.cc thrifty.h version.h
113
 
114
src/main.cc: version.h
115
 
116
# Adding this to BUILT_SOURCES will cause version.h to be
117
# regenerated on every "make all" or "make check", which is
118
# necessary because it changes whenever we "svn up" or similar.
119
# Ideally, we would like this to be regenerated whenever the
120
# compiler is rebuilt, but every way we could think of to do
121
# that caused unnecessary rebuilds of the compiler.
122
BUILT_SOURCES += regen_version_h
123
 
124
THRIFT_VERSION=$(shell /bin/sh $(top_srcdir)/print_version.sh -v)
125
THRIFT_REVISION=$(shell /bin/sh $(top_srcdir)/print_version.sh -r)
126
 
127
regen_version_h:
128
	@printf "Regenerating version.h... "
129
	@TMPFILE=`mktemp ./version_h.tmp_XXXXXX` ; \
130
		echo "// AUTOGENERATED, DO NOT EDIT" > $$TMPFILE ; \
131
		echo '#define THRIFT_VERSION "$(THRIFT_VERSION)"' >> $$TMPFILE ; \
132
		echo '#define THRIFT_REVISION "$(THRIFT_REVISION)"' >> $$TMPFILE ; \
133
		if cmp $$TMPFILE version.h >/dev/null ; \
134
		then \
135
			rm -f $$TMPFILE ; \
136
			echo "No changes." ; \
137
		else \
138
			mv $$TMPFILE version.h ; \
139
			echo "Updated." ; \
140
		fi