This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Run libresolv.so tests if $(build-shared) is yes
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 10 Sep 2012 06:36:16 -0700
- Subject: [PATCH] Run libresolv.so tests if $(build-shared) is yes
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
This patch enables libresolv.so tests only if $(build-shared) is yes.
OK to install?
H.J.
----
* resolv/Makefile: Include ../Makeconfig before tests.
(tests): Add tst-leaks and depend on
$(objpfx)mtrace-tst-leaks only if $(build-shared) is yes.
diff --git a/resolv/Makefile b/resolv/Makefile
index 4777317..6cb196a 100644
--- a/resolv/Makefile
+++ b/resolv/Makefile
@@ -29,13 +29,16 @@ headers := resolv.h \
routines := herror inet_addr inet_ntop inet_pton nsap_addr res_init \
res_hconf res_libc res-state
-tests = tst-aton tst-leaks tst-inet_ntop
+include ../Makeconfig
+
+tests = tst-aton tst-inet_ntop
+ifeq (yes,$(build-shared))
+tests += tst-leaks
+endif
xtests = tst-leaks2
generate := mtrace-tst-leaks tst-leaks.mtrace tst-leaks2.mtrace
-include ../Makeconfig
-
extra-libs := libresolv libnss_dns
ifeq ($(have-thread-library),yes)
extra-libs += libanl
@@ -108,7 +111,7 @@ $(objpfx)tst-leaks: $(objpfx)libresolv.so
tst-leaks-ENV = MALLOC_TRACE=$(objpfx)tst-leaks.mtrace
$(objpfx)mtrace-tst-leaks: $(objpfx)tst-leaks.out
$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks.mtrace > $@
-ifeq (no,$(cross-compiling))
+ifeq (yesno,$(build-shared)$(cross-compiling))
ifneq (no,$(PERL))
tests: $(objpfx)mtrace-tst-leaks
endif