I am encountering a problem with a block of script that has me
completely mystified. In a nutshell I am attempting to create a
template that will generate two different build targets. Which target
gets generated depends on the number of targets assigned to a variable
in the main Makefile.
The code in the template is summarized as
include target_defs.mk
ifeq ("$(words ${module})", "1")
# Default, only one module to build from sources in a target directory.
${module} : platform_module
else
# Assumes each module has a corresponding <module>_source
#
$(foreach m,${module}, \
$(eval $(call make-module-tgt, ${m}, $(subst .c,.o, ${${m}_sources})) ) \
)
endif
The function/macro defined in the included file is: