fix: #44 use mkdir -p so make eo is idempotent#47
Closed
edmoffo wants to merge 1 commit into
Closed
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The top-level
Makefileends theeotarget withmkdir target target/run, which has no-pflag and aborts on rerun. Oncetarget/already exists, the nextmake,make eo, ormake compileinvocation fails withmkdir: cannot create directory 'target': File existsand 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 bothtarget/andtarget/run/in one call and stays silent when they already exist. A subsequentmake eoon 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 thetarget/run/%.txt:rule a few lines below.Verified locally by running
make eotwice in a row on a clean checkout — the first invocation creates the directories, the second is silent, and theeotarget 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