menios
menios copied to clipboard
Extract Docker helpers and host/Docker branching to mk/core/docker.mk
Parent Issue
Part of #352 - Makefile refactoring
Objective
Centralize Docker-only helpers and host/Docker branching logic repeated across pattern rules.
Scope
Extract from root Makefile:
- Lines ~307: Docker helper functions
- Lines ~328: Host/Docker conditional logic
- Lines ~453: Pattern rule Docker branching
- Wrapper macros/functions for Docker execution
Target Location
mk/core/docker.mk
Implementation Steps
- Extract Docker detection and helper functions
- Create wrapper macros for Docker-vs-host execution
- Update root Makefile to
include mk/core/docker.mk - Refactor pattern rules to use centralized helpers
- Test both host and Docker builds
Dependencies
None - this is a foundational module
Acceptance Criteria
- [ ] All Docker helpers centralized in mk/core/docker.mk
- [ ] No duplicated Docker branching logic
- [ ] Both host and Docker builds work correctly
- [ ] Pattern rules simplified using new helpers