]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - grp/Makefile
Update.
[thirdparty/glibc.git] / grp / Makefile
index 5ca4953177f9695ee9e4ac3503e536d984e063bb..c4274ed53116e0d012d0cbdc5c0d870d64022686 100644 (file)
 subdir := grp
 headers := grp.h
 
+distribute := tst_fgetgrent.c tst_fgetgrent.sh
+
 routines := fgetgrent initgroups setgroups \
            getgrent getgrgid getgrnam putgrent \
            getgrent_r getgrgid_r getgrnam_r fgetgrent_r
 
-tests := testgrp tst_fgetgrent
+include ../Makeconfig
+
+tests := testgrp
+
+ifeq (yes,$(build-shared))
+test-srcs :=  tst_fgetgrent
+endif
+
 
 include ../Rules
 
@@ -42,3 +51,15 @@ CFLAGS-getgrgid_r.c = -DUSE_NSCD=1
 CFLAGS-getgrnam_r.c = -DUSE_NSCD=1
 
 endif
+
+ifeq (no,$(cross-compiling))
+# tst_fgetgrent currently only works with shared libraries
+ifeq (yes,$(build-shared))
+.PHONY: do-tst-fgetgrent
+tests: do-tst-fgetgrent
+do-tst-fgetgrent: $(objpfx)tst_fgetgrent
+       $(SHELL) -e tst_fgetgrent.sh $(common-objpfx) $(elf-objpfx) \
+                $(rtld-installed-name)
+
+endif
+endif