~ubuntu-branches/ubuntu/precise/eglibc/precise-201308281639

« back to all changes in this revision

Viewing changes to nss/Makefile

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-02-08 01:58:09 UTC
  • mfrom: (1.5.3) (288.1.12 precise)
  • Revision ID: package-import@ubuntu.com-20120208015809-ulscst7uteq3e22z
Tags: 2.15~pre6-0ubuntu10
Merge from Debian (r5151, 2.13-26).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 1996-1998,2000-2002,2007,2009,2010
 
1
# Copyright (C) 1996-1998,2000-2002,2007,2009,2010,2011
2
2
# Free Software Foundation, Inc.
3
3
# This file is part of the GNU C Library.
4
4
 
44
44
                          $(addsuffix -lookup,$(databases-y))
45
45
routines-$(OPTION_EGLIBC_INET) += digits_dots
46
46
 
47
 
others                  := getent
48
 
install-bin             := getent
 
47
others                  := getent makedb
 
48
install-bin             := getent makedb
 
49
makedb-modules = xmalloc hash-string
 
50
extra-objs              += $(makedb-modules:=.o)
49
51
 
50
52
tests                   = tst-nss-test1
51
53
tests-$(OPTION_EGLIBC_INET) += test-netdb
59
61
endif
60
62
 
61
63
# Specify rules for the nss_* modules.  We have some services.
62
 
services                := files
 
64
services                := files db
63
65
 
64
66
extra-libs              = $(services:%=libnss_%)
65
67
# These libraries will be built in the `others' pass rather than
68
70
 
69
71
# The sources are found in the appropriate subdir.
70
72
subdir-dirs = $(services:%=nss_%)
71
 
vpath %.c $(subdir-dirs)
 
73
vpath %.c $(subdir-dirs) ../locale/programs ../intl
72
74
 
73
75
 
74
76
libnss_files-routines   := $(addprefix files-,$(databases-y)) \
75
 
                           files-have_o_cloexec
 
77
                           files-initgroups files-have_o_cloexec files-init
76
78
distribute              += files-XXX.c files-parse.c
77
79
 
 
80
libnss_db-dbs           := $(addprefix db-,\
 
81
                                       $(filter-out hosts network key alias,\
 
82
                                                    $(databases))) \
 
83
                           db-initgroups
 
84
libnss_db-routines      := $(libnss_db-dbs) db-open db-init hash-string
 
85
generated               += $(filter-out db-alias.c db-netgrp.c, \
 
86
                                        $(addsuffix .c,$(libnss_db-dbs)))
 
87
distribute              += $(addprefix nss_db/, db-XXX.c nss_db.h)
 
88
 
 
89
install-others          += $(inst_vardbdir)/Makefile
78
90
 
79
91
# Build static module if requested
80
92
ifneq ($(build-static-nss),yes)
81
93
libnss_files-inhibit-o  = $(filter-out .os,$(object-suffixes))
 
94
libnss_db-inhibit-o     = $(filter-out .os,$(object-suffixes))
82
95
endif
83
96
 
84
97
ifneq ($(OPTION_EGLIBC_NSSWITCH),y)
127
140
$(objpfx)getent: $(objpfx)libnss_files.a
128
141
endif
129
142
 
 
143
ifeq (yes,$(have-selinux))
 
144
LDLIBS-makedb           := -lselinux
 
145
endif
 
146
 
130
147
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
131
148
# This ensures they will load libc.so for needed symbols if loaded by
132
149
# a statically-linked program that hasn't already loaded it.
133
 
$(services:%=$(objpfx)libnss_%.so): $(common-objpfx)libc.so \
 
150
libnss-libc = $(common-objpfx)linkobj/libc.so
 
151
$(services:%=$(objpfx)libnss_%.so): $(libnss-libc) \
134
152
                                    $(common-objpfx)libc_nonshared.a
135
153
 
 
154
$(objpfx)libnss_db.so: $(objpfx)libnss_files.so
 
155
 
 
156
$(libnss_db-dbs:%=$(objpfx)%.c): $(objpfx)db-%.c: nss_files/files-%.c
 
157
        @rm -f $@.new
 
158
        (echo '#define EXTERN_PARSER';\
 
159
         echo '#define GENERIC "../nss_db/db-XXX.c"';\
 
160
         echo '#include "$<"') > $@.new
 
161
        mv -f $@.new $@
 
162
 
 
163
 
 
164
$(objpfx)makedb: $(makedb-modules:%=$(objpfx)%.o)
 
165
 
 
166
$(inst_vardbdir)/Makefile: db-Makefile $(+force)
 
167
        $(do-install)
136
168
 
137
169
distribute              += nss_test1.c
138
170