1
0
mirror of https://github.com/simh/simh.git synced 2026-04-26 03:57:11 +00:00

Added an optional mechanism which will display the git commit id that produced the current simulator if the git commit id information is available

This commit is contained in:
Mark Pizzolato
2013-01-02 07:46:17 -08:00
parent 7c9cebf3b7
commit 35e66482b3
38 changed files with 227 additions and 117 deletions

View File

@@ -26,6 +26,8 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Check for required build dependencies &amp; git commit id"
CommandLine="if not exist ../../windows-build/winpcap/Wpdpack/Include/pcap.h goto _notice&#x0D;&#x0A;if not exist ../../windows-build/pthreads/pthread.h goto _notice&#x0D;&#x0A;goto _good&#x0D;&#x0A;&#x0D;&#x0A;:_notice&#x0D;&#x0A;echo ****************************************************&#x0D;&#x0A;echo ****************************************************&#x0D;&#x0A;echo ** The required build support is not available. **&#x0D;&#x0A;echo ****************************************************&#x0D;&#x0A;echo ****************************************************&#x0D;&#x0A;type 0ReadMe_Projects.txt&#x0D;&#x0A;exit 1&#x0D;&#x0A;&#x0D;&#x0A;:_good&#x0D;&#x0A;SET GIT_COMMIT_ID=&#x0D;&#x0A;if not exist ..\.git-commit-id goto _NoId&#x0D;&#x0A;for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i&#x0D;&#x0A;:_NoId&#x0D;&#x0A;SET OLD_GIT_COMMIT_ID=&#x0D;&#x0A;if not exist .git-commit-id.h echo.&gt;.git-commit-id.h&#x0D;&#x0A;for /F &quot;tokens=3&quot; %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i&#x0D;&#x0A;if &quot;%GIT_COMMIT_ID%&quot; equ &quot;%OLD_GIT_COMMIT_ID%&quot; goto _IdGood&#x0D;&#x0A;echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% &gt;.git-commit-id.h&#x0D;&#x0A;:_IdGood&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
@@ -43,7 +45,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="./;../"
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;USE_INT64"
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;USE_INT64;SIM_NEED_GIT_COMMIT_ID"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -105,6 +107,8 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Check for required build dependencies &amp; git commit id"
CommandLine="if not exist ../../windows-build/winpcap/Wpdpack/Include/pcap.h goto _notice&#x0D;&#x0A;if not exist ../../windows-build/pthreads/pthread.h goto _notice&#x0D;&#x0A;goto _good&#x0D;&#x0A;&#x0D;&#x0A;:_notice&#x0D;&#x0A;echo ****************************************************&#x0D;&#x0A;echo ****************************************************&#x0D;&#x0A;echo ** The required build support is not available. **&#x0D;&#x0A;echo ****************************************************&#x0D;&#x0A;echo ****************************************************&#x0D;&#x0A;type 0ReadMe_Projects.txt&#x0D;&#x0A;exit 1&#x0D;&#x0A;&#x0D;&#x0A;:_good&#x0D;&#x0A;SET GIT_COMMIT_ID=&#x0D;&#x0A;if not exist ..\.git-commit-id goto _NoId&#x0D;&#x0A;for /F %%i in (..\.git-commit-id) do SET GIT_COMMIT_ID=%%i&#x0D;&#x0A;:_NoId&#x0D;&#x0A;SET OLD_GIT_COMMIT_ID=&#x0D;&#x0A;if not exist .git-commit-id.h echo.&gt;.git-commit-id.h&#x0D;&#x0A;for /F &quot;tokens=3&quot; %%i in (.git-commit-id.h) do SET OLD_GIT_COMMIT_ID=%%i&#x0D;&#x0A;if &quot;%GIT_COMMIT_ID%&quot; equ &quot;%OLD_GIT_COMMIT_ID%&quot; goto _IdGood&#x0D;&#x0A;echo #define SIM_GIT_COMMIT_ID %GIT_COMMIT_ID% &gt;.git-commit-id.h&#x0D;&#x0A;:_IdGood&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
@@ -124,7 +128,7 @@
InlineFunctionExpansion="1"
OmitFramePointers="true"
AdditionalIncludeDirectories="./;../"
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;USE_INT64"
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;USE_INT64;SIM_NEED_GIT_COMMIT_ID"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"