From 9382fcee61189ac51a96b29cad75348737f0b47f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 5 Aug 2004 03:34:45 +0000 Subject: * Makeconfig ($(common-objpfx)config.status): Fix typo: $(add_ons) -> $(add-ons). (Makeconfig-add-on): New variable. When doing $(sysdep-makeconfigs) include, use black magic to get it set to an add-on's name during the include of the add-on's Makeconfig. * configure.in: Use variable name `libc_add_on' when sourcing add-on configure fragments, so they can refer to this. * configure: Regenerated. --- Makeconfig | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'Makeconfig') diff --git a/Makeconfig b/Makeconfig index 0b85021..8490d07 100644 --- a/Makeconfig +++ b/Makeconfig @@ -120,7 +120,7 @@ $(common-objpfx)config.status: $(..)version.h $(..)configure \ $(firstword $(wildcard \ $(addprefix $(dir)/,configure configure.in))))) \ $(patsubst %.in,%,\ - $(foreach dir,$(add_ons),\ + $(foreach dir,$(add-ons),\ $(firstword $(wildcard \ $(addprefix $(..)$(dir)/,configure configure.in))))) @cd $(@D); if test -f $(@F); then exec $(SHELL) $(@F) --recheck; else \ @@ -980,12 +980,25 @@ sysdep-makeconfigs := $(wildcard $(patsubst %,$(..)%/Makeconfig,\ $(config-sysdirs) $(add-ons))) ifneq (,$(sysdep-makeconfigs)) -include $(sysdep-makeconfigs) +Makeconfig-doing-sysdep := $(sysdep-makeconfigs) +# Before each one, include ourselves again to do the bit below that +# will set `Makeconfig-add-on' in an add-on's Makeconfig fragment. +include $(foreach M,$(sysdep-makeconfigs),$(..)Makeconfig $M) endif endif # Makeconfig not yet included +# The whole body above didn't run when we are included as a subroutine +# of ourselves in the sysdep-makeconfigs include line. This bit runs. +ifneq (,$(Makeconfig-doing-sysdep)) +sysdep-Makeconfig := $(firstword $(Makeconfig-doing-sysdep)) +Makeconfig-doing-sysdep := $(filter-out $(sysdep-Makeconfig),\ + $(Makeconfig-doing-sysdep)) +Makeconfig-add-on := $(filter $(add-ons),$(patsubst $(..)%/Makeconfig,%,\ + $(sysdep-Makeconfig))) +endif + # Local Variables: # mode: makefile # End: -- cgit v1.1