| Scripts | fixes | |
| .gitignore | Added readme, initial project setup script, and .gitignore. | |
| buildconfig.sample.yml | Initial DBS system | |
| README.md | Added readme, initial project setup script, and .gitignore. | |
| setup_project_build_system.sh | Added readme, initial project setup script, and .gitignore. | |
Distributed Build System (DBS)
A shared build system for managing complex multi-platform projects with dependency tracking, parallel execution, and comprehensive logging.
Overview
This repository contains the core build system components that can be shared across multiple projects. The build system provides:
- Dependency Management: Automatic dependency resolution and ordering
- Parallel Execution: Concurrent task execution where possible
- Platform Support: Cross-platform build management
- Comprehensive Logging: Detailed execution logs and status tracking
- Validation: Build configuration validation and cycle detection
- Flexible Configuration: YAML-based configuration with inheritance
Quick Start
Setting up a new project
- Clone or copy this repository to your local machine
- Run the setup script from your project directory:
# From your project root
/path/to/dbs/setup_project_build_system.sh /path/to/your/project
Using in an existing project
If you already have a project with build system files:
# From your project root
./Scripts/setup_build_system.sh
This will:
- Create backups of existing build system files
- Create symlinks to the shared build system
- Set up buildconfig.yml if needed
- Create a restore script for reverting changes
Core Components
Scripts
build.pl- Main build script with comprehensive command-line interfaceBuildNode.pm- Core build node implementationBuildNodeRegistry.pm- Node registry and managementBuildStatusManager.pm- Status tracking and managementBuildUtils.pm- Utility functions and helpersprereqs.sh- Prerequisites setup script
Configuration
buildconfig.sample.yml- Sample configuration filebuildconfig.yml- Project-specific configuration (created during setup)
Usage
Basic Commands
# Show help
./Scripts/build.pl --help
# List available targets
./Scripts/build.pl --list-targets
# Validate configuration
./Scripts/build.pl --validate
# Build a specific target
./Scripts/build.pl --target <target_name>
# Dry run (show what would be done)
./Scripts/build.pl --target <target_name> --dry-run
# Display build order for a target
./Scripts/build.pl --display <target_name>
Advanced Features
# Debug mode with verbose output
./Scripts/build.pl --target <target> --debug --verbose
# Simulate failures for testing
./Scripts/build.pl --target <target> --dry-run --simulate-failure node1,node2
# Generate sample configuration
./Scripts/build.pl --generate-sample-config
# Print build order as JSON
./Scripts/build.pl --print-build-order-json
Configuration
The build system uses YAML configuration files. Key sections include:
build_groups: Define build targets and their dependenciesplatforms: Platform-specific configurationstasks: Individual build tasksglobal_vars: Global variables for command expansion
See buildconfig.sample.yml for a complete example.
Project Structure
dbs/
├── Scripts/ # Core build system files
│ ├── build.pl # Main build script
│ ├── BuildNode.pm # Build node implementation
│ ├── BuildNodeRegistry.pm # Node registry
│ ├── BuildStatusManager.pm # Status management
│ ├── BuildUtils.pm # Utility functions
│ └── prereqs.sh # Prerequisites setup
├── buildconfig.sample.yml # Sample configuration
├── setup_project_build_system.sh # Setup script for new projects
└── README.md # This file
Updating
To update to the latest build system:
- Pull the latest changes from this repository
- The symlinks in your projects will automatically point to the updated files
Restoring Local Changes
If you need to restore local build system files:
# From your project root
./Scripts/restore_build_system.sh
This will restore the original files from backups created during setup.
Development
Adding New Features
- Make changes to the core build system files in this repository
- Test thoroughly with multiple projects
- Update documentation as needed
- Commit and push changes
Testing
The build system includes comprehensive validation:
# Validate all configurations
./Scripts/build.pl --validate
# Test specific target
./Scripts/build.pl --target <target> --dry-run
Troubleshooting
Common Issues
- Symlink errors: Ensure the DBS path is correct and accessible
- Permission errors: Make sure scripts are executable (
chmod +x) - Configuration errors: Use
--validateto check configuration - Dependency cycles: The system will detect and report circular dependencies
Debug Mode
Use --debug and --verbose flags for detailed output:
./Scripts/build.pl --target <target> --debug --verbose
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test with multiple projects
- Submit a pull request
License
[Add your license information here]
Support
For issues and questions:
- Check the troubleshooting section
- Review the help output:
./Scripts/build.pl --help - Create an issue in the repository