diff options
Diffstat (limited to 'tools/mhmake')
-rw-r--r-- | tools/mhmake/mhmake.vcproj | 508 | ||||
-rw-r--r-- | tools/mhmake/src/bison.cc | 8 | ||||
-rw-r--r-- | tools/mhmake/src/build.cpp | 17 | ||||
-rw-r--r-- | tools/mhmake/src/fileinfo.cpp | 2 | ||||
-rw-r--r-- | tools/mhmake/src/fileinfo.h | 2 | ||||
-rw-r--r-- | tools/mhmake/src/flexskel.cc | 14 | ||||
-rw-r--r-- | tools/mhmake/src/flexskel.h | 6 | ||||
-rw-r--r-- | tools/mhmake/src/functions.cpp | 22 | ||||
-rw-r--r-- | tools/mhmake/src/md5.cpp | 5 | ||||
-rw-r--r-- | tools/mhmake/src/md5.h | 2 | ||||
-rw-r--r-- | tools/mhmake/src/mhmakefileparser.cpp | 94 | ||||
-rw-r--r-- | tools/mhmake/src/mhmakefileparser.h | 8 | ||||
-rw-r--r-- | tools/mhmake/src/mhmakelexer.l | 10 | ||||
-rw-r--r-- | tools/mhmake/src/util.cpp | 4 | ||||
-rw-r--r-- | tools/mhmake/src/util.h | 2 |
15 files changed, 588 insertions, 116 deletions
diff --git a/tools/mhmake/mhmake.vcproj b/tools/mhmake/mhmake.vcproj index 9aba27775..690701c3c 100644 --- a/tools/mhmake/mhmake.vcproj +++ b/tools/mhmake/mhmake.vcproj @@ -1,15 +1,19 @@ <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9.00"
+ Version="9,00"
Name="mhmake"
ProjectGUID="{7F1669C8-7974-45DF-9B71-0E2A8DC44C06}"
+ RootNamespace="mhmake"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
+ <Platform
+ Name="x64"
+ />
</Platforms>
<ToolFiles>
</ToolFiles>
@@ -60,10 +64,7 @@ RuntimeTypeInfo="false"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
- PrecompiledHeaderFile=".\Release/mhmake.pch"
- AssemblerListingLocation=".\Release/"
- ObjectFile=".\Release/"
- ProgramDataBaseFileName=".\Release/"
+ AssemblerListingLocation="$(IntDir)"
WarningLevel="3"
SuppressStartupBanner="true"
CallingConvention="1"
@@ -83,10 +84,9 @@ />
<Tool
Name="VCLinkerTool"
- OutputFile=".\Release/mhmake.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
- ProgramDatabaseFile=".\Release/mhmake.pdb"
+ ProgramDatabaseFile=""
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
@@ -115,6 +115,102 @@ />
</Configuration>
<Configuration
+ Name="Release|x64"
+ OutputDirectory="Release64"
+ IntermediateDirectory="Release64"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Release/mhmake.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories=".,src,src\parser"
+ PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE"
+ StringPooling="true"
+ ExceptionHandling="2"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="false"
+ EnableEnhancedInstructionSet="0"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ AssemblerListingLocation="$(IntDir)"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ CallingConvention="1"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
@@ -150,10 +246,8 @@ RuntimeLibrary="1"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
- PrecompiledHeaderFile=".\Debug/mhmake.pch"
- AssemblerListingLocation=".\Debug/"
- ObjectFile=".\Debug/"
- ProgramDataBaseFileName=".\Debug/"
+ AssemblerListingLocation="$(IntDir)"
+ XMLDocumentationFileName="$(IntDir)"
BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="true"
@@ -174,11 +268,10 @@ />
<Tool
Name="VCLinkerTool"
- OutputFile=".\Debug/mhmake_dbg.exe"
+ OutputFile="$(OutDir)\mhmake_dbg.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
- ProgramDatabaseFile=".\Debug/mhmake.pdb"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
@@ -207,6 +300,97 @@ />
</Configuration>
<Configuration
+ Name="Debug|x64"
+ OutputDirectory="Debug64"
+ IntermediateDirectory="Debug64"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Debug/mhmake.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".,src,src\parser"
+ PreprocessorDefinitions="_DEBUG;_CRTDBG_MAP_ALLOC;WIN32;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ AssemblerListingLocation="$(IntDir)"
+ XMLDocumentationFileName="$(IntDir)"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\mhmake_dbg.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/mhmake.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
Name="Profile|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
@@ -307,6 +491,108 @@ Name="VCPostBuildEventTool"
/>
</Configuration>
+ <Configuration
+ Name="Profile|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Release/mhmake.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
+ AdditionalIncludeDirectories=".,src,src\parser"
+ PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="false"
+ EnableEnhancedInstructionSet="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile="$(ConfigurationName)/mhmake.pch"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CallingConvention="1"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(ConfigurationName)/mhmake.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
+ GenerateMapFile="true"
+ MapExports="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ FixedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
</Configurations>
<References>
</References>
@@ -359,6 +645,14 @@ />
</FileConfiguration>
<FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Debug|Win32"
>
<Tool
@@ -367,6 +661,14 @@ />
</FileConfiguration>
<FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Profile|Win32"
>
<Tool
@@ -374,6 +676,46 @@ UsePrecompiledHeader="1"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Profile|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug 64|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug 64|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release 64|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release 64|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath=".\src\util.cpp"
@@ -435,6 +777,16 @@ />
</FileConfiguration>
<FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="cmd.exe /c makelex.bat
"
+ AdditionalDependencies=".\src\flexskel.cc;.\src\flexskel.h;"
+ Outputs="src\parser\mhmakeLexer.cpp;src\parser\mhmakeLexer.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Debug|Win32"
>
<Tool
@@ -445,6 +797,16 @@ />
</FileConfiguration>
<FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="cmd.exe /c makelex.bat
"
+ AdditionalDependencies=".\src\flexskel.cc;.\src\flexskel.h;"
+ Outputs="src\parser\mhmakeLexer.cpp;src\parser\mhmakeLexer.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Profile|Win32"
>
<Tool
@@ -454,6 +816,56 @@ Outputs="src\parser\mhmakeLexer.cpp;src\parser\mhmakeLexer.h"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Profile|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="cmd.exe /c makelex.bat
"
+ AdditionalDependencies=".\src\flexskel.cc;.\src\flexskel.h;"
+ Outputs="src\parser\mhmakeLexer.cpp;src\parser\mhmakeLexer.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug 64|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="cmd.exe /c makelex.bat
"
+ AdditionalDependencies=".\src\flexskel.cc;.\src\flexskel.h;"
+ Outputs="src\parser\mhmakeLexer.cpp;src\parser\mhmakeLexer.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug 64|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="cmd.exe /c makelex.bat
"
+ AdditionalDependencies=".\src\flexskel.cc;.\src\flexskel.h;"
+ Outputs="src\parser\mhmakeLexer.cpp;src\parser\mhmakeLexer.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release 64|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="cmd.exe /c makelex.bat
"
+ AdditionalDependencies=".\src\flexskel.cc;.\src\flexskel.h;"
+ Outputs="src\parser\mhmakeLexer.cpp;src\parser\mhmakeLexer.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release 64|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="cmd.exe /c makelex.bat
"
+ AdditionalDependencies=".\src\flexskel.cc;.\src\flexskel.h;"
+ Outputs="src\parser\mhmakeLexer.cpp;src\parser\mhmakeLexer.h"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath=".\src\mhmakeParser.y"
@@ -469,6 +881,16 @@ />
</FileConfiguration>
<FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="cmd.exe /c makebison.bat
"
+ AdditionalDependencies=".\src\bison.cc;.\src\bison.h;"
+ Outputs="src\parser\mhmakeparser.cpp;src\parser\mhmakeparser.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Debug|Win32"
>
<Tool
@@ -479,6 +901,16 @@ />
</FileConfiguration>
<FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="cmd.exe /c makebison.bat
"
+ AdditionalDependencies=".\src\bison.cc;.\src\bison.h;"
+ Outputs="src\parser\mhmakeparser.cpp;src\parser\mhmakeparser.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Profile|Win32"
>
<Tool
@@ -488,6 +920,56 @@ Outputs="src\parser\mhmakeparser.cpp;src\parser\mhmakeparser.h"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Profile|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="cmd.exe /c makebison.bat
"
+ AdditionalDependencies=".\src\bison.cc;.\src\bison.h;"
+ Outputs="src\parser\mhmakeparser.cpp;src\parser\mhmakeparser.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug 64|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="cmd.exe /c makebison.bat
"
+ AdditionalDependencies=".\src\bison.cc;.\src\bison.h;"
+ Outputs="src\parser\mhmakeparser.cpp;src\parser\mhmakeparser.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug 64|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="cmd.exe /c makebison.bat
"
+ AdditionalDependencies=".\src\bison.cc;.\src\bison.h;"
+ Outputs="src\parser\mhmakeparser.cpp;src\parser\mhmakeparser.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release 64|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="cmd.exe /c makebison.bat
"
+ AdditionalDependencies=".\src\bison.cc;.\src\bison.h;"
+ Outputs="src\parser\mhmakeparser.cpp;src\parser\mhmakeparser.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release 64|x64"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="cmd.exe /c makebison.bat
"
+ AdditionalDependencies=".\src\bison.cc;.\src\bison.h;"
+ Outputs="src\parser\mhmakeparser.cpp;src\parser\mhmakeparser.h"
+ />
+ </FileConfiguration>
</File>
<Filter
Name="Auto"
diff --git a/tools/mhmake/src/bison.cc b/tools/mhmake/src/bison.cc index bb15365b6..e0315efd4 100644 --- a/tools/mhmake/src/bison.cc +++ b/tools/mhmake/src/bison.cc @@ -503,7 +503,7 @@ int YY_@_DEBUG_FLAG; /* nonzero means print parse trace in available built-in functions on various systems. */
#ifdef __cplusplus
-static void __yy_bcopy (char *from, char *to, int count)
+static void __yy_bcopy (char *from, char *to, size_t count)
#else
#ifdef __STDC__
static void __yy_bcopy (char *from, char *to, int count)
@@ -517,7 +517,7 @@ static void __yy_bcopy (from, to, count) {
register char *f = from;
register char *t = to;
- register int i = count;
+ register size_t i = count;
while (i-- > 0)
*t++ = *f++;
@@ -618,7 +618,7 @@ YYLABEL(yynewstate) #endif
/* Get the current used size of the three stacks, in elements. */
- int size = yyssp - yyss + 1;
+ size_t size = yyssp - yyss + 1;
#ifdef yyoverflow
/* Each stack pointer address is followed by the size of
@@ -884,7 +884,7 @@ YYLABEL(yyerrlab) /* here on detecting error */ if (yyn > YYFLAG && yyn < YYLAST)
{
- int size = 0;
+ size_t size = 0;
char *msg;
int x, count;
diff --git a/tools/mhmake/src/build.cpp b/tools/mhmake/src/build.cpp index 67b5bfffb..8e4732c32 100644 --- a/tools/mhmake/src/build.cpp +++ b/tools/mhmake/src/build.cpp @@ -481,7 +481,7 @@ static bool CopyFile(refptr<fileinfo> pSrc, refptr<fileinfo> pDest) return false;
}
char Buf[4096];
- int Ret;
+ size_t Ret;
while ( (Ret=fread(Buf,1,sizeof(Buf),pSrcFile)) > 0)
{
@@ -602,7 +602,7 @@ exit: static bool EchoCommand(const string &Params)
{
// Find the first > character
- int Pos=Params.find_first_of('>');
+ size_t Pos=Params.find_first_of('>');
if (Pos==string::npos)
{
// Just echo it
@@ -651,7 +651,7 @@ static bool CopyFiles(const string &Params) SplitToItems(Params,Files);
- int NrSrcs=Files.size()-1;
+ size_t NrSrcs=Files.size()-1;
if (NrSrcs<1)
{
@@ -666,7 +666,7 @@ static bool CopyFiles(const string &Params) return false;
}
- for (int i=0; i<NrSrcs; i++)
+ for (size_t i=0; i<NrSrcs; i++)
{
refptr<fileinfo> pSrc=Files[i];
@@ -914,9 +914,9 @@ string mhmakefileparser::GetFullCommand(string Command) }
if (!bBuild)
{
- deps_t Autodeps;
+ set< refptr<fileinfo> > Autodeps;
GetAutoDeps(pPyFile, Autodeps);
- deps_t::iterator It=Autodeps.begin();
+ set< refptr<fileinfo> >::iterator It=Autodeps.begin();
while (It!=Autodeps.end())
{
if (pExeFile->GetDate().IsOlder((*It)->GetDate()))
@@ -1074,7 +1074,7 @@ bool OsExeCommand(const string &Command,const string &Params,bool IgnoreError,st CloseHandle(ProcessInfo.hThread);
char Buf[256];
- int Nbr;
+ size_t Nbr;
while ( (Nbr=fread(Buf,1,sizeof(Buf)-1,pStdOut)) > 0)
{
if (pOutput)
@@ -1679,6 +1679,7 @@ mh_time_t mhmakefileparser::BuildTarget(const refptr<fileinfo> &Target,bool bChe Target->SetCommandsMd5_32(Md5_32); /* If the rule of the target was added with an implicit rule the targets in the rule is empty */
pMakefile->AddTarget(Target);
+ pMakefile->m_AutoDepsDirty=true;
pRule->SetTargetsIsBuild(Md5_32);
break;
}
@@ -1689,7 +1690,7 @@ mh_time_t mhmakefileparser::BuildTarget(const refptr<fileinfo> &Target,bool bChe // Only rebuild if it is not yet rebuild in this current run. This may happen for implicit rules that have multiple targets (implicit rules that build more then one target at the same time
Target->SetCommandsMd5_32(Md5_32);
pMakefile->AddTarget(Target);
- m_AutoDepsDirty=true; /* We need to update the autodeps file if the md5 has been changed */
+ pMakefile->m_AutoDepsDirty=true; /* We need to update the autodeps file if the md5 has been changed */
break;
}
else
diff --git a/tools/mhmake/src/fileinfo.cpp b/tools/mhmake/src/fileinfo.cpp index 6ea9c158e..387b2816d 100644 --- a/tools/mhmake/src/fileinfo.cpp +++ b/tools/mhmake/src/fileinfo.cpp @@ -57,7 +57,7 @@ string QuoteFileName(const string &Filename) ///////////////////////////////////////////////////////////////////////////////
string UnquoteFileName(const string &Filename)
{
- int Pos=0;
+ size_t Pos=0;
string Name(Filename);
#if OSPATHSEP=='\\'
/* Remove all the quotes from the filename */
diff --git a/tools/mhmake/src/fileinfo.h b/tools/mhmake/src/fileinfo.h index 9be40bdbe..9a521d4a6 100644 --- a/tools/mhmake/src/fileinfo.h +++ b/tools/mhmake/src/fileinfo.h @@ -211,7 +211,7 @@ public: {
#if defined(_DEBUG) && defined(_MSC_VER)
if (m_pRule && m_pRule->GetCommands().size()) {
- _asm int 3;
+ DebugBreak();
}
#endif
m_pRule=pRule;
diff --git a/tools/mhmake/src/flexskel.cc b/tools/mhmake/src/flexskel.cc index 148e7f54c..43c395dba 100644 --- a/tools/mhmake/src/flexskel.cc +++ b/tools/mhmake/src/flexskel.cc @@ -277,7 +277,7 @@ struct yy_buffer_state int yy_buf_size;
/* number of characters read into yy_ch_buf, not including EOB characters */
- int yy_n_chars;
+ size_t yy_n_chars;
int yy_eof_status; /* whether we've seen an EOF on this buffer */
#define EOF_NOT_SEEN 0
@@ -307,7 +307,7 @@ static int yy_n_chars; /* number of characters read into yy_ch_buf */ /* GLOBAL */
YY_@_CHAR *yy___text;
-int yy___leng;
+size_t yy___leng;
YY_@_IFILE *yy___in = (YY_@_IFILE *) 0;
YY_@_OFILE *yy___out = (YY_@_OFILE *) 0;
@@ -342,7 +342,7 @@ void YY_@_CLASS::yy___echo() }
#endif
#ifndef YY_@_INPUT_NOCODE
-int YY_@_CLASS::yy___input(char * buffer,int &result,int max_size)
+size_t YY_@_CLASS::yy___input(char * buffer,size_t &result,size_t max_size)
{
YY_@_INPUT_CODE
}
@@ -514,7 +514,7 @@ do_action: /* this label is used only to access EOF actions */ case YY_END_OF_BUFFER:
{
/* amount of text matched not including the EOB char */
- int yy_amount_of_matched_text = yy_cp - yy___text - 1;
+ int yy_amount_of_matched_text = (int)(yy_cp - yy___text - 1);
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = yy_hold_char;
@@ -643,7 +643,7 @@ int YY_@_CLASS::yy_get_next_buffer() {
register YY_@_CHAR *dest = YY_@_CURRENT_BUFFER->yy_ch_buf;
register YY_@_CHAR *source = yy___text - 1; /* copy prev. char, too */
- register int number_to_move, i;
+ register ptrdiff_t number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &YY_@_CURRENT_BUFFER->yy_ch_buf[yy_n_chars + 1] )
@@ -665,7 +665,7 @@ int YY_@_CLASS::yy_get_next_buffer() else
{
- int num_to_read = YY_@_CURRENT_BUFFER->yy_buf_size - number_to_move - 1;
+ ptrdiff_t num_to_read = YY_@_CURRENT_BUFFER->yy_buf_size - number_to_move - 1;
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
@@ -791,7 +791,7 @@ void YY_@_CLASS::yyunput( YY_@_CHAR c, YY_@_CHAR *yy_bp ) if ( yy_cp < YY_@_CURRENT_BUFFER->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
- register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
+ register ptrdiff_t number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
register YY_@_CHAR *dest = &YY_@_CURRENT_BUFFER->yy_ch_buf[YY_@_CURRENT_BUFFER->yy_buf_size + 2];
register YY_@_CHAR *source = &YY_@_CURRENT_BUFFER->yy_ch_buf[number_to_move];
diff --git a/tools/mhmake/src/flexskel.h b/tools/mhmake/src/flexskel.h index 58d807f6a..563e469c7 100644 --- a/tools/mhmake/src/flexskel.h +++ b/tools/mhmake/src/flexskel.h @@ -329,7 +329,7 @@ class YY_@_CLASS YY_@_INHERIT private:/* data */
YY_@_CHAR *yy_c_buf_p;
YY_@_CHAR yy_hold_char;
- int yy_n_chars;
+ size_t yy_n_chars;
int yy_init;
int yy_start;
int yy_did_buffer_switch_on_eof;
@@ -356,7 +356,7 @@ protected:/* non virtual */ =0
#endif
;
- virtual int YY_@_INPUT(char *buf,int &result,int max_size)
+ virtual size_t YY_@_INPUT(char *buf,size_t &result,size_t max_size)
#ifdef YY_@_INPUT_PURE
=0
#endif
@@ -373,7 +373,7 @@ protected:/* non virtual */ ;
public:
YY_@_CHAR *YY_@_TEXT;
- int YY_@_LENG;
+ size_t YY_@_LENG;
YY_@_IFILE *YY_@_IN;
YY_@_OFILE *YY_@_OUT;
YY_@_LEX_RETURN YY_@_LEX ( YY_@_LEX_PARAM);
diff --git a/tools/mhmake/src/functions.cpp b/tools/mhmake/src/functions.cpp index 3765bc37c..c93292d88 100644 --- a/tools/mhmake/src/functions.cpp +++ b/tools/mhmake/src/functions.cpp @@ -73,7 +73,7 @@ static string TrimString(const string &Input) while (strchr(" \t",Input[Start])) Start++;
if (Start>=Input.size())
return g_EmptyString;
- unsigned Stop=Input.size()-1;
+ size_t Stop=Input.size()-1;
while (strchr(" \t",Input[Stop])) Stop--;
return Input.substr(Start,Stop-Start+1);
}
@@ -81,7 +81,7 @@ static string TrimString(const string &Input) ///////////////////////////////////////////////////////////////////////////////
string mhmakefileparser::f_filter(const string & Arg) const
{
- int ipos=Arg.find(',');
+ size_t ipos=Arg.find(',');
#ifdef _DEBUG
if (ipos==string::npos) {
throw string("filter func should have 2 arguments: ")+Arg;
@@ -120,7 +120,7 @@ string mhmakefileparser::f_filter(const string & Arg) const ///////////////////////////////////////////////////////////////////////////////
string mhmakefileparser::f_filterout(const string & Arg) const
{
- int ipos=Arg.find(',');
+ size_t ipos=Arg.find(',');
#ifdef _DEBUG
if (ipos==string::npos) {
throw string("filter func should have 2 arguments: ")+Arg;
@@ -182,8 +182,8 @@ string mhmakefileparser::f_call(const string & Arg) const i++;
char Tmp[10];
::sprintf(Tmp,"$(%d)",i);
- int Len=::strlen(Tmp);
- int Pos=Func.find(Tmp);
+ size_t Len=::strlen(Tmp);
+ size_t Pos=Func.find(Tmp);
while (Func.npos!=Pos)
{
Func=Func.substr(0,Pos)+Repl+Func.substr(Pos+Len);
@@ -216,8 +216,8 @@ string mhmakefileparser::f_subst(const string & Arg) const return Text;
string Ret;
- int Pos=Text.find(FromString);
- int PrevPos=0;
+ size_t Pos=Text.find(FromString);
+ size_t PrevPos=0;
while (Pos!=string::npos)
{
Ret+=Text.substr(PrevPos,Pos-PrevPos);
@@ -334,11 +334,11 @@ string mhmakefileparser::f_firstword(const string & Arg) const string mhmakefileparser::f_wildcard(const string & Arg) const
{
string FileSpec=TrimString(Arg);
- int LastSep=FileSpec.find_last_of(OSPATHSEP)+1;
+ size_t LastSep=FileSpec.find_last_of(OSPATHSEP)+1;
string Dir=FileSpec.substr(0,LastSep);
#ifdef WIN32
struct _finddata_t FileInfo;
- long hFile=_findfirst(FileSpec.c_str(),&FileInfo);
+ intptr_t hFile=_findfirst(FileSpec.c_str(),&FileInfo);
if (hFile==-1)
return g_EmptyString;
@@ -500,7 +500,7 @@ string mhmakefileparser::f_basename(const string & FileNames) const ///////////////////////////////////////////////////////////////////////////////
static string notdir(const string &FileName,const string &)
{
- int Pos=FileName.find_last_of(OSPATHSEP);
+ size_t Pos=FileName.find_last_of(OSPATHSEP);
if (Pos==string::npos)
{
return FileName;
@@ -641,7 +641,7 @@ string mhmakefileparser::f_strip(const string & Arg) const ///////////////////////////////////////////////////////////////////////////////
static string dir(const string &FileName,const string &)
{
- int Pos=FileName.find_last_of(OSPATHSEP);
+ size_t Pos=FileName.find_last_of(OSPATHSEP);
if (Pos==string::npos)
{
return g_EmptyString;
diff --git a/tools/mhmake/src/md5.cpp b/tools/mhmake/src/md5.cpp index 2161b3c75..908f28134 100644 --- a/tools/mhmake/src/md5.cpp +++ b/tools/mhmake/src/md5.cpp @@ -210,7 +210,7 @@ static uint8 md5_padding[64] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
-void md5_update( md5_context *ctx, uint8 *input, uint32 length )
+void md5_update( md5_context *ctx, uint8 *input, size_t length )
{
uint32 left, fill;
@@ -224,8 +224,7 @@ void md5_update( md5_context *ctx, uint8 *input, uint32 length ) left = ctx->total[0] & 0x3F;
fill = 64 - left;
- ctx->total[0] += length;
- ctx->total[0] &= 0xFFFFFFFF;
+ ctx->total[0] = (uint32)((ctx->total[0] + length)& 0xFFFFFFFF);
if( ctx->total[0] < length )
ctx->total[1]++;
diff --git a/tools/mhmake/src/md5.h b/tools/mhmake/src/md5.h index 5f604d460..d2e3ef62f 100644 --- a/tools/mhmake/src/md5.h +++ b/tools/mhmake/src/md5.h @@ -44,7 +44,7 @@ md5_context; typedef uint32 md5_val[4];
void md5_starts( md5_context *ctx );
-void md5_update( md5_context *ctx, uint8 *input, uint32 length );
+void md5_update( md5_context *ctx, uint8 *input, size_t length );
void md5_finish( md5_context *ctx, uint8 digest[16] );
uint32 *md5_finishbin( md5_context *ctx);
uint32 md5_finish32( md5_context *ctx);
diff --git a/tools/mhmake/src/mhmakefileparser.cpp b/tools/mhmake/src/mhmakefileparser.cpp index cc1c308dd..de7b22da3 100644 --- a/tools/mhmake/src/mhmakefileparser.cpp +++ b/tools/mhmake/src/mhmakefileparser.cpp @@ -79,14 +79,14 @@ bool mhmakefileparser::IsDefined(const string &Var) const }
///////////////////////////////////////////////////////////////////////////////
-static inline int SkipUntilQuote(const string &Expr,int i,char Char)
+static inline size_t SkipUntilQuote(const string &Expr,size_t i,char Char)
{
while (Expr[i++]!=Char) ;
return i;
}
///////////////////////////////////////////////////////////////////////////////
-static inline int SkipMakeExpr(const string &Expr,int i)
+static inline size_t SkipMakeExpr(const string &Expr,size_t i)
{
char Char=Expr[i++];
if (Char!='(')
@@ -108,7 +108,7 @@ static inline int SkipMakeExpr(const string &Expr,int i) // a macro or quoted string
static pair<string,string> SplitExpr(const string &Expr,char Item)
{
- int i=0;
+ size_t i=0;
char Char=Expr[i++];
while (Char!=Item)
{
@@ -132,8 +132,8 @@ bool mhmakefileparser::IsEqual(const string &EqualExpr) const const char *pStr=Expr.c_str();
const char *pTmp=pStr;
while (*pTmp && *pTmp!=',') pTmp++;
- int Pos=pTmp-pStr;
- int Size=Expr.size();
+ ptrdiff_t Pos=pTmp-pStr;
+ size_t Size=Expr.size();
pTmp=pStr+Size-1;
while (pTmp>pStr && strchr(" \t",*pTmp))
{
@@ -164,8 +164,8 @@ bool mhmakefileparser::IsEqual(const string &EqualExpr) const string mhmakefileparser::ExpandExpression(const string &Expr) const
{
((mhmakefileparser*)this)->m_InExpandExpression++;
- int i=0;
- int Length=Expr.size();
+ size_t i=0;
+ size_t Length=Expr.size();
string Ret;
string ToAdd;
while (i<Length)
@@ -181,7 +181,7 @@ string mhmakefileparser::ExpandExpression(const string &Expr) const }
else
{
- int inew=SkipMakeExpr(Expr,i);
+ size_t inew=SkipMakeExpr(Expr,i);
i++;
if (inew>i)
{
@@ -206,7 +206,7 @@ string mhmakefileparser::ExpandExpression(const string &Expr) const // Here we do a special case in case we still have a $ within a %
if (Ret.find('$')!=string::npos)
Ret=ExpandExpression(Ret);
- int Pos;
+ size_t Pos;
while ((Pos=Ret.find("$$"))!=string::npos)
{
Ret=Ret.replace(Pos,2,"$");
@@ -458,7 +458,7 @@ void mhmakefileparser::AddRule() }
///////////////////////////////////////////////////////////////////////////////
-void mhmakefileparser::GetAutoDeps(const refptr<fileinfo> &FirstDep, deps_t &Autodeps)
+void mhmakefileparser::GetAutoDeps(const refptr<fileinfo> &FirstDep,set< refptr<fileinfo> > &Autodeps)
{
/* Here we have to scan only c/c++ headers so skip certain extensions */
const char *pFullName=FirstDep->GetFullFileName().c_str();
@@ -550,11 +550,11 @@ void mhmakefileparser::GetAutoDeps(const refptr<fileinfo> &FirstDep, deps_t &Aut /* Add the dependency when the file alrady exist or there is a rule available to be build */
if (BuildTarget(pInclude).DoesExist()) // Try to build the target, and add it if it exists after building
{
- deps_t::const_iterator pFind=Autodeps.find(pInclude);
+ set< refptr<fileinfo> >::iterator pFind=Autodeps.find(pInclude);
if (pFind==Autodeps.end())
{
Autodeps.insert(pInclude);
- GetAutoDepsIfNeeded(pInclude,pInclude);
+ GetAutoDeps(pInclude,Autodeps);
}
}
}
@@ -565,11 +565,11 @@ void mhmakefileparser::GetAutoDeps(const refptr<fileinfo> &FirstDep, deps_t &Aut refptr<fileinfo> pInclude=GetFileInfo(IncludeFile,*It);
if (BuildTarget(pInclude).DoesExist()) // Try to build the target, and add it if it exists after building
{
- deps_t::const_iterator pFind=Autodeps.find(pInclude);
+ set< refptr<fileinfo> >::iterator pFind=Autodeps.find(pInclude);
if (pFind==Autodeps.end())
{
Autodeps.insert(pInclude);
- GetAutoDepsIfNeeded(pInclude,pInclude);
+ GetAutoDeps(pInclude,Autodeps);
}
break;
}
@@ -588,31 +588,12 @@ void mhmakefileparser::GetAutoDeps(const refptr<fileinfo> &FirstDep, deps_t &Aut }
///////////////////////////////////////////////////////////////////////////////
-
-void mhmakefileparser::GetAutoDepsIfNeeded(const refptr<fileinfo> &Target, const refptr<fileinfo>&FirstDep)
-{
- autodeps_entry_t &Autodeps=m_AutoDeps[Target];
- if (!Autodeps.first)
- {
- Autodeps.first=true;
- /* We are going to rescan, so throw away the old. */
- Autodeps.second.clear();
- GetAutoDeps(FirstDep,Autodeps.second);
- // Now add these dependencies also to the rules
- deps_t::iterator It=Autodeps.second.begin();
- while (It!=Autodeps.second.end())
- {
- Target->AddDep(*It);
- It++;
- }
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
void mhmakefileparser::UpdateAutomaticDependencies(const refptr<fileinfo> &Target)
{
- m_AutoDepsDirty=true; /* Always assume dirty since in the autodeps file, the md5 strings are also saved. */
+ const char *pName=Target->GetFullFileName().c_str();
+ const char *pExt=strrchr(pName,'.');
+ if (!pExt)
+ return;
if (Target->IsAutoDepExtention())
{
// we have to search for the include files in the first dependency of Target
@@ -620,7 +601,18 @@ void mhmakefileparser::UpdateAutomaticDependencies(const refptr<fileinfo> &Targe if (!Deps.size())
return; // There is no first dep
refptr<fileinfo> FirstDep=Deps[0];
- GetAutoDepsIfNeeded(Target,FirstDep);
+
+ set< refptr<fileinfo> > &Autodeps=m_AutoDeps[Target];
+ Autodeps.clear(); // We are going to scan again, so clear the list
+ GetAutoDeps(FirstDep,Autodeps);
+ // Now add these dependencies also to the rules
+ set< refptr<fileinfo> >::iterator It=Autodeps.begin();
+ while (It!=Autodeps.end())
+ {
+ Target->AddDep(*It);
+ It++;
+ }
+ m_AutoDepsDirty=true;
}
}
@@ -697,14 +689,14 @@ void mhmakefileparser::LoadAutoDepsFile(refptr<fileinfo> &DepFile) while (FileName[0])
{
refptr<fileinfo> Target=GetFileInfo(FileName);
- autodeps_entry_t &Autodeps=m_AutoDeps[Target];
+ set< refptr<fileinfo> > &Autodeps=m_AutoDeps[Target];
ReadStr(pIn,FileName);
while (FileName[0])
{
if (!g_ForceAutoDepRescan) /* If we are forcing the autodepscan we do not have to load the dependencies. */
{
refptr<fileinfo> Dep=GetFileInfo(FileName);
- Autodeps.second.insert(Dep);
+ Autodeps.insert(Dep);
Target->AddDep(Dep);
}
ReadStr(pIn,FileName);
@@ -713,12 +705,15 @@ void mhmakefileparser::LoadAutoDepsFile(refptr<fileinfo> &DepFile) }
uint32 Md5_32;
+ bool MakeNotDirty=true;
while (fread(&Md5_32,sizeof(Md5_32),1,pIn))
{
ReadStr(pIn,FileName);
pair <set<refptr<fileinfo>,less_refptrfileinfo >::iterator, bool> pPair=g_FileInfos.insert(new fileinfo(FileName,Md5_32));
if (!pPair.second)
{
+ if (!(*pPair.first)->CompareMd5_32(Md5_32) && !(*pPair.first)->CompareMd5_32(0))
+ MakeNotDirty=false; /* BuildTarget had set the dirty flag, but since the md5 did not change it was a false dirty. This is for BuildTargets called before this routine */
#ifdef _DEBUG
if (!(*pPair.first)->CompareMd5_32(Md5_32) && !(*pPair.first)->CompareMd5_32(0))
cout << "Warning: trying to set to different md5's for Target "<<(*pPair.first)->GetQuotedFullFileName()<<" Old: "<<hex<<(*pPair.first)->GetCommandsMd5_32()<<" New: "<<Md5_32<<endl;
@@ -729,6 +724,8 @@ void mhmakefileparser::LoadAutoDepsFile(refptr<fileinfo> &DepFile) }
AddTarget(*pPair.first);
}
+ if (MakeNotDirty)
+ m_AutoDepsDirty=false;
fclose(pIn);
}
@@ -792,20 +789,17 @@ void mhmakefileparser::SaveAutoDepsFile() fwrite(&Md5_32,sizeof(Md5_32),1,pOut);
fprintf(pOut,"%s\n",m_Variables[USED_ENVVARS].c_str());
- autodeps_t::const_iterator It=m_AutoDeps.begin();
+ map< refptr<fileinfo>, set< refptr<fileinfo> > >::const_iterator It=m_AutoDeps.begin();
while (It!=m_AutoDeps.end())
{
- if (!It->second.second.empty())
+ fprintf(pOut,"%s\n",It->first->GetFullFileName().c_str());
+ set< refptr<fileinfo> >::const_iterator DepIt=It->second.begin();
+ while (DepIt!=It->second.end())
{
- fprintf(pOut,"%s\n",It->first->GetFullFileName().c_str());
- deps_t::const_iterator DepIt=It->second.second.begin();
- while (DepIt!=It->second.second.end())
- {
- fprintf(pOut,"%s\n",(*DepIt)->GetFullFileName().c_str());
- DepIt++;
- }
- fprintf(pOut,"\n");
+ fprintf(pOut,"%s\n",(*DepIt)->GetFullFileName().c_str());
+ DepIt++;
}
+ fprintf(pOut,"\n");
It++;
}
/* Now save the Md5 strings */
diff --git a/tools/mhmake/src/mhmakefileparser.h b/tools/mhmake/src/mhmakefileparser.h index 32d4ad88a..3afe84995 100644 --- a/tools/mhmake/src/mhmakefileparser.h +++ b/tools/mhmake/src/mhmakefileparser.h @@ -48,9 +48,6 @@ class fileinfoarray : public refbase,public vector<refptr<fileinfo> > };
typedef set< refptr<fileinfo> > deps_t;
-typedef pair< bool, deps_t > autodeps_entry_t;
-typedef map< refptr<fileinfo>, autodeps_entry_t > autodeps_t;
-
class mhmakefileparser : public refbase
{
@@ -81,7 +78,7 @@ protected: fileinfoarray m_IncludedMakefiles;
refptr< fileinfoarray > m_pIncludeDirs;
string m_IncludeDirs;
- autodeps_t m_AutoDeps;
+ map< refptr<fileinfo>, set< refptr<fileinfo> > > m_AutoDeps;
set< const fileinfo* , less_fileinfo > m_Targets; // List of targets that are build by this makefile
bool m_DoubleColonRule;
bool m_AutoDepsDirty;
@@ -158,10 +155,9 @@ public: {
m_RuleThatIsBuild=NULL;
}
- void GetAutoDepsIfNeeded(const refptr<fileinfo> &Target, const refptr<fileinfo>&FirstDep);
void UpdateAutomaticDependencies(const refptr<fileinfo> &Target);
const refptr<fileinfoarray> GetIncludeDirs() const;
- void GetAutoDeps(const refptr<fileinfo> &FirstDep, deps_t &Autodeps);
+ void GetAutoDeps(const refptr<fileinfo> &FirstDep,set< refptr<fileinfo> > &Autodeps);
void SaveAutoDepsFile();
void LoadAutoDepsFile(refptr<fileinfo> &DepFile);
bool SkipHeaderFile(const string &FileName);
diff --git a/tools/mhmake/src/mhmakelexer.l b/tools/mhmake/src/mhmakelexer.l index 0b25d4c74..00c9c3f9b 100644 --- a/tools/mhmake/src/mhmakelexer.l +++ b/tools/mhmake/src/mhmakelexer.l @@ -67,7 +67,7 @@ static void SaveMakMd5(refptr<fileinfo> &Target) };\
int m_Line;\
int m_BraceIndent;\
- int m_IndentSkip;\
+ size_t m_IndentSkip;\
iterstack<int> m_IndentStack;\
bool m_IgnoreIncludeError;\
string m_InputFileName; \
@@ -567,7 +567,7 @@ export { /*---------------------------------------------------------------------------*/
[a-zA-Z]:[a-zA-Z0-9\\\._\~\-%\@<&/]+\\[ \t\r]*\n {
- int EndIndex=::strlen((const char*)yytext);
+ size_t EndIndex=::strlen((const char*)yytext);
while (strchr(" \t\r\n\\",yytext[--EndIndex]));
yyless(EndIndex+1);
@@ -584,7 +584,7 @@ export { /*---------------------------------------------------------------------------*/
([a-zA-Z0-9\\\._\~\-\+%\@<&;/\*]|\\\ |\\#)+\\[ \t\r]*\n {
- int EndIndex=::strlen((const char*)yytext);
+ size_t EndIndex=::strlen((const char*)yytext);
while (strchr(" \t\r\n\\",yytext[--EndIndex]));
yyless(EndIndex+1);
@@ -594,7 +594,7 @@ export { }
([a-zA-Z0-9\\\._\~\-\+%\@<&;/\*]|\\\ |\\#)+\+= {
- int Len;
+ size_t Len;
PRINTF(("%s %d: STRING: %s\n",m_InputFileName.c_str(),m_Line,yytext));
Len=strlen((const char *)yytext)-2;
yyless(Len);
@@ -727,7 +727,7 @@ export { <COMMANDPARSE>[ \t]*\\#[^\n]* {
char ToAdd[100];
int i=0;
- int nChars=(strchr((const char *)yytext,'#')-(char*)yytext)+1;
+ int nChars=(int)((strchr((const char *)yytext,'#')-(char*)yytext))+1;
while (strchr(" \t",yytext[i]))
{
ToAdd[i]=yytext[i];
diff --git a/tools/mhmake/src/util.cpp b/tools/mhmake/src/util.cpp index 0e227989a..9fc03ddad 100644 --- a/tools/mhmake/src/util.cpp +++ b/tools/mhmake/src/util.cpp @@ -231,7 +231,7 @@ bool PercentMatchList(const string &String,const string &ExprList,matchres *pRes string ReplaceWithStem(const string &String,const string &Stem)
{
string Ret=String;
- int Pos=Ret.find('%');
+ size_t Pos=Ret.find('%');
while (Pos!=string::npos)
{
Ret=Ret.substr(0,Pos)+Stem+Ret.substr(Pos+1);
@@ -309,7 +309,7 @@ loadedmakefile::loadedmakefile(vector<string> &Args,const string&Makefile) vector<string>::iterator ArgIt=Args.begin();
while (ArgIt!=Args.end())
{
- int EqPos=ArgIt->find('=');
+ size_t EqPos=ArgIt->find('=');
if (EqPos!=string::npos)
{
string Var=ArgIt->substr(0,EqPos);
diff --git a/tools/mhmake/src/util.h b/tools/mhmake/src/util.h index 1634f5135..25db10e48 100644 --- a/tools/mhmake/src/util.h +++ b/tools/mhmake/src/util.h @@ -50,7 +50,7 @@ #define PLATFORM "linux"
#endif
-#define MHMAKEVER "1.4.8"
+#define MHMAKEVER "1.4.10"
string SearchCommand(const string &Command, const string &Extension="");
|