menios icon indicating copy to clipboard operation
menios copied to clipboard

Create optional mk/helpers/macros.mk for reusable recipes

Open pbalduino opened this issue 3 months ago • 0 comments

Parent Issue

Part of #352 - Makefile refactoring

Objective

Create an optional file for reusable recipes that emerge during the refactoring, such as Docker-vs-host handling patterns and staged copy loops.

Scope

  • Identify reusable patterns during other module extractions
  • Common macros for Docker-vs-host execution
  • Staged copy loop helpers
  • Other frequently repeated recipe patterns

Target Location

mk/helpers/macros.mk

Implementation Steps

  1. Complete other module extractions first
  2. Identify common patterns across modules
  3. Create mk/helpers/ directory if needed
  4. Extract reusable macros and functions
  5. Update modules to use shared helpers
  6. Update root Makefile to include mk/helpers/macros.mk if created
  7. Test all affected targets

Dependencies

  • All other refactoring issues (#353-#361)
  • This should be done last after patterns emerge

Acceptance Criteria

  • [ ] Common patterns identified
  • [ ] Reusable helpers extracted (if beneficial)
  • [ ] Modules simplified by using shared helpers
  • [ ] No code duplication for common patterns
  • [ ] No behavioral changes

Notes

This is optional and should only be created if clear patterns emerge that justify it. If individual modules handle their own patterns well, this may not be needed.

pbalduino avatar Oct 22 '25 19:10 pbalduino