[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] build: fix clean targets when subdir-y is used
commit 0c58617f21c9d841190222c54ee7a64845320acd Author: Anthony PERARD <anthony.perard@xxxxxxxxxx> AuthorDate: Tue Sep 7 09:30:25 2021 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Sep 7 09:30:25 2021 +0200 build: fix clean targets when subdir-y is used The make variable $(subdir-y) isn't used yet but will be in a following patch. Anything in $(subdir-y) doesn't to have a '/' as suffix as we already now it's a directory. Rework the rules so that it doesn't matter whether there is a '/' or not. It also mimic more closely to the way Linux's Kbuild descend in subdirectories. FORCE phony target isn't needed anymore running clean, so it can be removed. Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/scripts/Makefile.clean | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/xen/scripts/Makefile.clean b/xen/scripts/Makefile.clean index 53379e6102..027c200c0e 100644 --- a/xen/scripts/Makefile.clean +++ b/xen/scripts/Makefile.clean @@ -12,19 +12,18 @@ include Makefile # Figure out what we need to clean from the various variables # ========================================================================== subdir-all := $(subdir-y) $(subdir-n) $(subdir-) \ - $(filter %/, $(obj-y) $(obj-n) $(obj-)) + $(patsubst %/,%, $(filter %/, $(obj-y) $(obj-n) $(obj-))) DEPS_RM = $(DEPS) $(DEPS_INCLUDE) .PHONY: clean -clean:: $(addprefix _clean_, $(subdir-all)) +clean:: $(subdir-all) rm -f *.o .*.o.tmp *~ core $(DEPS_RM) # Descending # --------------------------------------------------------------------------- -_clean_%/: FORCE - $(MAKE) $(clean) $* +PHONY += $(subdir-all) +$(subdir-all): + $(MAKE) $(clean) $@ -# Force execution of pattern rules (for which PHONY cannot be directly used). -.PHONY: FORCE -FORCE: +.PHONY: $(PHONY) -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |