about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 9e7679bcf4..ed8d327ddc 100644
--- a/Makefile
+++ b/Makefile
@@ -188,19 +188,20 @@ $(version.c-objects): $(objpfx)version-info.h
 
 subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)stub-$(dir))
 
-$(common-objpfx)stub-%: subdir_install
-
 # Since stubs.h is never needed when building the library, we simplify the
 # hairy installation process by producing it in place only as the last part
-# of the top-level `make install'.
-$(inst_includedir)/gnu/stubs.h: $(subdir-stubs)
+# of the top-level `make install'.  It depends on subdir_install, which
+# iterates over all the subdirs; subdir_install in each subdir depends on
+# the subdir's stubs file.  Having more direct dependencies would result in
+# extra iterations over the list for subdirs and many recursive makes.
+$(inst_includedir)/gnu/stubs.h: subdir_install
 	$(make-target-directory)
 	@rm -f $(objpfx)stubs.h
 	(echo '/* This file is automatically generated.';\
 	 echo '   It defines a symbol `__stub_FUNCTION'\'' for each function';\
 	 echo '   in the C library which is a stub, meaning it will fail';\
 	 echo '   every time called, usually setting errno to ENOSYS.  */';\
-	 sort $^) > $(objpfx)stubs.h
+	 sort $(subdir-stubs)) > $(objpfx)stubs.h
 	if test -r $@ && cmp -s $(objpfx)stubs.h $@; \
 	then echo 'stubs.h unchanged'; \
 	else $(INSTALL_DATA) $(objpfx)stubs.h $@; fi
@@ -315,7 +316,7 @@ distribute  := README INSTALL FAQ NOTES NEWS PROJECTS BUGS		\
 	       autolock.sh rellns-sh munch-tmpl.c munch.awk interp.c	\
 	       sysdep.h set-hooks.h libc-symbols.h version.h shlib-versions \
 	       rpm/Makefile rpm/template rpm/rpmrc glibcbug.in abi-tags	\
-	       stub-tag.h
+	       stub-tag.h test-installation.pl
 
 distribute := $(strip $(distribute))
 generated := $(generated) stubs.h version-info.h