menios icon indicating copy to clipboard operation
menios copied to clipboard

Extract Docker helpers and host/Docker branching to mk/core/docker.mk

Open pbalduino opened this issue 3 months ago • 0 comments

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

  1. Extract Docker detection and helper functions
  2. Create wrapper macros for Docker-vs-host execution
  3. Update root Makefile to include mk/core/docker.mk
  4. Refactor pattern rules to use centralized helpers
  5. 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

pbalduino avatar Oct 22 '25 19:10 pbalduino