Skip to content

Commit

Permalink
Simplify build process by getting rid of bison/flex dependencies.
Browse files Browse the repository at this point in the history
Fixes both MSVC and autotools (automake 1.12+).

Revert "Abort autogen.sh when automake 1.12+ is found."

This reverts commit 978ed8f.
Should now work with automake 1.11+

fixes ticket:3887
fixes ticket:3538
closes ticket:3950

(cherry picked from commit 372eff6)

Forgot to push these changes for commit 372eff6

(cherry picked from commit e397b24)

Out of tree builds ?  Who needs them. :P

refs: 372eff6
(cherry picked from commit 20317c2)
  • Loading branch information
vexed authored and cybersphinx committed Sep 20, 2013
1 parent 3db05df commit d13bc0d
Show file tree
Hide file tree
Showing 35 changed files with 36,684 additions and 268 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Expand Up @@ -80,10 +80,10 @@ win32/__BUILD_CONFIG.USER
*.tab.[ch]
*.lex.[ch]pp
*.tab.[ch]pp
*lexer.[ch]pp
*parser.[ch]pp
*lexer.[ch]
*parser.[ch]
#*lexer.[ch]pp
#*parser.[ch]pp
#*lexer.[ch]
#*parser.[ch]
/src/autorevision.h
/autorevision.tmp
/src/autorevision.cache
Expand Down
5 changes: 0 additions & 5 deletions autogen.sh
Expand Up @@ -148,11 +148,6 @@ not_version ()
# Chdir to the srcdir, then run auto* tools.
cd "$SRCDIR"

version_check 0 "automake" "ftp://ftp.gnu.org/pub/gnu/automake/" 1 12 && {
echo "Sorry, automake 1.12+ is not supported yet, please use 1.11."
exit 1
}

version_check 1 "autoconf" "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 56 || DIE=1
version_check 1 "automake" "ftp://ftp.gnu.org/pub/gnu/automake/" 1 11 || DIE=1
if [ "$DIE" -eq 1 ]; then
Expand Down
13 changes: 0 additions & 13 deletions configure.ac
Expand Up @@ -30,19 +30,6 @@ AC_PROG_CXX
AC_CHECK_PROG(CXXCOMPILER, ${CXX}, cxxcompiler)
test -z "${CXXCOMPILER}" && AC_MSG_ERROR(No C++ compiler found!)

AC_PROG_YACC
if test "x$YACC" != "xbison -y" ; then
AC_MSG_ERROR([Bison is not installed])
fi
AC_PROG_VERSION_CHECK([bison], [1.31])

AC_PROG_LEX
test "x${LEX}" != "xflex" && AC_MSG_ERROR(flex not found!)
AC_PROG_VERSION_CHECK([${LEX}], [2.5.33], [2.5.34])
# Hack to make sure flex produces files with names ylwrap expects.
FLEX_FLAGS="-o lex.yy.c"
AC_SUBST([FLEX_FLAGS])

AX_WITH_PROG([PERL], [perl])
AX_PROG_PERL_VERSION([5.10], [], [ PERL="" ])
AC_SUBST([PERL])
Expand Down
15 changes: 6 additions & 9 deletions lib/framework/Makefile.am
@@ -1,8 +1,6 @@
AM_CPPFLAGS = -DYY_NO_INPUT $(SDL_CFLAGS) $(WZ_CPPFLAGS) $(QT4_CFLAGS)
AM_CFLAGS = $(WZ_CFLAGS)
AM_CXXFLAGS = $(WZ_CXXFLAGS) $(QT4_CFLAGS)
AM_LFLAGS = $(FLEX_FLAGS)
AM_YFLAGS = -d

MOCHEADER = \
wzconfig.h
Expand All @@ -11,9 +9,6 @@ MOCEDFILES = $(MOCHEADER:%.h=%_moc.cpp)
%_moc.cpp: %.h
$(MOC4) -o $@ $<

BUILT_SOURCES = \
resource_parser.h \
strres_parser.h

CLEANFILES = \
$(MOCEDFILES)
Expand Down Expand Up @@ -46,9 +41,11 @@ noinst_HEADERS = \
physfs_ext.h \
rational.h \
resly.h \
resource_parser.h \
stdio_ext.h \
string_ext.h \
strres.h \
strres_parser.h \
strresly.h \
treap.h \
trig.h \
Expand All @@ -70,12 +67,12 @@ libframework_a_SOURCES = \
geometry.cpp \
i18n.cpp \
lexer_input.cpp \
resource_lexer.lpp \
resource_parser.ypp \
resource_lexer.cpp \
resource_parser.cpp \
stdio_ext.cpp \
strres.cpp \
strres_lexer.lpp \
strres_parser.ypp \
strres_lexer.cpp \
strres_parser.cpp \
treap.cpp \
trig.cpp \
utf.cpp \
Expand Down
47 changes: 8 additions & 39 deletions lib/framework/framework.vcxproj
Expand Up @@ -60,9 +60,7 @@
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="..\..\devpkg\FlexBison.props" />
</ImportGroup>
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
Expand Down Expand Up @@ -102,9 +100,9 @@
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\devpkg\include;$(Qtdir)\include;$(IncludePath)</IncludePath>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release_SDL_STLport_x32|Win32'">..\devpkg\stlport5.2.1\stlport;..\devpkg\include;$(Qtdir)\include;$(IncludePath)</IncludePath>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release_QT_STLport_x32|Win32'">..\devpkg\stlport5.2.1\stlport;..\devpkg\include;$(Qtdir)\include;$(IncludePath)</IncludePath>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">*.lex.cpp;*.tab.cpp;*.tab.hpp;$(ExtensionsToDeleteOnClean)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug_SDL_STLport_x32|Win32'">*.lex.cpp;*.tab.cpp;*.tab.hpp;$(ExtensionsToDeleteOnClean)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug_QT_STLport_x32|Win32'">*.lex.cpp;*.tab.cpp;*.tab.hpp;$(ExtensionsToDeleteOnClean)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ExtensionsToDeleteOnClean)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug_SDL_STLport_x32|Win32'">$(ExtensionsToDeleteOnClean)</ExtensionsToDeleteOnClean>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug_QT_STLport_x32|Win32'">$(ExtensionsToDeleteOnClean)</ExtensionsToDeleteOnClean>
<PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</PreBuildEventUseInBuild>
<PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release_SDL_STLport_x32|Win32'">false</PreBuildEventUseInBuild>
<PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release_QT_STLport_x32|Win32'">true</PreBuildEventUseInBuild>
Expand Down Expand Up @@ -268,20 +266,7 @@
<ClCompile Include="geometry.cpp" />
<ClCompile Include="i18n.cpp" />
<ClCompile Include="lexer_input.cpp" />
<ClCompile Include="resource_lexer.cpp">
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug_SDL_STLport_x32|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug_QT_STLport_x32|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
<XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
<XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Debug_SDL_STLport_x32|Win32'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
<XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Debug_QT_STLport_x32|Win32'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release_SDL_STLport_x32|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
<ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release_QT_STLport_x32|Win32'">$(IntDir)%(Filename)1.obj</ObjectFileName>
<XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
<XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Release_SDL_STLport_x32|Win32'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
<XMLDocumentationFileName Condition="'$(Configuration)|$(Platform)'=='Release_QT_STLport_x32|Win32'">$(IntDir)%(Filename)1.xdc</XMLDocumentationFileName>
</ClCompile>
<ClCompile Include="resource_lexer.cpp" />
<ClCompile Include="resource_parser.cpp" />
<ClCompile Include="stdio_ext.cpp" />
<ClCompile Include="strres.cpp" />
Expand Down Expand Up @@ -317,12 +302,12 @@
<ClInclude Include="opengl.h" />
<ClInclude Include="physfs_ext.h" />
<ClInclude Include="resly.h" />
<ClInclude Include="resource_parser.hpp" />
<ClInclude Include="resource_parser.h" />
<ClInclude Include="stdio_ext.h" />
<ClInclude Include="string_ext.h" />
<ClInclude Include="strres.h" />
<ClInclude Include="strresly.h" />
<ClInclude Include="strres_parser.hpp" />
<ClInclude Include="strres_parser.h" />
<ClInclude Include="treap.h" />
<ClInclude Include="trig.h" />
<ClInclude Include="types.h" />
Expand All @@ -333,22 +318,6 @@
<ClInclude Include="wzfs.h" />
<ClInclude Include="wzglobal.h" />
</ItemGroup>
<ItemGroup>
<FlexGenerator Include="resource_lexer.lpp">
<FileType>Document</FileType>
</FlexGenerator>
<BisonParser Include="resource_parser.ypp">
<FileType>Document</FileType>
</BisonParser>
<FlexGenerator Include="strres_lexer.lpp">
<FileType>Document</FileType>
</FlexGenerator>
<BisonParser Include="strres_parser.ypp">
<FileType>Document</FileType>
</BisonParser>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\devpkg\FlexBison.targets" />
</ImportGroup>
<ImportGroup Label="ExtensionTargets" />
</Project>
31 changes: 6 additions & 25 deletions lib/framework/framework.vcxproj.filters
Expand Up @@ -9,9 +9,6 @@
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="FlexBison">
<UniqueIdentifier>{558c4d54-ca83-45b2-94bd-a22fe549de35}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="crc.cpp">
Expand Down Expand Up @@ -50,6 +47,9 @@
<ClCompile Include="geometry.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wzconfig.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="resource_lexer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand All @@ -62,9 +62,6 @@
<ClCompile Include="strres_parser.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wzconfig.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="crc.h">
Expand Down Expand Up @@ -157,30 +154,14 @@
<ClInclude Include="wzglobal.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource_parser.hpp">
<ClInclude Include="wzconfig.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="strres_parser.hpp">
<ClInclude Include="strres_parser.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wzconfig.h">
<ClInclude Include="resource_parser.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<FlexGenerator Include="resource_lexer.lpp">
<Filter>FlexBison</Filter>
</FlexGenerator>
<FlexGenerator Include="strres_lexer.lpp">
<Filter>FlexBison</Filter>
</FlexGenerator>
</ItemGroup>
<ItemGroup>
<BisonParser Include="resource_parser.ypp">
<Filter>FlexBison</Filter>
</BisonParser>
<BisonParser Include="strres_parser.ypp">
<Filter>FlexBison</Filter>
</BisonParser>
</ItemGroup>
</Project>

0 comments on commit d13bc0d

Please sign in to comment.