-
Notifications
You must be signed in to change notification settings - Fork 1.3k
build: make depclean remove the userspace dependency files too #4419
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -526,17 +526,24 @@ endif | |||||||||||||
|
|
||||||||||||||
| # These rules clean things up. 'modclean' cleans files generated by 'modules' | ||||||||||||||
| # (except that it doesn't remove the modules that were copied to rtlib) | ||||||||||||||
| # 'clean' cleans everything but dependency files, and 'depclean' cleans them | ||||||||||||||
| # too. | ||||||||||||||
| # 'clean' removes the build products (including, via 'objects', the userspace | ||||||||||||||
| # dependency files), and 'depclean' removes the dependency files alone. | ||||||||||||||
| modclean: | ||||||||||||||
| find -name '.*.cmd' -or -name '*.ko' -or -name '*.mod.c' -or -name '*.mod.o' | xargs rm -f | ||||||||||||||
| -rm -rf .tmp_versions | ||||||||||||||
| find . -name .tmp_versions |xargs rm -rf | ||||||||||||||
| -rm -f ../rtlib/*.ko | ||||||||||||||
| -rm -f ../rtlib/*.so | ||||||||||||||
|
|
||||||||||||||
| # Realtime dependency files live in 'depends'; userspace ones sit next to | ||||||||||||||
| # their objects as objects/**/*.d, so both have to go. Dropping them forces | ||||||||||||||
|
Comment on lines
+538
to
+539
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is only true for # Makefile:1292, BUILD_SYS=uspace
RTDEPS := $(sort $(RTOBJS:.o=.d))
# Makefile:1330, BUILD_SYS=normal
RTDEPS := $(sort $(patsubst objects/%.o,depends/%.d, $(RTOBJS)))On my uspace run-in-place tree there is no
Suggested change
The description splits the same way, counting all 535 as userspace. |
||||||||||||||
| # no recompilation (nothing depends on a .d existing), but it does clear | ||||||||||||||
| # stale prerequisites -- a dependency file naming a source that has since | ||||||||||||||
| # been renamed or moved otherwise aborts the build with "No rule to make | ||||||||||||||
| # target", and there is no way out of that short of a full 'make clean'. | ||||||||||||||
| depclean: | ||||||||||||||
| -rm -rf depends | ||||||||||||||
| -find objects -name '*.d' -print0 2>/dev/null | xargs -0 -r rm -f | ||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Worth saying in the comment why this is a |
||||||||||||||
|
|
||||||||||||||
| clean: genclean depclean modclean | ||||||||||||||
| genclean: | ||||||||||||||
|
|
||||||||||||||
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.
"userspace" undersells it: under
BUILD_SYS=uspace, which is the default,objects/holds the realtime dependency files as well (see the inline comment below). Dropping the word would keep this sentence true for both build systems.