]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - grp/Makefile
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / grp / Makefile
index 0c16c51911bdac8b15be758cb3cc85d6d9d230d1..9477cc67de96b9570430537aea67822a56bfea78 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1991,92,96,97,98,99,2000,2003 Free Software Foundation, Inc.
+# Copyright (C) 1991-2019 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
 # Lesser General Public License for more details.
 
 # You should have received a copy of the GNU Lesser General Public
-# License along with the GNU C Library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307 USA.
+# License along with the GNU C Library; if not, see
+# <https://www.gnu.org/licenses/>.
 
 #
 #      Sub-makefile for grp portion of the library.
 #
 subdir := grp
-headers := grp.h
 
-distribute := tst_fgetgrent.c tst_fgetgrent.sh
+include ../Makeconfig
+
+headers := grp.h
 
 routines := fgetgrent initgroups setgroups \
            getgrent getgrgid getgrnam putgrent \
-           getgrent_r getgrgid_r getgrnam_r fgetgrent_r
-
-include ../Makeconfig
+           getgrent_r getgrgid_r getgrnam_r fgetgrent_r \
+           grp-merge
 
-tests := testgrp
+tests := testgrp tst-putgrent
 
 ifeq (yes,$(build-shared))
 test-srcs :=  tst_fgetgrent
+ifeq ($(run-built-tests),yes)
+tests-special += $(objpfx)tst_fgetgrent.out
+endif
 endif
 
 
 include ../Rules
 
-ifeq (yes,$(build-static-nss))
-otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
-            $(resolvobjdir)/libresolv.a
-endif
-
-
 ifeq ($(have-thread-library),yes)
 
-CFLAGS-getgrgid_r.c = -DUSE_NSCD=1
-CFLAGS-getgrnam_r.c = -DUSE_NSCD=1
-CFLAGS-getgrent_r.c = -fexceptions
-CFLAGS-getgrent.c = -fexceptions
+CFLAGS-getgrgid_r.c += -fexceptions
+CFLAGS-getgrnam_r.c += -fexceptions
+CFLAGS-getgrent_r.c += -fexceptions
+CFLAGS-getgrent.c += -fexceptions
+CFLAGS-fgetgrent.c += -fexceptions
+CFLAGS-fgetgrent_r.c += -fexceptions $(libio-mtsafe)
+CFLAGS-putgrent.c += -fexceptions $(libio-mtsafe)
+CFLAGS-initgroups.c += -fexceptions
+CFLAGS-getgrgid.c += -fexceptions
 
 endif
 
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
 # tst_fgetgrent currently only works with shared libraries
 ifeq (yes,$(build-shared))
-tests: $(objpfx)tst_fgetgrent.out
 $(objpfx)tst_fgetgrent.out: tst_fgetgrent.sh $(objpfx)tst_fgetgrent
-       $(SHELL) -e tst_fgetgrent.sh $(common-objpfx) $(elf-objpfx) \
-                $(rtld-installed-name)
+       $(SHELL) $< $(common-objpfx) '$(test-program-prefix)' > $@; \
+       $(evaluate-test)
 
 endif
 endif