From 6eb88b16a064877665960b0690dba2911b2cd3b0 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 23 Oct 2018 11:06:19 -0500 Subject: [PATCH] Fix show-makefiles rule for files containing colons --- configure/RULES_COMMON | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/configure/RULES_COMMON b/configure/RULES_COMMON index af706c22a..fb8f211e4 100644 --- a/configure/RULES_COMMON +++ b/configure/RULES_COMMON @@ -8,12 +8,14 @@ # These rules show the set of Makefiles, config files and # rules files loaded by GNUmake. -SHOW_MAKEFILES = $(MAKEFILE_LIST:%=show-makefile.%) +# Protect against filenames containing colons (Windows) +SAFE_MAKEFILES = $(subst :,__colon__,$(MAKEFILE_LIST)) +SHOW_MAKEFILES = $(SAFE_MAKEFILES:%=show-makefile.%) show-makefiles: $(SHOW_MAKEFILES) # The sort prevents warnings about duplicate targets: $(sort $(SHOW_MAKEFILES)): show-makefile.%: - @echo " $(@:show-makefile.%=%)" + @echo " $(subst __colon__,:,$(@:show-makefile.%=%))" .PHONY: show-makefiles show-makefile.% @@ -23,7 +25,7 @@ $(sort $(SHOW_MAKEFILES)): show-makefile.%: PRINT_Var = $(@:PRINT.%=%) PRINT.%: - @echo "$(PRINT_Var) = '$($(PRINT_Var))'" + @echo $(PRINT_Var) = '$($(PRINT_Var))' .PHONY: PRINT PRINT.%