summaryrefslogtreecommitdiff
path: root/nss/Makefile
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-06-14 22:21:51 -0400
committerUlrich Drepper <drepper@gmail.com>2011-06-15 21:06:18 -0400
commit2666d441c2d8107b1987b869714189af64b954c6 (patch)
treec7b8877d691db280202b4c7655907a1165ec84fc /nss/Makefile
parent9ee76b5ae861ff9891e5586fc6906c94c447a9e0 (diff)
Reenable nss_db with a completely new implementation
No longer is Berkeley db used. Instead a simple hash function is used. The database files are not updated once they are created and therefore no complicated database is needed.
Diffstat (limited to 'nss/Makefile')
-rw-r--r--nss/Makefile19
1 files changed, 18 insertions, 1 deletions
diff --git a/nss/Makefile b/nss/Makefile
index 16578a3548..a925cb5bf7 100644
--- a/nss/Makefile
+++ b/nss/Makefile
@@ -53,7 +53,7 @@ otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
endif
# Specify rules for the nss_* modules. We have some services.
-services := files
+services := files db
extra-libs = $(services:%=libnss_%)
# These libraries will be built in the `others' pass rather than
@@ -69,10 +69,18 @@ libnss_files-routines := $(addprefix files-,$(databases)) \
files-initgroups files-have_o_cloexec
distribute += files-XXX.c files-parse.c
+libnss_db-dbs := $(addprefix db-,\
+ $(filter-out hosts network key alias,\
+ $(databases)))
+libnss_db-routines := $(libnss_db-dbs) db-open hash-string
+generated += $(filter-out db-alias.c db-netgrp.c, \
+ $(addsuffix .c,$(libnss_db-dbs)))
+distribute += $(addprefix nss_db/, db-XXX.c nss_db.h)
# Build static module if requested
ifneq ($(build-static-nss),yes)
libnss_files-inhibit-o = $(filter-out .os,$(object-suffixes))
+libnss_db-inhibit-o = $(filter-out .os,$(object-suffixes))
endif
include ../Rules
@@ -93,6 +101,15 @@ libnss-libc = $(common-objpfx)linkobj/libc.so
$(services:%=$(objpfx)libnss_%.so): $(libnss-libc) \
$(common-objpfx)libc_nonshared.a
+$(objpfx)libnss_db.so: $(objpfx)libnss_files.so
+
+$(libnss_db-dbs:%=$(objpfx)%.c): $(objpfx)db-%.c: nss_files/files-%.c
+ @rm -f $@.new
+ (echo '#define EXTERN_PARSER';\
+ echo '#define GENERIC "../nss_db/db-XXX.c"';\
+ echo '#include "$<"') > $@.new
+ mv -f $@.new $@
+
$(objpfx)makedb: $(makedb-modules:%=$(objpfx)%.o)