-
Notifications
You must be signed in to change notification settings - Fork 173
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
Remove generated files from the repository #642
base: master
Are you sure you want to change the base?
Conversation
Makefile
Outdated
@@ -88,14 +88,14 @@ uninstall: | |||
$(DESTDIR)$(PREFIX)/bin/keyd-usb-gadget.sh \ | |||
$(DESTDIR)$(PREFIX)/lib/systemd/system/keyd.service | |||
clean: | |||
-rm -rf bin keyd.service | |||
rm -rf bin data/*.1.gz data/keyd.compose keyd.service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compose and run are not included the default/clean targets so the user doesn't need to have python or scdoc on their system. The generated assets are deliberately checked into the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pros to removing generated files:
- It simplifies the work of downstream packagers that have to tweak the input files or the build process.
- It eliminates any chance that the checked-in generated files become out of sync with the checked-in input files.
- The codebase is easier for potential contributors to understand.
- No need to review changes to generated files when a pull request modifies the input files.
Cons to removing generated files:
- Users building keyd will have to install python and scdoc. (Users running a pre-built binary package are unaffected.) Such users already have to know how to install a C compiler and dependency headers; adding python and scdoc to the list does not seem overly burdensome to me.
- Building takes much more time now. (It's still sufficiently fast enough, in my opinion. Also, incremental build speed can be restored with some further tweaks to the
Makefile
.)
(Please let me know if anything was omitted.)
a7cc2e1
to
88ebfc5
Compare
The `-f` option causes `rm` to silently ignore files that don't exist, so `rm -rf` will only fail if `rm` has trouble deleting a file that exists. We want `make` to fail in that situation.
FYI, this was merged into https://github.com/keyd-project/keyd-fork as keyd-project/keyd-fork@8c28ad2 |
I am currently working on creating a Debian package for keyd, and would like to upstream some build system cleanup commits:
mkdir -p
instead of ignoring return codemake all
to make everything