source: branches/libc-0.6/src/libctests/glibc/libio/Makefile

Last change on this file was 2036, checked in by bird, 20 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 6.6 KB
Line 
1# Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc.
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
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.
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
12# Lesser General Public License for more details.
13
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.
18
19#
20# Specific makefile for libio.
21#
22subdir := libio
23
24headers := stdio.h libio.h _G_config.h bits/stdio.h bits/stdio-lock.h \
25 bits/sys_errlist.h bits/stdio2.h
26
27routines := \
28 filedoalloc iofclose iofdopen iofflush iofgetpos iofgets iofopen \
29 iofopncook iofputs iofread iofsetpos ioftell wfiledoalloc \
30 iofwrite iogetdelim iogetline iogets iopadn iopopen ioputs \
31 ioseekoff ioseekpos iosetbuffer iosetvbuf ioungetc \
32 iovsprintf iovsscanf \
33 iofgetpos64 iofopen64 iofsetpos64 \
34 fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \
35 iofputws iofputws_u iogetwline iowpadn ioungetwc putwc putwc_u \
36 putwchar putwchar_u putchar putchar_u fwprintf swprintf vwprintf \
37 wprintf wscanf fwscanf vwscanf vswprintf iovswscanf swscanf wgenops \
38 wstrops wfileops iofwide fwide \
39 \
40 clearerr feof ferror fileno fputc freopen fseek getc getchar \
41 memstream pclose putc putchar rewind setbuf setlinebuf vasprintf \
42 iovdprintf vscanf vsnprintf obprintf fcloseall fseeko ftello \
43 freopen64 fseeko64 ftello64 \
44 \
45 __fbufsize __freading __fwriting __freadable __fwritable __flbf \
46 __fpurge __fpending __fsetlocking \
47 \
48 libc_fatal fmemopen
49
50tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \
51 tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-fopenloc \
52 tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf \
53 tst-mmap-setvbuf bug-ungetwc1 bug-ungetwc2 tst-atime tst-eof \
54 tst-freopen bug-rewind bug-rewind2 bug-ungetc bug-fseek \
55 tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \
56 tst-mmap2-eofsync tst-mmap-offend bug-fopena+ bug-wfflush \
57 bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4
58test-srcs = test-freopen
59
60all: # Make this the default target; it will be defined in Rules.
61
62include ../Makeconfig
63
64ifeq ($(versioning),yes)
65routines += oldiofopen oldiofdopen oldiofclose oldiopopen oldpclose \
66 oldtmpfile oldiofgetpos oldiofgetpos64 oldiofsetpos \
67 oldiofsetpos64
68endif
69
70ifneq (,$(filter %REENTRANT, $(defines)))
71routines += clearerr_u feof_u ferror_u fputc_u getc_u getchar_u \
72 iofflush_u putc_u putchar_u peekc iofread_u iofwrite_u iofgets_u \
73 iofputs_u
74
75CPPFLAGS += -D_IO_MTSAFE_IO
76endif
77
78# Support for exception handling.
79CFLAGS-fileops.c = $(exceptions)
80CFLAGS-fputc.c = $(exceptions)
81CFLAGS-fputwc.c = $(exceptions)
82CFLAGS-freopen64.c = $(exceptions)
83CFLAGS-freopen.c = $(exceptions)
84CFLAGS-fseek.c = $(exceptions)
85CFLAGS-fseeko64.c = $(exceptions)
86CFLAGS-fseeko.c = $(exceptions)
87CFLAGS-ftello64.c = $(exceptions)
88CFLAGS-ftello.c = $(exceptions)
89CFLAGS-fwide.c = $(exceptions)
90CFLAGS-genops.c = $(exceptions)
91CFLAGS-getc.c = $(exceptions)
92CFLAGS-getchar.c = $(exceptions)
93CFLAGS-getwc.c = $(exceptions)
94CFLAGS-getwchar.c = $(exceptions)
95CFLAGS-iofclose.c = $(exceptions)
96CFLAGS-iofflush.c = $(exceptions)
97CFLAGS-iofgetpos64.c = $(exceptions)
98CFLAGS-iofgetpos.c = $(exceptions)
99CFLAGS-iofgets.c = $(exceptions)
100CFLAGS-iofgetws.c = $(exceptions)
101CFLAGS-iofputs.c = $(exceptions)
102CFLAGS-iofputws.c = $(exceptions)
103CFLAGS-iofread.c = $(exceptions)
104CFLAGS-iofsetpos64.c = $(exceptions)
105CFLAGS-iofsetpos.c = $(exceptions)
106CFLAGS-ioftell.c = $(exceptions)
107CFLAGS-iofwrite.c = $(exceptions)
108CFLAGS-iogetdelim.c = $(exceptions)
109CFLAGS-iogetline.c = $(exceptions)
110CFLAGS-iogets.c = $(exceptions)
111CFLAGS-iogetwline.c = $(exceptions)
112CFLAGS-ioputs.c = $(exceptions)
113CFLAGS-ioseekoff.c = $(exceptions)
114CFLAGS-ioseekpos.c = $(exceptions)
115CFLAGS-iosetbuffer.c = $(exceptions)
116CFLAGS-iosetvbuf.c = $(exceptions)
117CFLAGS-ioungetc.c = $(exceptions)
118CFLAGS-ioungetwc.c = $(exceptions)
119CFLAGS-oldfileops.c = $(exceptions)
120CFLAGS-oldiofclose.c = $(exceptions)
121CFLAGS-oldiofgetpos64.c = $(exceptions)
122CFLAGS-oldiofgetpos.c = $(exceptions)
123CFLAGS-oldiofsetpos64.c = $(exceptions)
124CFLAGS-oldiofsetpos.c = $(exceptions)
125CFLAGS-peekc.c = $(exceptions)
126CFLAGS-putc.c = $(exceptions)
127CFLAGS-putchar.c = $(exceptions)
128CFLAGS-putwc.c = $(exceptions)
129CFLAGS-putwchar.c = $(exceptions)
130CFLAGS-rewind.c = $(exceptions)
131CFLAGS-wfileops.c = $(exceptions)
132CFLAGS-wgenops.c = $(exceptions)
133CFLAGS-oldiofopen.c = $(exceptions)
134CFLAGS-iofopen.c = $(exceptions)
135CFLAGS-iofopen64.c = $(exceptions)
136CFLAGS-oldtmpfile.c = $(exceptions)
137# XXX Do we need filedoalloc and wfiledoalloc? Others?
138
139CFLAGS-tst_putwc.c = -DOBJPFX=\"$(objpfx)\"
140
141tst_wprintf2-ARGS = "Some Text"
142
143tst-widetext-ENV = LOCPATH=$(common-objpfx)localedata LANGUAGE=C
144tst-fopenloc-ENV = LOCPATH=$(common-objpfx)localedata \
145 MALLOC_TRACE=$(objpfx)tst-fopenloc.mtrace
146tst-fgetws-ENV = LOCPATH=$(common-objpfx)localedata
147tst-ungetwc1-ENV = LOCPATH=$(common-objpfx)localedata
148tst-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata
149bug-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata
150tst-swscanf-ENV = LOCPATH=$(common-objpfx)localedata
151bug-ftell-ENV = LOCPATH=$(common-objpfx)localedata
152
153generated = tst-fopenloc.mtrace tst-fopenloc.check
154
155aux := fileops genops stdfiles stdio strops
156
157ifeq ($(versioning),yes)
158aux += oldfileops oldstdfiles
159endif
160
161shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops \
162 oldstdfiles oldiopopen oldpclose oldtmpfile \
163 oldiofgetpos oldiofgetpos64 oldiofsetpos \
164 oldiofsetpos64
165
166distribute := iolibio.h libioP.h strfile.h Banner test-freopen.sh \
167 fd_to_filename.h
168
169include ../Rules
170
171ifeq (no,$(cross-compiling))
172tests: $(objpfx)test-freopen.out $(objpfx)tst-fopenloc.check
173endif
174
175$(objpfx)test-freopen.out: test-freopen.sh $(objpfx)test-freopen
176 $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' \
177 $(common-objpfx)libio/
178
179$(objpfx)tst-fopenloc.check: $(objpfx)tst-fopenloc.out
180 cmp ../iconvdata/testdata/ISO-8859-1..UTF8 $(objpfx)tst-fopenloc.out \
181 > $@
182 $(common-objpfx)malloc/mtrace $(objpfx)tst-fopenloc.mtrace >> $@
Note: See TracBrowser for help on using the repository browser.