Commit f5ce51c6 authored by Sam Ravnborg's avatar Sam Ravnborg

kbuild: add comments to Makefile.clean

Chris Wedgwood <cw@f00f.org> wrote:
> P.S. I'd love to see the rules in scripts/Makefile.* documented.  I
>      would offer a patch for this but I don't understand the rules
>      myself...
And provided the following patch, slightly modified by me.
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 2d52113a
...@@ -29,13 +29,25 @@ subdir-ymn := $(sort $(subdir-ym) $(subdir-n) $(subdir-)) ...@@ -29,13 +29,25 @@ subdir-ymn := $(sort $(subdir-ym) $(subdir-n) $(subdir-))
# Add subdir path # Add subdir path
subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn)) subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn))
# build a list of files to remove, usually releative to the current
# directory
__clean-files := $(extra-y) $(EXTRA_TARGETS) $(always) \ __clean-files := $(extra-y) $(EXTRA_TARGETS) $(always) \
$(targets) $(clean-files) \ $(targets) $(clean-files) \
$(host-progs) \ $(host-progs) \
$(hostprogs-y) $(hostprogs-m) $(hostprogs-) $(hostprogs-y) $(hostprogs-m) $(hostprogs-)
# as clean-files is given relative to the current directory, this adds
# a $(obj) prefix, except for absolute paths
__clean-files := $(wildcard \ __clean-files := $(wildcard \
$(addprefix $(obj)/, $(filter-out /%, $(__clean-files))) \ $(addprefix $(obj)/, $(filter-out /%, $(__clean-files))) \
$(filter /%, $(__clean-files))) $(filter /%, $(__clean-files)))
# as clean-dirs is given relative to the current directory, this adds
# a $(obj) prefix, except for absolute paths
__clean-dirs := $(wildcard \ __clean-dirs := $(wildcard \
$(addprefix $(obj)/, $(filter-out /%, $(clean-dirs))) \ $(addprefix $(obj)/, $(filter-out /%, $(clean-dirs))) \
$(filter /%, $(clean-dirs))) $(filter /%, $(clean-dirs)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment