Recursive Make for Multi-Directory Projects

Community

Parallelize multi-dir builds with phony targets

Authortherealbill
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Coordinating builds across multiple subdirectories in a Make-based project can be brittle when using shell loops, leading to serialized builds, hard-to-trace errors, and poor parallelism. This skill provides a structured approach to organizing per-subdirectory builds with phony targets and proper recursion.

Core Features & Use Cases

  • Phony targets for subdirectories: enables parallel builds with make -j and clear scheduling.
  • Proper recursion with $(MAKE): ensures flags like -t, -n, -q apply in sub-makes.
  • Dependency order & export options: allows declaring per-subdirectory dependencies and shared variables for consistent builds.
  • Guidance for common anti-patterns: explains why shell loops are problematic and provides the phony-target alternatives.
  • Use cases include multi-directory projects with frontend/backend/database, or scenarios with subdirectory-like subprojects.

Quick Start

Use phony targets for subdirectories and invoke $(MAKE) -C $@ in each target to enable parallel builds.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: Recursive Make for Multi-Directory Projects
Download link: https://github.com/therealbill/mynet/archive/main.zip#recursive-make-for-multi-directory-projects

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.