]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Consistently include Makeconfig after defining subdir.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 26 Feb 2014 23:12:03 +0000 (23:12 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 26 Feb 2014 23:12:03 +0000 (23:12 +0000)
In <https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html> I
noted it was necessary to add includes of Makeconfig early in various
subdirectory makefiles for the tests-special variable settings added
by that patch to be conditional on configuration information.  No-one
commented on the general question there of whether Makeconfig should
always be included immediately after the definition of subdir.

This patch implements that early inclusion of Makeconfig in each
directory (which is a lot easier than consistent placement of includes
of Rules).  Includes are added if needed, or moved up if already
present.  Subdirectory "all:" targets are removed, since Makeconfig
provides one.

There is potential for further cleanups I haven't done.  Rules and
Makerules have code such as

ifneq   "$(findstring env,$(origin headers))" ""
headers :=
endif

to override to empty any value of various variables that came from the
environment.  I think there is a case for Makeconfig setting all the
subdirectory variables (other than subdir) to empty to ensure no
outside value is going to take effect if a subdirectory fails to
define a variable.  (A list of such variables, possibly out of date
and incomplete, is in manual/maint.texi.)  Rules and Makerules would
give errors if Makeconfig hadn't already been included, instead of
including it themselves.  The special code to override values coming
from the environment would then be obsolete and could be removed.

Tested x86_64, including that installed binaries are identical before
and after the patch.

* argp/Makefile: Include Makeconfig immediately after defining
subdir.
* assert/Makefile: Likewise.
* benchtests/Makefile: Likewise.
* catgets/Makefile: Likewise.
* conform/Makefile: Likewise.
* crypt/Makefile: Likewise.
* csu/Makefile: Likewise.
(all): Remove target.
* ctype/Makefile: Include Makeconfig immediately after defining
subdir.
* debug/Makefile: Likewise.
* dirent/Makefile: Likewise.
* dlfcn/Makefile: Likewise.
* gmon/Makefile: Likewise.
* gnulib/Makefile: Likewise.
* grp/Makefile: Likewise.
* gshadow/Makefile: Likewise.
* hesiod/Makefile: Likewise.
* hurd/Makefile: Likewise.
(all): Remove target.
* iconvdata/Makefile: Include Makeconfig immediately after
defining subdir.
* inet/Makefile: Likewise.
* intl/Makefile: Likewise.
* io/Makefile: Likewise.
* libio/Makefile: Likewise.
(all): Remove target.
* locale/Makefile: Include Makeconfig immediately after defining
subdir.
* login/Makefile: Likewise.
* mach/Makefile: Likewise.
(all): Remove target.
* malloc/Makefile: Include Makeconfig immediately after defining
subdir.
(all): Remove target.
* manual/Makefile: Include Makeconfig immediately after defining
subdir.
* math/Makefile: Likewise.
* misc/Makefile: Likewise.
* nis/Makefile: Likewise.
* nss/Makefile: Likewise.
* po/Makefile: Likewise.
(all): Remove target.
* posix/Makefile: Include Makeconfig immediately after defining
subdir.
* pwd/Makefile: Likewise.
* resolv/Makefile: Likewise.
* resource/Makefile: Likewise.
* rt/Makefile: Likewise.
* setjmp/Makefile: Likewise.
* shadow/Makefile: Likewise.
* signal/Makefile: Likewise.
* socket/Makefile: Likewise.
* soft-fp/Makefile: Likewise.
* stdio-common/Makefile: Likewise.
* stdlib/Makefile: Likewise.
* streams/Makefile: Likewise.
* string/Makefile: Likewise.
* sunrpc/Makefile: Likewise.
(all): Remove target.
* sysvipc/Makefile: Include Makeconfig immediately after defining
subdir.
* termios/Makefile: Likewise.
* time/Makefile: Likewise.
* timezone/Makefile: Likewise.
(all): Remove target.
* wcsmbs/Makefile: Include Makeconfig immediately after defining
subdir.
* wctype/Makefile: Likewise.

libidn/ChangeLog:
* Makefile: Include Makeconfig immediately after defining subdir.

localedata/ChangeLog:
* Makefile: Include Makeconfig immediately after defining subdir.
(all): Remove target.

nptl/ChangeLog:
* Makefile: Include Makeconfig immediately after defining subdir.

nptl_db/ChangeLog:
* Makefile: Include Makeconfig immediately after defining subdir.

62 files changed:
ChangeLog
argp/Makefile
assert/Makefile
benchtests/Makefile
catgets/Makefile
conform/Makefile
crypt/Makefile
csu/Makefile
ctype/Makefile
debug/Makefile
dirent/Makefile
dlfcn/Makefile
gmon/Makefile
gnulib/Makefile
grp/Makefile
gshadow/Makefile
hesiod/Makefile
hurd/Makefile
iconvdata/Makefile
inet/Makefile
intl/Makefile
io/Makefile
libidn/ChangeLog
libidn/Makefile
libio/Makefile
locale/Makefile
localedata/ChangeLog
localedata/Makefile
login/Makefile
mach/Makefile
malloc/Makefile
manual/Makefile
math/Makefile
misc/Makefile
nis/Makefile
nptl/ChangeLog
nptl/Makefile
nptl_db/ChangeLog
nptl_db/Makefile
nss/Makefile
po/Makefile
posix/Makefile
pwd/Makefile
resolv/Makefile
resource/Makefile
rt/Makefile
setjmp/Makefile
shadow/Makefile
signal/Makefile
socket/Makefile
soft-fp/Makefile
stdio-common/Makefile
stdlib/Makefile
streams/Makefile
string/Makefile
sunrpc/Makefile
sysvipc/Makefile
termios/Makefile
time/Makefile
timezone/Makefile
wcsmbs/Makefile
wctype/Makefile

index 157649be538e905e2877bf225a5cfea94cb75e59..4ef5ccc31775e2c061cd7c388a0261f4433c1f75 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,76 @@
+2014-02-26  Joseph Myers  <joseph@codesourcery.com>
+
+       * argp/Makefile: Include Makeconfig immediately after defining
+       subdir.
+       * assert/Makefile: Likewise.
+       * benchtests/Makefile: Likewise.
+       * catgets/Makefile: Likewise.
+       * conform/Makefile: Likewise.
+       * crypt/Makefile: Likewise.
+       * csu/Makefile: Likewise.
+       (all): Remove target.
+       * ctype/Makefile: Include Makeconfig immediately after defining
+       subdir.
+       * debug/Makefile: Likewise.
+       * dirent/Makefile: Likewise.
+       * dlfcn/Makefile: Likewise.
+       * gmon/Makefile: Likewise.
+       * gnulib/Makefile: Likewise.
+       * grp/Makefile: Likewise.
+       * gshadow/Makefile: Likewise.
+       * hesiod/Makefile: Likewise.
+       * hurd/Makefile: Likewise.
+       (all): Remove target.
+       * iconvdata/Makefile: Include Makeconfig immediately after
+       defining subdir.
+       * inet/Makefile: Likewise.
+       * intl/Makefile: Likewise.
+       * io/Makefile: Likewise.
+       * libio/Makefile: Likewise.
+       (all): Remove target.
+       * locale/Makefile: Include Makeconfig immediately after defining
+       subdir.
+       * login/Makefile: Likewise.
+       * mach/Makefile: Likewise.
+       (all): Remove target.
+       * malloc/Makefile: Include Makeconfig immediately after defining
+       subdir.
+       (all): Remove target.
+       * manual/Makefile: Include Makeconfig immediately after defining
+       subdir.
+       * math/Makefile: Likewise.
+       * misc/Makefile: Likewise.
+       * nis/Makefile: Likewise.
+       * nss/Makefile: Likewise.
+       * po/Makefile: Likewise.
+       (all): Remove target.
+       * posix/Makefile: Include Makeconfig immediately after defining
+       subdir.
+       * pwd/Makefile: Likewise.
+       * resolv/Makefile: Likewise.
+       * resource/Makefile: Likewise.
+       * rt/Makefile: Likewise.
+       * setjmp/Makefile: Likewise.
+       * shadow/Makefile: Likewise.
+       * signal/Makefile: Likewise.
+       * socket/Makefile: Likewise.
+       * soft-fp/Makefile: Likewise.
+       * stdio-common/Makefile: Likewise.
+       * stdlib/Makefile: Likewise.
+       * streams/Makefile: Likewise.
+       * string/Makefile: Likewise.
+       * sunrpc/Makefile: Likewise.
+       (all): Remove target.
+       * sysvipc/Makefile: Include Makeconfig immediately after defining
+       subdir.
+       * termios/Makefile: Likewise.
+       * time/Makefile: Likewise.
+       * timezone/Makefile: Likewise.
+       (all): Remove target.
+       * wcsmbs/Makefile: Include Makeconfig immediately after defining
+       subdir.
+       * wctype/Makefile: Likewise.
+
 2014-02-26  Steve Ellcey  <sellcey@mips.com>
 
        * sysdeps/mips/math_private.h (_FPU_MASK_ALL) New.
index 35f1088a26a757f77ec11df407143120308a3d89..997424e2f83d9ec843d13fd193a5bb7124c225e3 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := argp
 
+include ../Makeconfig
+
 headers                = argp.h
 routines       = $(addprefix argp-, ba fmtstream fs-xinl help parse pv \
                                     pvh xinl eexst)
index 60ec53d0014a65fc360ecd06a5cab2d85da6994a..97fb476cd655d31a50c21b8baafdb21375a5caa2 100644 (file)
@@ -19,6 +19,9 @@
 #      Sub-makefile for assert portion of the library.
 #
 subdir := assert
+
+include ../Makeconfig
+
 headers        := assert.h
 
 routines := assert assert-perr __assert
index 8bfb03917e5a816b3c2533f750416265c8878c0d..55d957af35d898432e62e61d87e44a4994028652 100644 (file)
@@ -20,6 +20,9 @@
 # Add benchmark functions in alphabetical order.
 
 subdir := benchtests
+
+include ../Makeconfig
+
 bench := acos acosh asin asinh atan atanh cos cosh exp exp2 log log2 modf pow \
         rint sin sincos sinh sqrt tan tanh
 
@@ -65,7 +68,6 @@ LDLIBS-bench-sincos = -lm
 # affect their performance.
 .NOTPARALLEL:
 
-include ../Makeconfig
 include ../Rules
 
 binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
index 7c2a1170e1fefa4323b52d96999baf6e102db4d3..899d929db638678f27a8347ae0d2000d367ad904 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := catgets
 
+include ../Makeconfig
+
 headers                = nl_types.h
 routines       = catgets open_catalog
 others         = gencat
index 0761a1c2944f17231a4a56e7446aa8a362dfcef7..41f0bb3f57efedc0ab32a0da173ccfa64f063f8a 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := conform
 
+include ../Makeconfig
+
 include ../Rules
 
 ifneq (yes,$(fast-check))
index 9f69ecbdb7cce7d8ebaa02a69febc61684e76b04..b1645dee55aa5150a8819690f1c4606054fd7c24 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := crypt
 
+include ../Makeconfig
+
 headers := crypt.h
 
 extra-libs := libcrypt
@@ -30,8 +32,6 @@ libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \
 
 tests := cert md5c-test sha256c-test sha512c-test badsalttest
 
-include ../Makeconfig
-
 ifeq ($(crypt-in-libc),yes)
 routines += $(libcrypt-routines)
 endif
index b5afea0decd9014b1180fc7977ca3776d438b9d6..ebd4b4efeda5eb1731ee5242b82612c6bfce24da 100644 (file)
@@ -24,6 +24,8 @@
 
 subdir := csu
 
+include ../Makeconfig
+
 routines = init-first libc-start $(libc-init) sysdep version check_fds \
           libc-tls elf-init dso_handle
 aux     = errno
@@ -43,10 +45,6 @@ before-compile = $(objpfx)version-info.h
 tests := tst-empty tst-atomic tst-atomic-long
 tests-static := tst-empty
 
-all: # Make this the default target; it will be defined in Rules.
-
-include ../Makeconfig
-
 ifeq (yes,$(build-shared))
 extra-objs += S$(start-installed-name)
 install-lib += S$(start-installed-name)
index 7bfc928425f48f0c4c54e0acd3ed8a7da2e4f3ff..8a41f9c4991223e2d691f7b6a54b958f05d66cd7 100644 (file)
@@ -19,6 +19,9 @@
 #      Sub-makefile for ctype portion of the library.
 #
 subdir := ctype
+
+include ../Makeconfig
+
 headers        := ctype.h
 
 routines       := ctype ctype-extn ctype_l isctype
index fc15ef3aec83840c9018fcc4bf3eb326fbd80646..963460ecf909b6e4e0edd01b3a3c7abe82f0be7c 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := debug
 
+include ../Makeconfig
+
 headers        := execinfo.h
 
 # Note that ptsname_r_chk and getlogin_r are not here, but in
@@ -161,8 +163,6 @@ others = pcprofiledump
 install-bin = pcprofiledump
 install-bin-script = xtrace
 
-include ../Makeconfig
-
 ifeq ($(build-shared),yes)
 install-bin-script += catchsegv
 endif
index a67d2e6f2098b664031a0963843d7d8eeda6fe52..c9bd5dd62c30b1475574803aba8f675abf55556a 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir         := dirent
 
+include ../Makeconfig
+
 headers                := dirent.h bits/dirent.h
 routines       := opendir closedir readdir readdir_r rewinddir \
                   seekdir telldir scandir alphasort versionsort \
index bf20063902d3c45949d50369a883da6b12492e5f..39f18d7c7b2789b88e414167a531c30f681a5006 100644 (file)
@@ -16,6 +16,9 @@
 # <http://www.gnu.org/licenses/>.
 
 subdir         := dlfcn
+
+include ../Makeconfig
+
 headers                := bits/dlfcn.h dlfcn.h
 extra-libs     := libdl
 libdl-routines := dlopen dlclose dlsym dlvsym dlerror dladdr dladdr1 dlinfo \
@@ -25,8 +28,6 @@ elide-routines.os := $(routines)
 
 extra-libs-others := libdl
 
-include ../Makeconfig
-
 ifeq ($(build-shared),yes)
 libdl-routines += dlopenold
 libdl-shared-only-routines := dlopenold dlfcn
index b069fbdfde73757c45edccf508767d0ffd8f9069..a82db984182d1e7bbf2d16747b51d1b3dfaeda1d 100644 (file)
 #
 subdir := gmon
 
+include ../Makeconfig
+
 headers        := sys/gmon.h sys/gmon_out.h sys/profil.h
 routines := gmon mcount profil sprofil bb_init_func bb_exit_func prof-freq
 
 elide-routines.os = bb_init_func bb_exit_func
 
-include ../Makeconfig
-
 tests  = tst-sprofil
 ifeq ($(build-profile),yes)
 tests  += tst-profile-static
index e767570dcd4cb7ae4f13e9db48283f328fd75c1f..69c1e850bc61888901f1a492d42b3715a4e93fc9 100644 (file)
@@ -17,6 +17,8 @@
 
 subdir := gnulib
 
+include ../Makeconfig
+
 # Maybe this is the right place for a test of gcc's interface.
 tests = tst-gcc
 
index b8d1d81db510d540264f4992cbcb911d20be9335..3ed8471fdd11fef46e6e80a8caaf6d44fd5cd0af 100644 (file)
 #      Sub-makefile for grp portion of the library.
 #
 subdir := grp
+
+include ../Makeconfig
+
 headers := grp.h
 
 routines := fgetgrent initgroups setgroups \
            getgrent getgrgid getgrnam putgrent \
            getgrent_r getgrgid_r getgrnam_r fgetgrent_r
 
-include ../Makeconfig
-
 tests := testgrp
 
 ifeq (yes,$(build-shared))
index 213da06e991c6da81ecd9201cbc844dc5743575b..1b41eabd0f999b2c987fb820a50e15d6f7531d44 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := gshadow
 
+include ../Makeconfig
+
 headers                = gshadow.h
 routines       = getsgent getsgnam sgetsgent fgetsgent putsgent \
                  getsgent_r getsgnam_r sgetsgent_r fgetsgent_r
index b640cec8f2fc500cedeeb84dae81d3cc8c50b0a8..19952af65a8172153a275c847fd01ec433cc00dd 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := hesiod
 
+include ../Makeconfig
+
 extra-libs := libnss_hesiod
 extra-libs-others = $(extra-libs)
 
index fb334d8ab543ba14f59e28696ba51be93cafae7e..b9f23f01c1803f4bae18e8f165cb32f8f1068ea0 100644 (file)
 
 subdir := hurd
 
-all:
-
-# Some things below (but before including Rules) use configuration variables.
 include ../Makeconfig
 
-
 headers = hurd.h $(interface-headers) \
          $(addprefix hurd/,fd.h id.h port.h signal.h sigpreempt.h ioctl.h\
                            userlink.h resource.h threadvar.h lookup.h)
index 3a355208bef545a3d4c55691bf3c34b1a2d90cd7..01f50d2ac7ddc86c5879bf6bcd9f14c8d36da946 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := iconvdata
 
+include ../Makeconfig
+
 # Names of all the shared objects which implement the transformations.
 modules        := ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5             \
           ISO8859-6 ISO8859-7 ISO8859-8 ISO8859-9 ISO8859-10            \
@@ -63,8 +65,6 @@ modules       := ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5             \
 
 modules.so := $(addsuffix .so, $(modules))
 
-include ../Makeconfig
-
 ifeq (yes,$(build-shared))
 tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \
        tst-iconv6 bug-iconv5 bug-iconv6 tst-iconv7 bug-iconv8 bug-iconv9
index f4c32739167fe82558d8b52c7dc5f6b1f6de706d..2f1186fa1bd50b38facd121b46aee804e83a4ec4 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := inet
 
+include ../Makeconfig
+
 headers        := netinet/ether.h netinet/in.h netinet/in_systm.h \
           netinet/if_ether.h netinet/igmp.h \
           netinet/tcp.h netinet/ip.h $(wildcard arpa/*.h protocols/*.h) \
index 8a96a857f16cc2b1ecb6e3c0db754afa614eeccf..b21f4d92956661c24a1a0ff4f234775267ed196e 100644 (file)
 # Makefile for intl subdirectory: message handling code from GNU gettext.
 
 subdir = intl
+
+include ../Makeconfig
+
 headers = libintl.h
 routines = bindtextdom dcgettext dgettext gettext      \
           dcigettext dcngettext dngettext ngettext \
           finddomain loadmsgcat localealias textdomain
 aux =     l10nflist explodename plural plural-exp hash-string
 
-include ../Makeconfig
-
 multithread-test-srcs := tst-gettext4 tst-gettext5 tst-gettext6
 test-srcs := tst-gettext tst-translit tst-gettext2 tst-codeset tst-gettext3
 ifeq ($(have-thread-library),yes)
index bb32b86eef950a949ec4f0a864f7f92964f23008..8d38612b0683aa452fbbfd8c9eebff9efc2717e5 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := io
 
+include ../Makeconfig
+
 headers := sys/stat.h bits/stat.h sys/statfs.h bits/statfs.h sys/vfs.h \
           sys/statvfs.h bits/statvfs.h fcntl.h sys/fcntl.h bits/fcntl.h \
           poll.h sys/poll.h bits/poll.h bits/fcntl2.h bits/poll2.h \
index e8130bb5b485b9cf4b929564ddada119cfbebedd..7a48fd5c6d366f1f2cd06c55bbff6a30cdc0a870 100644 (file)
@@ -1,3 +1,7 @@
+2014-02-26  Joseph Myers  <joseph@codesourcery.com>
+
+       * Makefile: Include Makeconfig immediately after defining subdir.
+
 2013-10-30  Mike Frysinger  <vapier@gentoo.org>
 
        * configure.in: Moved to ...
index 542840d947740377eb874d62bf3c765f0c2e6fe7..a40f08e9fd50c4251080a756eb7600ff3d298fd1 100644 (file)
@@ -19,6 +19,8 @@
 
 subdir := libidn
 
+include ../Makeconfig
+
 routines = idn-stub
 
 extra-libs             = libcidn
@@ -27,9 +29,6 @@ extra-libs-others     = $(extra-libs)
 libcidn-routines := punycode toutf8 nfkc stringprep rfc3454 profiles idna \
                    iconvme
 
-
-include $(..)Makeconfig
-
 libcidn-inhibit-o = $(filter-out .os,$(object-suffixes))
 
 include $(..)Rules
index 9bbe71259dfa1313b6f6651ff16a232efbfa85bf..fb6ec70d2070e741de7f92405b93c43e3faf14ea 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := libio
 
+include ../Makeconfig
+
 headers        := stdio.h libio.h _G_config.h bits/stdio.h bits/stdio-lock.h \
           bits/sys_errlist.h bits/stdio2.h bits/stdio-ldbl.h bits/libio-ldbl.h
 
@@ -46,8 +48,6 @@ routines      :=                                                            \
                                                                              \
        libc_fatal fmemopen
 
-include ../Makeconfig
-
 tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc   \
        tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-ext2 \
        tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf           \
@@ -68,8 +68,6 @@ tests += tst-fopenloc
 endif
 test-srcs = test-freopen
 
-all: # Make this the default target; it will be defined in Rules.
-
 ifeq ($(build-shared),yes)
 routines += oldiofopen oldiofdopen oldiofclose oldiopopen oldpclose \
            oldtmpfile oldiofgetpos oldiofgetpos64 oldiofsetpos     \
index 51b383afa86df00cc0b8f1a69e4bfe74d919056e..eeff2cbd78226179cc5c8c78271edce45c972b4c 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := locale
 
+include ../Makeconfig
+
 headers                = locale.h bits/locale.h langinfo.h xlocale.h
 routines       = setlocale findlocale loadlocale loadarchive \
                  localeconv nl_langinfo nl_langinfo_l mb_cur_max \
index 1857fc1f814a9b483f6945e4c15966f4935fd251..2bd966dc1f5cffa300366b3915016963098b4584 100644 (file)
@@ -1,3 +1,8 @@
+2014-02-26  Joseph Myers  <joseph@codesourcery.com>
+
+       * Makefile: Include Makeconfig immediately after defining subdir.
+       (all): Remove target.
+
 2014-02-21  Joseph Myers  <joseph@codesourcery.com>
 
        * Makefile ($(objpfx)sort-test.out): Use $(evaluate-test).
index a69ec41aee098faaa0f574924250c7761d527d54..881337452e1a275607c3ae3fb803a0c4ce374213 100644 (file)
@@ -19,7 +19,7 @@
 
 subdir := localedata
 
-all: # Make this the default target; it will be defined in Rules.
+include ../Makeconfig
 
 # List with all available character set descriptions.
 charmaps := $(wildcard charmaps/[A-I]*) $(wildcard charmaps/[J-Z]*)
@@ -56,9 +56,6 @@ generated := $(test-input) $(test-output) sort-test.out tst-locale.out \
 generated-dirs := $(ld-test-names) tt_TT de_DE.437                     \
                  $(addprefix tstfmon_,$(fmon-tests))                   \
 
-# Get $(inst_i18ndir) defined.
-include ../Makeconfig
-
 ifeq ($(run-built-tests),yes)
 locale_test_suite := tst_iswalnum tst_iswalpha tst_iswcntrl            \
                     tst_iswctype tst_iswdigit tst_iswgraph            \
index 91947024e6fa1efff07f81971c4950520153abf9..ca55808127b2a52dc368cc0950e1242c77dcb87d 100644 (file)
@@ -21,6 +21,8 @@
 
 subdir := login
 
+include ../Makeconfig
+
 headers        := utmp.h bits/utmp.h lastlog.h pty.h
 
 routines := getlogin getlogin_r setlogin getlogin_r_chk \
@@ -32,8 +34,6 @@ CFLAGS-grantpt.c = -DLIBEXECDIR='"$(libexecdir)"'
 
 others = utmpdump
 
-include ../Makeconfig
-
 ifeq (yes,$(build-pt-chown))
 others += pt_chown
 others-pie = pt_chown
index c804fa30c46a93ee9e616f4b8bf80eb545d4edb4..c316e7a942087ff082e5595736adfa068ef2546f 100644 (file)
 
 subdir := mach
 
-all:
-
-# Some things below (but before including Rules) use configuration variables.
 include ../Makeconfig
 
-
 headers = mach_init.h mach.h mach_error.h mach-shortcuts.h mach/mach_traps.h \
          $(interface-headers) mach/mach.h mach/mig_support.h mach/error.h \
          $(lock-headers) machine-sp.h
index d2d3c8e0a19fd7f43b29c9200a436940a2bb48d8..12b4ec6b43771b205ab1f9404139d399d3603e30 100644 (file)
@@ -20,7 +20,7 @@
 #
 subdir := malloc
 
-all:
+include ../Makeconfig
 
 dist-headers := malloc.h
 headers := $(dist-headers) obstack.h mcheck.h
@@ -48,8 +48,6 @@ extra-objs = mcheck-init.o libmcheck.a
 # Include the cleanup handler.
 aux := set-freeres thread-freeres
 
-include ../Makeconfig
-
 CPPFLAGS-memusagestat = -DNOT_IN_libc
 
 # The Perl script to analyze the output of the mtrace functions.
index 1129136c890630e1efaf240ea98ffce2c6b05462..5c62f9a95db05fbaa2f64634aeecbdc6c919e5be 100644 (file)
 
 subdir := manual
 
+include ../Makeconfig
+
 # Allow override
 INSTALL_INFO = install-info
 
 .PHONY: dvi pdf info html
 
-# Get glibc's configuration info.
-include ../Makeconfig
-
 dvi: $(objpfx)libc.dvi
 pdf: $(objpfx)libc.pdf
 
index cc27935acdc855ff726fb0f61b33a15cecc3dddf..09d14a0dcd1e19f4a4967eb10ea756deb047e7f1 100644 (file)
@@ -19,6 +19,8 @@
 
 subdir         := math
 
+include ../Makeconfig
+
 # Installed header files.
 headers                := math.h bits/mathcalls.h bits/mathinline.h bits/huge_val.h \
                   bits/huge_valf.h bits/huge_vall.h bits/inf.h bits/nan.h \
@@ -61,8 +63,6 @@ libm-calls = e_acos e_acosh e_asin e_atan2 e_atanh e_cosh e_exp e_fmod        \
             s_isinf_ns s_issignaling $(calls:s_%=m_%) x2y2m1 k_casinh  \
             gamma_product
 
-include ../Makeconfig
-
 dbl-only-routines := branred doasin dosincos halfulp mpa mpatan2       \
                     mpatan mpexp mplog mpsqrt mptan sincos32 slowexp   \
                     slowpow sincostab
index 66d0ab7b189622109abf51033c60c6f2cfaaf911..1897f6c3688075af914fb75ff4b8362dd6a19413 100644 (file)
@@ -21,6 +21,8 @@
 
 subdir := misc
 
+include ../Makeconfig
+
 headers        := sys/uio.h bits/uio.h sys/ioctl.h bits/ioctls.h bits/ioctl-types.h \
           sys/ptrace.h sys/file.h sys/dir.h sys/cdefs.h \
           ar.h a.out.h libgen.h stab.h bits/stab.def sgtty.h \
@@ -69,8 +71,6 @@ routines := brk sbrk sstk ioctl \
 
 generated := tst-error1.mtrace tst-error1-mem
 
-include ../Makeconfig
-
 aux := init-misc
 install-lib := libg.a
 gpl2lgpl := error.c error.h
index 15f86baaa96d8e6145bbc78511c9ee293c494472..76886047aaeebf0ae9631117eb54a3ff248aa0af 100644 (file)
 #
 subdir := nis
 
-aux                    := nis_hash
-
 include ../Makeconfig
 
+aux                    := nis_hash
+
 ifeq ($(link-obsolete-rpc),yes)
 headers                        := $(wildcard rpcsvc/*.[hx])
 endif
index 793b662f4cb715a73d896cd98e04d6b1b9d06caf..a1d0f11d4b228285fc2b2426b635234ff5e6786a 100644 (file)
@@ -1,3 +1,7 @@
+2014-02-26  Joseph Myers  <joseph@codesourcery.com>
+
+       * Makefile: Include Makeconfig immediately after defining subdir.
+
 2014-02-21  Joseph Myers  <joseph@codesourcery.com>
 
        * Makefile ($(objpfx)tst-stack3-mem): Use $(evaluate-test).
index 253e7dd2934568e01aee85d57977657528fd8850..d568e5d34de756a44d0ae18b80bda2081cda16ab 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := nptl
 
+include ../Makeconfig
+
 headers := pthread.h semaphore.h bits/semaphore.h
 
 extra-libs := libpthread
@@ -282,8 +284,6 @@ LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst
 CFLAGS-tst-cleanup2.c = -fno-builtin
 CFLAGS-tst-cleanupx2.c = -fno-builtin
 
-include ../Makeconfig
-
 ifeq ($(have-forced-unwind),yes)
 tests += tst-cancelx2 tst-cancelx3 tst-cancelx4 tst-cancelx5 \
         tst-cancelx6 tst-cancelx7 tst-cancelx8 tst-cancelx9 tst-cancelx10 \
index f4787ee2d822ba1a7f089a0678000c8f05b92b3b..85cf2ba7a191e48c56838395183dba9cc40d59cf 100644 (file)
@@ -1,3 +1,7 @@
+2014-02-26  Joseph Myers  <joseph@codesourcery.com>
+
+       * Makefile: Include Makeconfig immediately after defining subdir.
+
 2014-02-21  Joseph Myers  <joseph@codesourcery.com>
 
        * Makefile ($(objpfx)db-symbols.out): Use
index 5d20dd542740124fda2e09da9d52cc9673ae1e71..f321b539dcbb84b4b58d0c4ab42492cad87dbee4 100644 (file)
@@ -19,6 +19,8 @@
 
 subdir          := nptl_db
 
+include ../Makeconfig
+
 nptl_db-version = 1.0
 
 extra-libs = libthread_db
index c8880c061c80f93f29192356a753209410b89caa..1fa7f1f397f586ad5c846fbfcf47fda8c873d7f2 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := nss
 
+include ../Makeconfig
+
 headers                        := nss.h
 
 # This is the trivial part which goes into libc itself.
@@ -40,8 +42,6 @@ extra-objs            += $(makedb-modules:=.o)
 tests                  = test-netdb tst-nss-test1 test-digits-dots
 xtests                 = bug-erange
 
-include ../Makeconfig
-
 # Specify rules for the nss_* modules.  We have some services.
 services               := files db
 
index 99f28160d2ec8592b10fa147bda6443ae5fe8a42..9d90f6bb1c2b9bb7df49dc42eedc1eeff86f902f 100644 (file)
@@ -19,6 +19,8 @@
 
 subdir := po
 
+include ../Makeconfig
+
 # Add names of the languages with broken .po files here.
 BROKEN_LINGUAS =
 
@@ -36,10 +38,6 @@ endif
 # Text domain name to install under; must match ../locale/SYS_libc.c string.
 domainname = libc
 
-all: # Make this the default target; it will be defined in Rules.
-
-include ../Makeconfig
-
 # Pattern for where message catalog object for language % gets installed.
 mo-installed = $(inst_msgcatdir)/%/LC_MESSAGES/$(domainname).mo
 
index ea06d392bea4a5c3835cc88994446f950db45d49..304238ffe850e003ed2c1319b4c24035010f4e83 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := posix
 
+include ../Makeconfig
+
 headers        := sys/utsname.h sys/times.h sys/wait.h sys/types.h unistd.h          \
           glob.h regex.h wordexp.h fnmatch.h getopt.h                        \
           bits/types.h bits/typesizes.h bits/pthreadtypes.h                  \
@@ -59,8 +61,6 @@ routines :=                                                                 \
        posix_madvise                                                         \
        get_child_max sched_cpucount sched_cpualloc sched_cpufree
 
-include ../Makeconfig
-
 aux            := init-posix environ
 tests          := tstgetopt testfnm runtests runptests      \
                   tst-preadwrite tst-preadwrite64 test-vfork regexbug1 \
index a19ddb5632c43568b5c671ba62bec2fc7d2c96d2..e063686cee84e6114f1c45d1886c2b344bbd85a7 100644 (file)
@@ -19,6 +19,9 @@
 #      Sub-makefile for pwd portion of the library.
 #
 subdir := pwd
+
+include ../Makeconfig
+
 headers := pwd.h
 
 routines := fgetpwent getpw putpwent \
index 7a102cd4438980d8d4627f4a00e2a3052a15a32d..9e4daee8c23e708276cef063d7fc4a3c0287fe2b 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := resolv
 
+include ../Makeconfig
+
 headers        := resolv.h \
           netdb.h bits/netdb.h \
           arpa/nameser.h arpa/nameser_compat.h \
@@ -33,8 +35,6 @@ xtests = tst-leaks2
 
 generate := mtrace-tst-leaks tst-leaks.mtrace tst-leaks2.mtrace
 
-include ../Makeconfig
-
 extra-libs := libresolv libnss_dns
 ifeq ($(have-thread-library),yes)
 extra-libs += libanl
index 9441b2b2f57179bcb055a1c90b4b8872a6329fe2..6334b6ee18a4b50099c685431ae10dfb4d033915 100644 (file)
@@ -17,6 +17,8 @@
 
 subdir := resource
 
+include ../Makeconfig
+
 headers          := sys/resource.h bits/resource.h sys/vlimit.h sys/vtimes.h   \
             ulimit.h
 
index 6e99da0ebb1bbb08fe6b57d43458f8b4f0cc3164..875deb377c0e7a1d03844ae68a9e8704900a75b3 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := rt
 
+include ../Makeconfig
+
 headers        := aio.h mqueue.h bits/mqueue.h bits/mqueue2.h
 
 aio-routines   := aio_cancel aio_error aio_fsync aio_misc aio_read     \
index 285b90982c02c9e0b89ad6d9fd208710c4e6c915..fe0fb5dc6d5ae6e2696cf309004a9484e028f38e 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := setjmp
 
+include ../Makeconfig
+
 headers        := setjmp.h bits/setjmp.h bits/setjmp2.h
 
 routines       := setjmp sigjmp bsd-setjmp bsd-_setjmp \
index c5cb358375ee6bdc8a7cbde68bb66d58007028b4..72ee8e438bb71ac8774d0b5022e1eb23633998a6 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := shadow
 
+include ../Makeconfig
+
 headers                = shadow.h
 routines       = getspent getspnam sgetspent fgetspent putspent \
                  getspent_r getspnam_r sgetspent_r fgetspent_r \
index f9d5f715b921b0d156ca377474a5415adbba6e44..427c7a1e6fca27469cc7ff739fff1553f2887c17 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := signal
 
+include ../Makeconfig
+
 headers        := signal.h sys/signal.h bits/signum.h bits/sigcontext.h \
           bits/sigaction.h bits/sigset.h bits/siginfo.h bits/sigstack.h \
           bits/sigthread.h
index a297084cc79036667eda433f023dfa1dd8b46056..b347693872b8ea47aa3c41c6bf04fa89969b87f2 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := socket
 
+include ../Makeconfig
+
 headers        := sys/socket.h sys/un.h bits/sockaddr.h bits/socket.h \
           bits/socket2.h sys/socketvar.h net/if.h
 
index 8a7efa3dfdd166def7c32f77ebd98434f8a49896..b1313093530f29a635dcc1281f1c14e95f7acf1e 100644 (file)
@@ -21,6 +21,8 @@
 #
 subdir := soft-fp
 
+include ../Makeconfig
+
 gcc-single-routines := negsf2 addsf3 subsf3 mulsf3 divsf3 eqsf2 \
        lesf2 gesf2 unordsf2 fixsfsi fixunssfsi floatsisf fixsfdi        \
        fixunssfdi floatdisf sqrtsf2 floatunsisf floatundisf
index c401f25fbb82d50e10cbd60aef76186f6a4b88e2..ba0bf64fc07139c97a7dd89607d5f18298c110d7 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := stdio-common
 
+include ../Makeconfig
+
 headers        := stdio_ext.h printf.h bits/printf-ldbl.h bits/stdio_lim.h
 
 routines       :=                                                            \
@@ -39,8 +41,6 @@ routines      :=                                                            \
        isoc99_vsscanf                                                        \
        psiginfo
 
-include ../Makeconfig
-
 aux    := errlist siglist printf-parsemb printf-parsewc fxprintf
 
 tests := tstscanf test_rdwr test-popen tstgetln test-fseek \
index 8e5623c89dc47784e4979eaa91da52870a354933..5f2c10cec26d6d49e7a853fc438ed46295c53e15 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := stdlib
 
+include ../Makeconfig
+
 headers        := stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h      \
           monetary.h bits/monetary-ldbl.h                                    \
           inttypes.h stdint.h bits/wordsize.h                                \
@@ -76,8 +78,6 @@ tests-static  := tst-secure-getenv
 
 modules-names  = tst-tls-atexit-lib
 
-include ../Makeconfig
-
 ifeq ($(build-shared),yes)
 tests          += tst-putenv
 endif
index eeacd3ab50d41fe04eead98964d3c93655860e0e..9ae27048ae910daf92b3fc269f529459c36f7901 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := streams
 
+include ../Makeconfig
+
 headers                = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
 routines       = isastream getmsg getpmsg putmsg putpmsg fattach fdetach
 
index 3759229587c369179dab025e78c74048b7ad885f..543b5f68e4462c8134192e5af6cec55f8ef87bb8 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := string
 
+include ../Makeconfig
+
 headers        := string.h strings.h memory.h endian.h bits/endian.h \
           argz.h envz.h byteswap.h bits/byteswap.h bits/byteswap-16.h \
           bits/string.h bits/string2.h bits/string3.h
index b36e3dd513e2145f9a49afd4c32ff5bb6ee5e907..9ffcb23e97510f20909fe17865b7fe6b63febabe 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := sunrpc
 
+include ../Makeconfig
+
 # The code in this subdirectory is taken from Sun's RPCSRC-4.0
 # distribution with some additional changes from the TI-RPC package
 # which is also available from Sun.  The files are heavily changed to
@@ -58,8 +60,6 @@ generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
            $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
 generated-dirs := rpcsvc
 
-include ../Makeconfig
-
 ifeq ($(link-obsolete-rpc),yes)
 headers += $(headers-in-tirpc) $(headers-not-in-tirpc)
 endif
@@ -94,8 +94,6 @@ rpcgen-objs = rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o \
 extra-objs = $(rpcgen-objs) $(addprefix cross-,$(rpcgen-objs))
 others += rpcgen
 
-all: # Make this the default target; it will be defined in Rules.
-
 tests = tst-xdrmem tst-xdrmem2
 xtests := tst-getmyaddr
 
index dbf629aa92f31f2da64acbff0f2c5fa4b99c5ff0..fe23f0a27c062140b625d8507a29693b1d74fd86 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := sysvipc
 
+include ../Makeconfig
+
 headers        := sys/ipc.h sys/msg.h sys/sem.h sys/shm.h \
           bits/ipctypes.h bits/ipc.h bits/msq.h bits/sem.h bits/shm.h
 
index 446910dcdd69c3e600e45c597ed11023aabfbeae..fc164029eb6bbf72783ca66b3fb7d52855325025 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := termios
 
+include ../Makeconfig
+
 headers        := termios.h bits/termios.h sys/ttydefaults.h sys/termios.h \
           sys/ttychars.h
 
index 227a4a0c44eb1854cf00b3bee8882d2a4c27dbb4..b7f3dba7845da2ac1245aa66effcd9f8a44c1078 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := time
 
+include ../Makeconfig
+
 headers        := time.h sys/time.h sys/timeb.h bits/time.h
 
 routines := offtime asctime clock ctime ctime_r difftime \
index 6c640fd1447fd9d680d47f54c0d655700e38cec3..a4ff4fe73ca962cb5db48c06d1c2c4c6a9266707 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := timezone
 
+include ../Makeconfig
+
 extra-objs := scheck.o ialloc.o
 
 others := zdump zic
@@ -38,10 +40,6 @@ install-sbin := zic zdump
 
 generated-dirs = testdata
 
-all: # Make this the default target; it will be defined in Rules.
-
-include ../Makeconfig  # Get objpfx defined so we can use it below.
-
 CPPFLAGS-zic = -DNOT_IN_libc
 
 install-bin-script = tzselect
index c139b4fd304e005bf5835a82c57f4f26c8eefdc7..197ca7d7e20a495af8286aec066366e0474b5a10 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := wcsmbs
 
+include ../Makeconfig
+
 headers        := wchar.h bits/wchar.h bits/wchar2.h bits/wchar-ldbl.h uchar.h
 
 routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
index 073cc0baee686f12db2604d3e5955bd03866f23d..ea9040ceb2f8ce6d2372c3e339c7b545744c474f 100644 (file)
@@ -20,6 +20,8 @@
 #
 subdir := wctype
 
+include ../Makeconfig
+
 headers                := wctype.h
 routines       := wcfuncs wctype iswctype wctrans towctrans \
                   wcfuncs_l wctype_l iswctype_l wctrans_l towctrans_l