Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QMakeEvaluator Class Reference

#include <qmakeevaluator.h>

+ Collaboration diagram for QMakeEvaluator:

Classes

struct  Location
 

Public Types

enum  LoadFlag {
  LoadProOnly = 0 , LoadPreFiles = 1 , LoadPostFiles = 2 , LoadAll = LoadPreFiles|LoadPostFiles ,
  LoadSilent = 0x10 , LoadHidden = 0x20
}
 
enum  VisitReturn {
  ReturnFalse , ReturnTrue , ReturnError , ReturnBreak ,
  ReturnNext , ReturnReturn
}
 
enum  { m_cumulative = 0 }
 
enum  { m_skipLevel = 0 }
 
enum  { m_debugLevel = 0 }
 

Public Member Functions

 QMakeEvaluator (QMakeGlobals *option, QMakeParser *parser, QMakeVfs *vfs, QMakeHandler *handler)
 
 ~QMakeEvaluator ()
 
void setExtraVars (const ProValueMap &extraVars)
 
void setExtraConfigs (const ProStringList &extraConfigs)
 
void setOutputDir (const QString &outputDir)
 
ProStringList values (const ProKey &variableName) const
 
ProStringListvaluesRef (const ProKey &variableName)
 
ProString first (const ProKey &variableName) const
 
ProString propertyValue (const ProKey &val) const
 
ProString dirSep () const
 
bool isHostBuild () const
 
VisitReturn evaluateExpression (const ushort *&tokPtr, ProStringList *ret, bool joined)
 
void skipExpression (const ushort *&tokPtr)
 
void loadDefaults ()
 
bool prepareProject (const QString &inDir)
 
bool loadSpecInternal ()
 
bool loadSpec ()
 
void initFrom (const QMakeEvaluator *other)
 
void setupProject ()
 
void evaluateCommand (const QString &cmds, const QString &where)
 
void applyExtraConfigs ()
 
VisitReturn visitProFile (ProFile *pro, QMakeHandler::EvalFileType type, LoadFlags flags)
 
VisitReturn visitProBlock (ProFile *pro, const ushort *tokPtr)
 
VisitReturn visitProBlock (const ushort *tokPtr)
 
VisitReturn visitProLoop (const ProKey &variable, const ushort *exprPtr, const ushort *tokPtr)
 
void visitProFunctionDef (ushort tok, const ProKey &name, const ushort *tokPtr)
 
VisitReturn visitProVariable (ushort tok, const ProStringList &curr, const ushort *&tokPtr)
 
ALWAYS_INLINE const ProKeymap (const ProString &var)
 
const ProKeymap (const ProKey &var)
 
ProValueMapfindValues (const ProKey &variableName, ProValueMap::Iterator *it)
 
void setTemplate ()
 
ProStringList split_value_list (QStringView vals, int source=0)
 
VisitReturn expandVariableReferences (const ushort *&tokPtr, int sizeHint, ProStringList *ret, bool joined)
 
QString currentFileName () const
 
QString currentDirectory () const
 
ProFilecurrentProFile () const
 
int currentFileId () const
 
QString resolvePath (const QString &fileName) const
 
QString filePathArg0 (const ProStringList &args)
 
QString filePathEnvArg0 (const ProStringList &args)
 
VisitReturn evaluateFile (const QString &fileName, QMakeHandler::EvalFileType type, LoadFlags flags)
 
VisitReturn evaluateFileChecked (const QString &fileName, QMakeHandler::EvalFileType type, LoadFlags flags)
 
VisitReturn evaluateFeatureFile (const QString &fileName, bool silent=false)
 
VisitReturn evaluateFileInto (const QString &fileName, ProValueMap *values, LoadFlags flags)
 
VisitReturn evaluateConfigFeatures ()
 
void message (int type, const QString &msg) const
 
void evalError (const QString &msg) const
 
void languageWarning (const QString &msg) const
 
void deprecationWarning (const QString &msg) const
 
VisitReturn prepareFunctionArgs (const ushort *&tokPtr, QList< ProStringList > *ret)
 
VisitReturn evaluateFunction (const ProFunctionDef &func, const QList< ProStringList > &argumentsList, ProStringList *ret)
 
VisitReturn evaluateBoolFunction (const ProFunctionDef &func, const QList< ProStringList > &argumentsList, const ProString &function)
 
VisitReturn evaluateExpandFunction (const ProKey &function, const ushort *&tokPtr, ProStringList *ret)
 
VisitReturn evaluateConditionalFunction (const ProKey &function, const ushort *&tokPtr)
 
VisitReturn evaluateBuiltinExpand (const QMakeInternal::QMakeBuiltin &adef, const ProKey &function, const ProStringList &args, ProStringList &ret)
 
VisitReturn evaluateBuiltinConditional (const QMakeInternal::QMakeBuiltin &adef, const ProKey &function, const ProStringList &args)
 
VisitReturn evaluateConditional (QStringView cond, const QString &where, int line=-1)
 
void updateMkspecPaths ()
 
void updateFeaturePaths ()
 
bool isActiveConfig (QStringView config, bool regex=false)
 
void populateDeps (const ProStringList &deps, const ProString &prefix, const ProStringList &suffixes, const ProString &priosfx, QHash< ProKey, QSet< ProKey > > &dependencies, ProValueMap &dependees, QMultiMap< int, ProString > &rootSet) const
 
bool getMemberArgs (const ProKey &name, int srclen, const ProStringList &args, int *start, int *end)
 
VisitReturn parseJsonInto (const QByteArray &json, const QString &into, ProValueMap *value)
 
VisitReturn writeFile (const QString &ctx, const QString &fn, QIODevice::OpenMode mode, QMakeVfs::VfsFlags flags, const QString &contents)
 
QByteArray getCommandOutput (const QString &args, int *exitCode) const
 
ALWAYS_INLINE void debugMsgInternal (int, const char *,...) const
 
ALWAYS_INLINE void traceMsgInternal (const char *,...) const
 

Static Public Member Functions

static void initStatics ()
 
static void initFunctionStatics ()
 
static ALWAYS_INLINE VisitReturn returnBool (bool b)
 
static ALWAYS_INLINE uint getBlockLen (const ushort *&tokPtr)
 
static ALWAYS_INLINE void skipStr (const ushort *&tokPtr)
 
static ALWAYS_INLINE void skipHashStr (const ushort *&tokPtr)
 
static QString quoteValue (const ProString &val)
 

Public Attributes

QMakeEvaluatorm_caller
 
Location m_current
 
QStack< Locationm_locationStack
 
QStack< ProFile * > m_profileStack
 
ProValueMap m_extraVars
 
ProStringList m_extraConfigs
 
QString m_outputDir
 
int m_listCount
 
int m_toggle
 
bool m_valuemapInited
 
bool m_hostBuild
 
QString m_qmakespec
 
QString m_qmakespecName
 
QString m_superfile
 
QString m_conffile
 
QString m_cachefile
 
QString m_stashfile
 
QString m_sourceRoot
 
QString m_buildRoot
 
QStringList m_qmakepath
 
QStringList m_qmakefeatures
 
QStringList m_mkspecPaths
 
QExplicitlySharedDataPointer< QMakeFeatureRootsm_featureRoots
 
ProString m_dirSep
 
ProFunctionDefs m_functionDefs
 
ProStringList m_returnValue
 
ProValueMapStack m_valuemapStack
 
QString m_tmp1
 
QString m_tmp2
 
QString m_tmp3
 
QString m_tmp [2]
 
QMakeGlobalsm_option
 
QMakeParserm_parser
 
QMakeHandlerm_handler
 
QMakeVfsm_vfs
 

Detailed Description

Definition at line 86 of file qmakeevaluator.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
m_cumulative 

Definition at line 239 of file qmakeevaluator.h.

◆ anonymous enum

anonymous enum
Enumerator
m_skipLevel 

Definition at line 240 of file qmakeevaluator.h.

◆ anonymous enum

anonymous enum
Enumerator
m_debugLevel 

Definition at line 257 of file qmakeevaluator.h.

◆ LoadFlag

Enumerator
LoadProOnly 
LoadPreFiles 
LoadPostFiles 
LoadAll 
LoadSilent 
LoadHidden 

Definition at line 89 of file qmakeevaluator.h.

◆ VisitReturn

Enumerator
ReturnFalse 
ReturnTrue 
ReturnError 
ReturnBreak 
ReturnNext 
ReturnReturn 

Definition at line 117 of file qmakeevaluator.h.

Constructor & Destructor Documentation

◆ QMakeEvaluator()

QMakeEvaluator::QMakeEvaluator ( QMakeGlobals * option,
QMakeParser * parser,
QMakeVfs * vfs,
QMakeHandler * handler )

Definition at line 181 of file qmakeevaluator.cpp.

References QMakeEvaluator(), m_caller, m_handler, m_hostBuild, m_listCount, m_option, m_parser, m_toggle, m_valuemapInited, m_valuemapStack, m_vfs, and ProValueMapStack::push().

Referenced by QMakeEvaluator(), evaluateFileInto(), loadSpec(), and visitProFile().

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

◆ ~QMakeEvaluator()

QMakeEvaluator::~QMakeEvaluator ( )

Definition at line 209 of file qmakeevaluator.cpp.

Member Function Documentation

◆ applyExtraConfigs()

void QMakeEvaluator::applyExtraConfigs ( )

Definition at line 1303 of file qmakeevaluator.cpp.

Referenced by visitProFile().

+ Here is the caller graph for this function:

◆ currentDirectory()

QString QMakeEvaluator::currentDirectory ( ) const

Definition at line 1594 of file qmakeevaluator.cpp.

References currentProFile().

Referenced by evaluateBuiltinExpand(), resolvePath(), and visitProFile().

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

◆ currentFileId()

int QMakeEvaluator::currentFileId ( ) const

Definition at line 1578 of file qmakeevaluator.cpp.

References currentProFile(), and ProFile::id().

Referenced by evaluateBuiltinExpand(), setupProject(), and split_value_list().

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

◆ currentFileName()

QString QMakeEvaluator::currentFileName ( ) const

Definition at line 1586 of file qmakeevaluator.cpp.

References currentProFile().

+ Here is the call graph for this function:

◆ currentProFile()

ProFile * QMakeEvaluator::currentProFile ( ) const

Definition at line 1571 of file qmakeevaluator.cpp.

Referenced by currentDirectory(), currentFileId(), currentFileName(), and visitProFile().

+ Here is the caller graph for this function:

◆ debugMsgInternal()

ALWAYS_INLINE void QMakeEvaluator::debugMsgInternal ( int ,
const char * ,
... ) const
inline

Definition at line 254 of file qmakeevaluator.h.

Referenced by evaluateExpression(), visitProFile(), and visitProVariable().

+ Here is the caller graph for this function:

◆ deprecationWarning()

void QMakeEvaluator::deprecationWarning ( const QString & msg) const
inline

Definition at line 184 of file qmakeevaluator.h.

References QMakeHandler::EvalWarnDeprecated, and message().

+ Here is the call graph for this function:

◆ dirSep()

ProString QMakeEvaluator::dirSep ( ) const
inline

Definition at line 114 of file qmakeevaluator.h.

◆ evalError()

void QMakeEvaluator::evalError ( const QString & msg) const
inline

Definition at line 180 of file qmakeevaluator.h.

References QMakeHandler::EvalError, and message().

Referenced by evaluateBuiltinConditional(), and evaluateBuiltinExpand().

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

◆ evaluateBoolFunction()

QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBoolFunction ( const ProFunctionDef & func,
const QList< ProStringList > & argumentsList,
const ProString & function )

Definition at line 1715 of file qmakeevaluator.cpp.

References evaluateFunction(), ReturnFalse, and ReturnTrue.

+ Here is the call graph for this function:

◆ evaluateBuiltinConditional()

QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional ( const QMakeInternal::QMakeBuiltin & adef,
const ProKey & function,
const ProStringList & args )

◆ evaluateBuiltinExpand()

QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinExpand ( const QMakeInternal::QMakeBuiltin & adef,
const ProKey & function,
const ProStringList & args,
ProStringList & ret )

Definition at line 574 of file qmakebuiltins.cpp.

References ProString::ProString(), ProString::ProString(), currentDirectory(), currentFileId(), evalError(), getMemberArgs(), ProString::isEmpty(), ProStringList::join(), m_option, m_skipLevel, m_valuemapStack, map(), ProStringList::removeDuplicates(), ReturnTrue, ProString::setSource(), ProString::size(), ProStringRoUser::str(), ProValueMapStack::top(), traceMsgInternal(), values(), and valuesRef().

Referenced by evaluateExpandFunction().

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

◆ evaluateCommand()

void QMakeEvaluator::evaluateCommand ( const QString & cmds,
const QString & where )

Definition at line 1290 of file qmakeevaluator.cpp.

References ProFile::deref(), ProFile::isOk(), m_parser, ProFile::tokPtr(), and visitProBlock().

+ Here is the call graph for this function:

◆ evaluateConditional()

QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConditional ( QStringView cond,
const QString & where,
int line = -1 )

Definition at line 1797 of file qmakeevaluator.cpp.

References ProFile::deref(), ProFile::isOk(), m_parser, ReturnFalse, QMakeParser::TestGrammar, ProFile::tokPtr(), and visitProBlock().

+ Here is the call graph for this function:

◆ evaluateConditionalFunction()

QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConditionalFunction ( const ProKey & function,
const ushort *& tokPtr )

Definition at line 1743 of file qmakeevaluator.cpp.

References evaluateBuiltinConditional(), expandVariableReferences(), prepareFunctionArgs(), ReturnError, ReturnFalse, skipExpression(), and traceMsgInternal().

Referenced by visitProBlock().

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

◆ evaluateConfigFeatures()

QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConfigFeatures ( )

Definition at line 1311 of file qmakeevaluator.cpp.

Referenced by visitProFile().

+ Here is the caller graph for this function:

◆ evaluateExpandFunction()

QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateExpandFunction ( const ProKey & function,
const ushort *& tokPtr,
ProStringList * ret )

Definition at line 1770 of file qmakeevaluator.cpp.

References evaluateBuiltinExpand(), expandVariableReferences(), prepareFunctionArgs(), ReturnError, ReturnFalse, skipExpression(), and traceMsgInternal().

+ Here is the call graph for this function:

◆ evaluateExpression()

QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateExpression ( const ushort *& tokPtr,
ProStringList * ret,
bool joined )

Definition at line 387 of file qmakeevaluator.cpp.

References ProString::ProString(), debugMsgInternal(), m_current, and QMakeEvaluator::Location::pro.

Referenced by prepareFunctionArgs(), and visitProBlock().

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

◆ evaluateFeatureFile()

QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFeatureFile ( const QString & fileName,
bool silent = false )

Definition at line 1950 of file qmakeevaluator.cpp.

References ProKey::ProKey(), ReturnFalse, ReturnTrue, updateFeaturePaths(), and valuesRef().

Referenced by evaluateBuiltinConditional(), loadSpecInternal(), and visitProFile().

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

◆ evaluateFile()

QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFile ( const QString & fileName,
QMakeHandler::EvalFileType type,
LoadFlags flags )

Definition at line 1911 of file qmakeevaluator.cpp.

References ProKey::ProKey(), ProString::ProString(), ProFile::deref(), LoadHidden, m_valuemapStack, ReturnFalse, and ReturnTrue.

+ Here is the call graph for this function:

◆ evaluateFileChecked()

QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFileChecked ( const QString & fileName,
QMakeHandler::EvalFileType type,
LoadFlags flags )

Definition at line 1934 of file qmakeevaluator.cpp.

References m_caller, and ReturnFalse.

◆ evaluateFileInto()

QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFileInto ( const QString & fileName,
ProValueMap * values,
LoadFlags flags )

Definition at line 2051 of file qmakeevaluator.cpp.

References ProKey::ProKey(), QMakeEvaluator(), QMakeHandler::EvalAuxFile, m_caller, m_handler, m_option, m_parser, m_valuemapStack, m_vfs, ReturnTrue, and ProValueMapStack::top().

+ Here is the call graph for this function:

◆ evaluateFunction()

QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFunction ( const ProFunctionDef & func,
const QList< ProStringList > & argumentsList,
ProStringList * ret )

Definition at line 1683 of file qmakeevaluator.cpp.

References m_valuemapStack, ProFunctionDef::pro(), ProValueMapStack::push(), ReturnError, ReturnReturn, ReturnTrue, ProFunctionDef::tokPtr(), and visitProBlock().

Referenced by evaluateBoolFunction().

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

◆ expandVariableReferences()

QMakeEvaluator::VisitReturn QMakeEvaluator::expandVariableReferences ( const ushort *& tokPtr,
int sizeHint,
ProStringList * ret,
bool joined )

Definition at line 1640 of file qmakeevaluator.cpp.

Referenced by evaluateConditionalFunction(), evaluateExpandFunction(), visitProLoop(), and visitProVariable().

+ Here is the caller graph for this function:

◆ filePathArg0()

QString QMakeEvaluator::filePathArg0 ( const ProStringList & args)

Definition at line 558 of file qmakebuiltins.cpp.

◆ filePathEnvArg0()

QString QMakeEvaluator::filePathEnvArg0 ( const ProStringList & args)

Definition at line 566 of file qmakebuiltins.cpp.

◆ findValues()

ProValueMap * QMakeEvaluator::findValues ( const ProKey & variableName,
ProValueMap::Iterator * it )

Definition at line 1838 of file qmakeevaluator.cpp.

References isFunctParam(), and m_valuemapStack.

+ Here is the call graph for this function:

◆ first()

ProString QMakeEvaluator::first ( const ProKey & variableName) const

Definition at line 1903 of file qmakeevaluator.cpp.

References ProString::ProString(), and values().

Referenced by loadSpec(), and loadSpecInternal().

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

◆ getBlockLen()

uint QMakeEvaluator::getBlockLen ( const ushort *& tokPtr)
static

Definition at line 228 of file qmakeevaluator.cpp.

Referenced by visitProBlock().

+ Here is the caller graph for this function:

◆ getCommandOutput()

QByteArray QMakeEvaluator::getCommandOutput ( const QString & args,
int * exitCode ) const

Definition at line 484 of file qmakebuiltins.cpp.

◆ getMemberArgs()

bool QMakeEvaluator::getMemberArgs ( const ProKey & name,
int srclen,
const ProStringList & args,
int * start,
int * end )

Definition at line 224 of file qmakebuiltins.cpp.

References ProString::left(), ProString::mid(), and ProString::toInt().

Referenced by evaluateBuiltinExpand().

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

◆ initFrom()

void QMakeEvaluator::initFrom ( const QMakeEvaluator * other)

Definition at line 213 of file qmakeevaluator.cpp.

References m_valuemapInited, and m_valuemapStack.

Referenced by visitProFile().

+ Here is the caller graph for this function:

◆ initFunctionStatics()

void QMakeEvaluator::initFunctionStatics ( )
static

Definition at line 120 of file qmakebuiltins.cpp.

Referenced by initStatics().

+ Here is the caller graph for this function:

◆ initStatics()

void QMakeEvaluator::initStatics ( )
static

Definition at line 112 of file qmakeevaluator.cpp.

References initFunctionStatics().

+ Here is the call graph for this function:

◆ isActiveConfig()

bool QMakeEvaluator::isActiveConfig ( QStringView config,
bool regex = false )

Definition at line 1602 of file qmakeevaluator.cpp.

References m_hostBuild.

◆ isHostBuild()

bool QMakeEvaluator::isHostBuild ( ) const
inline

Definition at line 115 of file qmakeevaluator.h.

References m_hostBuild.

◆ languageWarning()

void QMakeEvaluator::languageWarning ( const QString & msg) const
inline

Definition at line 182 of file qmakeevaluator.h.

References QMakeHandler::EvalWarnLanguage, and message().

+ Here is the call graph for this function:

◆ loadDefaults()

void QMakeEvaluator::loadDefaults ( )

Definition at line 1013 of file qmakeevaluator.cpp.

References m_valuemapInited, m_valuemapStack, and ProValueMapStack::top().

Referenced by visitProFile().

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

◆ loadSpec()

bool QMakeEvaluator::loadSpec ( )

Definition at line 1195 of file qmakeevaluator.cpp.

References ProKey::ProKey(), QMakeEvaluator(), first(), loadSpecInternal(), m_handler, m_hostBuild, m_option, m_parser, m_vfs, propertyValue(), ProString::toQString(), and updateMkspecPaths().

Referenced by visitProFile().

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

◆ loadSpecInternal()

bool QMakeEvaluator::loadSpecInternal ( )

Definition at line 1157 of file qmakeevaluator.cpp.

References ProKey::ProKey(), evaluateFeatureFile(), first(), ProString::isEmpty(), and ReturnTrue.

Referenced by ProFileEvaluator::loadNamedSpec(), and loadSpec().

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

◆ map() [1/2]

const ProKey & QMakeEvaluator::map ( const ProKey & var)

Definition at line 170 of file qmakeevaluator.cpp.

Referenced by map(), and visitProLoop().

+ Here is the caller graph for this function:

◆ map() [2/2]

ALWAYS_INLINE const ProKey & QMakeEvaluator::map ( const ProString & var)
inline

Definition at line 152 of file qmakeevaluator.h.

References map(), and ProString::toKey().

Referenced by evaluateBuiltinExpand().

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

◆ message()

void QMakeEvaluator::message ( int type,
const QString & msg ) const

Definition at line 2071 of file qmakeevaluator.cpp.

References QMakeHandler::CumulativeEvalMessage, QMakeEvaluator::Location::line, m_cumulative, m_current, m_handler, m_skipLevel, QMakeParserHandler::message(), and QMakeEvaluator::Location::pro.

Referenced by PRESUBMIT_test_mocks.MockOutputApi.PresubmitResult::__repr__(), deprecationWarning(), evalError(), and languageWarning().

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

◆ parseJsonInto()

QMakeEvaluator::VisitReturn QMakeEvaluator::parseJsonInto ( const QByteArray & json,
const QString & into,
ProValueMap * value )

Definition at line 423 of file qmakebuiltins.cpp.

References ReturnFalse, and ReturnTrue.

Referenced by evaluateBuiltinConditional().

+ Here is the caller graph for this function:

◆ populateDeps()

void QMakeEvaluator::populateDeps ( const ProStringList & deps,
const ProString & prefix,
const ProStringList & suffixes,
const ProString & priosfx,
QHash< ProKey, QSet< ProKey > > & dependencies,
ProValueMap & dependees,
QMultiMap< int, ProString > & rootSet ) const

Definition at line 534 of file qmakebuiltins.cpp.

◆ prepareFunctionArgs()

QMakeEvaluator::VisitReturn QMakeEvaluator::prepareFunctionArgs ( const ushort *& tokPtr,
QList< ProStringList > * ret )

Definition at line 1665 of file qmakeevaluator.cpp.

References evaluateExpression(), ReturnError, ReturnTrue, TokArgSeparator, and TokFuncTerminator.

Referenced by evaluateConditionalFunction(), and evaluateExpandFunction().

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

◆ prepareProject()

bool QMakeEvaluator::prepareProject ( const QString & inDir)

Definition at line 1085 of file qmakeevaluator.cpp.

References QMakeGlobals::do_cache, and m_option.

Referenced by visitProFile().

+ Here is the caller graph for this function:

◆ propertyValue()

ProString QMakeEvaluator::propertyValue ( const ProKey & val) const

Definition at line 1561 of file qmakeevaluator.cpp.

References m_option, and QMakeGlobals::propertyValue().

Referenced by loadSpec().

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

◆ quoteValue()

QString QMakeEvaluator::quoteValue ( const ProString & val)
static

Definition at line 269 of file qmakebuiltins.cpp.

References ProString::isEmpty(), and ProString::size().

+ Here is the call graph for this function:

◆ resolvePath()

QString QMakeEvaluator::resolvePath ( const QString & fileName) const
inline

Definition at line 165 of file qmakeevaluator.h.

References currentDirectory(), and QMakeInternal::IoUtils::resolvePath().

+ Here is the call graph for this function:

◆ returnBool()

static ALWAYS_INLINE VisitReturn QMakeEvaluator::returnBool ( bool b)
inlinestatic

Definition at line 126 of file qmakeevaluator.h.

References ReturnFalse, and ReturnTrue.

Referenced by evaluateBuiltinConditional(), and visitProBlock().

+ Here is the caller graph for this function:

◆ setExtraConfigs()

void QMakeEvaluator::setExtraConfigs ( const ProStringList & extraConfigs)
inline

Definition at line 106 of file qmakeevaluator.h.

Referenced by ProFileEvaluator::setExtraConfigs().

+ Here is the caller graph for this function:

◆ setExtraVars()

void QMakeEvaluator::setExtraVars ( const ProValueMap & extraVars)
inline

Definition at line 105 of file qmakeevaluator.h.

Referenced by ProFileEvaluator::setExtraVars().

+ Here is the caller graph for this function:

◆ setOutputDir()

void QMakeEvaluator::setOutputDir ( const QString & outputDir)
inline

Definition at line 107 of file qmakeevaluator.h.

◆ setTemplate()

void QMakeEvaluator::setTemplate ( )

Definition at line 943 of file qmakeevaluator.cpp.

References ProString::ProString(), and m_option.

Referenced by setupProject(), and visitProVariable().

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

◆ setupProject()

void QMakeEvaluator::setupProject ( )

Definition at line 1279 of file qmakeevaluator.cpp.

References currentFileId(), m_valuemapStack, setTemplate(), and ProValueMapStack::top().

Referenced by visitProFile().

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

◆ skipExpression()

void QMakeEvaluator::skipExpression ( const ushort *& tokPtr)

Definition at line 450 of file qmakeevaluator.cpp.

Referenced by evaluateConditionalFunction(), evaluateExpandFunction(), visitProBlock(), and visitProVariable().

+ Here is the caller graph for this function:

◆ skipHashStr()

void QMakeEvaluator::skipHashStr ( const ushort *& tokPtr)
static

Definition at line 241 of file qmakeevaluator.cpp.

Referenced by visitProBlock().

+ Here is the caller graph for this function:

◆ skipStr()

void QMakeEvaluator::skipStr ( const ushort *& tokPtr)
static

Definition at line 235 of file qmakeevaluator.cpp.

◆ split_value_list()

ProStringList QMakeEvaluator::split_value_list ( QStringView vals,
int source = 0 )

Definition at line 250 of file qmakeevaluator.cpp.

References currentFileId(), and ProString::setSource().

+ Here is the call graph for this function:

◆ traceMsgInternal()

ALWAYS_INLINE void QMakeEvaluator::traceMsgInternal ( const char * ,
... ) const
inline

Definition at line 255 of file qmakeevaluator.h.

Referenced by evaluateBuiltinConditional(), evaluateBuiltinExpand(), evaluateConditionalFunction(), evaluateExpandFunction(), visitProBlock(), visitProLoop(), and visitProVariable().

+ Here is the caller graph for this function:

◆ updateFeaturePaths()

void QMakeEvaluator::updateFeaturePaths ( )

Definition at line 1493 of file qmakeevaluator.cpp.

References ProKey::ProKey(), m_option, QMakeGlobals::propertyValue(), and ProString::toQString().

Referenced by evaluateFeatureFile().

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

◆ updateMkspecPaths()

void QMakeEvaluator::updateMkspecPaths ( )

Definition at line 1469 of file qmakeevaluator.cpp.

References ProKey::ProKey(), m_option, and QMakeGlobals::propertyValue().

Referenced by ProFileEvaluator::loadNamedSpec(), and loadSpec().

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

◆ values()

ProStringList QMakeEvaluator::values ( const ProKey & variableName) const

Definition at line 1884 of file qmakeevaluator.cpp.

References ProStringList::ProStringList(), isFunctParam(), and m_valuemapStack.

Referenced by evaluateBuiltinConditional(), evaluateBuiltinExpand(), first(), ProFileEvaluator::templateType(), ProFileEvaluator::values(), visitProLoop(), and visitProVariable().

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

◆ valuesRef()

ProStringList & QMakeEvaluator::valuesRef ( const ProKey & variableName)

Definition at line 1858 of file qmakeevaluator.cpp.

References isFunctParam(), m_valuemapStack, and ProValueMapStack::top().

Referenced by evaluateBuiltinExpand(), evaluateFeatureFile(), visitProFile(), and visitProVariable().

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

◆ visitProBlock() [1/2]

QMakeEvaluator::VisitReturn QMakeEvaluator::visitProBlock ( const ushort * tokPtr)

Definition at line 498 of file qmakeevaluator.cpp.

References evaluateConditionalFunction(), evaluateExpression(), getBlockLen(), ProFile::getHashStr(), QMakeEvaluator::Location::line, m_cumulative, m_current, m_skipLevel, m_valuemapStack, QMakeEvaluator::Location::pro, returnBool(), ReturnBreak, ReturnError, ReturnFalse, ReturnNext, ReturnReturn, ReturnTrue, skipExpression(), skipHashStr(), TokAnd, TokAppend, TokAppendUnique, TokAssign, TokBranch, TokBreak, TokBypassNesting, TokCondition, TokForLoop, TokLine, TokNext, TokNot, TokOr, TokRemove, TokReplace, TokReplaceDef, TokTestCall, TokTestDef, traceMsgInternal(), visitProBlock(), visitProFunctionDef(), visitProLoop(), and visitProVariable().

Referenced by visitProBlock(), and visitProBlock().

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

◆ visitProBlock() [2/2]

QMakeEvaluator::VisitReturn QMakeEvaluator::visitProBlock ( ProFile * pro,
const ushort * tokPtr )

Definition at line 490 of file qmakeevaluator.cpp.

References QMakeEvaluator::Location::line, m_current, QMakeEvaluator::Location::pro, and visitProBlock().

Referenced by evaluateBuiltinConditional(), evaluateCommand(), evaluateConditional(), evaluateFunction(), and visitProFile().

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

◆ visitProFile()

◆ visitProFunctionDef()

void QMakeEvaluator::visitProFunctionDef ( ushort tok,
const ProKey & name,
const ushort * tokPtr )

Definition at line 716 of file qmakeevaluator.cpp.

References ProFunctionDef::ProFunctionDef(), m_current, QMakeEvaluator::Location::pro, and ProFile::tokPtr().

Referenced by visitProBlock().

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

◆ visitProLoop()

QMakeEvaluator::VisitReturn QMakeEvaluator::visitProLoop ( const ProKey & variable,
const ushort * exprPtr,
const ushort * tokPtr )

Definition at line 726 of file qmakeevaluator.cpp.

References expandVariableReferences(), ProString::isEmpty(), m_cumulative, map(), ReturnError, ReturnFalse, ReturnTrue, ProString::toKey(), traceMsgInternal(), and values().

Referenced by visitProBlock().

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

◆ visitProVariable()

QMakeEvaluator::VisitReturn QMakeEvaluator::visitProVariable ( ushort tok,
const ProStringList & curr,
const ushort *& tokPtr )

Definition at line 836 of file qmakeevaluator.cpp.

References debugMsgInternal(), expandVariableReferences(), ProStringList::insertUnique(), m_cumulative, ProStringList::removeEach(), ProStringList::removeEmpty(), ReturnError, ReturnTrue, setTemplate(), skipExpression(), TokAppend, TokAppendUnique, TokAssign, TokRemove, TokReplace, traceMsgInternal(), values(), and valuesRef().

Referenced by visitProBlock().

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

◆ writeFile()

QMakeEvaluator::VisitReturn QMakeEvaluator::writeFile ( const QString & ctx,
const QString & fn,
QIODevice::OpenMode mode,
QMakeVfs::VfsFlags flags,
const QString & contents )

Definition at line 450 of file qmakebuiltins.cpp.

References QMakeParser::discardFileFromCache(), m_parser, m_vfs, ReturnFalse, ReturnTrue, QMakeVfs::VfsAccessedOnly, and QMakeVfs::VfsCreate.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_buildRoot

QString QMakeEvaluator::m_buildRoot

Definition at line 287 of file qmakeevaluator.h.

◆ m_cachefile

QString QMakeEvaluator::m_cachefile

Definition at line 284 of file qmakeevaluator.h.

◆ m_caller

QMakeEvaluator* QMakeEvaluator::m_caller

Definition at line 234 of file qmakeevaluator.h.

Referenced by QMakeEvaluator(), evaluateFileChecked(), and evaluateFileInto().

◆ m_conffile

QString QMakeEvaluator::m_conffile

Definition at line 283 of file qmakeevaluator.h.

◆ m_current

◆ m_dirSep

ProString QMakeEvaluator::m_dirSep

Definition at line 292 of file qmakeevaluator.h.

◆ m_extraConfigs

ProStringList QMakeEvaluator::m_extraConfigs

Definition at line 273 of file qmakeevaluator.h.

◆ m_extraVars

ProValueMap QMakeEvaluator::m_extraVars

Definition at line 272 of file qmakeevaluator.h.

◆ m_featureRoots

QExplicitlySharedDataPointer<QMakeFeatureRoots> QMakeEvaluator::m_featureRoots

Definition at line 291 of file qmakeevaluator.h.

◆ m_functionDefs

ProFunctionDefs QMakeEvaluator::m_functionDefs

Definition at line 293 of file qmakeevaluator.h.

◆ m_handler

QMakeHandler* QMakeEvaluator::m_handler

Definition at line 300 of file qmakeevaluator.h.

Referenced by QMakeEvaluator(), evaluateFileInto(), loadSpec(), message(), and visitProFile().

◆ m_hostBuild

bool QMakeEvaluator::m_hostBuild

◆ m_listCount

int QMakeEvaluator::m_listCount

Definition at line 276 of file qmakeevaluator.h.

Referenced by QMakeEvaluator().

◆ m_locationStack

QStack<Location> QMakeEvaluator::m_locationStack

Definition at line 269 of file qmakeevaluator.h.

◆ m_mkspecPaths

QStringList QMakeEvaluator::m_mkspecPaths

Definition at line 290 of file qmakeevaluator.h.

◆ m_option

◆ m_outputDir

QString QMakeEvaluator::m_outputDir

Definition at line 274 of file qmakeevaluator.h.

◆ m_parser

◆ m_profileStack

QStack<ProFile *> QMakeEvaluator::m_profileStack

Definition at line 270 of file qmakeevaluator.h.

◆ m_qmakefeatures

QStringList QMakeEvaluator::m_qmakefeatures

Definition at line 289 of file qmakeevaluator.h.

◆ m_qmakepath

QStringList QMakeEvaluator::m_qmakepath

Definition at line 288 of file qmakeevaluator.h.

◆ m_qmakespec

QString QMakeEvaluator::m_qmakespec

Definition at line 280 of file qmakeevaluator.h.

◆ m_qmakespecName

QString QMakeEvaluator::m_qmakespecName

Definition at line 281 of file qmakeevaluator.h.

◆ m_returnValue

ProStringList QMakeEvaluator::m_returnValue

Definition at line 294 of file qmakeevaluator.h.

◆ m_sourceRoot

QString QMakeEvaluator::m_sourceRoot

Definition at line 286 of file qmakeevaluator.h.

◆ m_stashfile

QString QMakeEvaluator::m_stashfile

Definition at line 285 of file qmakeevaluator.h.

◆ m_superfile

QString QMakeEvaluator::m_superfile

Definition at line 282 of file qmakeevaluator.h.

◆ m_tmp

QString QMakeEvaluator::m_tmp[2]

Definition at line 296 of file qmakeevaluator.h.

◆ m_tmp1

QString QMakeEvaluator::m_tmp1

Definition at line 296 of file qmakeevaluator.h.

◆ m_tmp2

QString QMakeEvaluator::m_tmp2

Definition at line 296 of file qmakeevaluator.h.

◆ m_tmp3

QString QMakeEvaluator::m_tmp3

Definition at line 296 of file qmakeevaluator.h.

◆ m_toggle

int QMakeEvaluator::m_toggle

Definition at line 277 of file qmakeevaluator.h.

Referenced by QMakeEvaluator().

◆ m_valuemapInited

bool QMakeEvaluator::m_valuemapInited

Definition at line 278 of file qmakeevaluator.h.

Referenced by QMakeEvaluator(), initFrom(), loadDefaults(), and visitProFile().

◆ m_valuemapStack

◆ m_vfs

QMakeVfs* QMakeEvaluator::m_vfs

Definition at line 301 of file qmakeevaluator.h.

Referenced by QMakeEvaluator(), evaluateFileInto(), loadSpec(), visitProFile(), and writeFile().


The documentation for this class was generated from the following files: