|
gwenhywfar
5.7.2
|
#include "gwenbuild/parser/parser.h"#include "gwenbuild/parser/p_project.h"#include <gwenhywfar/debug.h>#include <gwenhywfar/syncio.h>#include <gwenhywfar/process.h>#include <gwenhywfar/directory.h>#include <gwenhywfar/text.h>#include <unistd.h>#include <stdlib.h>#include <errno.h>#include <string.h>#include <ctype.h>#include <sys/types.h>#include <sys/stat.h>
Go to the source code of this file.
|
static |
Definition at line 839 of file parser.c.
References GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_GetCharValue(), GWEN_DB_SetCharValue(), and NULL.
Referenced by _parseSetVar().


|
static |
Definition at line 813 of file parser.c.
References DBG_ERROR, GWEN_ERROR_IO, and NULL.
Referenced by _parseWriteFile().

|
static |
Definition at line 652 of file parser.c.
References _varHasValue(), GWEN_XMLNode_FindFirstTag(), and NULL.
Referenced by GWB_Parser_ParseWellKnownElements().


|
static |
Definition at line 574 of file parser.c.
References DBG_ERROR, DBG_INFO, GWB_Context_GetVars(), GWEN_DB_GetCharValue(), GWEN_ERROR_GENERIC, GWEN_Text_ComparePattern(), GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_GetProperty(), and NULL.
Referenced by GWB_Parser_ParseWellKnownElements().


|
static |
Definition at line 629 of file parser.c.
References _varHasValue(), GWEN_XMLNode_FindFirstTag(), and NULL.
Referenced by GWB_Parser_ParseWellKnownElements().


|
static |
Definition at line 519 of file parser.c.
References DBG_ERROR, DBG_INFO, GWB_Context_GetVars(), GWEN_DB_GetCharValue(), GWEN_ERROR_GENERIC, GWEN_Text_ComparePattern(), GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_GetProperty(), and NULL.
Referenced by GWB_Parser_ParseWellKnownElements().


|
static |
Definition at line 475 of file parser.c.
References _appendVarValue(), DBG_ERROR, DBG_WARN, GWB_Context_GetVars(), GWB_Parser_ReadXmlDataIntoBufferAndExpand(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_GetUsedBytes(), GWEN_DB_DeleteVar(), GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_SetCharValue(), GWEN_ERROR_GENERIC, GWEN_XMLNode_GetProperty(), and NULL.
Referenced by GWB_Parser_ParseWellKnownElements().


|
static |
Definition at line 435 of file parser.c.
References DBG_ERROR, DBG_INFO, GWB_Context_free(), GWB_Context_GetCurrentRelativeDir(), GWB_File_AddFlags(), GWB_FILE_FLAGS_DIST, GWB_File_List2_GetOrCreateFile(), GWB_Parser_CopyContextForSubdir(), GWB_PARSER_FILENAME, GWB_Parser_ReadBuildFile(), GWB_Project_GetFileList(), GWB_Project_GetGwbuild(), GWEN_ERROR_BAD_DATA, GWEN_XMLNode_free(), and NULL.
Referenced by GWB_Parser_ParseSubdirs().


|
static |
Definition at line 711 of file parser.c.
References _getFilePermissions(), _setFilePermissions(), DBG_ERROR, GWB_Context_GetCurrentRelativeDir(), GWB_Context_GetCurrentSourceDir(), GWB_Context_GetVars(), GWB_File_AddFlags(), GWB_FILE_FLAGS_DIST, GWB_FILE_FLAGS_GENERATED, GWB_File_List2_GetOrCreateFile(), GWB_Parser_ReplaceVarsBetweenAtSigns(), GWB_Project_GetFileList(), GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_GetUsedBytes(), GWEN_Buffer_new(), GWEN_Buffer_Reset(), GWEN_DIR_SEPARATOR_S, GWEN_ERROR_GENERIC, GWEN_SyncIo_Helper_ReadFile(), GWEN_SyncIo_Helper_WriteFile(), GWEN_XMLNode_GetProperty(), and NULL.
Referenced by GWB_Parser_ParseWellKnownElements().


|
static |
Definition at line 285 of file parser.c.
References DBG_ERROR, GWEN_ERROR_GENERIC, and NULL.
Referenced by _readVersion().

|
static |
Definition at line 242 of file parser.c.
References _readIntUntilPoint(), DBG_ERROR, GWEN_ERROR_GENERIC, and NULL.
Referenced by GWB_Parser_ReadBuildFile().


|
static |
Definition at line 827 of file parser.c.
References DBG_ERROR, GWEN_ERROR_IO, and NULL.
Referenced by _parseWriteFile().

|
static |
Definition at line 675 of file parser.c.
References DBG_ERROR, GWB_Context_GetVars(), GWEN_DB_GetCharValue(), GWEN_ERROR_GENERIC, GWEN_Text_ComparePattern(), GWEN_XMLNode_GetProperty(), and NULL.
Referenced by _parseIfNotVarHasValue(), and _parseIfVarHasValue().


| GWB_CONTEXT* GWB_Parser_CopyContextForSubdir | ( | const GWB_CONTEXT * | sourceContext, |
| const char * | folder | ||
| ) |
Definition at line 107 of file parser.c.
References GWB_Context_AddCurrentBuildDir(), GWB_Context_AddCurrentRelativeDir(), GWB_Context_AddCurrentSourceDir(), GWB_Context_ClearDefineList(), GWB_Context_ClearIncludeList(), GWB_Context_ClearSourceFileList2(), GWB_Context_dup(), GWB_Context_GetCurrentSourceDir(), GWB_Context_GetTopBuildDir(), GWB_Context_GetTopSourceDir(), GWB_Context_GetVars(), GWB_Context_InsertCurrentSourceDir(), GWB_Context_InsertTopBuildDir(), GWB_Context_InsertTopSourceDir(), GWEN_DB_DeleteGroup(), GWEN_DB_FLAGS_OVERWRITE_VARS, and GWEN_DB_SetCharValue().
Referenced by _parseSubdir().


| GWB_CONTEXT* GWB_Parser_CopyContextForTarget | ( | const GWB_CONTEXT * | sourceContext | ) |
Definition at line 142 of file parser.c.
References GWB_Context_ClearDefineList(), GWB_Context_ClearIncludeList(), GWB_Context_ClearSourceFileList2(), and GWB_Context_dup().
Referenced by GWB_ParseTarget().


| int GWB_Parser_ParseSourcesOrHeaders | ( | GWB_PROJECT * | project, |
| GWB_CONTEXT * | currentContext, | ||
| GWEN_XMLNODE * | xmlNode, | ||
| int | alwaysDist, | ||
| int | isSource | ||
| ) |
Definition at line 977 of file parser.c.
References DBG_INFO, GWB_Context_AddSourceFile(), GWB_Context_GetCurrentRelativeDir(), GWB_Context_GetVars(), GWB_File_AddFlags(), GWB_FILE_FLAGS_DIST, GWB_FILE_FLAGS_GENERATED, GWB_FILE_FLAGS_INSTALL, GWB_File_List2_GetOrCreateFile(), GWB_File_SetBuilder(), GWB_File_SetFileType(), GWB_File_SetInstallPath(), GWB_Parser_ReadXmlDataIntoStringList(), GWB_Project_GetFileList(), GWEN_StringList_FirstEntry(), GWEN_StringList_free(), GWEN_StringListEntry_Data(), GWEN_StringListEntry_Next(), GWEN_XMLNode_ExpandProperties(), GWEN_XMLNode_GetProperty(), and NULL.
Referenced by _parseChildNodes().


| int GWB_Parser_ParseSubdirs | ( | GWB_PROJECT * | project, |
| GWB_CONTEXT * | currentContext, | ||
| GWEN_XMLNODE * | xmlNode, | ||
| GWB_PARSER_PARSE_ELEMENT_FN | fn | ||
| ) |
Definition at line 392 of file parser.c.
References _parseSubdir(), DBG_ERROR, DBG_INFO, GWB_Context_GetVars(), GWB_Parser_ReadXmlDataIntoStringList(), GWEN_Directory_GetPath(), GWEN_ERROR_GENERIC, GWEN_StringList_FirstEntry(), GWEN_StringList_free(), GWEN_StringListEntry_Data(), GWEN_StringListEntry_Next(), and NULL.
Referenced by _parseChildNodes().


| int GWB_Parser_ParseWellKnownElements | ( | GWB_PROJECT * | project, |
| GWB_CONTEXT * | currentContext, | ||
| GWEN_XMLNODE * | n, | ||
| GWB_PARSER_PARSE_ELEMENT_FN | fn | ||
| ) |
Definition at line 940 of file parser.c.
References _parseIfNotVarHasValue(), _parseIfNotVarMatches(), _parseIfVarHasValue(), _parseIfVarMatches(), _parseSetVar(), _parseWriteFile(), DBG_DEBUG, DBG_ERROR, GWEN_LOGDOMAIN, GWEN_XMLNode_GetData(), and NULL.
Referenced by _parseChildNodes().


| GWEN_XMLNODE* GWB_Parser_ReadBuildFile | ( | GWENBUILD * | gwbuild, |
| const GWB_CONTEXT * | currentContext, | ||
| const char * | fileName | ||
| ) |
Definition at line 157 of file parser.c.
References _readVersion(), DBG_DEBUG, DBG_ERROR, GWB_Context_GetCurrentBuildDir(), GWB_Context_GetCurrentSourceDir(), GWB_Context_GetInitialSourceDir(), GWBUILD_AddBuildFilename(), GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_DIR_SEPARATOR_S, GWEN_XML_FLAGS_DEFAULT, GWEN_XML_ReadFile(), GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_free(), GWEN_XMLNode_GetProperty(), GWEN_XMLNode_new(), GWEN_XMLNode_UnlinkChild(), GWEN_XMLNodeTypeTag, GWENHYWFAR_VERSION_MAJOR, GWENHYWFAR_VERSION_MINOR, GWENHYWFAR_VERSION_PATCHLEVEL, and NULL.
Referenced by _parseSubdir(), and GWB_Parser_ReadBuildTree().


| GWB_PROJECT* GWB_Parser_ReadBuildTree | ( | GWENBUILD * | gwbuild, |
| GWB_CONTEXT * | currentContext, | ||
| const char * | srcDir, | ||
| GWB_KEYVALUEPAIR_LIST * | givenOptionList | ||
| ) |
Definition at line 56 of file parser.c.
References DBG_ERROR, GWB_Context_GetCurrentRelativeDir(), GWB_Context_SetCurrentSourceDir(), GWB_Context_SetInitialSourceDir(), GWB_Context_SetTopSourceDir(), GWB_File_AddFlags(), GWB_FILE_FLAGS_DIST, GWB_File_List2_GetOrCreateFile(), GWB_ParseProject(), GWB_PARSER_FILENAME, GWB_Parser_ReadBuildFile(), GWB_Project_free(), GWB_Project_GetFileList(), GWB_Project_new(), GWB_Project_SetGivenOptionList(), GWEN_XMLNode_FindFirstTag(), GWEN_XMLNode_free(), and NULL.
Referenced by GWB_Setup().


| GWEN_BUFFER* GWB_Parser_ReadNamedXmlDataIntoBufferAndExpand | ( | GWEN_DB_NODE * | db, |
| GWEN_XMLNODE * | xmlNode, | ||
| const char * | elem | ||
| ) |
Definition at line 370 of file parser.c.
References GWB_Parser_ReadXmlDataIntoBufferAndExpand(), GWEN_Buffer_free(), GWEN_Buffer_GetUsedBytes(), GWEN_XMLNode_FindFirstTag(), and NULL.
Referenced by GWB_ParseOption().


| GWEN_BUFFER* GWB_Parser_ReadXmlDataIntoBufferAndExpand | ( | GWEN_DB_NODE * | db, |
| GWEN_XMLNODE * | xmlNode | ||
| ) |
Definition at line 332 of file parser.c.
References DBG_INFO, GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetUsedBytes(), GWEN_Buffer_new(), GWEN_DB_ReplaceVars(), GWEN_XMLNode_GetData(), GWEN_XMLNode_GetFirstData(), and NULL.
Referenced by _parseArg(), _parseBuildCommand(), _parseSetVar(), GWB_ParseBuildFiles(), GWB_ParseOption(), GWB_Parser_ReadNamedXmlDataIntoBufferAndExpand(), and GWB_Parser_ReadXmlDataIntoStringList().


| GWEN_STRINGLIST* GWB_Parser_ReadXmlDataIntoStringList | ( | GWEN_DB_NODE * | db, |
| GWEN_XMLNODE * | xmlNode | ||
| ) |
Definition at line 308 of file parser.c.
References DBG_INFO, GWB_Parser_ReadXmlDataIntoBufferAndExpand(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_StringList_fromString(), and NULL.
Referenced by _parseIncludes(), _parseLibraries(), _parseProg(), _parseUsedTargets(), _readMainSettingsFromXml(), _readSettingsFromXml(), _retrieveVariables(), GWB_ParseCheckFunctions(), GWB_ParseCheckHeaders(), GWB_Parser_ParseSourcesOrHeaders(), and GWB_Parser_ParseSubdirs().


| int GWB_Parser_ReplaceVarsBetweenAtSigns | ( | const char * | s, |
| GWEN_BUFFER * | dbuf, | ||
| GWEN_DB_NODE * | db | ||
| ) |
Definition at line 877 of file parser.c.
References DBG_ERROR, DBG_WARN, GWEN_Buffer_AppendByte(), GWEN_Buffer_AppendString(), GWEN_DB_Dump(), GWEN_DB_GetCharValue(), GWEN_ERROR_BAD_DATA, GWEN_LOGDOMAIN, and NULL.
Referenced by _parseWriteFile().


| void GWB_Parser_SetItemValue | ( | GWEN_DB_NODE * | db, |
| const char * | sId, | ||
| const char * | suffix, | ||
| const char * | value | ||
| ) |
Definition at line 860 of file parser.c.
References GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_DB_FLAGS_OVERWRITE_VARS, and GWEN_DB_SetCharValue().
Referenced by _callPkgConfig(), _checkVersion(), _parseLib(), _parseProg(), _setVarFunctionExists(), and _setVarHeaderExists().


1.8.14