docs/10-building-and-testing.md
Awesome has the following dependencies (besides a more-or-less standard POSIX environment):
Additionally, the following optional dependencies exist:
awesome-client utilitybacktrace_symbols() to
generate slightly better backtraces on crashesXephyr or Xvfb for running integration tests./themes/gtk/With all dependencies installed, run the following commands within the root of the repository to build and install Awesome on your system:
make
sudo make install
To ease installation management, you can pack Awesome into .deb or .rpm packages. The following command will build the correct package for your system's package manager:
make package
To install the package, run one of the following commands:
sudo dpkg -i awesome-x.y.z.deb
# or
sudo rpm -Uvh awesome-x.y.z.rpm
Awesome allows customizing various aspects of the build process through CMake variables. To change these variables, pass the CMAKE_ARGS environment variable to make with CMake flags as content (see cmake -h).
Here is an example:
CMAKE_ARGS="-DLUA_EXECUTABLE=/usr/bin/lua5.3" make
Note:
CMake arguments only need to be specified on the first run of make or after make distclean.
The CMake variables GENERATE_DOC and GENERATE_MANPAGES toggle generation of HTML documentation and man pages respectively. They are enabled by default but can be set to OFF.
CMAKE_ARGS="-DGENERATE_DOC=OFF -DGENERATE_MANPAGES=OFF" make
Both the build steps and the final binary require a working Lua interpreter. To change the Lua interpreter that both the build process and Awesome should use, specify an absolute path to a lua binary for LUA_EXECUTABLE and values that match the binary's version for LUA_LIBRARY and LUA_INCLUDE_DIR.
Example to build on Arch Linux:
CMAKE_ARGS="-DLUA_EXECUTABLE=/usr/bin/lua5.3 -DLUA_LIBRARY=/usr/lib/liblua.so.5.3 -DLUA_INCLUDE_DIR=/usr/include/lua5.3" make
Additional variables can be found through CMake. Run the following command to print a list of all available variables, including the ones explained above:
cmake -B build -L
Once Awesome has been built, you can run various test suites to verify functionality for both the binary and the Lua library. Make sure to install applicable dependencies as outlined at the top.
Full test suite:
make check
Individual test categories can be run as well:
make check-integration: Run integration tests within a Xephyr session.make check-qa: Run luacheck against the Lua librarymake check-unit: Run unit tests with busted against the Lua library. You can also run busted <options> ./spec if you want to specify options for busted.make check-requires: Check for invalid require() calls.make check-examples: Run integration tests within the examples in ./tests/examples.make check-themes: Test themes.