Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makego - Template #157

Open
xmonader opened this issue Jun 28, 2024 · 0 comments
Open

Makego - Template #157

xmonader opened this issue Jun 28, 2024 · 0 comments
Labels
task New task

Comments

@xmonader
Copy link
Member

Description:
Create a simple build automation tool similar to Make, but with a simpler featureset. The tool should be able to execute targets with dependencies and commands, focusing on the core functionality of a build system.

Requirements:

  1. Configuration File:

    • Parse a custom configuration file Makefile
    • Support defining targets, their dependencies, and associated commands
  2. Target Definition:

    • Allow users to define targets with a name
    • Support specifying dependencies for each target
    • Enable associating one or more shell commands with each target
  3. Dependency Resolution:

    • Implement a dependency graph to determine the order of execution
    • Detect and report circular dependencies
  4. Command Execution:

    • Execute shell commands associated with each target
    • Support running multiple commands for a single target
  5. CLI Interface:

    • Accept target names as command-line arguments
    • If no target is specified, run the default target (if defined)
    • Implement a '-f' flag to specify a custom Makefile
  6. Concurrency:

    • Execute independent targets concurrently using goroutines
    • Implement proper synchronization for dependent targets
  7. Error Handling:

    • Provide clear error messages for configuration issues
    • Handle and report errors in command execution
  8. Testing:

    • Write unit tests for core functionalities (parsing, dependency resolution)
    • Implement integration tests with sample Makefile
  9. Documentation:

    • Provide clear documentation on the Makefile format
    • Include usage instructions and examples in the README

Optional Enhancements:

  • Implement a dry-run mode to show what would be executed
  • Add support for environment variable expansion in commands
  • Implement simple variable substitution in the Makefile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task New task
Projects
None yet
Development

No branches or pull requests

2 participants