u-boot-brain/scripts/Makefile.clean

96 lines
2.9 KiB
Makefile
Raw Permalink Normal View History

# SPDX-License-Identifier: GPL-2.0
# ==========================================================================
# Cleaning up
# ==========================================================================
src := $(obj)
PHONY := __clean
__clean:
kbuild: sync with Linux 4.1 Update some build scripts to match Linux 4.1. Commit-based syncing was done so as not to break U-Boot specific changes. The previous big sync was from Linux 3.18-rc1 by commit 176d09827725 (kbuild: sync misc scripts with Linux 3.18-rc1). The commits imported from Linux (some with adjustments) are: [1] commit 9fb5e5372208973984a23ee6f5f025c05d364633 Author: Robert Richter <rrichter@cavium.com> dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst [2] commit 371fdc77af44f4cb32475fd499e1d912ccc30890 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: collect shorthands into scripts/Kbuild.include [3] commit a29b82326ed4eb5567b03c85b52c6891578d5a03 Author: Michal Marek <mmarek@suse.cz> kbuild: Remove duplicate $(cmd) definition in Makefile.clean [4] commit 1846dfbde3e8a53f3673dcb1c1b79fd9b3f8d40d Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: remove redundant -rR flag of hdr-inst [5] commit 34948e0bbf98640fc1821751b01d2f0cd17d84d5 Author: Michal Marek <mmarek@suse.cz> kbuild: Drop support for clean-rule [6] commit a16c5f99a28c9945165c46da27fff8e6f26f8736 Author: Michal Marek <mmarek@suse.cz> kbuild: Fix removal of the debian/ directory [7] commit d0d38cd9e853db11e0242b3df4c9c3c4a663fbb4 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: use mixed-targets when two or more config targets are given [8] commit dd33c03b18b3f2db791eb6a17c37d2de66e4de18 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: fix cc-ifversion macro [9] commit 665d92e38f65d70796aad2b8e49e42e80815d4a4 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: do not add $(call ...) to invoke cc-version or cc-fullversion [10] commit 6dcb4e5edf39e3b65a75ca76f087b2fdbee8a808 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: allow cc-ifversion to have the argument for false condition [11] commit c0a80c0c27e5e65b180a25e6c4c2f7ef9e386cd3 Author: Heiko Carstens <heiko.carstens@de.ibm.com> ftrace: allow architectures to specify ftrace compile options [12] commit 0b24becc810dc3be6e3f94103a866f214c282394 Author: Andrey Ryabinin <a.ryabinin@samsung.com> kasan: add kernel address sanitizer infrastructure [13] commit 4218affdf57f938c04e3a916a9685ee27079f377 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: remove warning about "make depend" [14] commit 77479b38e2f58890eb221a0418357502a5b41cd6 Author: Nathan Rossi <nathan.rossi@xilinx.com> kbuild: Create directory for target DTB Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Robert Richter <rrichter@cavium.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com> Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-07-05 01:56:55 +09:00
include scripts/Kbuild.include
# The filename Kbuild has precedence over Makefile
kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile)
# Figure out what we need to build from the various variables
# ==========================================================================
__subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y)))
subdir-y += $(__subdir-y)
__subdir-m := $(patsubst %/,%,$(filter %/, $(obj-m)))
subdir-m += $(__subdir-m)
__subdir- := $(patsubst %/,%,$(filter %/, $(obj-)))
subdir- += $(__subdir-)
# Subdirectories we need to descend into
subdir-ym := $(sort $(subdir-y) $(subdir-m))
subdir-ymn := $(sort $(subdir-ym) $(subdir-))
# Add subdir path
subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn))
# Temporal work-around for U-Boot
subdir-ymn := $(foreach f, $(subdir-ymn), \
$(if $(wildcard $(srctree)/$f/Makefile),$f))
# build a list of files to remove, usually relative to the current
# directory
__clean-files := $(extra-y) $(extra-m) $(extra-) \
$(always) $(targets) $(clean-files) \
kconfig / kbuild: Re-sync with Linux 4.19 Align Kconfig and Kbuild logic to Linux 4.19 release with minimal impact on files outside of this scope. Our previous Kconfig sync was done by commit 5972ff077e0f ("kconfig / kbuild: re-sync with Linux 4.18"). In this particular re-sync in order to keep clang support working a number of related changes needed to be pulled in that had been missed previously. Not all of these changes we easily traceable and so have been omitted from the list below. The imported Linux commits are: [From prior to v4.18] 9f3f1fd29976 kbuild: Add __cc-option macro d7f14c66c273 kbuild: Enable Large File Support for hostprogs 6d79a7b424a5 kbuild: suppress warnings from 'getconf LFS_*' 24403874316a Shared library support 86a9df597cdd kbuild: fix linker feature test macros when cross compiling with Clang 0294e6f4a000 kbuild: simplify ld-option implementation [From v4.18 to v4.19] 96f14fe738b6 kbuild: Rename HOSTCFLAGS to KBUILD_HOSTCFLAGS 10844aebf448 kbuild: Rename HOSTCXXFLAGS to KBUILD_HOSTCXXFLAGS b90a368000ab kbuild: Rename HOSTLDFLAGS to KBUILD_HOSTLDFLAGS 8377bd2b9ee1 kbuild: Rename HOST_LOADLIBES to KBUILD_HOSTLDLIBS f92d19e0ef9b kbuild: Use HOST*FLAGS options from the command line 4ab3b80159d4 kconfig: check for pkg-config on make {menu,n,g,x}config 693359f7ac90 kconfig: rename SYMBOL_AUTO to SYMBOL_NO_WRITE f60b992e30ff kbuild: replace $(LDFLAGS) $(ldflags-y) with $(ld_flags) 2fb9279f2c3e kbuild: change ld_flags to contain LDFLAGS_$(@F) c931d34ea085 arm64: build with baremetal linker target instead of Linux when available 5accd7f3360e kconfig: handle format string before calling conf_message_callback() a2ff4040151a kconfig: rename file_write_dep and move it to confdata.c 0608182ad542 kconfig: split out useful helpers in confdata.c adc18acf42a1 kconfig: remove unneeded directory generation from local*config 79123b1389cc kconfig: create directories needed for syncconfig by itself 16952b77d8b5 kconfig: make syncconfig update .config regardless of sym_change_count d6c6ab93e17f kbuild: remove deprecated host-progs variable 56869d45e364 kconfig: fix the rule of mainmenu_stmt symbol c151272d1687 kconfig: remove unused sym_get_env_prop() function 1880861226c1 kconfig: remove P_ENV property type e3fd9b5384f3 scripts/dtc: consolidate include path options in Makefile 4bf6a9af0e91 kconfig: add build-only configurator targets f1575595d156 kconfig: error out when seeing recursive dependency 5e8c5299d315 kconfig: report recursive dependency involving 'imply' f498926c47aa kconfig: improve the recursive dependency report 98a4afbfafd2 kconfig: fix "Can't open ..." in parallel build 9a9ddcf47831 kconfig: suppress "configuration written to .config" for syncconfig 87a32e624037 kbuild: pass LDFLAGS to recordmcount.pl d503ac531a52 kbuild: rename LDFLAGS to KBUILD_LDFLAGS 217c3e019675 disable stringop truncation warnings for now bc8d2e20a3eb kconfig: remove a spurious self-assignment fd65465b7016 kconfig: do not require pkg-config on make {menu,n}config 5a4630aadb9a ftrace: Build with CPPFLAGS to get -Qunused-arguments Note that this adds new cleanup work to do in that we should adapt the shared library support we have to what is now upstream. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
2020-03-28 00:46:27 +09:00
$(hostprogs-y) $(hostprogs-m) $(hostprogs-) \
$(hostlibs-y) $(hostlibs-m) $(hostlibs-) \
$(hostcxxlibs-y) $(hostcxxlibs-m)
__clean-files := $(filter-out $(no-clean-files), $(__clean-files))
kbuild: sync with Linux 4.1 Update some build scripts to match Linux 4.1. Commit-based syncing was done so as not to break U-Boot specific changes. The previous big sync was from Linux 3.18-rc1 by commit 176d09827725 (kbuild: sync misc scripts with Linux 3.18-rc1). The commits imported from Linux (some with adjustments) are: [1] commit 9fb5e5372208973984a23ee6f5f025c05d364633 Author: Robert Richter <rrichter@cavium.com> dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst [2] commit 371fdc77af44f4cb32475fd499e1d912ccc30890 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: collect shorthands into scripts/Kbuild.include [3] commit a29b82326ed4eb5567b03c85b52c6891578d5a03 Author: Michal Marek <mmarek@suse.cz> kbuild: Remove duplicate $(cmd) definition in Makefile.clean [4] commit 1846dfbde3e8a53f3673dcb1c1b79fd9b3f8d40d Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: remove redundant -rR flag of hdr-inst [5] commit 34948e0bbf98640fc1821751b01d2f0cd17d84d5 Author: Michal Marek <mmarek@suse.cz> kbuild: Drop support for clean-rule [6] commit a16c5f99a28c9945165c46da27fff8e6f26f8736 Author: Michal Marek <mmarek@suse.cz> kbuild: Fix removal of the debian/ directory [7] commit d0d38cd9e853db11e0242b3df4c9c3c4a663fbb4 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: use mixed-targets when two or more config targets are given [8] commit dd33c03b18b3f2db791eb6a17c37d2de66e4de18 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: fix cc-ifversion macro [9] commit 665d92e38f65d70796aad2b8e49e42e80815d4a4 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: do not add $(call ...) to invoke cc-version or cc-fullversion [10] commit 6dcb4e5edf39e3b65a75ca76f087b2fdbee8a808 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: allow cc-ifversion to have the argument for false condition [11] commit c0a80c0c27e5e65b180a25e6c4c2f7ef9e386cd3 Author: Heiko Carstens <heiko.carstens@de.ibm.com> ftrace: allow architectures to specify ftrace compile options [12] commit 0b24becc810dc3be6e3f94103a866f214c282394 Author: Andrey Ryabinin <a.ryabinin@samsung.com> kasan: add kernel address sanitizer infrastructure [13] commit 4218affdf57f938c04e3a916a9685ee27079f377 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: remove warning about "make depend" [14] commit 77479b38e2f58890eb221a0418357502a5b41cd6 Author: Nathan Rossi <nathan.rossi@xilinx.com> kbuild: Create directory for target DTB Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Robert Richter <rrichter@cavium.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com> Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-07-05 01:56:55 +09:00
# clean-files is given relative to the current directory, unless it
# starts with $(objtree)/ (which means "./", so do not add "./" unless
# you want to delete a file from the toplevel object directory).
__clean-files := $(wildcard \
kbuild: sync with Linux 4.1 Update some build scripts to match Linux 4.1. Commit-based syncing was done so as not to break U-Boot specific changes. The previous big sync was from Linux 3.18-rc1 by commit 176d09827725 (kbuild: sync misc scripts with Linux 3.18-rc1). The commits imported from Linux (some with adjustments) are: [1] commit 9fb5e5372208973984a23ee6f5f025c05d364633 Author: Robert Richter <rrichter@cavium.com> dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst [2] commit 371fdc77af44f4cb32475fd499e1d912ccc30890 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: collect shorthands into scripts/Kbuild.include [3] commit a29b82326ed4eb5567b03c85b52c6891578d5a03 Author: Michal Marek <mmarek@suse.cz> kbuild: Remove duplicate $(cmd) definition in Makefile.clean [4] commit 1846dfbde3e8a53f3673dcb1c1b79fd9b3f8d40d Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: remove redundant -rR flag of hdr-inst [5] commit 34948e0bbf98640fc1821751b01d2f0cd17d84d5 Author: Michal Marek <mmarek@suse.cz> kbuild: Drop support for clean-rule [6] commit a16c5f99a28c9945165c46da27fff8e6f26f8736 Author: Michal Marek <mmarek@suse.cz> kbuild: Fix removal of the debian/ directory [7] commit d0d38cd9e853db11e0242b3df4c9c3c4a663fbb4 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: use mixed-targets when two or more config targets are given [8] commit dd33c03b18b3f2db791eb6a17c37d2de66e4de18 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: fix cc-ifversion macro [9] commit 665d92e38f65d70796aad2b8e49e42e80815d4a4 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: do not add $(call ...) to invoke cc-version or cc-fullversion [10] commit 6dcb4e5edf39e3b65a75ca76f087b2fdbee8a808 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: allow cc-ifversion to have the argument for false condition [11] commit c0a80c0c27e5e65b180a25e6c4c2f7ef9e386cd3 Author: Heiko Carstens <heiko.carstens@de.ibm.com> ftrace: allow architectures to specify ftrace compile options [12] commit 0b24becc810dc3be6e3f94103a866f214c282394 Author: Andrey Ryabinin <a.ryabinin@samsung.com> kasan: add kernel address sanitizer infrastructure [13] commit 4218affdf57f938c04e3a916a9685ee27079f377 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: remove warning about "make depend" [14] commit 77479b38e2f58890eb221a0418357502a5b41cd6 Author: Nathan Rossi <nathan.rossi@xilinx.com> kbuild: Create directory for target DTB Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Robert Richter <rrichter@cavium.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com> Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-07-05 01:56:55 +09:00
$(addprefix $(obj)/, $(filter-out $(objtree)/%, $(__clean-files))) \
$(filter $(objtree)/%, $(__clean-files)))
kbuild: sync with Linux 4.1 Update some build scripts to match Linux 4.1. Commit-based syncing was done so as not to break U-Boot specific changes. The previous big sync was from Linux 3.18-rc1 by commit 176d09827725 (kbuild: sync misc scripts with Linux 3.18-rc1). The commits imported from Linux (some with adjustments) are: [1] commit 9fb5e5372208973984a23ee6f5f025c05d364633 Author: Robert Richter <rrichter@cavium.com> dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst [2] commit 371fdc77af44f4cb32475fd499e1d912ccc30890 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: collect shorthands into scripts/Kbuild.include [3] commit a29b82326ed4eb5567b03c85b52c6891578d5a03 Author: Michal Marek <mmarek@suse.cz> kbuild: Remove duplicate $(cmd) definition in Makefile.clean [4] commit 1846dfbde3e8a53f3673dcb1c1b79fd9b3f8d40d Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: remove redundant -rR flag of hdr-inst [5] commit 34948e0bbf98640fc1821751b01d2f0cd17d84d5 Author: Michal Marek <mmarek@suse.cz> kbuild: Drop support for clean-rule [6] commit a16c5f99a28c9945165c46da27fff8e6f26f8736 Author: Michal Marek <mmarek@suse.cz> kbuild: Fix removal of the debian/ directory [7] commit d0d38cd9e853db11e0242b3df4c9c3c4a663fbb4 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: use mixed-targets when two or more config targets are given [8] commit dd33c03b18b3f2db791eb6a17c37d2de66e4de18 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: fix cc-ifversion macro [9] commit 665d92e38f65d70796aad2b8e49e42e80815d4a4 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: do not add $(call ...) to invoke cc-version or cc-fullversion [10] commit 6dcb4e5edf39e3b65a75ca76f087b2fdbee8a808 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: allow cc-ifversion to have the argument for false condition [11] commit c0a80c0c27e5e65b180a25e6c4c2f7ef9e386cd3 Author: Heiko Carstens <heiko.carstens@de.ibm.com> ftrace: allow architectures to specify ftrace compile options [12] commit 0b24becc810dc3be6e3f94103a866f214c282394 Author: Andrey Ryabinin <a.ryabinin@samsung.com> kasan: add kernel address sanitizer infrastructure [13] commit 4218affdf57f938c04e3a916a9685ee27079f377 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: remove warning about "make depend" [14] commit 77479b38e2f58890eb221a0418357502a5b41cd6 Author: Nathan Rossi <nathan.rossi@xilinx.com> kbuild: Create directory for target DTB Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Robert Richter <rrichter@cavium.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com> Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-07-05 01:56:55 +09:00
# same as clean-files
__clean-dirs := $(wildcard \
kbuild: sync with Linux 4.1 Update some build scripts to match Linux 4.1. Commit-based syncing was done so as not to break U-Boot specific changes. The previous big sync was from Linux 3.18-rc1 by commit 176d09827725 (kbuild: sync misc scripts with Linux 3.18-rc1). The commits imported from Linux (some with adjustments) are: [1] commit 9fb5e5372208973984a23ee6f5f025c05d364633 Author: Robert Richter <rrichter@cavium.com> dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst [2] commit 371fdc77af44f4cb32475fd499e1d912ccc30890 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: collect shorthands into scripts/Kbuild.include [3] commit a29b82326ed4eb5567b03c85b52c6891578d5a03 Author: Michal Marek <mmarek@suse.cz> kbuild: Remove duplicate $(cmd) definition in Makefile.clean [4] commit 1846dfbde3e8a53f3673dcb1c1b79fd9b3f8d40d Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: remove redundant -rR flag of hdr-inst [5] commit 34948e0bbf98640fc1821751b01d2f0cd17d84d5 Author: Michal Marek <mmarek@suse.cz> kbuild: Drop support for clean-rule [6] commit a16c5f99a28c9945165c46da27fff8e6f26f8736 Author: Michal Marek <mmarek@suse.cz> kbuild: Fix removal of the debian/ directory [7] commit d0d38cd9e853db11e0242b3df4c9c3c4a663fbb4 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: use mixed-targets when two or more config targets are given [8] commit dd33c03b18b3f2db791eb6a17c37d2de66e4de18 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: fix cc-ifversion macro [9] commit 665d92e38f65d70796aad2b8e49e42e80815d4a4 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: do not add $(call ...) to invoke cc-version or cc-fullversion [10] commit 6dcb4e5edf39e3b65a75ca76f087b2fdbee8a808 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: allow cc-ifversion to have the argument for false condition [11] commit c0a80c0c27e5e65b180a25e6c4c2f7ef9e386cd3 Author: Heiko Carstens <heiko.carstens@de.ibm.com> ftrace: allow architectures to specify ftrace compile options [12] commit 0b24becc810dc3be6e3f94103a866f214c282394 Author: Andrey Ryabinin <a.ryabinin@samsung.com> kasan: add kernel address sanitizer infrastructure [13] commit 4218affdf57f938c04e3a916a9685ee27079f377 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> kbuild: remove warning about "make depend" [14] commit 77479b38e2f58890eb221a0418357502a5b41cd6 Author: Nathan Rossi <nathan.rossi@xilinx.com> kbuild: Create directory for target DTB Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Robert Richter <rrichter@cavium.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com> Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-07-05 01:56:55 +09:00
$(addprefix $(obj)/, $(filter-out $(objtree)/%, $(clean-dirs))) \
$(filter $(objtree)/%, $(clean-dirs)))
# ==========================================================================
quiet_cmd_clean = CLEAN $(obj)
cmd_clean = rm -f $(__clean-files)
quiet_cmd_cleandir = CLEAN $(__clean-dirs)
cmd_cleandir = rm -rf $(__clean-dirs)
__clean: $(subdir-ymn)
ifneq ($(strip $(__clean-files)),)
+$(call cmd,clean)
endif
ifneq ($(strip $(__clean-dirs)),)
+$(call cmd,cleandir)
endif
@:
# ===========================================================================
# Generic stuff
# ===========================================================================
# Descending
# ---------------------------------------------------------------------------
PHONY += $(subdir-ymn)
$(subdir-ymn):
$(Q)$(MAKE) $(clean)=$@
.PHONY: $(PHONY)