xref: /spdk/mk/spdk.subdirs.mk (revision 79c52a64269385b9a8b53c2fe03e2343160d38b3)
1#  SPDX-License-Identifier: BSD-3-Clause
2#  Copyright (C) 2015 Intel Corporation.
3#  All rights reserved.
4#
5
6ALL_DEPDIRS := $(patsubst DEPDIRS-%,%,$(filter DEPDIRS-%,$(.VARIABLES)))
7
8define depdirs_rule
9$(DEPDIRS-$(1)):
10
11$(1): | $(DEPDIRS-$(1))
12
13endef
14
15$(DIRS-y) :
16	$(Q)$(MAKE) -C $@ S=$S$(S:%=/)$@ $(MAKECMDGOALS)
17
18$(foreach dir,$(ALL_DEPDIRS),$(eval $(call depdirs_rule,$(dir))))
19
20install: all $(DIRS-y)
21
22uninstall: $(DIRS-y)
23