diff options
author | jimb <jimb@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2007-05-14 03:26:09 +0000 |
---|---|---|
committer | jimb <jimb@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2007-05-14 03:26:09 +0000 |
commit | 0b586afcbc9a2e292ebf44d2f8f4b968ba82e10f (patch) | |
tree | 680d7f91fc741f0e35788a382a488841b89a3b5a /libc/nis | |
parent | e2f920f6100658d8f2f6d25d31e9cc725b518e53 (diff) |
Add the OPTION_EGLIBC_INET option group.
* option-groups.def (OPTION_EGLIBC_INET): New entry.
* option-groups.defaults (OPTION_EGLIBC_INET): Initialize.
* option-groups.mak: Add initializer for aux-y.
* Makerules (aux): Add in contents of aux-y.
* extra-lib.mk (all-$(lib)-routines): Include $($(lib)-routines-y)
in the list.
(cpp-srcs-left): Refer $(all-$(lib)-routines) instead of spelling
its value out.
* nscd/Makefile: include option-groups.mak.
(routines, aux, others, install-sbin, extra-objs): Place
everything here in the option group.
* pwd/Makefile: include option-groups.mak.
(CFLAGS-getpwuid_r.c, CFLAGS-getpwnam_r.c): Define USE_NSCD only
if OPTION_EGLIBC_INET is enabled.
* misc/Makefile: include option-groups.mak.
* sysdeps/unix/sysv/linux/gethostid.c [!OPTION_EGLIBC_INET]: Don't
try to look up our IP address; just return a dummy value.
* sysdeps/unix/sysv/linux/Makefile: #define OPTION_EGLIBC_INET
appropriately when compiling gethostid.c.
* inet/Makefile: include option-groups.mak.
(routines, aux): Place all routines in the option group.
* nss/Makefile: include option-groups.mak.
(databases): Put proto, service, hosts, network, rpc, ethers,
netgrp, key, and aliases database in option group. Move
assignment to 'databases' above assignment to 'routines', since we
generate some of the latter from the former.
(routines): Put digits_dots in option group.
(tests): Put test-netdb in option group.
(xtests): Put bug-erange in option group.
(CFLAGS-nsswitch.c, CFLAGS-getnssent_r.c, CFLAGS-getent.c): #define
OPTION_EGLIBC_INET as appropriate.
* nss/getnssent_r.c (__nss_setent, __nss_endent, __nss_getent_r):
Don't try to initialize resolver state unless the option group is
enabled.
* nss/nssswitch.c (__nss_disable_nscd): Define this only if
the option group is enabled.
* nss/getent.c (print_aliases, aliases_keys, ethers_keys,
print_hosts, hosts_keys, ahosts_keys_int, ahosts_keys,
ahostsv4_keys, ahostsv6_keys, netgroup_keys, print_networks,
networks_keys, print_protocols, protocols_keys, print_rpc,
rpc_keys, print_services, services_keys): Define only #if
OPTION_EGLIBC_INET.
(DN): New macro.
(databases): Make entries for ahosts, ahostsv4, ahostsv6, aliases,
ethers, hosts, netgroup, networks, protocols, rpc, and services
present only if option group is enabled.
* hesiod/Makefile (extra-libs, extra-libs-others): Place all
libraries in option group.
* grp/Makefile: include option-groups.mak.
(CFLAGS-getgruid_r.c, CFLAGS-getgrnam_r.c, CFLAGS-initgroups.c):
Define USE_NSCD only if OPTION_EGLIBC_INET is enabled.
* nptl/Makefile: include option-groups.mak.
(libpthread-routines): Move 'herrno' and 'res' into the option
group.
(CFLAGS-pthread_create.c): Define OPTION_EGLIBC_INET as
appropriate.
* nptl/pthread_create.c (start_thread): Initialize and free
__resp only when OPTION_EGLIBC_INET is #defined.
* posix/Makefile: include option-groups.mak.
(routines): Put getaddrinfo and gai_strerror in the option group.
(tests, xtests): Move tst-getaddrinfo, bug-ga1, tst-getaddrinfo2,
tst-rfc3484, tst-rfc3484-2, tst-getaddrinfo3, and bug-ga2 into the
option group.
(CFLAGS-getaddrinfo.c): #define USE_NSCD only if the option group
is enabled.
* resolv/Makefile: include option-groups.mak.
(routines, tests, xtests, extra-libs, extra-libs-others): Move
everything into the option group.
(tests): Only add ga_test as a dependency if the option group is
enabled.
* sunrpc/Makefile: include option-groups.mak.
(install-others, routines, others, install-bin, install-sbin)
(extra-objs, tests, xtests, extra-libs, extra-libs-others): Move
everything into the option group.
* nis/Makefile: include option-groups.mak.
(services, extra-libs, extra-libs-others): Move everything into
the option group.
* option-groups.mak (extra-libs-y, extra-libs-others-y): Add
missing initializers.
* nss/getnssent_r.c (__nss_getent_r): Pass h_errnop through to the
getent function, not &h_errno.
git-svn-id: svn://svn.eglibc.org/trunk@2230 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/nis')
-rw-r--r-- | libc/nis/Makefile | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/libc/nis/Makefile b/libc/nis/Makefile index 8083ee804..f185ab050 100644 --- a/libc/nis/Makefile +++ b/libc/nis/Makefile @@ -19,6 +19,8 @@ # # Makefile for NIS/NIS+ part. # +include ../option-groups.mak + subdir := nis aux := nis_hash @@ -33,15 +35,21 @@ databases = proto service hosts network grp pwd rpc ethers \ spwd netgrp alias publickey # Specify rules for the nss_* modules. -services := nis nisplus compat +# The 'compat' module includes nis support, and the 'nss' directory +# includes a bare-bones "files" library, so we'll include 'compat' in +# OPTION_EGLIBC_INET. +services-y := +services-$(OPTION_EGLIBC_INET) += nis nisplus compat + +extra-libs-$(OPTION_EGLIBC_INET) += libnsl +extra-libs-y += $(services-y:%=libnss_%) -extra-libs = libnsl $(services:%=libnss_%) # These libraries will be built in the `others' pass rather than # the `lib' pass, because they depend on libc.so being built already. -extra-libs-others = $(extra-libs) +extra-libs-others-y += $(extra-libs-y) # The sources are found in the appropriate subdir. -subdir-dirs = $(services:%=nss_%) +subdir-dirs = $(services-y:%=nss_%) vpath %.c $(subdir-dirs) libnsl-routines = yp_xdr ypclnt ypupdate_xdr \ @@ -78,12 +86,12 @@ $(objpfx)libnss_nisplus.so: $(objpfx)libnsl.so$(libnsl.so-version) # Depend on libc.so so a DT_NEEDED is generated in the shared objects. # This ensures they will load libc.so for needed symbols if loaded by # a statically-linked program that hasn't already loaded it. -$(services:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: $(common-objpfx)libc.so\ - $(common-objpfx)libc_nonshared.a +$(services-y:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: \ + $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a ifeq ($(build-shared),yes) -$(others:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version) +$(others-y:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version) else -$(others:%=$(objpfx)%): $(objpfx)libnsl.a +$(others-y:%=$(objpfx)%): $(objpfx)libnsl.a endif |