A Python tool for analyzing build system configurations without extracting archives to disk. It identifies build requirements, options, and dependencies from Autotools, CMake, and Meson projects.
- Tar Archive Support: Analyze compressed archives directly without extracting to disk
- Supports
.tar,.tar.gz/.tgz,.tar.bz2/.tbz2,.tar.xz/.txz - Optional
.tar.zst/.tar.zstdsupport withzstandardpackage
- Supports
- Multiple Build Systems: Detects and parses:
- Autotools:
configure.ac,configure.in,Makefile.am - CMake:
CMakeLists.txt - Meson:
meson.build,meson_options.txt,meson.options
- Autotools:
- Memory-Efficient: Streams through archives and only extracts relevant build files into memory
- Dependency Detection: Identifies required and optional dependencies
- Build Options: Lists available configuration options and switches
- JSON Output: Machine-readable JSON output for integration with other tools
- Python 3.6 or later
- Python standard library modules (no external dependencies required for basic functionality):
argparse,json,logging,os,re,sys,tarfile,io
| Package | Version | Purpose |
|---|---|---|
zstandard |
>= 0.15.0 | Support for .tar.zst and .tar.zstd archives |
Install optional dependencies:
pip install zstandardNo installation required. Simply download build_analyzer.py and run it with Python 3.
# Clone the repository or download the script
git clone https://github.com/EdgeOfAssembly/build_analyzer.git
cd build_analyzer# Analyze a directory
python3 build_analyzer.py /path/to/source/directory
# Analyze a tar archive (without extracting to disk!)
python3 build_analyzer.py project-1.0.tar.xz
# Output in JSON format for machine-readable output
python3 build_analyzer.py --json project-1.0.tar.xz# Analyze Linux kernel source without extracting 1.5GB
python3 build_analyzer.py linux-6.12.tar.xz
# Analyze GCC source archive
python3 build_analyzer.py gcc-15.2.0.tar.xz
# Analyze Mesa graphics library
python3 build_analyzer.py mesa-25.3.1.tar.xz
# Analyze graphite2 library
python3 build_analyzer.py graphite2-1.3.14.tgzAnalyzing tar archive: mesa-25.3.1.tar.xz
(Reading directly from archive without extracting to disk)
Meson project at mesa-25.3.1:
Meson version expected: 1.1.0
Supported options (sorted):
gallium-drivers array auto List of Gallium drivers to build
vulkan-drivers array auto List of Vulkan drivers to build
...
Dependencies (sorted):
libdrm >= 2.4.109
libunwind (optional)
llvm >= 15.0.0
...
| Extension | Compression | Notes |
|---|---|---|
.tar |
None | Plain tar archive |
.tar.gz, .tgz |
gzip | Built-in Python support |
.tar.bz2, .tbz2 |
bzip2 | Built-in Python support |
.tar.xz, .txz |
xz/LZMA | Built-in Python support |
.tar.zst, .tar.zstd |
Zstandard | Requires zstandard package |
- Archive Detection: The tool detects if the input is a tar archive based on file extension
- Streaming Extraction: Only build system files are extracted into memory (not to disk)
- Build System Detection: Identifies Autotools, CMake, and Meson projects
- Parsing: Extracts version requirements, build options, and dependencies
- Output: Displays organized information about each build system found
The tool only extracts these files into memory:
configure.ac,configure.in(Autotools)CMakeLists.txt(CMake)meson.build,meson_options.txt,meson.options(Meson)Makefile.am,Makefile.in(Automake version detection)
- Autoconf version required (from
AC_PREREQ) - Automake version required (from
AM_INIT_AUTOMAKE,AUTOMAKE_OPTIONS) - Configure switches (
--enable-*,--disable-*,--with-*,--without-*) - Environment variables (from
AC_ARG_VAR) - Dependencies (from
AC_CHECK_LIB,PKG_CHECK_MODULES)
- CMake version required (from
cmake_minimum_required) - Build options (
-Dvariables fromoption()andset(... CACHE ...)) - Dependencies (from
find_package)
- Meson version required (from
meson_version) - Build options (from
option()definitions) - Dependencies (from
dependency()calls)
Copyright (c) 2025 EdgeOfAssembly
This project is dual-licensed:
This software is licensed under the GNU General Public License v3.0 (GPLv3).
See the LICENSE file for the full license text.
For commercial use or if you need a license other than GPLv3, please contact the author:
EdgeOfAssembly
Email: haxbox2000@gmail.com
Contributions are welcome! Please ensure any contributions are compatible with the GPLv3 license.
EdgeOfAssemblly - haxbox2000@gmail.com