menios
menios copied to clipboard
Create optional mk/helpers/macros.mk for reusable recipes
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
- Complete other module extractions first
- Identify common patterns across modules
- Create
mk/helpers/directory if needed - Extract reusable macros and functions
- Update modules to use shared helpers
- Update root Makefile to
include mk/helpers/macros.mkif created - 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.