8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 09:20:39 +01:00

Include CLOOP build and interfaces generation to Windows build

This commit is contained in:
Dimitry Sibiryakov 2020-08-28 17:53:35 +02:00
parent 64ec331b41
commit cb21d4365d
5 changed files with 15609 additions and 31 deletions

View File

@ -0,0 +1,45 @@
all: updateCloopInterfaces
CLOOP=$(FB_BIN_DIR)cloop.exe
IDL_ROOT=$(FB_ROOT_PATH)\src\include\firebird
IDL_FILE=$(IDL_ROOT)\FirebirdInterface.idl
API_H_FILE=$(IDL_ROOT)\IdlFbInterfaces.h
API_PAS_FILE=$(FB_ROOT_PATH)\src\include\gen\Firebird.pas
MISC=$(FB_ROOT_PATH)\src\misc
PAS_ROOT=$(MISC)\pascal
PASCAL_SOURCES=$(PAS_ROOT)\Pascal.interface.pas $(PAS_ROOT)\Pascal.implementation.pas
TMP_FUNCS=$(FB_GEN_DIR)\misc\func.pas
XPB_CONSTS=$(FB_ROOT_PATH)\src\include\firebird\impl\consts_pub.h
ERR_CONSTS=$(FB_ROOT_PATH)\lang_helpers\gds_codes.pas
RPL_AWK=$(FB_GEN_DIR)\def_awk.exe
RPL_AWK_SRC=$(MISC)\def_awk.c
RPL_GREP=$(FB_GEN_DIR)\isc_grep.exe
RPL_GREP_SRC=$(MISC)\isc_grep.c
# These utils are platform and build independent, use fixed temporary dir.
UTL_TMP_DIR=$(FB_TEMP_DIR)\Release\misc
updateCloopInterfaces: $(API_H_FILE) $(API_PAS_FILE)
$(API_H_FILE): $(IDL_FILE)
$(CLOOP) $(IDL_FILE) c++ $@ IDL_FB_INTERFACES_H Firebird I
$(RPL_AWK): $(RPL_AWK_SRC)
# NMAKE strips trailing backslash during macro substitution that's why it is here and not in definition.
$(CPP) /Fe$@ /Fo$(UTL_TMP_DIR)\ $(RPL_AWK_SRC)
$(RPL_GREP): $(RPL_GREP_SRC)
$(CPP) /Fe$@ /Fo$(UTL_TMP_DIR)\ $(RPL_GREP_SRC)
$(TMP_FUNCS): $(PAS_ROOT)\fb_get_master_interface.pas $(XPB_CONSTS) $(ERR_CONSTS) $(RPL_AWK) $(RPL_GREP)
copy $(PAS_ROOT)\fb_get_master_interface.pas $(TMP_FUNCS)
$(RPL_AWK) <$(XPB_CONSTS) >>$(TMP_FUNCS)
$(RPL_GREP) <$(ERR_CONSTS) >>$(TMP_FUNCS)
$(API_PAS_FILE): $(IDL_FILE) $(PASCAL_SOURCES) $(TMP_FUNCS)
$(CLOOP) $(IDL_FILE) pascal $@ Firebird --uses SysUtils \
--interfaceFile $(PAS_ROOT)\Pascal.interface.pas \
--implementationFile $(PAS_ROOT)\Pascal.implementation.pas \
--exceptionClass FbException \
--functionsFile $(TMP_FUNCS) \
--prefix I

View File

@ -58,7 +58,7 @@ if errorlevel 1 call :ERROR build failed - see make_all_%FB_TARGET_PLATFORM%.log
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\yvalve\fbclient.lib %FB_OUTPUT_DIR%\lib\fbclient_ms.lib >nul
@copy %FB_ROOT_PATH%\temp\%FB_OBJ_DIR%\ib_util\ib_util.lib %FB_OUTPUT_DIR%\lib\ib_util_ms.lib >nul
for %%v in (gpre_boot build_msg codes) do (
for %%v in (gpre_boot build_msg codes cloop) do (
@del %FB_OUTPUT_DIR%\%%v.* 2>nul
)

View File

@ -18,20 +18,22 @@ set ERRLEV=0
:MAIN
@echo.
@echo Creating directories
@rmdir /s /q %FB_GEN_DIR% 2>nul
:: Remove previously generated output, and recreate the directory hierarchy.
for %%v in ( alice auth burp dsql gpre isql jrd misc msgs qli examples yvalve) do (
@mkdir %FB_GEN_DIR%\%%v
:: Create the directory hierarchy.
for %%v in ( alice auth burp dsql gpre isql jrd misc msgs qli examples yvalve utilities) do (
@mkdir %FB_GEN_DIR%\%%v 2>nul
)
@rmdir /s /q %FB_GEN_DIR%\utilities 2>nul
@mkdir %FB_GEN_DIR%\utilities 2>nul
@mkdir %FB_GEN_DIR%\utilities\gstat 2>nul
@mkdir %FB_GEN_DIR%\auth\SecurityDatabase 2>nul
@mkdir %FB_GEN_DIR%\gpre\std 2>nul
::=======
call :cloop
if "%ERRLEV%"=="1" goto :END
call :interfaces
if "%ERRLEV%"=="1" goto :END
call :btyacc
if "%ERRLEV%"=="1" goto :END
@ -196,6 +198,25 @@ if errorlevel 1 call :boot2 re2
@popd
goto :EOF
::===================
:: Build CLOOP
:cloop
@echo.
@echo Building CLOOP...
@call compile.bat extern\cloop\cloop cloop_%FB_TARGET_PLATFORM%.log cloop
if errorlevel 1 call :boot2 cloop
goto :EOF
::===================
:: Generate interface headers
:interfaces
@echo.
@echo Generating interfaces...
@mkdir %FB_TEMP_DIR%\..\%FB_OBJ_DIR%\misc 2>nul
@nmake /s /x interfaces_%FB_TARGET_PLATFORM%.log /f gen_helper.nmake updateCloopInterfaces
if errorlevel 1 call :boot2 interfaces
goto :EOF
::===================
:: Extract zlib
:zlib

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -20,8 +20,14 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Globals">
<OutDir>$(SolutionDir)..\..\temp\$(PlatformName)\$(Configuration)\firebird\</OutDir>
<IntDir>$(SolutionDir)..\..\temp\$(PlatformName)\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
@ -54,26 +60,20 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\output\$(Configuration)\bin\</OutDir>
<IntDir>$(SolutionDir)\build\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\output\$(Configuration)\bin\</OutDir>
<IntDir>$(SolutionDir)\build\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\output\$(Configuration)\bin\</OutDir>
<IntDir>$(SolutionDir)\build\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\output\$(Configuration)\bin\</OutDir>
<IntDir>$(SolutionDir)\build\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<BrowseInformation>true</BrowseInformation>
<BrowseInformationFile>$(IntDir)</BrowseInformationFile>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
</Link>
<Bscmake>
<OutputFile>$(IntDir)$(TargetName).bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -103,7 +103,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
@ -118,7 +118,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>

15512
src/include/gen/Firebird.pas Normal file

File diff suppressed because it is too large Load Diff