]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Include sys-dirs and sys-sorted earlier.
authorUlrich Drepper <drepper@redhat.com>
Fri, 26 Nov 1999 06:27:19 +0000 (06:27 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 26 Nov 1999 06:27:19 +0000 (06:27 +0000)
($(common-objpfx)soversions.mk): Wait until subdirs is complete.
($(common-objpfx)sysd-sorted): Emit marker when this file is
complete.

Makeconfig

index 6ae27e9dc6b100c79675c873fde9b79f462f2b0b..4ed38eb856c9030b223d6dfa0f7bcc62af7eb928 100644 (file)
@@ -655,11 +655,19 @@ endif
 
 move-if-change = $(SHELL) $(..)scripts/move-if-change
 \f
+-include $(common-objpfx)sysd-dirs
+
+ifeq ($(sysd-dirs-done),t)
+-include $(common-objpfx)sysd-sorted
+subdirs = $(sorted-subdirs)
+endif
 
 ifeq (yes, $(build-shared))
 
 # Process the shlib-versions file, which tells us what shared library
 # version numbers to use when we install shared objects on this system.
+# We need to wait until $(subdirs) is complete.
+ifeq ($(sysd-sorted-done),t)
 -include $(common-objpfx)soversions.mk
 ifndef avoid-generated
 $(common-objpfx)soversions.mk: $(..)shlib-versions $(..)Makeconfig \
@@ -690,6 +698,7 @@ $(common-objpfx)soversions.mk: $(..)shlib-versions $(..)Makeconfig \
         done;) > $@T; exit 0
        mv -f $@T $@
 endif
+endif
 
 postclean-generated += soversions.mk
 
@@ -744,8 +753,6 @@ have-thread-library = yes
 rpath-dirs += linuxthreads
 endif
 
--include $(common-objpfx)sysd-dirs
-
 # These are the subdirectories containing the library source.  The order
 # is more or less arbitrary.  The sorting step will take care of the
 # dependencies.  Only the $(binfmt-subdir) should always be kept at the
@@ -758,11 +765,6 @@ all-subdirs = csu assert ctype db db2 locale intl catgets math setjmp signal\
              $(binfmt-subdir)
 all-subdirs := $(filter-out $(sysdep-inhibit-subdirs),$(all-subdirs))
 
-ifeq ($(sysd-dirs-done),t)
--include $(common-objpfx)sysd-sorted
-subdirs = $(sorted-subdirs)
-endif
-
 # 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
@@ -788,16 +790,18 @@ $(common-objpfx)sysd-dirs: $(common-objpfx)config.make $(all-Subdirs-files)
 all-Depend-files = $(wildcard $(..)*/Depend)
 $(common-objpfx)sysd-sorted: $(..)scripts/gen-sorted.awk $(all-Depend-files) \
                             $(common-objpfx)sysd-dirs $(..)Makeconfig
-       (dirs='$(patsubst $(..)%/Depend,$(..)%,$(filter %/Depend, $^))';\
-        for d in $$dirs; do                                            \
-          while read on; do                                            \
-            echo "depend $$d $$on";                                    \
-          done < $$d/Depend;                                           \
-        done;                                                          \
-        for f in $(all-subdirs); do                                    \
-          echo $$f;                                                    \
-        done                                                           \
-       ) | $(AWK) -f $< > $@-tmp
+       { { dirs='$(patsubst $(..)%/Depend,$(..)%,$(filter %/Depend,$^))';\
+           for d in $$dirs; do                                           \
+             while read on; do                                           \
+               echo "depend $$d $$on";                                   \
+             done < $$d/Depend;                                          \
+           done;                                                         \
+           for f in $(all-subdirs); do                                   \
+             echo $$f;                                                   \
+           done;                                                         \
+         } | $(AWK) -f $< &&                                             \
+         echo sysd-sorted-done = t;                                      \
+       } > $@-tmp
        mv -f $@-tmp $@
 endif