65ec48ee (kx 2023-11-06 11:55:51 +0300 1)
65ec48ee (kx 2023-11-06 11:55:51 +0300 2) #
cb2922a8 (kx 2023-11-06 12:07:18 +0300 3) # Following command helps to cheate SUBDIRS list:
cb2922a8 (kx 2023-11-06 12:07:18 +0300 4) # $ tree -fid .
65ec48ee (kx 2023-11-06 11:55:51 +0300 5) #
65ec48ee (kx 2023-11-06 11:55:51 +0300 6)
627e8968 (kx 2023-11-06 13:07:01 +0300 7) SUBDIRS := Tools \
627e8968 (kx 2023-11-06 13:07:01 +0300 8) opensbi \
cb2922a8 (kx 2023-11-06 12:07:18 +0300 9) u-boot
65ec48ee (kx 2023-11-06 11:55:51 +0300 10)
65ec48ee (kx 2023-11-06 11:55:51 +0300 11)
cb2922a8 (kx 2023-11-06 12:07:18 +0300 12) all-recursive downloads_clean-recursive:
cb2922a8 (kx 2023-11-06 12:07:18 +0300 13) @set fnord $(MAKEFLAGS); amf=$$2; \
cb2922a8 (kx 2023-11-06 12:07:18 +0300 14) target=`echo $@ | sed s/-recursive//`; \
cb2922a8 (kx 2023-11-06 12:07:18 +0300 15) list='$(SUBDIRS)'; for subdir in $$list; do \
cb2922a8 (kx 2023-11-06 12:07:18 +0300 16) echo "Making $$target in $$subdir"; \
cb2922a8 (kx 2023-11-06 12:07:18 +0300 17) local_target="$$target"; \
cb2922a8 (kx 2023-11-06 12:07:18 +0300 18) (cd $$subdir && $(MAKE) $$fnord $$local_target) \
cb2922a8 (kx 2023-11-06 12:07:18 +0300 19) || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
cb2922a8 (kx 2023-11-06 12:07:18 +0300 20) done; test -z "$$fail"
65ec48ee (kx 2023-11-06 11:55:51 +0300 21)
cb2922a8 (kx 2023-11-06 12:07:18 +0300 22) all: all-recursive
65ec48ee (kx 2023-11-06 11:55:51 +0300 23)
cb2922a8 (kx 2023-11-06 12:07:18 +0300 24) downloads_clean: downloads_clean-recursive
65ec48ee (kx 2023-11-06 11:55:51 +0300 25)
cb2922a8 (kx 2023-11-06 12:07:18 +0300 26) .PHONY: all-recursive downloads_clean-recursive all downloads_clean