14 #define DISABLE_DEBUGLOG 19 #include "gwenbuild/buildctx/buildctx_p.h" 21 #include <gwenhywfar/debug.h> 22 #include <gwenhywfar/text.h> 23 #include <gwenhywfar/directory.h> 35 bctx->commandList=GWB_BuildCmd_List2_new();
36 bctx->fileList=GWB_File_List2_new();
46 GWB_BuildCmd_List2_free(bctx->waitingQueue);
47 GWB_BuildCmd_List2_free(bctx->runningQueue);
48 GWB_BuildCmd_List2_free(bctx->finishedQueue);
53 free(bctx->initialSourceDir);
63 return bctx->initialSourceDir;
70 free(bctx->initialSourceDir);
71 bctx->initialSourceDir=s?strdup(s):
NULL;
78 return bctx->commandList;
85 GWB_BuildCmd_List2_PushBack(bctx->commandList, cmd);
92 return bctx->fileList;
100 GWB_File_List2_PushBack(bctx->fileList, file);
132 GWB_FILE_LIST2_ITERATOR *it;
134 it=GWB_File_List2_First(fileList);
138 file=GWB_File_List2Iterator_Data(it);
141 file=GWB_File_List2Iterator_Next(it);
143 GWB_File_List2Iterator_free(it);
169 GWB_FILE_LIST2_ITERATOR *it;
171 it=GWB_File_List2_First(fileList);
175 file=GWB_File_List2Iterator_Data(it);
178 file=GWB_File_List2Iterator_Next(it);
180 GWB_File_List2Iterator_free(it);
190 for(i=0; i<indent; i++)
191 fprintf(stderr,
" ");
192 fprintf(stderr,
"BuildCtx:\n");
GWB_BUILD_CONTEXT * GWB_BuildCtx_new()
struct GWB_BUILD_CONTEXT GWB_BUILD_CONTEXT
#define GWEN_FREE_OBJECT(varname)
GWB_FILE * GWB_File_dup(const GWB_FILE *oldFile)
void GWB_BuildCtx_free(GWB_BUILD_CONTEXT *bctx)
void GWB_File_SetId(GWB_FILE *f, uint32_t i)
void GWBUILD_Debug_PrintBuildCmdList2(const char *sName, const GWB_BUILD_CMD_LIST2 *buildCmdList2, int indent)
GWB_FILE * GWB_BuildCtx_GetFileByPathAndName(const GWB_BUILD_CONTEXT *bctx, const char *folder, const char *fname)
const char * GWB_File_GetFolder(const GWB_FILE *f)
const char * GWB_BuildCtx_GetInitialSourceDir(const GWB_BUILD_CONTEXT *bctx)
const char * GWB_File_GetName(const GWB_FILE *f)
#define GWEN_NEW_OBJECT(typ, varname)
GWB_FILE_LIST2 * GWB_BuildCtx_GetFileList(const GWB_BUILD_CONTEXT *bctx)
void GWB_BuildCmd_AddInFile(GWB_BUILD_CMD *bcmd, GWB_FILE *file)
void GWB_BuildCtx_SetInitialSourceDir(GWB_BUILD_CONTEXT *bctx, const char *s)
void GWBUILD_Debug_PrintFileList2(const char *sName, const GWB_FILE_LIST2 *fileList2, int indent)
void GWB_BuildCtx_AddInFilesToCtxAndCmd(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_FILE_LIST2 *fileList)
void GWB_File_List2_FreeAll(GWB_FILE_LIST2 *fileList2)
void GWB_BuildCtx_AddCommand(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *cmd)
void GWB_BuildCtx_AddOutFilesToCtxAndCmd(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_FILE_LIST2 *fileList)
void GWB_BuildCmd_List2_FreeAll(GWB_BUILD_CMD_LIST2 *cmdList)
GWB_FILE * GWB_File_List2_GetFileByPathAndName(const GWB_FILE_LIST2 *fileList, const char *folder, const char *fname)
void GWB_BuildCtx_AddFile(GWB_BUILD_CONTEXT *bctx, GWB_FILE *file)
struct GWB_BUILD_CMD GWB_BUILD_CMD
GWB_BUILD_CMD_LIST2 * GWB_BuildCtx_GetCommandList(const GWB_BUILD_CONTEXT *bctx)
void GWB_BuildCmd_AddOutFile(GWB_BUILD_CMD *bcmd, GWB_FILE *file)
void GWB_BuildCtx_AddInFileToCtxAndCmd(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_FILE *file)
void GWB_BuildCtx_Dump(const GWB_BUILD_CONTEXT *bctx, int indent)
void GWB_BuildCtx_AddOutFileToCtxAndCmd(GWB_BUILD_CONTEXT *bctx, GWB_BUILD_CMD *bcmd, GWB_FILE *file)