diff options
author | H.J. Lu <hjl@gnu.org> | 1998-02-24 19:55:15 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-02-24 12:55:15 -0700 |
commit | 3ceda776d8ecd50a7900b1a8cf128871d7fee409 (patch) | |
tree | eae289eeedd5e1aaa6a24c8efa20ecb1ca04ecad /libio | |
parent | d356de352f868921e740dbbe380eeb9180873866 (diff) |
configure.in (topsrcdir): New.
* configure.in (topsrcdir): New.
(CHECK_SUBDIRS, configdirs): Check ${topsrcdir}/gcc instead.
(config-ml.in): Use ${topsrcdir}/config-ml.in.
* tests/configure.in (topsrcdir): New.
(CHECK): Check ${topsrcdir}/gcc instead.
* configure.in (CHECK_SUBDIRS): Set to testsuite only if
${srcdir}/../gcc exists.
(configdirs): Include testsuite only if ${srcdir}/../gcc exists.
* tests/Makefile.in (check): Depend on $(CHECK).
* tests/configure.in (CHECK): Set to "check-iostream
check-stdio" if ${srcdir}/../../gcc doesn't exists.
From-SVN: r18220
Diffstat (limited to 'libio')
-rw-r--r-- | libio/ChangeLog | 18 | ||||
-rw-r--r-- | libio/configure.in | 26 | ||||
-rw-r--r-- | libio/tests/Makefile.in | 199 | ||||
-rw-r--r-- | libio/tests/configure.in | 33 |
4 files changed, 49 insertions, 227 deletions
diff --git a/libio/ChangeLog b/libio/ChangeLog index ac8c2229048..17385a03e4e 100644 --- a/libio/ChangeLog +++ b/libio/ChangeLog @@ -1,3 +1,21 @@ +Tue Feb 24 20:57:39 1998 H.J. Lu (hjl@gnu.org) + + * configure.in (topsrcdir): New. + (CHECK_SUBDIRS, configdirs): Check ${topsrcdir}/gcc instead. + (config-ml.in): Use ${topsrcdir}/config-ml.in. + + * tests/configure.in (topsrcdir): New. + (CHECK): Check ${topsrcdir}/gcc instead. + + * configure.in (CHECK_SUBDIRS): Set to testsuite only if + ${srcdir}/../gcc exists. + (configdirs): Include testsuite only if ${srcdir}/../gcc exists. + + * tests/Makefile.in (check): Depend on $(CHECK). + + * tests/configure.in (CHECK): Set to "check-iostream + check-stdio" if ${srcdir}/../../gcc doesn't exists. + 1998-02-17 Andreas Schwab (schwab@issan.informatik.uni-dortmund.de) * iostream.cc (istream::operator>>(long double&)) diff --git a/libio/configure.in b/libio/configure.in index 63a152a90f1..9efcb3e096a 100644 --- a/libio/configure.in +++ b/libio/configure.in @@ -2,7 +2,21 @@ # necessary for a configure script to process the program in # this directory. For more information, look at ../configure. -configdirs="tests dbz stdio testsuite" +if [ "${srcdir}" = "." ] ; then + if [ "${with_target_subdir}" != "." ] ; then + topsrcdir=${with_multisrctop}../.. + else + topsrcdir=${with_multisrctop}.. + fi +else + topsrcdir=${srcdir}/.. +fi + +if [ -d ${topsrcdir}/gcc ] ; then + configdirs="tests dbz stdio testsuite" +else + configdirs="tests dbz stdio" +fi srctrigger=libioP.h srcname="input/output library" package_makefile_frag=Make.pack @@ -116,12 +130,4 @@ if [ -n "${with_cross_host}" ] ; then mv -f Makefile.tem Makefile fi -if [ "${srcdir}" = "." ] ; then - if [ "${with_target_subdir}" != "." ] ; then - . ${with_multisrctop}../../config-ml.in - else - . ${with_multisrctop}../config-ml.in - fi -else - . ${srcdir}/../config-ml.in -fi +. ${topsrcdir}/config-ml.in diff --git a/libio/tests/Makefile.in b/libio/tests/Makefile.in index 66e88dc64d6..b99a1a6350f 100644 --- a/libio/tests/Makefile.in +++ b/libio/tests/Makefile.in @@ -1,197 +1,2 @@ -# Copyright (C) 1993 Free Software Foundation -# -# This file is part of the GNU IO Library. This library is free -# software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU CC; see the file COPYING. If not, write to -# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - -srcdir = . - -CFLAGS = -g -C_FLAGS = $(CFLAGS) -I. -I.. -I$(srcdir) -I$(srcdir)/.. -CXXFLAGS = -g -CC = gcc -CXX = gcc - -#### package, host, target, and site dependent Makefile fragments come in here. -## - -STDIO_LD_FLAGS = -u __cleanup - -#LIBS = ../../libg++.a - -#LIBSTDIO = ../stdio/libstdio++.a -#LIBIO = ../libio.a - -#STDIOLIBS = $(STDIO_LD_FLAGS) $(LIBSTDIO) $(LIBIO) $(LIBS) -STDIOLIBS = $(LIBSTDIO) $(LIBIO) $(LIBS) -IOLIBS = -L../../libstdc++ -lstdc++ -IOSTDIOLIB = ../libio.a ../../libiberty/libiberty.a - -DEPEND_SOURCES = $(srcdir)/*.C - -.PHONY: check check-old check-iostream check-stdio -check: - -check-old: check-iostream check-iostdio - - -# These are tests written in C++, that test the iostream facility. -check-iostream: check-tFile check-tiomisc \ - check-hounddog check-putbackdog check-tiomanip - -# These are tests written in C, that don't need C++. -# They test libio's emulation of stdio. -check-iostdio: check-tiformat check-tfformat check-tstdiomisc - -# check-stdio runs test programs that use stdio. -# These aren't run by default because there may be linker tricks needed -# to build them (if libc.a contains a competing stdio implementation). - -check-stdio: check-tfseek check-twrseek check-trdseek check-tpopen - -# See ${MOSTLYCLEAN} in configure.in -JUNK_TO_CLEAN = tFile tiomisc hounddog putbackdog tiomanip \ - t?format *.out streamfile ftmp* tstdiomisc foo.dat - -.PHONY: info -info: -.PHONY: clean-info -clean-info: -.PHONY: install-info -install-info: - -tst: tst.o - gcc -v -o tst tst.o $(STDIOLIBS) - -tgetl: tgetl.o - $(CXX) $(CXXFLAGS) -o tgetl tgetl.o $(IOLIBS) - -tFile: tFile.o - $(CXX) $(CXXFLAGS) -o tFile tFile.o $(IOLIBS) - -tiomisc: tiomisc.o - $(CXX) $(CXXFLAGS) -o tiomisc tiomisc.o $(IOLIBS) - -hounddog: hounddog.o - $(CXX) $(CXXFLAGS) -o hounddog hounddog.o $(IOLIBS) - -check-hounddog: hounddog - ./hounddog <$(srcdir)/hounddog.inp > hounddog.out 2>&1 - diff -c hounddog.out $(srcdir)/hounddog.exp - ./hounddog -b0 <$(srcdir)/hounddog.inp > hound-b0.out 2>&1 - diff -c hound-b0.out $(srcdir)/hounddog.exp - ./hounddog -b2 <$(srcdir)/hounddog.inp > hound-b2.out 2>&1 - diff -c hound-b2.out $(srcdir)/hounddog.exp - -putbackdog: putbackdog.o - $(CXX) $(CXXFLAGS) -o putbackdog putbackdog.o $(IOLIBS) - -check-putbackdog-regular: putbackdog - ./putbackdog <$(srcdir)/hounddog.inp > putback.out 2>&1 - diff -c putback.out $(srcdir)/hounddog.exp -check-putbackdog-nobuf: putbackdog - ./putbackdog -b0 <$(srcdir)/hounddog.inp > putback-b0.out 2>&1 - diff -c putback-b0.out $(srcdir)/hounddog.exp -check-putbackdog-buf2: putbackdog - ./putbackdog -b2 <$(srcdir)/hounddog.inp > putback-b2.out 2>&1 - diff -c putback-b2.out $(srcdir)/hounddog.exp -check-putbackdog: \ - check-putbackdog-regular check-putbackdog-nobuf check-putbackdog-buf2 - -tfseek: tfseek.o - $(CC) $(CFLAGS) -o tfseek tfseek.o $(STDIOLIBS) - -check-tfseek: tfseek - ./tfseek SEEK_SET fopen > tfseek-set-fopen.out 2>&1 - diff -c tfseek-set-fopen.out $(srcdir)/tfseek-set.exp - ./tfseek SEEK_SET freopen > tfseek-set-freopen.out 2>&1 - diff -c tfseek-set-freopen.out $(srcdir)/tfseek-set.exp - ./tfseek SEEK_CUR fopen > tfseek-cur-fopen.out 2>&1 - diff -c tfseek-cur-fopen.out $(srcdir)/tfseek-cur.exp - ./tfseek SEEK_CUR freopen > tfseek-cur-freopen.out 2>&1 - diff -c tfseek-cur-freopen.out $(srcdir)/tfseek-cur.exp - -twrseek: twrseek.o - $(CC) $(CFLAGS) -o twrseek twrseek.o $(STDIOLIBS) - -check-twrseek: twrseek - ./twrseek > twrseek.out 2>&1 - diff -c twrseek.out $(srcdir)/twrseek.exp - -trdseek: trdseek.o - $(CC) $(CFLAGS) -o trdseek -v trdseek.o $(STDIOLIBS) - -check-trdseek: trdseek - ./trdseek - -check-tFile-regular: tFile - ./tFile < $(srcdir)/tFile.inp > tFile.out 2>&1 - diff -c tFile.out $(srcdir)/tFile.exp -# Run tFile with cout.rdbuf() unbuffered. -check-tFile-nobuf: tFile - ./tFile -b0 < $(srcdir)/tFile.inp > tFile-buf0.out 2>&1 - diff -c tFile-buf0.out $(srcdir)/tFile.exp -# Run tFile with a 3-byte buffer for cout.rdbuf(). -check-tFile-buf3: tFile - ./tFile -b3 < $(srcdir)/tFile.inp > tFile-buf3.out 2>&1 - diff -c tFile-buf3.out $(srcdir)/tFile.exp -check-tFile: check-tFile-regular check-tFile-nobuf check-tFile-buf3 - -check-tiomisc: tiomisc - ./tiomisc >tiomisc.out 2>&1 - diff -c tiomisc.out $(srcdir)/tiomisc.exp - -tiomanip: tiomanip.o - $(CXX) $(CXXFLAGS) -o tiomanip tiomanip.o $(IOLIBS) -check-tiomanip: tiomanip - ./tiomanip >tiomanip.out 2>&1 - diff -c tiomanip.out $(srcdir)/tiomanip.exp - -tfformat: $(srcdir)/tfformat.c - $(CC) $(C_FLAGS) -DTEST_LIBIO -DTEST_EXACTNESS \ - -o tfformat $(srcdir)/tfformat.c $(IOSTDIOLIB) - -check-tfformat: tfformat - ./tfformat - -tiformat: $(srcdir)/tiformat.c - $(CC) $(C_FLAGS) -DTEST_LIBIO -o tiformat $(srcdir)/tiformat.c $(IOSTDIOLIB) - -check-tiformat: tiformat - ./tiformat - -tstdiomisc: tstdiomisc.o - $(CC) $(CFLAGS) -o tstdiomisc tstdiomisc.o $(IOSTDIOLIB) - -check-tstdiomisc: tstdiomisc - ./tstdiomisc >tstdiomisc.out 2>&1 - diff -c tstdiomisc.out $(srcdir)/tstdiomisc.exp - -tpopen: tpopen.o - $(CC) $(CFLAGS) -o tpopen tpopen.o $(STDIOLIBS) - -check-tpopen: tpopen - ./tpopen > tpopen.out 2>&1 - diff -c tpopen.out $(srcdir)/tpopen.exp - -trwseek: trwseek.o - $(CC) $(CFLAGS) -o trwseek trwseek.o $(STDIOLIBS) - -check-trwseek: trwseek - ./trwsseek TMP r+ k w o - -foo: foo.o - $(CXX) $(CXXFLAGS) -o foo foo.o $(STDIOLIBS) -foo+: foo+.o - $(CXX) $(CXXFLAGS) -o foo+ foo+.o $(IOLIBS) +# Copyright (C) 1993, 1998 Free Software Foundation +check: $(CHECK) diff --git a/libio/tests/configure.in b/libio/tests/configure.in index f832adfb236..89ccf11be44 100644 --- a/libio/tests/configure.in +++ b/libio/tests/configure.in @@ -1,21 +1,14 @@ -# This file is a shell script fragment that supplies the information -# necessary for a configure script to process the program in -# this directory. For more information, look at ../../configure. +if [ "${srcdir}" = "." ] ; then + if [ "${with_target_subdir}" != "." ] ; then + topsrcdir=${with_multisrctop}../../.. + else + topsrcdir=${with_multisrctop}../.. + fi +else + topsrcdir=${srcdir}/../.. +fi + +if [ ! -d ${topsrcdir}/gcc ] ; then + echo "CHECK = check-iostream check-iostdio" >>${package_makefile_frag} +fi -configdirs= -srctrigger=tFile.cc -srcname="test C++ input/output library" -package_makefile_frag=Make.pack - -# per-host: - -# per-target: - -TO_TOPDIR=../../ -ALL=' ' -XCINCLUDES='-I. -I.. -I$(srcdir) -I$(srcdir)/..' -XCXXINCLUDES='-I. -I.. -I$(srcdir) -I$(srcdir)/..' -MOSTLYCLEAN='*.o core $(JUNK_TO_CLEAN)' -(. ${srcdir}/../config.shared) >${package_makefile_frag} - -# post-target: |