Mark Slee | eb0d024 | 2007-01-25 07:58:55 +0000 | [diff] [blame] | 1 | AM_YFLAGS = -d |
David Reiss | dd08f6d | 2008-06-30 20:24:24 +0000 | [diff] [blame] | 2 | BUILT_SOURCES = |
Mark Slee | eb0d024 | 2007-01-25 07:58:55 +0000 | [diff] [blame] | 3 | |
| 4 | bin_PROGRAMS = thrift |
| 5 | |
| 6 | thrift_OBJDIR = obj |
| 7 | |
| 8 | thrift_SOURCES = src/thrifty.yy \ |
| 9 | src/thriftl.ll \ |
| 10 | src/main.cc \ |
David Reiss | 8df6c82 | 2008-05-04 03:00:22 +0000 | [diff] [blame] | 11 | src/md5.c \ |
Mark Slee | eb0d024 | 2007-01-25 07:58:55 +0000 | [diff] [blame] | 12 | src/generate/t_generator.cc \ |
Mark Slee | eb0d024 | 2007-01-25 07:58:55 +0000 | [diff] [blame] | 13 | src/generate/t_php_generator.cc \ |
Mark Slee | 2c44d20 | 2007-05-16 02:18:07 +0000 | [diff] [blame] | 14 | src/generate/t_xsd_generator.cc \ |
David Reiss | 9f2a5d7 | 2008-06-11 01:15:45 +0000 | [diff] [blame] | 15 | src/generate/t_erl_generator.cc \ |
Mark Slee | efd37f1 | 2007-11-20 05:13:09 +0000 | [diff] [blame] | 16 | src/globals.h \ |
| 17 | src/main.h \ |
David Reiss | 204420f | 2008-01-11 20:59:03 +0000 | [diff] [blame] | 18 | src/platform.h \ |
Mark Slee | efd37f1 | 2007-11-20 05:13:09 +0000 | [diff] [blame] | 19 | src/md5.h \ |
| 20 | src/parse/t_doc.h \ |
| 21 | src/parse/t_type.h \ |
| 22 | src/parse/t_base_type.h \ |
| 23 | src/parse/t_enum.h \ |
| 24 | src/parse/t_enum_value.h \ |
| 25 | src/parse/t_typedef.h \ |
| 26 | src/parse/t_container.h \ |
| 27 | src/parse/t_list.h \ |
| 28 | src/parse/t_set.h \ |
| 29 | src/parse/t_map.h \ |
| 30 | src/parse/t_struct.h \ |
| 31 | src/parse/t_field.h \ |
| 32 | src/parse/t_service.h \ |
| 33 | src/parse/t_function.h \ |
| 34 | src/parse/t_program.h \ |
| 35 | src/parse/t_scope.h \ |
| 36 | src/parse/t_const.h \ |
| 37 | src/parse/t_const_value.h \ |
| 38 | src/generate/t_generator.h \ |
| 39 | src/generate/t_oop_generator.h \ |
Mark Slee | efd37f1 | 2007-11-20 05:13:09 +0000 | [diff] [blame] | 40 | src/generate/t_php_generator.h \ |
Mark Slee | efd37f1 | 2007-11-20 05:13:09 +0000 | [diff] [blame] | 41 | src/generate/t_xsd_generator.h \ |
David Reiss | 9f2a5d7 | 2008-06-11 01:15:45 +0000 | [diff] [blame] | 42 | src/generate/t_erl_generator.h |
iproctor | 9a41a0c | 2007-07-16 21:59:24 +0000 | [diff] [blame] | 43 | |
David Reiss | 2258573 | 2008-02-27 01:55:33 +0000 | [diff] [blame] | 44 | if THRIFT_GEN_cpp |
| 45 | thrift_SOURCES += src/generate/t_cpp_generator.cc |
| 46 | endif |
David Reiss | e8a87de | 2008-02-27 02:39:25 +0000 | [diff] [blame] | 47 | if THRIFT_GEN_java |
| 48 | thrift_SOURCES += src/generate/t_java_generator.cc |
| 49 | endif |
David Reiss | ce4f4f0 | 2008-03-27 21:41:31 +0000 | [diff] [blame] | 50 | if THRIFT_GEN_csharp |
| 51 | thrift_SOURCES += src/generate/t_csharp_generator.cc |
| 52 | endif |
David Reiss | bfd26dc | 2008-03-27 21:41:49 +0000 | [diff] [blame] | 53 | if THRIFT_GEN_py |
| 54 | thrift_SOURCES += src/generate/t_py_generator.cc |
| 55 | endif |
David Reiss | ae25358 | 2008-03-27 21:42:11 +0000 | [diff] [blame] | 56 | if THRIFT_GEN_rb |
| 57 | thrift_SOURCES += src/generate/t_rb_generator.cc |
| 58 | endif |
David Reiss | fdc21aa | 2008-03-27 21:42:34 +0000 | [diff] [blame] | 59 | if THRIFT_GEN_perl |
| 60 | thrift_SOURCES += src/generate/t_perl_generator.cc |
| 61 | endif |
David Reiss | 4b349aa | 2008-03-27 21:41:02 +0000 | [diff] [blame] | 62 | if THRIFT_GEN_cocoa |
| 63 | thrift_SOURCES += src/generate/t_cocoa_generator.cc |
| 64 | endif |
David Reiss | b3ac8a6 | 2008-03-27 21:40:42 +0000 | [diff] [blame] | 65 | if THRIFT_GEN_st |
| 66 | thrift_SOURCES += src/generate/t_st_generator.cc |
| 67 | endif |
David Reiss | 3d671b5 | 2008-03-27 21:40:11 +0000 | [diff] [blame] | 68 | if THRIFT_GEN_ocaml |
| 69 | thrift_SOURCES += src/generate/t_ocaml_generator.cc |
| 70 | endif |
David Reiss | 22812f8 | 2008-03-27 21:40:26 +0000 | [diff] [blame] | 71 | if THRIFT_GEN_hs |
| 72 | thrift_SOURCES += src/generate/t_hs_generator.cc |
| 73 | endif |
David Reiss | dc0aada | 2008-10-21 00:09:23 +0000 | [diff] [blame] | 74 | if THRIFT_GEN_html |
| 75 | thrift_SOURCES += src/generate/t_html_generator.cc |
| 76 | endif |
David Reiss | 2258573 | 2008-02-27 01:55:33 +0000 | [diff] [blame] | 77 | |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 78 | thrift_CXXFLAGS = -Wall -I$(srcdir)/src $(BOOST_CPPFLAGS) |
Mark Slee | 58dfb4f | 2007-07-06 02:45:25 +0000 | [diff] [blame] | 79 | thrift_LDFLAGS = -Wall $(BOOST_LDFLAGS) |
Mark Slee | eb0d024 | 2007-01-25 07:58:55 +0000 | [diff] [blame] | 80 | |
| 81 | thrift_LDADD = @LEXLIB@ |
| 82 | |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 83 | EXTRA_DIST = README |
David Reiss | b72d19f | 2007-09-18 19:46:00 +0000 | [diff] [blame] | 84 | |
Mark Slee | eb0d024 | 2007-01-25 07:58:55 +0000 | [diff] [blame] | 85 | clean-local: |
David Reiss | 466b3fa | 2008-11-20 21:24:32 +0000 | [diff] [blame] | 86 | $(RM) thriftl.cc thrifty.cc thrifty.h version.h |
David Reiss | dd08f6d | 2008-06-30 20:24:24 +0000 | [diff] [blame] | 87 | |
| 88 | src/main.cc: version.h |
| 89 | |
| 90 | # Adding this to BUILT_SOURCES will cause version.h to be |
| 91 | # regenerated on every "make all" or "make check", which is |
| 92 | # necessary because it changes whenever we "svn up" or similar. |
| 93 | # Ideally, we would like this to be regenerated whenever the |
| 94 | # compiler is rebuilt, but every way we could think of to do |
| 95 | # that caused unnecessary rebuilds of the compiler. |
| 96 | BUILT_SOURCES += regen_version_h |
| 97 | |
| 98 | THRIFT_VERSION=$(shell /bin/sh $(top_srcdir)/print_version.sh -v) |
| 99 | THRIFT_REVISION=$(shell /bin/sh $(top_srcdir)/print_version.sh -r) |
| 100 | |
| 101 | regen_version_h: |
David Reiss | 4d8edc5 | 2008-06-30 21:55:52 +0000 | [diff] [blame] | 102 | @printf "Regenerating version.h... " |
David Reiss | dd08f6d | 2008-06-30 20:24:24 +0000 | [diff] [blame] | 103 | @TMPFILE=`mktemp ./version_h.tmp_XXXXXX` ; \ |
| 104 | echo "// AUTOGENERATED, DO NOT EDIT" > $$TMPFILE ; \ |
David Reiss | aabfa63 | 2008-06-30 22:27:29 +0000 | [diff] [blame] | 105 | echo '#define THRIFT_VERSION "$(THRIFT_VERSION)"' >> $$TMPFILE ; \ |
| 106 | echo '#define THRIFT_REVISION "$(THRIFT_REVISION)"' >> $$TMPFILE ; \ |
David Reiss | dd08f6d | 2008-06-30 20:24:24 +0000 | [diff] [blame] | 107 | if cmp $$TMPFILE version.h >/dev/null ; \ |
| 108 | then \ |
| 109 | rm -f $$TMPFILE ; \ |
| 110 | echo "No changes." ; \ |
| 111 | else \ |
| 112 | mv $$TMPFILE version.h ; \ |
| 113 | echo "Updated." ; \ |
| 114 | fi |