Home · Overviews · Reference · Classes codeless banner

QBuild Functions

There are 2 ways to call functions. The first style (which matches qmake's test functions) allows functions to return only true/false and can be used to delimit a scope.


A function called in this way returns true unless the function reslt matches one of the following criteria:

The second way to call a function (which matches qmake's replace test functions) assigns the result to a variable.


Note that most functions are suited to one call style only though there is nothing to prevent them being called in either style. Function implementations cannot determine how they have been called so the behavior of a function does not change based on how it was called.

contains()Check if a variable contains a value.
disable_project()Turn off a project that cannot be built.
equals()Test if a variable is equal to a value.
error()Report a fatal error.
eval()Evaluate commands.
exists()Test if a file exists.
for()Loop over the items in a variable
globalValue()Return a value from the startup scripts.
if()Group conditionals into a single statement
include()Include the contents of another file.
include_depends_rule()Read a .d file.
info()Report information to the user.
isEmpty()Check if a variable is empty.
join()Join a list of items into a single item.
load()Load an extension.
lower()Convert a value to lowercase.
message()Report information to the user.
not()Reverse a truth value.
path()Return the path to a file.
project()Returns the name of the project.
rule_for_file()Find the rule that freshens a file
shellQuote()Quotes strings for passing to shell commands.
testFile()Check the contents of a file.
upper()Convert a value to uppercase.
value()Return the value of a variable.
warning()Report a warning to the user.
writeFile()Write data to a file.

See also QBuild Script.

Copyright © 2009 Nokia
Qt Extended - QBuild Maintainer Guide