Skip to content

fix: #44 use mkdir -p so make eo is idempotent#47

Closed
edmoffo wants to merge 1 commit into
objectionary:masterfrom
edmoffo:44-mkdir-p
Closed

fix: #44 use mkdir -p so make eo is idempotent#47
edmoffo wants to merge 1 commit into
objectionary:masterfrom
edmoffo:44-mkdir-p

Conversation

@edmoffo

@edmoffo edmoffo commented Jun 19, 2026

Copy link
Copy Markdown

The top-level Makefile ends the eo target with mkdir target target/run, which has no -p flag and aborts on rerun. Once target/ already exists, the next make, make eo, or make compile invocation fails with mkdir: cannot create directory 'target': File exists and the build is reported broken without anything having actually changed in the sources. This is the surface symptom flagged in #44 and one slice of the broader breakage tracked in #40.

After this change the recipe is mkdir -p target/run, which creates both target/ and target/run/ in one call and stays silent when they already exist. A subsequent make eo on a populated working copy is now a no-op for this step instead of a hard failure, and the recipe matches the convention already used by the target/run/%.txt: rule a few lines below.

Verified locally by running make eo twice in a row on a clean checkout — the first invocation creates the directories, the second is silent, and the eo target no longer returns a non-zero exit code on idempotent rebuilds. Other build failures unrelated to directory creation are not in scope here.

Closes #44

Replace mkdir target target/run with mkdir -p target/run so a second
make eo on a populated working copy no longer aborts with
mkdir: cannot create directory 'target': File exists. The -p flag
matches the convention already used inside the target/run/%.txt rule
lower in the same Makefile.
@yegor256 yegor256 closed this Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Top-level Makefile eo target fails on rebuild: mkdir target target/run lacks -p

2 participants