summary refs log tree commit diff
path: root/sysdeps/gnu/Makefile
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /sysdeps/gnu/Makefile
parent7d58530341304d403a6626d7f7a1913165fe2f32 (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.xz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip
2.5-18.1
Diffstat (limited to 'sysdeps/gnu/Makefile')
-rw-r--r--sysdeps/gnu/Makefile15
1 files changed, 8 insertions, 7 deletions
diff --git a/sysdeps/gnu/Makefile b/sysdeps/gnu/Makefile
index a0b3e6e420..5b9a0a56ed 100644
--- a/sysdeps/gnu/Makefile
+++ b/sysdeps/gnu/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1996,1997,1998,1999,2001,2002,2003,2004
+# Copyright (C) 1996,1997,1998,1999,2001,2002,2003,2004,2005,2006
 #	Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
@@ -32,12 +32,13 @@ endif
 
 ifeq ($(subdir),stdio-common)
 
-vpath errlist.c $(full_config_sysdirs)
+errlist-c = $(firstword $(wildcard $(addsuffix /errlist.c,$(sysdirs) .)))
+
 ifeq ($(versioning),yes)
-$(objpfx)errlist-compat.c: errlist.c $(..)sysdeps/gnu/errlist-compat.awk \
+$(objpfx)errlist-compat.c: $(errlist-c) $(..)sysdeps/gnu/errlist-compat.awk \
 			   $(common-objpfx)Versions.v.i $(before-compile)
 else
-$(objpfx)errlist-compat.c: errlist.c $(..)sysdeps/gnu/errlist-compat.awk \
+$(objpfx)errlist-compat.c: $(errlist-c) $(..)sysdeps/gnu/errlist-compat.awk \
 			   $(before-compile)
 endif
 	$(make-target-directory)
@@ -45,8 +46,7 @@ endif
 	  $(CC) -S $(CPPFLAGS) $(CFLAGS) -DNOT_IN_libc -DEMIT_ERR_MAX $< -o - \
 	  | sed -n 's/^.*@@@[^0-9]*\([0-9]*\)[^0-9]*@@@.*$$/\1/p'` \
 	       -f $(..)sysdeps/gnu/errlist-compat.awk \
-	       $(wildcard $(patsubst %,$(..)%/Versions,\
-		 $(config-sysdirs) $(add-ons))) > $@T
+	       $(wildcard $(sysdirs:=/Versions)) > $@T
 # Make it unwritable so noone will edit it by mistake.
 	-chmod a-w $@T
 	mv -f $@T $@
@@ -57,7 +57,8 @@ $(objpfx)errlist-compat.h: $(objpfx)errlist-compat.c
 generated += errlist-compat.c errlist-compat.h
 
 # This will force the generation above to happy if need be.
-$(foreach o,.d $(object-suffixes),$(objpfx)errlist$o):$(objpfx)errlist-compat.h
+$(foreach o,$(object-suffixes) $(object-suffixes:=.d),\
+	  $(objpfx)errlist$o): $(objpfx)errlist-compat.h
 endif
 
 ifeq ($(subdir),login)