Fix typos.
[platform/upstream/glibc.git] / libio / Makefile
index 645448f..e15cd40 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1995,96,97,98,99,2000,01,02 Free Software Foundation, Inc.
+# Copyright (C) 1995-2013 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
@@ -12,9 +12,8 @@
 # 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
+# <http://www.gnu.org/licenses/>.
 
 #
 #      Specific makefile for libio.
@@ -22,7 +21,7 @@
 subdir := libio
 
 headers        := stdio.h libio.h _G_config.h bits/stdio.h bits/stdio-lock.h \
-          bits/sys_errlist.h
+          bits/sys_errlist.h bits/stdio2.h bits/stdio-ldbl.h bits/libio-ldbl.h
 
 routines       :=                                                            \
        filedoalloc iofclose iofdopen iofflush iofgetpos iofgets iofopen      \
@@ -35,7 +34,7 @@ routines      :=                                                            \
        iofputws iofputws_u iogetwline iowpadn ioungetwc putwc putwc_u        \
        putwchar putwchar_u putchar putchar_u fwprintf swprintf vwprintf      \
        wprintf wscanf fwscanf vwscanf vswprintf iovswscanf swscanf wgenops   \
-       wstrops wfileops iofwide fwide                                        \
+       wstrops wfileops iofwide fwide wmemstream                             \
                                                                              \
        clearerr feof ferror fileno fputc freopen fseek getc getchar          \
        memstream pclose putc putchar rewind setbuf setlinebuf vasprintf      \
@@ -47,33 +46,44 @@ routines    :=                                                            \
                                                                              \
        libc_fatal fmemopen
 
+include ../Makeconfig
+
 tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc   \
-       tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-fopenloc          \
+       tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-ext2 \
        tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf           \
        tst-mmap-setvbuf bug-ungetwc1 bug-ungetwc2 tst-atime tst-eof          \
        tst-freopen bug-rewind bug-rewind2 bug-ungetc bug-fseek \
        tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \
-       tst-mmap2-eofsync tst-mmap-offend bug-fopena+ bug-wfflush
+       tst-mmap2-eofsync tst-mmap-offend bug-fopena+ bug-wfflush \
+       bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4 tst-fopenloc2 \
+       tst-memstream1 tst-memstream2 \
+       tst-wmemstream1 tst-wmemstream2 \
+       bug-memstream1 bug-wmemstream1 \
+       tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos tst-fseek \
+       tst-fwrite-error
+ifeq (yes,$(build-shared))
+# Add test-fopenloc only if shared library is enabled since it depends on
+# shared localedata objects.
+tests += tst-fopenloc
+endif
 test-srcs = test-freopen
 
 all: # Make this the default target; it will be defined in Rules.
 
-include ../Makeconfig
-
 ifeq ($(versioning),yes)
 routines += oldiofopen oldiofdopen oldiofclose oldiopopen oldpclose \
            oldtmpfile oldiofgetpos oldiofgetpos64 oldiofsetpos     \
            oldiofsetpos64
 endif
 
-ifneq (,$(filter %REENTRANT, $(defines)))
+ifeq (yes,$(libc-reentrant))
 routines += clearerr_u feof_u ferror_u fputc_u getc_u getchar_u                      \
            iofflush_u putc_u putchar_u peekc iofread_u iofwrite_u iofgets_u  \
            iofputs_u
-
-CPPFLAGS += -D_IO_MTSAFE_IO
 endif
 
+CPPFLAGS += $(libio-mtsafe)
+
 # Support for exception handling.
 CFLAGS-fileops.c = $(exceptions)
 CFLAGS-fputc.c = $(exceptions)
@@ -129,6 +139,10 @@ CFLAGS-putwchar.c = $(exceptions)
 CFLAGS-rewind.c = $(exceptions)
 CFLAGS-wfileops.c = $(exceptions)
 CFLAGS-wgenops.c = $(exceptions)
+CFLAGS-oldiofopen.c = $(exceptions)
+CFLAGS-iofopen.c = $(exceptions)
+CFLAGS-iofopen64.c = $(exceptions)
+CFLAGS-oldtmpfile.c = $(exceptions)
 # XXX Do we need filedoalloc and wfiledoalloc?  Others?
 
 CFLAGS-tst_putwc.c = -DOBJPFX=\"$(objpfx)\"
@@ -143,6 +157,9 @@ tst-ungetwc1-ENV = LOCPATH=$(common-objpfx)localedata
 tst-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata
 bug-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata
 tst-swscanf-ENV = LOCPATH=$(common-objpfx)localedata
+bug-ftell-ENV = LOCPATH=$(common-objpfx)localedata
+tst-fgetwc-ENV = LOCPATH=$(common-objpfx)localedata
+tst-fseek-ENV = LOCPATH=$(common-objpfx)localedata
 
 generated = tst-fopenloc.mtrace tst-fopenloc.check
 
@@ -157,17 +174,19 @@ shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops      \
                       oldiofgetpos oldiofgetpos64 oldiofsetpos         \
                       oldiofsetpos64
 
-distribute := iolibio.h libioP.h strfile.h Banner test-freopen.sh \
-             fd_to_filename.h
-
 include ../Rules
 
-ifeq (no,$(cross-compiling))
-tests: $(objpfx)test-freopen.out $(objpfx)tst-fopenloc.check
+ifeq ($(run-built-tests),yes)
+tests: $(objpfx)test-freopen.out
+ifeq (yes,$(build-shared))
+# Run tst-fopenloc.check only if shared library is enabled since it
+# depends on tst-fopenloc.out.
+tests: $(objpfx)tst-fopenloc.check
+endif
 endif
 
 $(objpfx)test-freopen.out: test-freopen.sh $(objpfx)test-freopen
-       $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' \
+       $(SHELL) $< $(common-objpfx) '$(test-program-prefix)'   \
        $(common-objpfx)libio/
 
 $(objpfx)tst-fopenloc.check: $(objpfx)tst-fopenloc.out