gwenhywfar 5.12.0
buildctx.c File Reference
#include "gwenbuild/buildctx/buildctx.h"
#include "gwenbuild/buildctx/buildctx_run.h"
#include "gwenbuild/buildctx/buildctx_p.h"
#include <gwenhywfar/debug.h>
#include <gwenhywfar/text.h>
#include <gwenhywfar/directory.h>
#include <gwenhywfar/gwentime.h>
#include <unistd.h>
#include <ctype.h>
Include dependency graph for buildctx.c:

Go to the source code of this file.

Macros

#define DISABLE_DEBUGLOG

Functions

static int _prepareBaseLogPath (GWB_BUILD_CONTEXT *bctx)
void GWB_BuildCtx_AddCommand (GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *cmd)
void GWB_BuildCtx_AddFile (GWB_BUILD_CONTEXT *bctx, GWB_FILE *file)
void GWB_BuildCtx_AddInFilesToCtxAndCmd (GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_FILE_LIST2 *fileList)
void GWB_BuildCtx_AddInFileToCtxAndCmd (GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_FILE *file)
void GWB_BuildCtx_AddOutFilesToCtxAndCmd (GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_FILE_LIST2 *fileList)
void GWB_BuildCtx_AddOutFileToCtxAndCmd (GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_FILE *file)
int GWB_BuildCtx_CreateAndSetLogFilenameForSubCmd (GWB_BUILD_CONTEXT *bctx, GWB_BUILD_SUBCMD *cmd)
void GWB_BuildCtx_Dump (const GWB_BUILD_CONTEXT *bctx, int indent)
void GWB_BuildCtx_free (GWB_BUILD_CONTEXT *bctx)
GWB_BUILD_CMD_LIST2 * GWB_BuildCtx_GetCommandList (const GWB_BUILD_CONTEXT *bctx)
GWB_FILEGWB_BuildCtx_GetFileByPathAndName (const GWB_BUILD_CONTEXT *bctx, const char *folder, const char *fname)
GWB_FILE_LIST2 * GWB_BuildCtx_GetFileList (const GWB_BUILD_CONTEXT *bctx)
const char * GWB_BuildCtx_GetInitialSourceDir (const GWB_BUILD_CONTEXT *bctx)
const char * GWB_BuildCtx_GetLogPath (const GWB_BUILD_CONTEXT *bctx)
GWB_BUILD_CONTEXTGWB_BuildCtx_new ()
void GWB_BuildCtx_SetInitialSourceDir (GWB_BUILD_CONTEXT *bctx, const char *s)
void GWB_BuildCtx_SetLogPath (GWB_BUILD_CONTEXT *bctx, const char *s)

Macro Definition Documentation

◆ DISABLE_DEBUGLOG

#define DISABLE_DEBUGLOG

Definition at line 14 of file buildctx.c.

Function Documentation

◆ _prepareBaseLogPath()

int _prepareBaseLogPath ( GWB_BUILD_CONTEXT * bctx)
static

◆ GWB_BuildCtx_AddCommand()

void GWB_BuildCtx_AddCommand ( GWB_BUILD_CONTEXT * bctx,
GWB_BUILD_CMD * cmd )

Definition at line 102 of file buildctx.c.

Referenced by _addBuildCmd(), and _addBuildCommands().

Here is the caller graph for this function:

◆ GWB_BuildCtx_AddFile()

void GWB_BuildCtx_AddFile ( GWB_BUILD_CONTEXT * bctx,
GWB_FILE * file )

Definition at line 116 of file buildctx.c.

References DBG_INFO, GWB_File_GetFolder(), GWB_File_GetName(), GWB_File_SetId(), and NULL.

Referenced by _addFilesToBuildCtx(), GWB_BuildCtx_AddInFileToCtxAndCmd(), and GWB_BuildCtx_AddOutFileToCtxAndCmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWB_BuildCtx_AddInFilesToCtxAndCmd()

void GWB_BuildCtx_AddInFilesToCtxAndCmd ( GWB_BUILD_CONTEXT * bctx,
GWB_BUILD_CMD * bcmd,
GWB_FILE_LIST2 * fileList )

Definition at line 150 of file buildctx.c.

References GWB_BuildCtx_AddInFileToCtxAndCmd().

Referenced by _addBuildCmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWB_BuildCtx_AddInFileToCtxAndCmd()

void GWB_BuildCtx_AddInFileToCtxAndCmd ( GWB_BUILD_CONTEXT * bctx,
GWB_BUILD_CMD * bcmd,
GWB_FILE * file )

Definition at line 132 of file buildctx.c.

References GWB_BuildCmd_AddInFile(), GWB_BuildCtx_AddFile(), GWB_BuildCtx_GetFileByPathAndName(), GWB_File_dup(), GWB_File_GetFolder(), and GWB_File_GetName().

Referenced by GWB_BuildCtx_AddInFilesToCtxAndCmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWB_BuildCtx_AddOutFilesToCtxAndCmd()

void GWB_BuildCtx_AddOutFilesToCtxAndCmd ( GWB_BUILD_CONTEXT * bctx,
GWB_BUILD_CMD * bcmd,
GWB_FILE_LIST2 * fileList )

Definition at line 187 of file buildctx.c.

References GWB_BuildCtx_AddOutFileToCtxAndCmd().

Referenced by _addBuildCmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWB_BuildCtx_AddOutFileToCtxAndCmd()

void GWB_BuildCtx_AddOutFileToCtxAndCmd ( GWB_BUILD_CONTEXT * bctx,
GWB_BUILD_CMD * bcmd,
GWB_FILE * file )

Definition at line 169 of file buildctx.c.

References GWB_BuildCmd_AddOutFile(), GWB_BuildCtx_AddFile(), GWB_BuildCtx_GetFileByPathAndName(), GWB_File_dup(), GWB_File_GetFolder(), and GWB_File_GetName().

Referenced by GWB_BuildCtx_AddOutFilesToCtxAndCmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWB_BuildCtx_CreateAndSetLogFilenameForSubCmd()

int GWB_BuildCtx_CreateAndSetLogFilenameForSubCmd ( GWB_BUILD_CONTEXT * bctx,
GWB_BUILD_SUBCMD * cmd )

Definition at line 220 of file buildctx.c.

References _prepareBaseLogPath(), DBG_ERROR, DBG_INFO, GWB_BuildSubCmd_SetLogFilename(), GWEN_Buffer_AppendArgs(), GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_Directory_GetPath(), GWEN_LOGDOMAIN, and NULL.

Referenced by _startCommand().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWB_BuildCtx_Dump()

void GWB_BuildCtx_Dump ( const GWB_BUILD_CONTEXT * bctx,
int indent )

Definition at line 206 of file buildctx.c.

References GWBUILD_Debug_PrintBuildCmdList2(), and GWBUILD_Debug_PrintFileList2().

Here is the call graph for this function:

◆ GWB_BuildCtx_free()

void GWB_BuildCtx_free ( GWB_BUILD_CONTEXT * bctx)

Definition at line 47 of file buildctx.c.

References GWB_BuildCmd_List2_FreeAll(), GWB_File_List2_FreeAll(), and GWEN_FREE_OBJECT.

Referenced by GWBUILD_MakeBuildCommands().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWB_BuildCtx_GetCommandList()

GWB_BUILD_CMD_LIST2 * GWB_BuildCtx_GetCommandList ( const GWB_BUILD_CONTEXT * bctx)

Definition at line 95 of file buildctx.c.

◆ GWB_BuildCtx_GetFileByPathAndName()

GWB_FILE * GWB_BuildCtx_GetFileByPathAndName ( const GWB_BUILD_CONTEXT * bctx,
const char * folder,
const char * fname )

Definition at line 125 of file buildctx.c.

References GWB_File_List2_GetFileByPathAndName().

Referenced by GWB_BuildCtx_AddInFileToCtxAndCmd(), and GWB_BuildCtx_AddOutFileToCtxAndCmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWB_BuildCtx_GetFileList()

GWB_FILE_LIST2 * GWB_BuildCtx_GetFileList ( const GWB_BUILD_CONTEXT * bctx)

Definition at line 109 of file buildctx.c.

◆ GWB_BuildCtx_GetInitialSourceDir()

const char * GWB_BuildCtx_GetInitialSourceDir ( const GWB_BUILD_CONTEXT * bctx)

Definition at line 80 of file buildctx.c.

◆ GWB_BuildCtx_GetLogPath()

const char * GWB_BuildCtx_GetLogPath ( const GWB_BUILD_CONTEXT * bctx)

Definition at line 65 of file buildctx.c.

◆ GWB_BuildCtx_new()

GWB_BUILD_CONTEXT * GWB_BuildCtx_new ( )

Definition at line 34 of file buildctx.c.

References GWEN_NEW_OBJECT.

Referenced by GWB_BuildCtx_fromXml(), and GWBUILD_MakeBuildCommands().

Here is the caller graph for this function:

◆ GWB_BuildCtx_SetInitialSourceDir()

void GWB_BuildCtx_SetInitialSourceDir ( GWB_BUILD_CONTEXT * bctx,
const char * s )

Definition at line 87 of file buildctx.c.

References NULL.

Referenced by GWB_BuildCtx_fromXml(), and GWBUILD_MakeBuildCommands().

Here is the caller graph for this function:

◆ GWB_BuildCtx_SetLogPath()

void GWB_BuildCtx_SetLogPath ( GWB_BUILD_CONTEXT * bctx,
const char * s )

Definition at line 72 of file buildctx.c.

References NULL.

Referenced by _prepareBaseLogPath().

Here is the caller graph for this function: