summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Piro <cpiro@apache.org>2013-03-07 11:24:51 -0500
committerChris Piro <cpiro@apache.org>2013-03-07 11:24:51 -0500
commit92e3860cfbaab5132439b9bac2e18dba06494bcc (patch)
tree5bffdf5ab615a53489b675078aa08754801a5afb
parent073f9eb9b920bda948b306ee16e78743e42b7cd1 (diff)
downloadthrift-92e3860cfbaab5132439b9bac2e18dba06494bcc.tar.gz
THRIFT-1614: handle automake >= 1.12 yacc output name (thrifty.hh)
-rw-r--r--.gitignore1
-rwxr-xr-xbootstrap.sh3
-rw-r--r--compiler/cpp/Makefile.am3
-rw-r--r--compiler/cpp/README_Windows.txt8
-rw-r--r--compiler/cpp/compiler.vcxproj10
-rw-r--r--compiler/cpp/compiler.vcxproj.filters2
-rw-r--r--compiler/cpp/src/thriftl.ll2
-rw-r--r--rat_exclude1
8 files changed, 18 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore
index 403321ed4..eb2ae4d4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,6 +36,7 @@ gen-*
/compiler/cpp/thriftl.cc
/compiler/cpp/thrifty.cc
/compiler/cpp/thrifty.h
+/compiler/cpp/thrifty.hh
/compiler/cpp/version.h
/config.*
/configure
diff --git a/bootstrap.sh b/bootstrap.sh
index 0c2b8868c..26d93c8f4 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -38,6 +38,9 @@ else
exit 1
fi
+# automake <= 1.11 names yacc output .h rather than .hh -- see THRIFT-1614
+echo '#include "thrifty.h"' > compiler/cpp/thrifty.hh
+
autoscan
$LIBTOOLIZE --copy --automake
aclocal -I ./aclocal
diff --git a/compiler/cpp/Makefile.am b/compiler/cpp/Makefile.am
index f47b15f05..8a8f394ae 100644
--- a/compiler/cpp/Makefile.am
+++ b/compiler/cpp/Makefile.am
@@ -106,6 +106,7 @@ EXTRA_DIST = \
$(WINDOWS_DIST)
clean-local:
- $(RM) thriftl.cc thrifty.cc thrifty.h version.h windows/version.h
+ $(RM) thriftl.cc thrifty.cc thrifty.h thrifty.hh version.h windows/version.h
+ echo '#include "thrifty.h"' > compiler/cpp/thrifty.hh
src/main.cc: version.h
diff --git a/compiler/cpp/README_Windows.txt b/compiler/cpp/README_Windows.txt
index a7fccea15..438ce0465 100644
--- a/compiler/cpp/README_Windows.txt
+++ b/compiler/cpp/README_Windows.txt
@@ -1,8 +1,8 @@
Building the Thrift IDL compiler in Windows
-------------------------------------------
-The Visual Studio project contains pre-build commands to generate the
-thriftl.cc, thrifty.cc and thrifty.h files which are necessary to build
+The Visual Studio project contains pre-build commands to generate the
+thriftl.cc, thrifty.cc and thrifty.hh files which are necessary to build
the compiler. These depend on bison, flex and their dependencies to
work properly. If this doesn't work on a system, try these manual
pre-build steps.
@@ -22,9 +22,9 @@ In the generated thriftl.cc, comment out #include <unistd.h>
Place a copy of bison.simple in thrift/compiler/cpp
> bison -y -o "src/thrifty.cc" --defines src/thrifty.yy
-> move src\thrifty.cc.h src\thrifty.h
+> move src\thrifty.cc.hh src\thrifty.hh
-Download inttypes.h from the interwebs and place it in an include path
+Download inttypes.h from the interwebs and place it in an include path
location (e.g. thrift/compiler/cpp/src).
Build the compiler in Visual Studio.
diff --git a/compiler/cpp/compiler.vcxproj b/compiler/cpp/compiler.vcxproj
index f46aaabbb..6fe2d9d83 100644
--- a/compiler/cpp/compiler.vcxproj
+++ b/compiler/cpp/compiler.vcxproj
@@ -45,7 +45,7 @@
<ClInclude Include="src\parse\t_type.h" />
<ClInclude Include="src\parse\t_typedef.h" />
<ClInclude Include="src\platform.h" />
- <ClInclude Include="src\thrifty.h" />
+ <ClInclude Include="src\thrifty.hh" />
<ClInclude Include="src\windows\config.h" />
<ClInclude Include="src\windows\version.h" />
</ItemGroup>
@@ -166,7 +166,7 @@
</Link>
<PreBuildEvent>
<Command>flex -o "src\\thriftl.cc" src/thriftl.ll
-bison -y -o "src\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy</Command>
+bison -y -o "src\thrifty.cc" --defines="src/thrifty.hh" src/thrifty.yy</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -185,7 +185,7 @@ bison -y -o "src\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy</Command>
</Link>
<PreBuildEvent>
<Command>flex -o "src\thriftl.cc" src/thriftl.ll
-bison -y -o "src\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy</Command>
+bison -y -o "src\thrifty.cc" --defines="src/thrifty.hh" src/thrifty.yy</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -208,7 +208,7 @@ bison -y -o "src\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy</Command>
</Link>
<PreBuildEvent>
<Command>flex -o "src\thriftl.cc" src/thriftl.ll
-bison -y -o "src\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy</Command>
+bison -y -o "src\thrifty.cc" --defines="src/thrifty.hh" src/thrifty.yy</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -231,7 +231,7 @@ bison -y -o "src\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy</Command>
</Link>
<PreBuildEvent>
<Command>flex -o "src\thriftl.cc" src/thriftl.ll
-bison -y -o "src\thrifty.cc" --defines="src/thrifty.h" src/thrifty.yy</Command>
+bison -y -o "src\thrifty.cc" --defines="src/thrifty.hh" src/thrifty.yy</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/compiler/cpp/compiler.vcxproj.filters b/compiler/cpp/compiler.vcxproj.filters
index 6836f0db5..7e2d933ee 100644
--- a/compiler/cpp/compiler.vcxproj.filters
+++ b/compiler/cpp/compiler.vcxproj.filters
@@ -71,7 +71,7 @@
<Filter>parse</Filter>
</ClInclude>
<ClInclude Include="src\platform.h" />
- <ClInclude Include="src\thrifty.h" />
+ <ClInclude Include="src\thrifty.hh" />
<ClInclude Include="src\windows\config.h">
<Filter>windows</Filter>
</ClInclude>
diff --git a/compiler/cpp/src/thriftl.ll b/compiler/cpp/src/thriftl.ll
index 00e985054..fda6b331b 100644
--- a/compiler/cpp/src/thriftl.ll
+++ b/compiler/cpp/src/thriftl.ll
@@ -48,7 +48,7 @@
* Must be included AFTER parse/t_program.h, but I can't remember why anymore
* because I wrote this a while ago.
*/
-#include "thrifty.h"
+#include "thrifty.hh"
void thrift_reserved_keyword(char* keyword) {
yyerror("Cannot use reserved language keyword: \"%s\"\n", keyword);
diff --git a/rat_exclude b/rat_exclude
index e0cced52f..feafe8ba7 100644
--- a/rat_exclude
+++ b/rat_exclude
@@ -18,6 +18,7 @@ ylwrap
*.m4
autom4te.cache
thrifty.h
+thrifty.hh
version.h
version.h.in
md5.c