]>
Commit | Line | Data |
---|---|---|
77fe0b9c | 1 | # Copyright (C) 1995,96,97,98,99,2000,2001,2002 Free Software Foundation, Inc. |
96aa2d94 RM |
2 | # This file is part of the GNU C Library. |
3 | ||
4 | # The GNU C Library is free software; you can redistribute it and/or | |
41bdb6e2 AJ |
5 | # modify it under the terms of the GNU Lesser General Public |
6 | # License as published by the Free Software Foundation; either | |
7 | # version 2.1 of the License, or (at your option) any later version. | |
96aa2d94 RM |
8 | |
9 | # The GNU C Library is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 | 12 | # Lesser General Public License for more details. |
96aa2d94 | 13 | |
41bdb6e2 AJ |
14 | # You should have received a copy of the GNU Lesser General Public |
15 | # License along with the GNU C Library; if not, write to the Free | |
16 | # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
17 | # 02111-1307 USA. | |
96aa2d94 RM |
18 | |
19 | # | |
20 | # Specific makefile for libio. | |
21 | # | |
22 | subdir := libio | |
23 | ||
35c53530 | 24 | headers := stdio.h libio.h _G_config.h bits/stdio.h bits/stdio-lock.h |
96aa2d94 RM |
25 | |
26 | routines := \ | |
27 | filedoalloc iofclose iofdopen iofflush iofgetpos iofgets iofopen \ | |
d64b6ad0 | 28 | iofopncook iofputs iofread iofsetpos ioftell wfiledoalloc \ |
f65fd747 | 29 | iofwrite iogetdelim iogetline iogets iopadn iopopen ioputs \ |
77fe0b9c | 30 | ioseekoff ioseekpos iosetbuffer iosetvbuf ioungetc \ |
96aa2d94 | 31 | iovsprintf iovsscanf \ |
dfd2257a | 32 | iofgetpos64 iofopen64 iofsetpos64 \ |
d64b6ad0 UD |
33 | fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \ |
34 | iofputws iofputws_u iogetwline iowpadn ioungetwc putwc putwc_u \ | |
3944f99e AS |
35 | putwchar putwchar_u putchar putchar_u fwprintf swprintf vwprintf \ |
36 | wprintf wscanf fwscanf vwscanf vswprintf iovswscanf swscanf wgenops \ | |
d052b31b | 37 | wstrops wfileops iofwide fwide \ |
96aa2d94 | 38 | \ |
209caedf | 39 | clearerr feof ferror fileno fputc freopen fseek getc getchar \ |
77a58cad | 40 | memstream pclose putc putchar rewind setbuf setlinebuf vasprintf \ |
a5a0310d | 41 | iovdprintf vscanf vsnprintf obprintf fcloseall fseeko ftello \ |
77ccaba1 | 42 | freopen64 fseeko64 ftello64 \ |
96aa2d94 | 43 | \ |
a91d3cd3 UD |
44 | __fbufsize __freading __fwriting __freadable __fwritable __flbf \ |
45 | __fpurge __fpending __fsetlocking \ | |
46 | \ | |
46e4bd3b | 47 | libc_fatal fmemopen |
96aa2d94 | 48 | |
9c38a689 | 49 | tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \ |
5e473a71 | 50 | tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-fopenloc \ |
c7509e31 | 51 | tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf |
897d4284 | 52 | test-srcs = test-freopen |
d64b6ad0 | 53 | |
c4029823 UD |
54 | all: # Make this the default target; it will be defined in Rules. |
55 | ||
edf5b2d7 UD |
56 | include ../Makeconfig |
57 | ||
1ea89a40 | 58 | ifeq ($(versioning),yes) |
7d6a8338 | 59 | routines += oldiofopen oldiofdopen oldiofclose oldiopopen oldpclose \ |
655c0697 UD |
60 | oldtmpfile oldiofgetpos oldiofgetpos64 oldiofsetpos \ |
61 | oldiofsetpos64 | |
1ea89a40 UD |
62 | endif |
63 | ||
edf5b2d7 UD |
64 | ifneq (,$(filter %REENTRANT, $(defines))) |
65 | routines += clearerr_u feof_u ferror_u fputc_u getc_u getchar_u \ | |
50304ef0 UD |
66 | iofflush_u putc_u putchar_u peekc iofread_u iofwrite_u iofgets_u \ |
67 | iofputs_u | |
edf5b2d7 UD |
68 | |
69 | CPPFLAGS += -D_IO_MTSAFE_IO | |
70 | endif | |
71 | ||
21cea68e UD |
72 | # Support for exception handling. |
73 | CFLAGS-genops.c = $(exceptions) | |
74 | CFLAGS-wgenops.c = $(exceptions) | |
75 | CFLAGS-fileops.c = $(exceptions) | |
76 | CFLAGS-wfileops.c = $(exceptions) | |
77 | # XXX Do we need filedoalloc and wfiledoalloc? Others? | |
78 | ||
e8595e84 UD |
79 | CFLAGS-tst_putwc.c = -DOBJPFX=\"$(objpfx)\" |
80 | ||
9c38a689 UD |
81 | tst_wprintf2-ARGS = "Some Text" |
82 | ||
a3b231b7 | 83 | tst-widetext-ENV = LOCPATH=$(common-objpfx)localedata LANGUAGE=C |
277f8cdf UD |
84 | tst-fopenloc-ENV = LOCPATH=$(common-objpfx)localedata \ |
85 | MALLOC_TRACE=$(objpfx)tst-fopenloc.mtrace | |
8f739934 UD |
86 | tst-fgetws-ENV = LOCPATH=$(common-objpfx)localedata |
87 | tst-ungetwc1-ENV = LOCPATH=$(common-objpfx)localedata | |
40a982a9 | 88 | tst-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata |
cc7f258f | 89 | tst-swscanf-ENV = LOCPATH=$(common-objpfx)localedata |
277f8cdf UD |
90 | |
91 | generated = tst-fopenloc.mtrace tst-fopenloc.check | |
a3b231b7 | 92 | |
414fd335 | 93 | aux := fileops genops stdfiles stdio strops |
96aa2d94 | 94 | |
1ea89a40 UD |
95 | ifeq ($(versioning),yes) |
96 | aux += oldfileops oldstdfiles | |
97 | endif | |
98 | ||
bd355af0 | 99 | shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops \ |
655c0697 UD |
100 | oldstdfiles oldiopopen oldpclose oldtmpfile \ |
101 | oldiofgetpos oldiofgetpos64 oldiofsetpos \ | |
102 | oldiofsetpos64 | |
f2ea0f5b | 103 | |
1dc843f7 UD |
104 | distribute := iolibio.h libioP.h strfile.h Banner test-freopen.sh \ |
105 | fd_to_filename.h | |
96aa2d94 RM |
106 | |
107 | include ../Rules | |
897d4284 | 108 | |
b647f210 | 109 | ifeq (no,$(cross-compiling)) |
277f8cdf | 110 | tests: $(objpfx)test-freopen.out $(objpfx)tst-fopenloc.check |
b647f210 | 111 | endif |
897d4284 UD |
112 | |
113 | $(objpfx)test-freopen.out: test-freopen.sh $(objpfx)test-freopen | |
2632a4cc | 114 | $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' \ |
5a7eedfb | 115 | $(common-objpfx)libio/ |
277f8cdf UD |
116 | |
117 | $(objpfx)tst-fopenloc.check: $(objpfx)tst-fopenloc.out | |
118 | cmp ../iconvdata/testdata/ISO-8859-1..UTF8 $(objpfx)tst-fopenloc.out \ | |
119 | > $@ | |
120 | $(common-objpfx)malloc/mtrace $(objpfx)tst-fopenloc.mtrace >> $@ |