From a5f891ac8df09e56ecc64bf18a839a06470deacd Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 26 Feb 2014 23:12:03 +0000 Subject: Consistently include Makeconfig after defining subdir. In 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. --- ChangeLog | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++ argp/Makefile | 2 ++ assert/Makefile | 3 +++ benchtests/Makefile | 4 ++- catgets/Makefile | 2 ++ conform/Makefile | 2 ++ crypt/Makefile | 4 +-- csu/Makefile | 6 ++--- ctype/Makefile | 3 +++ debug/Makefile | 4 +-- dirent/Makefile | 2 ++ dlfcn/Makefile | 5 ++-- gmon/Makefile | 4 +-- gnulib/Makefile | 2 ++ grp/Makefile | 5 ++-- gshadow/Makefile | 2 ++ hesiod/Makefile | 2 ++ hurd/Makefile | 4 --- iconvdata/Makefile | 4 +-- inet/Makefile | 2 ++ intl/Makefile | 5 ++-- io/Makefile | 2 ++ libidn/ChangeLog | 4 +++ libidn/Makefile | 5 ++-- libio/Makefile | 6 ++--- locale/Makefile | 2 ++ localedata/ChangeLog | 5 ++++ localedata/Makefile | 5 +--- login/Makefile | 4 +-- mach/Makefile | 4 --- malloc/Makefile | 4 +-- manual/Makefile | 5 ++-- math/Makefile | 4 +-- misc/Makefile | 4 +-- nis/Makefile | 4 +-- nptl/ChangeLog | 4 +++ nptl/Makefile | 4 +-- nptl_db/ChangeLog | 4 +++ nptl_db/Makefile | 2 ++ nss/Makefile | 4 +-- po/Makefile | 6 ++--- posix/Makefile | 4 +-- pwd/Makefile | 3 +++ resolv/Makefile | 4 +-- resource/Makefile | 2 ++ rt/Makefile | 2 ++ setjmp/Makefile | 2 ++ shadow/Makefile | 2 ++ signal/Makefile | 2 ++ socket/Makefile | 2 ++ soft-fp/Makefile | 2 ++ stdio-common/Makefile | 4 +-- stdlib/Makefile | 4 +-- streams/Makefile | 2 ++ string/Makefile | 2 ++ sunrpc/Makefile | 6 ++--- sysvipc/Makefile | 2 ++ termios/Makefile | 2 ++ time/Makefile | 2 ++ timezone/Makefile | 6 ++--- wcsmbs/Makefile | 2 ++ wctype/Makefile | 2 ++ 62 files changed, 205 insertions(+), 76 deletions(-) diff --git a/ChangeLog b/ChangeLog index 157649b..4ef5ccc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,76 @@ +2014-02-26 Joseph Myers + + * 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 * sysdeps/mips/math_private.h (_FPU_MASK_ALL) New. diff --git a/argp/Makefile b/argp/Makefile index 35f1088..997424e 100644 --- a/argp/Makefile +++ b/argp/Makefile @@ -20,6 +20,8 @@ # subdir := argp +include ../Makeconfig + headers = argp.h routines = $(addprefix argp-, ba fmtstream fs-xinl help parse pv \ pvh xinl eexst) diff --git a/assert/Makefile b/assert/Makefile index 60ec53d..97fb476 100644 --- a/assert/Makefile +++ b/assert/Makefile @@ -19,6 +19,9 @@ # Sub-makefile for assert portion of the library. # subdir := assert + +include ../Makeconfig + headers := assert.h routines := assert assert-perr __assert diff --git a/benchtests/Makefile b/benchtests/Makefile index 8bfb039..55d957a 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -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)) diff --git a/catgets/Makefile b/catgets/Makefile index 7c2a117..899d929 100644 --- a/catgets/Makefile +++ b/catgets/Makefile @@ -20,6 +20,8 @@ # subdir := catgets +include ../Makeconfig + headers = nl_types.h routines = catgets open_catalog others = gencat diff --git a/conform/Makefile b/conform/Makefile index 0761a1c..41f0bb3 100644 --- a/conform/Makefile +++ b/conform/Makefile @@ -20,6 +20,8 @@ # subdir := conform +include ../Makeconfig + include ../Rules ifneq (yes,$(fast-check)) diff --git a/crypt/Makefile b/crypt/Makefile index 9f69ecb..b1645de 100644 --- a/crypt/Makefile +++ b/crypt/Makefile @@ -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 diff --git a/csu/Makefile b/csu/Makefile index b5afea0..ebd4b4e 100644 --- a/csu/Makefile +++ b/csu/Makefile @@ -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) diff --git a/ctype/Makefile b/ctype/Makefile index 7bfc928..8a41f9c 100644 --- a/ctype/Makefile +++ b/ctype/Makefile @@ -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 diff --git a/debug/Makefile b/debug/Makefile index fc15ef3..963460e 100644 --- a/debug/Makefile +++ b/debug/Makefile @@ -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 diff --git a/dirent/Makefile b/dirent/Makefile index a67d2e6..c9bd5dd 100644 --- a/dirent/Makefile +++ b/dirent/Makefile @@ -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 \ diff --git a/dlfcn/Makefile b/dlfcn/Makefile index bf20063..39f18d7 100644 --- a/dlfcn/Makefile +++ b/dlfcn/Makefile @@ -16,6 +16,9 @@ # . 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 diff --git a/gmon/Makefile b/gmon/Makefile index b069fbd..a82db98 100644 --- a/gmon/Makefile +++ b/gmon/Makefile @@ -20,13 +20,13 @@ # 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 diff --git a/gnulib/Makefile b/gnulib/Makefile index e767570..69c1e85 100644 --- a/gnulib/Makefile +++ b/gnulib/Makefile @@ -17,6 +17,8 @@ subdir := gnulib +include ../Makeconfig + # Maybe this is the right place for a test of gcc's interface. tests = tst-gcc diff --git a/grp/Makefile b/grp/Makefile index b8d1d81..3ed8471 100644 --- a/grp/Makefile +++ b/grp/Makefile @@ -19,14 +19,15 @@ # 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)) diff --git a/gshadow/Makefile b/gshadow/Makefile index 213da06..1b41eab 100644 --- a/gshadow/Makefile +++ b/gshadow/Makefile @@ -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 diff --git a/hesiod/Makefile b/hesiod/Makefile index b640cec..19952af 100644 --- a/hesiod/Makefile +++ b/hesiod/Makefile @@ -20,6 +20,8 @@ # subdir := hesiod +include ../Makeconfig + extra-libs := libnss_hesiod extra-libs-others = $(extra-libs) diff --git a/hurd/Makefile b/hurd/Makefile index fb334d8..b9f23f0 100644 --- a/hurd/Makefile +++ b/hurd/Makefile @@ -17,12 +17,8 @@ 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) diff --git a/iconvdata/Makefile b/iconvdata/Makefile index 3a35520..01f50d2 100644 --- a/iconvdata/Makefile +++ b/iconvdata/Makefile @@ -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 diff --git a/inet/Makefile b/inet/Makefile index f4c3273..2f1186f 100644 --- a/inet/Makefile +++ b/inet/Makefile @@ -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) \ diff --git a/intl/Makefile b/intl/Makefile index 8a96a85..b21f4d9 100644 --- a/intl/Makefile +++ b/intl/Makefile @@ -18,14 +18,15 @@ # 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) diff --git a/io/Makefile b/io/Makefile index bb32b86..8d38612 100644 --- a/io/Makefile +++ b/io/Makefile @@ -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 \ diff --git a/libidn/ChangeLog b/libidn/ChangeLog index e8130bb..7a48fd5 100644 --- a/libidn/ChangeLog +++ b/libidn/ChangeLog @@ -1,3 +1,7 @@ +2014-02-26 Joseph Myers + + * Makefile: Include Makeconfig immediately after defining subdir. + 2013-10-30 Mike Frysinger * configure.in: Moved to ... diff --git a/libidn/Makefile b/libidn/Makefile index 542840d..a40f08e 100644 --- a/libidn/Makefile +++ b/libidn/Makefile @@ -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 diff --git a/libio/Makefile b/libio/Makefile index 9bbe712..fb6ec70 100644 --- a/libio/Makefile +++ b/libio/Makefile @@ -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 \ diff --git a/locale/Makefile b/locale/Makefile index 51b383a..eeff2cb 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -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 \ diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 1857fc1..2bd966d 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,8 @@ +2014-02-26 Joseph Myers + + * Makefile: Include Makeconfig immediately after defining subdir. + (all): Remove target. + 2014-02-21 Joseph Myers * Makefile ($(objpfx)sort-test.out): Use $(evaluate-test). diff --git a/localedata/Makefile b/localedata/Makefile index a69ec41..8813374 100644 --- a/localedata/Makefile +++ b/localedata/Makefile @@ -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 \ diff --git a/login/Makefile b/login/Makefile index 9194702..ca55808 100644 --- a/login/Makefile +++ b/login/Makefile @@ -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 diff --git a/mach/Makefile b/mach/Makefile index c804fa3..c316e7a 100644 --- a/mach/Makefile +++ b/mach/Makefile @@ -17,12 +17,8 @@ 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 diff --git a/malloc/Makefile b/malloc/Makefile index d2d3c8e..12b4ec6 100644 --- a/malloc/Makefile +++ b/malloc/Makefile @@ -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. diff --git a/manual/Makefile b/manual/Makefile index 1129136..5c62f9a 100644 --- a/manual/Makefile +++ b/manual/Makefile @@ -19,14 +19,13 @@ 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 diff --git a/math/Makefile b/math/Makefile index cc27935..09d14a0 100644 --- a/math/Makefile +++ b/math/Makefile @@ -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 diff --git a/misc/Makefile b/misc/Makefile index 66d0ab7..1897f6c 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -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 diff --git a/nis/Makefile b/nis/Makefile index 15f86ba..7688604 100644 --- a/nis/Makefile +++ b/nis/Makefile @@ -20,10 +20,10 @@ # subdir := nis -aux := nis_hash - include ../Makeconfig +aux := nis_hash + ifeq ($(link-obsolete-rpc),yes) headers := $(wildcard rpcsvc/*.[hx]) endif diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 793b662..a1d0f11 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,7 @@ +2014-02-26 Joseph Myers + + * Makefile: Include Makeconfig immediately after defining subdir. + 2014-02-21 Joseph Myers * Makefile ($(objpfx)tst-stack3-mem): Use $(evaluate-test). diff --git a/nptl/Makefile b/nptl/Makefile index 253e7dd..d568e5d 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -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 \ diff --git a/nptl_db/ChangeLog b/nptl_db/ChangeLog index f4787ee..85cf2ba 100644 --- a/nptl_db/ChangeLog +++ b/nptl_db/ChangeLog @@ -1,3 +1,7 @@ +2014-02-26 Joseph Myers + + * Makefile: Include Makeconfig immediately after defining subdir. + 2014-02-21 Joseph Myers * Makefile ($(objpfx)db-symbols.out): Use diff --git a/nptl_db/Makefile b/nptl_db/Makefile index 5d20dd5..f321b53 100644 --- a/nptl_db/Makefile +++ b/nptl_db/Makefile @@ -19,6 +19,8 @@ subdir := nptl_db +include ../Makeconfig + nptl_db-version = 1.0 extra-libs = libthread_db diff --git a/nss/Makefile b/nss/Makefile index c8880c0..1fa7f1f 100644 --- a/nss/Makefile +++ b/nss/Makefile @@ -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 diff --git a/po/Makefile b/po/Makefile index 99f2816..9d90f6b 100644 --- a/po/Makefile +++ b/po/Makefile @@ -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 diff --git a/posix/Makefile b/posix/Makefile index ea06d39..304238f 100644 --- a/posix/Makefile +++ b/posix/Makefile @@ -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 \ diff --git a/pwd/Makefile b/pwd/Makefile index a19ddb5..e063686 100644 --- a/pwd/Makefile +++ b/pwd/Makefile @@ -19,6 +19,9 @@ # Sub-makefile for pwd portion of the library. # subdir := pwd + +include ../Makeconfig + headers := pwd.h routines := fgetpwent getpw putpwent \ diff --git a/resolv/Makefile b/resolv/Makefile index 7a102cd..9e4daee 100644 --- a/resolv/Makefile +++ b/resolv/Makefile @@ -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 diff --git a/resource/Makefile b/resource/Makefile index 9441b2b..6334b6e 100644 --- a/resource/Makefile +++ b/resource/Makefile @@ -17,6 +17,8 @@ subdir := resource +include ../Makeconfig + headers := sys/resource.h bits/resource.h sys/vlimit.h sys/vtimes.h \ ulimit.h diff --git a/rt/Makefile b/rt/Makefile index 6e99da0..875deb3 100644 --- a/rt/Makefile +++ b/rt/Makefile @@ -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 \ diff --git a/setjmp/Makefile b/setjmp/Makefile index 285b909..fe0fb5d 100644 --- a/setjmp/Makefile +++ b/setjmp/Makefile @@ -20,6 +20,8 @@ # subdir := setjmp +include ../Makeconfig + headers := setjmp.h bits/setjmp.h bits/setjmp2.h routines := setjmp sigjmp bsd-setjmp bsd-_setjmp \ diff --git a/shadow/Makefile b/shadow/Makefile index c5cb358..72ee8e4 100644 --- a/shadow/Makefile +++ b/shadow/Makefile @@ -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 \ diff --git a/signal/Makefile b/signal/Makefile index f9d5f71..427c7a1 100644 --- a/signal/Makefile +++ b/signal/Makefile @@ -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 diff --git a/socket/Makefile b/socket/Makefile index a297084..b347693 100644 --- a/socket/Makefile +++ b/socket/Makefile @@ -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 diff --git a/soft-fp/Makefile b/soft-fp/Makefile index 8a7efa3..b131309 100644 --- a/soft-fp/Makefile +++ b/soft-fp/Makefile @@ -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 diff --git a/stdio-common/Makefile b/stdio-common/Makefile index c401f25..ba0bf64 100644 --- a/stdio-common/Makefile +++ b/stdio-common/Makefile @@ -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 \ diff --git a/stdlib/Makefile b/stdlib/Makefile index 8e5623c..5f2c10c 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -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 diff --git a/streams/Makefile b/streams/Makefile index eeacd3a..9ae2704 100644 --- a/streams/Makefile +++ b/streams/Makefile @@ -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 diff --git a/string/Makefile b/string/Makefile index 3759229..543b5f6 100644 --- a/string/Makefile +++ b/string/Makefile @@ -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 diff --git a/sunrpc/Makefile b/sunrpc/Makefile index b36e3dd..9ffcb23 100644 --- a/sunrpc/Makefile +++ b/sunrpc/Makefile @@ -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 diff --git a/sysvipc/Makefile b/sysvipc/Makefile index dbf629a..fe23f0a 100644 --- a/sysvipc/Makefile +++ b/sysvipc/Makefile @@ -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 diff --git a/termios/Makefile b/termios/Makefile index 446910d..fc16402 100644 --- a/termios/Makefile +++ b/termios/Makefile @@ -20,6 +20,8 @@ # subdir := termios +include ../Makeconfig + headers := termios.h bits/termios.h sys/ttydefaults.h sys/termios.h \ sys/ttychars.h diff --git a/time/Makefile b/time/Makefile index 227a4a0..b7f3dba 100644 --- a/time/Makefile +++ b/time/Makefile @@ -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 \ diff --git a/timezone/Makefile b/timezone/Makefile index 6c640fd..a4ff4fe 100644 --- a/timezone/Makefile +++ b/timezone/Makefile @@ -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 diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile index c139b4f..197ca7d 100644 --- a/wcsmbs/Makefile +++ b/wcsmbs/Makefile @@ -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 \ diff --git a/wctype/Makefile b/wctype/Makefile index 073cc0b..ea9040c 100644 --- a/wctype/Makefile +++ b/wctype/Makefile @@ -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 -- cgit v1.1