Makefile Informative Output

Description

I think the Makefile system would benefit from more informative output in general. See the following recommendation for ocpi/include/hdl/hdl-targets.mk

  1. Handle a directory named "platforms", exported or not
    HdlDoPlatformsDir=\
    $(if $(wildcard $1/mk),\
    $(foreach d,$(wildcard $1/mk/*.mk),\
    $(foreach p,$(basename $(notdir $d)),\

    $(if $(ALL_PLATFORMS_PRINTED),,$(info platform: $p (included from $d)))

    \
    $(call HdlAddPlatform,$1/mk,$p,$1/$p))),\
    \
    $(foreach d,$(wildcard $1/*),\
    $(foreach p,$(notdir $d),\
    $(if $(wildcard $d/$p.xml)$(wildcard $d/lib/hdl/$p.xml)$(wildcard $d/hdl/$p.xml),\
    $(call HdlDoPlatform,$d)))))


$(call OcpiDbgVar,HdlAllPlatforms)
$(if $(PLATFORMS_PRINTED),,$(info Available platforms $(eval export PLATFORMS_PRINTED=yes))
$(foreach d,$(subst :, ,$(OCPI_HDL_PLATFORM_PATH)),\
$(if $(wildcard $d),,$(error in OCPI_HDL_PLATFORM_PATH "$d" does not exist))\
$(if $(filter platforms,$(notdir $d)),\
$(call HdlDoPlatformsDir,$d),\
$(call HdlDoPlatform,$d)))
$(if $(ALL_PLATFORMS_PRINTED),,$(eval export ALL_PLATFORMS_PRINTED=yes))

Environment

None

Status

Assignee

Unassigned

Reporter

Davis Hoover

Labels

None

Priority

Minor
Configure