From 8217fa86fe5e5e6bc19dad0b6e03626d1b5d3cc5 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 12 Apr 2019 18:14:57 -0500 Subject: [PATCH] Reimplement show-makefiles to display duplicates --- configure/RULES_COMMON | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/configure/RULES_COMMON b/configure/RULES_COMMON index 6c3d48889..ff428c342 100644 --- a/configure/RULES_COMMON +++ b/configure/RULES_COMMON @@ -8,16 +8,17 @@ # These rules show the set of Makefiles, config files and # rules files loaded by GNUmake. -# Protect against filenames containing colons (Windows) -SAFE_MAKEFILES = $(subst :,__colon__,$(MAKEFILE_LIST)) -SHOW_MAKEFILES = $(SAFE_MAKEFILES:%=show-makefile.%) -show-makefiles: $(SHOW_MAKEFILES) +show-makefiles:: + @echo + @echo Makefiles read: +define SHOW_MAKEFILE_template +show-makefiles:: + @echo " $(1)" +endef +$(foreach file,$(MAKEFILE_LIST), \ + $(eval $(call SHOW_MAKEFILE_template,$(file)))) -# The sort prevents warnings about duplicate targets: -$(sort $(SHOW_MAKEFILES)): show-makefile.%: - @echo " $(subst __colon__,:,$(@:show-makefile.%=%))" - -.PHONY: show-makefiles show-makefile.% +.PHONY: show-makefiles # These rules support printing a Makefile variable values.