aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/gnu/Makefile11
-rw-r--r--sysdeps/mach/Subdirs10
-rw-r--r--sysdeps/unix/Makefile7
3 files changed, 17 insertions, 11 deletions
diff --git a/sysdeps/gnu/Makefile b/sysdeps/gnu/Makefile
index 2b3194f..5b9a0a5 100644
--- a/sysdeps/gnu/Makefile
+++ b/sysdeps/gnu/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1996,1997,1998,1999,2001,2002,2003,2004, 2005
+# 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,8 +32,7 @@ endif
ifeq ($(subdir),stdio-common)
-errlist-c = $(firstword $(wildcard $(addsuffix /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 \
@@ -47,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 $@
@@ -59,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)
diff --git a/sysdeps/mach/Subdirs b/sysdeps/mach/Subdirs
index fc6ac35..24fa4a3 100644
--- a/sysdeps/mach/Subdirs
+++ b/sysdeps/mach/Subdirs
@@ -1 +1,9 @@
-mach
+# This file says that the mach subdirectory should appear before all others.
+# The mach and hurd subdirectories have many generated header files which
+# much of the rest of the library depends on, so it is best to build them
+# first (and mach before hurd, at that). The before-compile additions in
+# sysdeps/{mach,hurd}/Makefile should make it reliably work for these files
+# not to exist when making in other directories, but it will be slower that
+# way with more somewhat expensive `make' invocations.
+
+first mach
diff --git a/sysdeps/unix/Makefile b/sysdeps/unix/Makefile
index c9aa360..4ab06ba 100644
--- a/sysdeps/unix/Makefile
+++ b/sysdeps/unix/Makefile
@@ -305,9 +305,6 @@ generated += stub-syscalls.c
endif
endif
-export sysdirs
-export asm_CPP := $(COMPILE.S) -E -x assembler-with-cpp
-
# This is the end of the pipeline for compiling the syscall stubs.
# The stdin in assembler with cpp using sysdep.h macros.
# Be sure to disable debugging info since it would all just say "<stdin>".
@@ -318,7 +315,9 @@ $(common-objpfx)sysd-syscalls: $(..)sysdeps/unix/make-syscalls.sh \
$(wildcard $(+sysdep_dirs:%=%/syscalls.list))
for dir in $(+sysdep_dirs); do \
test -f $$dir/syscalls.list && \
- { $(SHELL) $(dir $<)$(notdir $<) $$dir || exit 1; }; \
+ { sysdirs='$(sysdirs)' \
+ asm_CPP='$(COMPILE.S) -E -x assembler-with-cpp' \
+ $(SHELL) $(dir $<)$(notdir $<) $$dir || exit 1; }; \
test $$dir = $(..)sysdeps/unix && break; \
done > $@T
mv -f $@T $@