This commit is contained in:
2025-06-04 00:18:32 +03:00
parent 804711f2c4
commit 5d85ebd85f
17 changed files with 108 additions and 7 deletions

View File

@@ -5,6 +5,7 @@
#include "tier1/utlstring.h"
#include "unistd.h"
#include "libgen.h"
#include "sys/stat.h"
unsigned int g_hashState = 102851263;
unsigned int CProject::GenerateProjectHash( void )
@@ -52,6 +53,19 @@ void IFileSystem2::MakeDirectory( const char *psz )
IRunner::Run("mkdir", args);
};
bool IFileSystem2::ShouldRecompile(const char *szSource, const char *szOutput)
{
struct stat srcbuf;
struct stat outbuf;
if (stat(szSource, &srcbuf) != 0) {
return true;
}
if (stat(szOutput, &outbuf) != 0) {
return true;
}
return outbuf.st_mtime < srcbuf.st_mtime;
};
CUtlVector<CBuildStage*> g_buildStages;
CBuildStage::CBuildStage( CUtlString sz, int(*pMainFn)() )