kbuild: Add comments to Makefile.clean

From: Sam Ravnborg
Date: Wed Aug 18 2004 - 16:15:03 EST


# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/08/18 23:17:03+02:00 sam@xxxxxxxxxxxxxxxxx
# kbuild: add comments to Makefile.clean
#
# Chris Wedgwood <cw@xxxxxxxx> 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@xxxxxxxxxxxx>
#
# scripts/Makefile.clean
# 2004/08/18 23:16:47+02:00 sam@xxxxxxxxxxxxxxxxx +12 -0
# Add comments
#
diff -Nru a/scripts/Makefile.clean b/scripts/Makefile.clean
--- a/scripts/Makefile.clean 2004-08-19 01:08:07 +02:00
+++ b/scripts/Makefile.clean 2004-08-19 01:08:07 +02:00
@@ -29,13 +29,25 @@
# 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)))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/