]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - Rules
Fix BZ #18043 comment # 19: don't call undefined setenv(..., NULL, 1).
[thirdparty/glibc.git] / Rules
diff --git a/Rules b/Rules
index feb304dbc0bab53e0ac33d2270f573061784b41b..e237d0352af3c3b56527c86e030fa07ecee58d88 100644 (file)
--- a/Rules
+++ b/Rules
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2014 Free Software Foundation, Inc.
+# Copyright (C) 1991-2015 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
@@ -84,10 +84,6 @@ common-generated += dummy.o dummy.c
 # This makes all the auxiliary and test programs.
 
 .PHONY: others tests bench
-ifeq ($(multi-arch),no)
-tests := $(filter-out $(tests-ifunc), $(tests))
-xtests := $(filter-out $(xtests-ifunc), $(xtests))
-endif
 
 ifeq ($(build-programs),yes)
 others: $(addprefix $(objpfx),$(others) $(sysdep-others) $(extra-objs))
@@ -190,9 +186,11 @@ ifneq "$(strip $(tests) $(xtests) $(test-srcs))" ""
 # These are the implicit rules for making test outputs
 # from the test programs and whatever input files are present.
 
-make-test-out = $(test-wrapper-env) \
-               GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
-               $($*-ENV) $(host-test-program-cmd) $($*-ARGS)
+define make-test-out
+$(if $($*-ENV-only),$(test-wrapper-env-only) $($*-ENV-only),\
+     $(test-wrapper-env) $(run-program-env) $($*-ENV)) \
+$(host-test-program-cmd) $($*-ARGS)
+endef
 $(objpfx)%.out: %.input $(objpfx)%
        $(make-test-out) > $@ < $(word 1,$^); \
        $(evaluate-test)
@@ -200,6 +198,18 @@ $(objpfx)%.out: /dev/null $(objpfx)%       # Make it 2nd arg for canned sequence.
        $(make-test-out) > $@; \
        $(evaluate-test)
 
+# tests-unsupported lists tests that we will not try to build at all in
+# this configuration.  Note this runs every time because it does not
+# actually create its target.  The dependency on Makefile is meant to
+# ensure that it runs after a Makefile change to add a test to the list
+# when it previously ran and produced a .out file (probably for a failure).
+ifneq "$(strip $(tests-unsupported))" ""
+$(tests-unsupported:%=$(objpfx)%.out): $(objpfx)%.out: Makefile
+       @rm -f $@
+       $(..)scripts/evaluate-test.sh $(patsubst $(common-objpfx)%.out,%,$@) \
+                                     77 false false > $(@:.out=.test-result)
+endif
+
 endif  # tests
 
 \f