Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup: Add -f to rm commands of make clean #25

Merged
merged 1 commit into from Mar 2, 2021
Merged

Conversation

Wuzzy2
Copy link
Contributor

@Wuzzy2 Wuzzy2 commented Mar 2, 2021

When you run make clean but the repo is already clean, you get a warning message from the rm command (file not found error).

This PR adds the -f parameter to suppress this warning.

orudge
orudge approved these changes Mar 2, 2021
Copy link
Contributor

@orudge orudge left a comment

The make clean command already ignores errors if rm fails:

rm: cannot remove 'opensfx.obs': No such file or directory
make: [Makefile.in:48: clean] Error 1 (ignored)
rm: cannot remove 'opensfx.cat': No such file or directory
make: [Makefile.in:49: clean] Error 1 (ignored)
rm: cannot remove 'src/opensfx.cat': No such file or directory
make: [Makefile.in:50: clean] Error 1 (ignored)

That said, -f itself should be safe in this context, and it looks like most of the rest of the makefile actually uses -rf even when I'd argue it shouldn't be. I don't see that this change should cause any harm.

@orudge orudge merged commit 2694299 into OpenTTD:master Mar 2, 2021
2 checks passed
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.

None yet

2 participants