running-make-to-build

Runs recursive make builds for stellar-core with correct parallelism and output handling.

3.3k|1.1k|Updated Nov 24, 2014
One-click install
npx skills add https://github.com/stellar/stellar-core --skill running-make-to-build
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: running-make-to-build
Source: https://github.com/stellar/stellar-core/tree/main/.claude/skills/running-make-to-build
Command: npx skills add https://github.com/stellar/stellar-core --skill running-make-to-build

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Building stellar-core involves a recursive make structure with vendored libraries, Rust components, and generated files, and running make incorrectly (wrong directory, wrong flags, manual cargo invocation) leads to broken or confusing builds.

Core Features & Use Cases

  • Correct Build Invocation: Enforces running make -j $(nproc) from the top-level directory with output limited via 2>&1 | tail -N.
  • Build System Rules: Documents what never to do, such as running make from subdirectories, invoking cargo manually, or editing generated Makefiles.
  • File Inclusion Workflow: Explains that adding a source file requires git add <file> followed by ./make-mks to include it in the build.
  • Use Case: After adding a new .cpp file to stellar-core, follow this Skill to stage it in git, re-run ./make-mks, and rebuild with full parallelism.

Quick Start

Build stellar-core by running make -j $(nproc) from the repository top level with output piped through tail.

Frequently Asked Questions about running-make-to-build

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build stellar-core with make?

Run `make -j $(nproc)` from the top-level repository directory, piping output through `2>&1 | tail -N` to limit noise. Never run make from a subdirectory or use `make -C` for other directories.

How do I add a new source file to the stellar-core build?

Stage the new .cpp or .h file with `git add <file>`, then run `./make-mks`. The script lists git-tracked files and defines makefile variables, so the file is automatically included in the build.

Should I run cargo manually to build stellar-core's Rust code?

No, never run cargo manually. The src/Makefile.am delegates to cargo to build the Rust components in src/rust and the soroban submodules, and the integration is subtle enough that make must handle it.

What should I do when the stellar-core build fails or behaves strangely?

Run `make clean` and try again. If the project was configured with --enable-ccache, rebuilding is typically cheap, especially when combined with `make -j $(nproc)`.

Can I edit Makefile or Makefile.in to change the build?

No, only ever edit Makefile.am files. Makefile and Makefile.in are generated artifacts, and most build changes are handled automatically by the ./make-mks script based on git-tracked files.