diff options
author | Sam Ravnborg <sam@mars.ravnborg.org> | 2004-08-19 03:17:03 +0200 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2004-08-19 03:17:03 +0200 |
commit | f5ce51c635d17d0e03e18400bc57b591df2712ca (patch) | |
tree | b3f11e4a37edcd60f2a5a6fd7c346fc78e7eb603 /scripts | |
parent | 2d52113a4d4cb9af704b8c8373563b71efa0eb94 (diff) | |
download | history-f5ce51c635d17d0e03e18400bc57b591df2712ca.tar.gz |
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: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.clean | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index ab73032fc77358..b02ab1fb28e38d 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean @@ -29,13 +29,25 @@ subdir-ymn := $(sort $(subdir-ym) $(subdir-n) $(subdir-)) # Add subdir path 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) \ $(targets) $(clean-files) \ $(host-progs) \ $(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 \ $(addprefix $(obj)/, $(filter-out /%, $(__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 \ $(addprefix $(obj)/, $(filter-out /%, $(clean-dirs))) \ $(filter /%, $(clean-dirs))) |