summaryrefslogtreecommitdiff
path: root/Makeconfig
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-08-05 03:34:45 +0000
committerRoland McGrath <roland@gnu.org>2004-08-05 03:34:45 +0000
commit9382fcee61189ac51a96b29cad75348737f0b47f (patch)
treeb9bfc24233d25bd7c991bf5c5770ff8cc5620bfb /Makeconfig
parent8cc5920e23990aaef097343fc1003092fff98abd (diff)
downloadglibc-9382fcee61189ac51a96b29cad75348737f0b47f.tar.gz
* 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.
Diffstat (limited to 'Makeconfig')
-rw-r--r--Makeconfig17
1 files changed, 15 insertions, 2 deletions
diff --git a/Makeconfig b/Makeconfig
index 0b8502192e..8490d077b6 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: