packaging: add license files to all sub components
[platform/upstream/linaro-glibc.git] / Makeconfig
index a3d3e70..cef0f06 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2013 Free Software Foundation, Inc.
+# Copyright (C) 1991-2014 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
@@ -86,18 +86,18 @@ $(common-objpfx)config.make: $(common-objpfx)config.status \
 $(common-objpfx)config.status: $(..)version.h $(..)configure \
                               $(foreach dir,$(sysdirs),\
                                         $(wildcard $(dir)/Implies) \
-                                        $(patsubst %.in,%,\
+                                        $(patsubst %.ac,%,\
                                                    $(firstword $(wildcard \
- $(addprefix $(dir)/,configure configure.in))))) \
-                              $(patsubst %.in,%,\
- $(wildcard $(..)sysdeps/*/preconfigure $(..)sysdeps/*/preconfigure.in)) \
-                              $(patsubst %.in,%,\
+ $(addprefix $(dir)/,configure configure.ac))))) \
+                              $(patsubst %.ac,%,\
+ $(wildcard $(..)sysdeps/*/preconfigure $(..)sysdeps/*/preconfigure.ac)) \
+                              $(patsubst %.ac,%,\
                                          $(foreach add-on,$(add-ons),\
                                                    $(firstword $(wildcard \
  $(addprefix $(firstword $(filter /%,$(add-on)) $(..)$(add-on))/,\
-            configure configure.in))) \
+            configure configure.ac))) \
  $(wildcard $(addprefix $(firstword $(filter /%,$(add-on)) $(..)$(add-on))/,\
-                       sysdeps/*/preconfigure sysdeps/*/preconfigure.in))))
+                       sysdeps/*/preconfigure sysdeps/*/preconfigure.ac))))
        @cd $(@D); if test -f $(@F); then exec $(SHELL) $(@F) --recheck; else \
         echo The GNU C library has not been configured. >&2; \
         echo Run \`configure\' to configure it before building. >&2; \
@@ -451,7 +451,7 @@ rtld-LDFLAGS = -Wl,-dynamic-linker=$(rtlddir)/$(rtld-installed-name)
 endif
 ifndef rtld-tests-LDFLAGS
 ifeq (yes,$(build-hardcoded-path-in-tests))
-rtld-tests-LDFLAGS = -Wl,-dynamic-linker=$(common-objpfx)elf/ld.so
+rtld-tests-LDFLAGS = -Wl,-dynamic-linker=$(elf-objpfx)ld.so
 else
 rtld-tests-LDFLAGS = $(rtld-LDFLAGS)
 endif
@@ -470,7 +470,7 @@ link-libc-tests-rpath-link = $(link-libc-rpath-link)
 endif
 link-libc-before-gnulib = $(common-objpfx)libc.so$(libc.so-version) \
                          $(common-objpfx)$(patsubst %,$(libtype.oS),c) \
-                         $(as-needed) $(common-objpfx)elf/ld.so \
+                         $(as-needed) $(elf-objpfx)ld.so \
                          $(no-as-needed)
 link-libc = $(link-libc-rpath-link) $(link-libc-before-gnulib) $(gnulib)
 link-libc-tests = $(link-libc-tests-rpath-link) \
@@ -485,8 +485,6 @@ link-libc-tests = $(common-objpfx)libc.a $(otherlibs) $(gnulib-tests) $(common-o
 endif
 endif
 
-elfobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)elf)
-
 # Differences in the linkers on the various platforms.
 LDFLAGS-rpath-ORIGIN = -Wl,-rpath,'$$ORIGIN'
 LDFLAGS-soname-fname = -Wl,-soname,$(@F)
@@ -601,6 +599,12 @@ run-built-tests = yes
 endif
 endif
 
+# Whether to stop immediately when a test fails.  Nonempty means to
+# stop, empty means not to stop.
+ifndef stop-on-test-failure
+stop-on-test-failure =
+endif
+
 # How to run a program we just linked with our library.
 # The program binary is assumed to be $(word 2,$^).
 built-program-file = $(dir $(word 2,$^))$(notdir $(word 2,$^))
@@ -624,17 +628,30 @@ run-via-rtld-prefix =                                                           \
 else
 run-via-rtld-prefix =
 endif
+# $(run-program-env) is the default environment variable settings to
+# use when running a program built with the newly built library.
+run-program-env = GCONV_PATH=$(common-objpfx)iconvdata \
+                 LOCPATH=$(common-objpfx)localedata LC_ALL=C
 # $(run-program-prefix) is a command that, when prepended to the name
 # of a program built with the newly built library, produces a command
 # that, executed on the build system on which "make" is run, runs that
-# program.
-run-program-prefix = $(test-wrapper) $(run-via-rtld-prefix)
+# program.  $(run-program-prefix-before-env) and
+# $(run-program-prefix-after-env) are similar, but separate parts
+# before and after a list of environment variables.
+run-program-prefix-before-env = $(test-wrapper-env)
+run-program-prefix-after-env = $(run-via-rtld-prefix)
+run-program-prefix = $(run-program-prefix-before-env) $(run-program-env) \
+                    $(run-program-prefix-after-env)
 # $(built-program-cmd) is a command that, executed on the build system
 # on which "make" is run, runs the newly built program that is the
 # second dependency of the makefile target in which
-# $(built-program-cmd) is used.
-built-program-cmd = $(test-wrapper) \
-                   $(run-via-rtld-prefix) $(built-program-file)
+# $(built-program-cmd) is used.  $(built-program-cmd-before-env) and
+# $(built-program-cmd-after-env) are similar, before and after a list
+# of environment variables.
+built-program-cmd-before-env = $(test-wrapper-env)
+built-program-cmd-after-env = $(run-via-rtld-prefix) $(built-program-file)
+built-program-cmd = $(built-program-cmd-before-env) $(run-program-env) \
+                   $(built-program-cmd-after-env)
 # $(host-built-program-cmd) is a command that, executed on the host
 # for which the library is built, runs the newly built program that is
 # the second dependency of the makefile target in which
@@ -655,12 +672,16 @@ endif
 # $(test-program-prefix) is a command that, when prepended to the name
 # of a test program built with the newly built library, produces a command
 # that, executed on the build system on which "make" is run, runs that
-# test program.
+# test program.  $(test-program-prefix-before-env) and
+# $(test-program-prefix-after-env) are similar, before and after a
+# list of environment variables.
 
 # $(test-program-cmd) is a command that, executed on the build system
 # on which "make" is run, runs the newly built test program that is the
 # second dependency of the makefile target in which
-# $(test-program-cmd) is used.
+# $(test-program-cmd) is used.  $(test-program-cmd-before-env) and
+# $(test-program-cmd-after-env) are similar, before and after a list
+# of environment variables.
 
 # $(host-test-program-cmd) is a command that, executed on the host
 # for which the library is built, runs the newly built test program that
@@ -669,12 +690,22 @@ endif
 
 ifeq (yes,$(build-hardcoded-path-in-tests))
 test-via-rtld-prefix =
-test-program-prefix = $(test-wrapper)
-test-program-cmd = $(test-wrapper) $(built-program-file)
+test-program-prefix-before-env = $(test-wrapper-env)
+test-program-prefix-after-env =
+test-program-prefix = $(test-program-prefix-before-env) $(run-program-env) \
+                     $(test-program-prefix-after-env)
+test-program-cmd-before-env = $(test-wrapper-env)
+test-program-cmd-after-env = $(built-program-file)
+test-program-cmd = $(test-program-cmd-before-env) $(run-program-env) \
+                  $(test-program-cmd-after-env)
 host-test-program-cmd = $(built-program-file)
 else
 test-via-rtld-prefix = $(run-via-rtld-prefix)
+test-program-prefix-before-env = $(run-program-prefix-before-env)
+test-program-prefix-after-env = $(run-program-prefix-after-env)
 test-program-prefix = $(run-program-prefix)
+test-program-cmd-before-env = $(built-program-cmd-before-env)
+test-program-cmd-after-env = $(built-program-cmd-after-env)
 test-program-cmd = $(built-program-cmd)
 host-test-program-cmd = $(host-built-program-cmd)
 endif
@@ -685,6 +716,7 @@ ifeq ($(all-warnings),yes)
 else
 +gccwarn := -Wall -Wwrite-strings -Winline
 endif
++gccwarn += -Wundef
 +gccwarn-c = -Wstrict-prototypes
 
 # We do not depend on the address of constants in different files to be
@@ -785,7 +817,8 @@ libio-include = -I$(..)libio
 # Note that we can't use -std=* in CPPFLAGS, because it overrides
 # the implicit -lang-asm and breaks cpp behavior for .S files--notably
 # it causes cpp to stop predefining __ASSEMBLER__.
-CPPFLAGS = $(CPPUNDEFS) $(CPPFLAGS-config) $($(subdir)-CPPFLAGS) \
+CPPFLAGS = $(config-extra-cppflags) $(CPPUNDEFS) $(CPPFLAGS-config) \
+          $($(subdir)-CPPFLAGS) \
           $(+includes) $(defines) \
           -include $(..)include/libc-symbols.h $(sysdep-CPPFLAGS) \
           $(CPPFLAGS-$(suffix $@)) \
@@ -939,7 +972,6 @@ $(common-objpfx)soversions.i: $(..)scripts/soversions.awk \
 $(common-objpfx)soversions.mk: $(common-objpfx)soversions.i $(..)Makeconfig
        (while read which lib number setname; do \
           eval seen_$$which=1; \
-          test x"$$which" != xABI || echo abi-name = "$$lib"; \
           test x"$$which" = xDEFAULT || continue; \
           case $$number in \
             [0-9]*) echo "$$lib.so-version=.$$number"; \
@@ -1041,7 +1073,7 @@ ifndef avoid-generated
 # existing directory not in all-subdirs, then sysd-sorted needs to
 # be regenerated, so it depends on existing $(sorted-subdirs:=/Depend) files.
 all-Depend-files := $(wildcard $(sort \
-                       $(foreach dir,$(all-subdirs),\
+                       $(foreach dir,$(all-subdirs),\
                                  $(firstword $($(dir)-srcdir) \
                                  $(..)$(dir))/Depend) \
                        $(sorted-subdirs:=/Depend)))
@@ -1080,6 +1112,20 @@ defines += -D_LIBC_REENTRANT
 libio-mtsafe = -D_IO_MTSAFE_IO
 endif
 
+# The name to give to a test in test results summaries.
+test-name = $(strip $(patsubst %.out, %, $(patsubst $(common-objpfx)%, %, $@)))
+
+# Likewise, in XFAIL variable names.
+test-xfail-name = $(strip $(patsubst %.out, %, $(patsubst $(objpfx)%, %, $@)))
+
+# Command to output a test status line (such as PASS: test-name).  If
+# test-xfail-$(test-xfail-name) has a nonempty value, the status will be
+# XPASS or XFAIL rather than PASS or FAIL.
+evaluate-test = $(..)scripts/evaluate-test.sh $(test-name) $$? \
+                 $(if $(test-xfail-$(test-xfail-name)),true,false) \
+                 $(if $(stop-on-test-failure),true,false) \
+                 > $(common-objpfx)$(test-name).test-result
+
 endif # Makeconfig not yet included
 
 # Local Variables: