1# Copyright 2016 The Fuchsia Authors 2# Copyright (c) 2008-2015 Travis Geiselbrecht 3# 4# Use of this source code is governed by a MIT-style 5# license that can be found in the LICENSE file or at 6# https://opensource.org/licenses/MIT 7 8# included from the main makefile to include a set of rules.mk to satisfy 9# the current MODULE list. If as a byproduct of including the rules.mk 10# more stuff shows up on the MODULE list, recurse 11 12# Strip any .postfixes, as these refer to "sub-modules" defined in the 13# rules.mk file of the base module name. 14MODULES := $(foreach d,$(strip $(MODULES)),$(firstword $(subst .,$(SPACE),$(d)))) 15 16# sort and filter out any modules that have already been included 17MODULES := $(sort $(MODULES)) 18MODULES := $(filter-out $(ALLMODULES),$(MODULES)) 19 20ifneq ($(MODULES),) 21ALLMODULES += $(MODULES) 22ALLMODULES := $(sort $(ALLMODULES)) 23INCMODULES := $(MODULES) 24MODULES := 25include $(addsuffix /rules.mk,$(INCMODULES)) 26 27include make/recurse.mk 28 29endif 30