Fix CMake stale linux build dir#1071
Open
runlevel5 wants to merge 2 commits intoRobertBeckebans:masterfrom
Open
Fix CMake stale linux build dir#1071runlevel5 wants to merge 2 commits intoRobertBeckebans:masterfrom
runlevel5 wants to merge 2 commits intoRobertBeckebans:masterfrom
Conversation
The scripts did rm -rf build && mkdir build, which invalidates the cwd of any shell already inside the build directory. Replace with mkdir -p build && cd build && rm -rf * to clean the contents while preserving the directory inode.
74b83e1 to
d28b452
Compare
|
@runlevel5 I always thought these command-line build scripts were designed to work from the RBDoom3BFG/neo directory, not from the build directory. However, your change adds that use case and makes things more flexible. Note this is also applicable to the cmake-macos-*.sh scripts (but not the cmake-xcode-*.sh ones). Please feel free to update this PR and apply the same changes to: |
Author
|
@SRSaunders amended |
|
Thanks @runlevel5 for adding this! |
Author
|
@RobertBeckebans the PR is ready for review. Great thanks |
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.
Problem:
Why?
rm -rf buildandmkdir buildin those scripts are culprits. Since you're already sitting inside the build directory when you run the script, the directory gets deleted and recreated underneath you. Your shell still holds a file descriptor to the old (now deleted) inode, so make fails withgetcwd: No such file or directory.Solution: instead of
rm -rf build && mkdir build, just clean the contents of the directory