Skip to content

External Build Systems

Jake can detect and run targets from Makefile and Justfile in the same directory. This lets you gradually migrate to Jake or use them together.

Jake automatically detects these files:

Makefile variants (in priority order):

  • GNUmakefile
  • Makefile
  • makefile

Justfile variants (in priority order):

  • justfile
  • Justfile
  • .justfile

External recipes get a prefix to avoid conflicts:

SourcePrefixExample
Makefilemake.make.build, make.clean
Justfilejust.just.test, just.deploy
Terminal window
# List all recipes including external
jake --list
# List only external recipes
jake --external
# List only Makefile targets
jake --external make
# List only Justfile recipes
jake --external just
# Hide external recipes from listing
jake --list --no-external

Run them like any other recipe:

Terminal window
# Run a Makefile target
jake make.build
# Run a Justfile recipe
jake just.test
# With arguments (passed through)
jake make.install PREFIX=/usr/local

When you run an external recipe, Jake delegates to the underlying tool:

  • Makefile: Runs make -f <file> <target>
  • Justfile: Runs just --justfile <file> <recipe>

The original tool handles all the execution logic.

Targets starting with _ are treated as private:

# Makefile
_helper: # Hidden from jake --list
echo "helper"
build: _helper
echo "building"

Directory structure:

project/
├── Jakefile # Jake recipes
├── Makefile # Legacy build
└── justfile # Additional tooling
Terminal window
# See everything
jake --list
# Output:
# Available recipes:
# build Build the project
# test Run tests
#
# Makefile (Makefile):
# make.all
# make.clean
#
# Justfile (justfile):
# just.fmt Format code
# just.lint Run linter

Use external support to migrate incrementally:

  1. Create a Jakefile alongside your Makefile
  2. Move recipes one at a time
  3. Have Jake recipes call make targets during transition:
task build:
@description "New Jake build"
# Can still call old make targets
make legacy-step
echo "New build steps..."
  1. Remove Makefile when migration is complete