Commit 397a479
committed
kbuild: simplify rustfmt target
There is no need to prune the rust/alloc directory because it was
removed by commit 9d0441b ("rust: alloc: remove our fork of the
`alloc` crate").
There is no need to prune the rust/test directory because no '*.rs'
files are generated within it.
To avoid forking the 'grep -Fv generated' process, filter out generated
files using the option, ! -name '*generated*'.
Now that the '-path ... -prune' option is no longer used, there is no
need to use the absolute path. Searching in $(srctree), which can be
a relative path, is sufficient.
The comment mentions the use case where $(srctree) is '..', that is,
$(objtree) is a sub-directory of $(srctree). In this scenario, all
'*.rs' files under $(objtree) are generated files and filters out by
the '*generated*' pattern.
Add $(RCS_FIND_IGNORE) as a shortcut. Although I do not believe '*.rs'
files would exist under the .git directory, there is no need for the
'find' command to traverse it.
Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Nicolas Schier <[email protected]>
Acked-by: Miguel Ojeda <[email protected]>1 parent a49401b commit 397a479
1 file changed
+2
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1754 | 1754 | | |
1755 | 1755 | | |
1756 | 1756 | | |
1757 | | - | |
1758 | | - | |
1759 | | - | |
1760 | | - | |
1761 | | - | |
1762 | 1757 | | |
1763 | | - | |
1764 | | - | |
1765 | | - | |
1766 | | - | |
1767 | | - | |
1768 | | - | |
| 1758 | + | |
| 1759 | + | |
1769 | 1760 | | |
1770 | 1761 | | |
1771 | 1762 | | |
| |||
0 commit comments