codescalersinternships / home

home repo for internships
1 stars 0 forks source link

Makego - Template #157

Open xmonader opened 4 days ago

xmonader commented 4 days ago

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: