From d1796b46df0f70ddb14b62013d88d2292995c7f1 Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Sun, 18 Feb 2001 05:12:06 +0000 Subject: [PATCH] * Most all files: Update copyright notices. * Makefile.am: Add support for making RPMs. Force different values for RUNTEST and RUNTESTFLAGS, so we can test ourselves. * testsuite/Makefile.am: Force a different value for RUNTESTFLAGS. * acinclude.m4, configure.in: Find Tclsh, and Docbook. * configure: Regenerated. * doc/Makefile.am: Use $DOCBOOK to find the filters. * doc/overview: Add the html version of the doc so one doesn't need docbook to read the manual. * example/calc/Makefile.am: New automake support. * example/calc/Makefile.in: Generated. * example/Makefile.am: Recursion support for make. * example/calc/Makefile.in: Generated by automake. * example/calc/calc.h.in: Move constants to calc.c, so we can use autoheader. * example/calc/calc.c: Add constants from calc.h.in. * redhat/dejagnu.spec: New RPM packaging file. * debian/{changelog,conffiles,control,copyright,postinst,preinst, rules,site.exp}: New Debian packaging support. --- .clean | 39 + ChangeLog | 37 +- Clean.tcl | 193 + Makefile.am | 55 +- Makefile.in | 171 +- README | 6 +- TODO | 4 + acinclude.m4 | 87 + aclocal.m4 | 88 + baseboards/arc-sim.exp | 2 +- baseboards/arm-sim.exp | 3 - baseboards/fr30-sim.exp | 2 +- baseboards/m32r-sim.exp | 2 +- baseboards/mcore-sim.exp | 2 +- baseboards/mn10200-sim.exp | 2 +- baseboards/mn10300-sim.exp | 2 +- baseboards/tx39-sim.exp | 9 +- config.sub | 1337 ++++ config/arc.exp | 4 +- config/arm-ice.exp | 4 +- config/base-config.exp | 4 +- config/base68k.exp | 8 +- config/bug.exp | 4 +- config/cfdbug.exp | 4 +- config/cygmon.exp | 4 +- config/d10v.exp | 4 +- config/ddb-ether.exp | 4 +- config/ddb.exp | 4 +- config/dos.exp | 4 +- config/dve.exp | 4 +- config/gdb-comm.exp | 4 +- config/gdb_stub.exp | 6 +- config/h8300.exp | 4 +- config/i386-bozo.exp | 4 +- config/i960.exp | 4 +- config/m32r-stub.exp | 4 +- config/m32r.exp | 4 +- config/mips-idt.exp | 4 +- config/mn10200-eval.exp | 4 +- config/mn10300-eval.exp | 4 +- config/netware.exp | 4 +- config/powerpc-bug.exp | 4 +- config/proelf.exp | 4 +- config/rom68k.exp | 4 +- config/sh.exp | 4 +- config/sim.exp | 4 +- config/slite.exp | 4 +- config/sparclet.exp | 4 +- config/udi.exp | 6 +- config/unix.exp | 6 +- config/vr4100.exp | 4 +- config/vr4300.exp | 4 +- config/vr5000.exp | 4 +- config/vrtx.exp | 6 +- config/vxworks.exp | 6 +- configure | 410 +- configure.in | 16 +- doc/Makefile.am | 23 +- doc/Makefile.in | 186 +- doc/dejagnu.texi | 6 +- doc/overview.sgml | 78 +- doc/overview/addboard.html | 261 + doc/overview/adding.html | 244 + doc/overview/addtarget.html | 206 + doc/overview/addtool.html | 577 ++ doc/overview/boardconfig.html | 254 + doc/overview/boarddefs.html | 887 +++ doc/overview/book1.html | 403 ++ doc/overview/builtins.html | 10723 ++++++++++++++++++++++++++++ doc/overview/configfile.html | 513 ++ doc/overview/customizing.html | 470 ++ doc/overview/debugging.html | 248 + doc/overview/designgoals.html | 219 + doc/overview/docbook.css | 20 + doc/overview/extending.html | 206 + doc/overview/filemap.html | 222 + doc/overview/global.html | 245 + doc/overview/hints.html | 258 + doc/overview/new.html | 228 + doc/overview/outputfiles.html | 596 ++ doc/overview/overview.html | 279 + doc/overview/posix.html | 365 + doc/overview/preface.html | 157 + doc/overview/reference.html | 373 + doc/overview/releng.html | 354 + doc/overview/runningtests.html | 257 + doc/overview/runtest.html | 1142 +++ doc/overview/tvariables.html | 208 + doc/overview/writing.html | 202 + doc/ref.sgml | 22 +- doc/runtest.1 | 3 +- doc/user.sgml | 27 +- example/Makefile.am | 5 +- example/Makefile.in | 189 +- example/calc/AUTHORS | 0 example/calc/COPYING | 340 + example/calc/INSTALL | 182 + example/calc/Makefile.am | 23 + example/calc/Makefile.in | 503 +- example/calc/NEWS | 0 example/calc/README | 0 example/calc/aclocal.m4 | 127 + example/calc/calc.c | 7 +- example/calc/calc.h.in | 19 +- example/calc/configure | 646 +- example/calc/configure.in | 10 +- example/calc/stamp-h.in | 1 + example/calc/testsuite/calc.test/calc.exp | 4 +- example/calc/testsuite/config/unix.exp | 4 +- lib/debugger.exp | 6 +- lib/dg.exp | 10 +- lib/framework.exp | 7 +- lib/ftp.exp | 4 +- lib/kermit.exp | 4 +- lib/mondfe.exp | 6 +- lib/remote.exp | 10 +- lib/rlogin.exp | 4 +- lib/rsh.exp | 4 +- lib/standard.exp | 4 +- lib/target.exp | 6 +- lib/targetdb.exp | 4 +- lib/telnet.exp | 4 +- lib/tip.exp | 4 +- lib/util-defs.exp | 6 +- lib/utils.exp | 8 +- lib/xsh.exp | 6 +- runtest | 4 +- runtest.exp | 10 +- testsuite/Makefile.am | 8 +- testsuite/Makefile.in | 53 +- testsuite/config/default.exp | 6 +- testsuite/lib/libsup.exp | 6 +- testsuite/runtest.all/libs.exp | 4 +- testsuite/runtest.all/options.exp | 6 +- testsuite/runtest.all/stats-sub.exp | 4 +- testsuite/runtest.all/stats.exp | 4 +- 136 files changed, 24562 insertions(+), 791 deletions(-) create mode 100644 .clean create mode 100755 Clean.tcl create mode 100644 acinclude.m4 create mode 100755 config.sub create mode 100644 doc/overview/addboard.html create mode 100644 doc/overview/adding.html create mode 100644 doc/overview/addtarget.html create mode 100644 doc/overview/addtool.html create mode 100644 doc/overview/boardconfig.html create mode 100644 doc/overview/boarddefs.html create mode 100644 doc/overview/book1.html create mode 100644 doc/overview/builtins.html create mode 100644 doc/overview/configfile.html create mode 100644 doc/overview/customizing.html create mode 100644 doc/overview/debugging.html create mode 100644 doc/overview/designgoals.html create mode 100755 doc/overview/docbook.css create mode 100644 doc/overview/extending.html create mode 100644 doc/overview/filemap.html create mode 100644 doc/overview/global.html create mode 100644 doc/overview/hints.html create mode 100644 doc/overview/new.html create mode 100644 doc/overview/outputfiles.html create mode 100644 doc/overview/overview.html create mode 100644 doc/overview/posix.html create mode 100644 doc/overview/preface.html create mode 100644 doc/overview/reference.html create mode 100644 doc/overview/releng.html create mode 100644 doc/overview/runningtests.html create mode 100644 doc/overview/runtest.html create mode 100644 doc/overview/tvariables.html create mode 100644 doc/overview/writing.html create mode 100644 example/calc/AUTHORS create mode 100644 example/calc/COPYING create mode 100644 example/calc/INSTALL create mode 100644 example/calc/Makefile.am create mode 100644 example/calc/NEWS create mode 100644 example/calc/README create mode 100644 example/calc/aclocal.m4 create mode 100644 example/calc/stamp-h.in diff --git a/.clean b/.clean new file mode 100644 index 0000000..54da622 --- /dev/null +++ b/.clean @@ -0,0 +1,39 @@ +# this is a list of files to keep +.clean +ChangeLog +AUTHORS +COPYING +ChangeLog +Clean.tcl +INSTALL +Makefile.am +Makefile.in +NEWS +README +TODO +acinclude.m4 +aclocal.m4 +baseboards +config +config.guess +config.sub +configure +configure.in +contrib +debian +doc +example +i960glue.c +install-sh +lib +missing +mkinstalldirs +redhat +runtest +runtest.exp +site.tmpl +stub-loader.c +tcl-mode.el +testglue.c +testsuite + diff --git a/ChangeLog b/ChangeLog index bcd99ce..9924d21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,31 @@ -2001-01-24 Fernando Nasser +2001-02-17 Rob Savoye + + * Most all files: Update copyright notices. + * Makefile.am: Add support for making RPMs. Force different + values for RUNTEST and RUNTESTFLAGS, so we can test ourselves. + * testsuite/Makefile.am: Force a different value for + RUNTESTFLAGS. + * acinclude.m4, configure.in: Find Tclsh, and Docbook. + * configure: Regenerated. + * doc/Makefile.am: Use $DOCBOOK to find the filters. + * doc/overview: Add the html version of the doc so one doesn't + need docbook to read the manual. + +2001-01-31 Rob Savoye + + * Merge in latest snapshot from RedHat. + * example/calc/Makefile.am: New automake support. + * example/calc/Makefile.in: Generated. + * example/Makefile.am: Recursion support for make. + * example/calc/Makefile.in: Generated by automake. + * example/calc/calc.h.in: Move constants to calc.c, so we can use + autoheader. + * example/calc/calc.c: Add constants from calc.h.in. + * redhat/dejagnu.spec: New RPM packaging file. + * debian/{changelog,conffiles,control,copyright,postinst,preinst, + rules,site.exp}: New Debian packaging support. + - From Gabriel Dos Reis - * lib/dg.exp (dg-trim-dirname): New function. - (dg-test): Use it to rip directory-name out of file name. - 2001-01-20 Ben Elliston * runtest.exp (usage): Replace --mail in usage output. @@ -15,6 +37,11 @@ * lib/target.exp (prune_warnings): Avoid ``.*'' in NetBSD warnings pattern. +2001-01-18 Gabriel Dos Reis + + * lib/dg.exp (dg-trim-dirname): New function. + (dg-test): Use it to rip directory-name out of file name. + 2001-01-15 Ben Elliston * lib/framework.exp (record_test): Invoke a user-defined procedure diff --git a/Clean.tcl b/Clean.tcl new file mode 100755 index 0000000..a5366ad --- /dev/null +++ b/Clean.tcl @@ -0,0 +1,193 @@ +#!/usr/local/bin/tclsh + +# Clean.tcl +# This script is used to remove all unwanted files from a +# directory not in the .clean file list. This should only +# be used by maintainers when producing a release. + +# Copyright (C) 2000, 2001 Free Software Foundation, Inc. +# +# This program 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 of the License, or +# (at your option) any later version. +# +# This program 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 this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +# Please email any bugs, comments, and/or additions to this file to: +# bug-dejagnu@gnu.org + +# This file was written by Rob Savoye. (rob@welcomehome.org) + +# default to no verbosity +if ![info exists verbose] { + set verbose 0 +} + +proc usage { } { + puts "USAGE: Clean.tcl \[options...\]" + puts "\t--verbose (-v)\t\tPrint all test output to screen" +} + +# print a message if it's verbosity is greater than the default +proc verbose { args } { + global verbose + set newline 1 + + set i 0 + if { [string index [lindex $args 0] 0] == "-" } { + for { set i 0 } { $i < [llength $args] } { incr i } { + if { [lindex $args $i] == "--" } { + incr i + break + } elseif { [lindex $args $i] == "-n" } { + set newline 0 + } elseif { [string index [lindex $args $i] 0] == "-" } { + puts "ERROR: verbose: illegal argument: [lindex $args $i]" + return + } else { + break + } + } + if { [llength $args] == $i } { + puts "ERROR: verbose: nothing to print" + return + } + } + + set level 1 + if { [llength $args] > $i + 1 } { + set level [lindex $args [expr $i+1]] + } + set message [lindex $args $i] + + if { $verbose >= $level } { + # There is no need for the "--" argument here, but play it safe. + # We assume send_user also sends the text to the log file (which + # appears to be the case though the docs aren't clear on this). + if { $newline } { + puts -nonewline "$message\n" + } else { + puts -nonewline "$message" + } + } +} + +# process the command line arguments +for { set i 0 } { $i < $argc } { incr i } { + set option [lindex $argv $i] + + # make all options have two hyphens + switch -glob -- $option { + "--*" { + } + "-*" { + set option "-$option" + } + } + + + switch -glob -- $option { + "--he*" { # (--help) help text + usage; + exit 0 + } + + "--v" - + "--verb*" { # (--verbose) verbose output + incr verbose + continue + } + } +} +verbose "Verbose level is $verbose" 2 + +proc cleanfiles { directory } { + set filelist "" + + # get a list of all the files in this directory + set allfiles [glob -nocomplain "$directory/*"] + regsub -all "$directory/" $allfiles "" allfiles + + # open the .clean file, which has the list of stuff we + # want to save + catch "set cleanfile [open "$directory/.clean" r]" + if ![info exists cleanfile] { + verbose "WARNING: no .clean file in $directory, removing the default set of \"*! core CVS RCS\"" 3 + set allfiles [glob -nocomplain "$directory/*~"] + append allfiles " [glob -nocomplain "$directory/core"]" + append allfiles " [glob -nocomplain "$directory/CVS"]" + append allfiles " [glob -nocomplain "$directory/RCS"]" + } else { + # read in the .clean file, line by line + while { [gets $cleanfile cur_line]>=0 } { + # ignore comments + if { [string index $cur_line 0] == "\#" } { + verbose "Ignoring comment" 2 + continue + } + # ignore blank lines + if { [string length $cur_line]<=0 } { + verbose "Ignoring blank line" 2 + continue + } + regsub -all "\[\+\]" $cur_line "\\+" cur_line + # remove the filename from the list + regsub -all " $cur_line " $allfiles " " allfiles + # also match the name if it's the last one in the file + regsub -all " $cur_line$" $allfiles " " allfiles + # also match if it's the only name in the list + regsub -all "^$cur_line" $allfiles " " allfiles + } + } + + # remove the leading and trailing blank spaces for cleanliness sake + set allfiles [string trimleft $allfiles] + set allfiles [string trimright $allfiles] + # nuke the files + if { [string length $allfiles] > 0 } { + verbose "Removing \"$allfiles\" from $directory" + catch "exec rm -f $allfiles" + } else { + verbose "Nothing to remove from $directory" 2 + } + + # close the .clean file + catch "close $cleanfile" +} + + +# now that we've removed everything we don't want from this +# directory, recur into the directories that are left to clean +# those as well. + +proc getdirs { directory } { + set dirs "" + set files [glob -nocomplain "$directory/*"] + if { [llength $files] != 0 } { + foreach j $files { + if [file isdirectory $j] { + append dirs " $j" + append dirs " [getdirs $j]" + } + } + } + return $dirs +} + +cleanfiles . +# now we actually do it all +foreach i [getdirs .] { + cleanfiles $i +} + + + + diff --git a/Makefile.am b/Makefile.am index f673015..4b93a73 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,15 +1,63 @@ ## Process this file with automake to generate Makefile.in -AUTOMAKE_OPTIONS = cygnus +AUTOMAKE_OPTIONS = dejagnu +# Install all the associated data files SUBDIRS = doc testsuite example -# driver script goes in /usr/local/bin +# Install the bourne shell script driver in the bindir bin_SCRIPTS = runtest -# auxiliary scripts go in /usr/local/share/dejagnu +# Install the main DejaGnu expect file in the datadir pkgdata_SCRIPTS = config.guess runtest.exp +# Install config.guess too, so we can use it to figure out +# what type of machine we're running on. +libexecdir = $(pkgdatadir)/libexec +libexec_SCRIPTS = config.guess + +TLCSH = @TCLSH@ + +RUNTESTDEFAULTFLAGS = --tool runtest --srcdir $(srcdir)/testsuite RUNTEST=$(RUNTEST) +RUNTEST = ` \ + if [ -f ${srcdir}/runtest$(EXEEXT) ] ; then \ + echo ${srcdir}/runtest$(EXEEXT) ; \ + else echo runtest ; fi` + +# Set ourselves up to build a RedHat package +dist2: rpmspec overview.html + -rm -fr dejagnu-${VERSION}.0 + cp -fpr $(srcdir) dejagnu-${VERSION}.0 + @echo "clean up stuff we don't want in the source file" + (cd dejagnu-${VERSION}.0 ; $(srcdir)/Clean.tcl) + -mkdir -p doc/overview + -cp -fr doc/overview dejagnu-${VERSION}.0/doc/ + tar cvf ../dejagnu-${VERSION}.tar dejagnu-${VERSION}.0 + gzip -9fv ../dejagnu-${VERSION}.tar + cp -f ../dejagnu-${VERSION}.tar.gz /usr/src/redhat/SOURCES/ + cp -f $(srcdir)/redhat/dejagnu.spec /usr/src/redhat/SPECS/ + +rpmspec: + cp -f $(srcdir)/redhat/dejagnu.spec /usr/src/redhat/SPECS/ + +rpm: dist rpmspec + cp -f $(distdir).tar.gz /usr/src/redhat/SOURCES/ + rpm -ba /usr/src/redhat/SPECS/dejagnu.spec + +overview.html install-doc doc html dvi ps pdf rtf: + cd doc && $(MAKE) $(FLAGS_TO_PASS) $@ + +# Automake sucks when it comes to building a distribution, so +# we just copy the source tree onto of what Automake did, and +# then we Clean it. Automake only includes the source files. +# We want all the testsuites, data files, and html versions of the doc. +dist-hook: rpmspec overview.html + -rm -fr $(distdir) + cp -fpr $(srcdir) $(distdir) + (cd $(distdir) ; $(TCLSH) $(srcdir)/Clean.tcl) + -cp -fr doc/overview $(distdir)/doc/ + + # Below, host-independent data files that need to get installed. # We do it this way so we can use globbing. @@ -48,3 +96,4 @@ uninstall-local: for f in $(baseboards_files); do \ test ! -f "$$f" || rm -f $(baseboards_dest)/`basename "$$f"`; \ done + diff --git a/Makefile.in b/Makefile.in index 8687693..bb345f8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -21,7 +21,6 @@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ -libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ @@ -60,22 +59,37 @@ POST_UNINSTALL = : BOARDS = @BOARDS@ CC = @CC@ CONFIG = @CONFIG@ +DOCBOOK = @DOCBOOK@ EXEEXT = @EXEEXT@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ +TCLSH = @TCLSH@ VERSION = @VERSION@ +tclsh = @tclsh@ -AUTOMAKE_OPTIONS = cygnus +AUTOMAKE_OPTIONS = dejagnu +# Install all the associated data files SUBDIRS = doc testsuite example -# driver script goes in /usr/local/bin +# Install the bourne shell script driver in the bindir bin_SCRIPTS = runtest -# auxiliary scripts go in /usr/local/share/dejagnu +# Install the main DejaGnu expect file in the datadir pkgdata_SCRIPTS = config.guess runtest.exp +# Install config.guess too, so we can use it to figure out +# what type of machine we're running on. +libexecdir = $(pkgdatadir)/libexec +libexec_SCRIPTS = config.guess + +TLCSH = @TCLSH@ + +RUNTESTDEFAULTFLAGS = --tool runtest --srcdir $(srcdir)/testsuite RUNTEST=$(RUNTEST) +RUNTEST = ` if [ -f ${srcdir}/runtest$(EXEEXT) ] ; then echo ${srcdir}/runtest$(EXEEXT) ; else echo runtest ; fi` + + # Below, host-independent data files that need to get installed. # We do it this way so we can use globbing. @@ -88,29 +102,30 @@ baseboards_files = $(srcdir)/baseboards/README $(srcdir)/baseboards/*.exp config_dest = $(DESTDIR)$(pkgdatadir)/config config_files = $(srcdir)/config/README $(srcdir)/config/*.exp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = -SCRIPTS = $(bin_SCRIPTS) $(pkgdata_SCRIPTS) +SCRIPTS = $(bin_SCRIPTS) $(libexec_SCRIPTS) $(pkgdata_SCRIPTS) DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ -Makefile.in NEWS TODO aclocal.m4 config.guess configure configure.in \ -install-sh mkinstalldirs +Makefile.in NEWS TODO acinclude.m4 aclocal.m4 config.guess config.sub \ +configure configure.in install-sh missing mkinstalldirs DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best +EXPECT = expect all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4 cd $(srcdir) && $(ACLOCAL) config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -137,6 +152,25 @@ uninstall-binSCRIPTS: rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ done +install-libexecSCRIPTS: $(libexec_SCRIPTS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(libexecdir) + @list='$(libexec_SCRIPTS)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`"; \ + $(INSTALL_SCRIPT) $$p $(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`; \ + else if test -f $(srcdir)/$$p; then \ + echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`"; \ + $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`; \ + else :; fi; fi; \ + done + +uninstall-libexecSCRIPTS: + @$(NORMAL_UNINSTALL) + list='$(libexec_SCRIPTS)'; for p in $$list; do \ + rm -f $(DESTDIR)$(libexecdir)/`echo $$p|sed '$(transform)'`; \ + done + install-pkgdataSCRIPTS: $(pkgdata_SCRIPTS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) @@ -166,7 +200,7 @@ uninstall-pkgdataSCRIPTS: @SET_MAKE@ all-recursive install-data-recursive install-exec-recursive \ -installdirs-recursive install-recursive uninstall-recursive install-info-recursive \ +installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive info-recursive dvi-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ @@ -283,10 +317,15 @@ distdir: $(DISTFILES) -rm -rf $(distdir) mkdir $(distdir) -chmod 777 $(distdir) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile @for file in $(DISTFILES); do \ - if test -f $$file; then d=.; else d=$(srcdir); fi; \ + d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ @@ -303,17 +342,43 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook + +RUNTESTFLAGS = + +DEJATOOL = $(PACKAGE) + +check-DEJAGNU: site.exp + srcdir=`cd $(srcdir) && pwd`; export srcdir; \ + EXPECT=$(EXPECT); export EXPECT; \ + runtest=$(RUNTEST); \ + if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ + $$runtest $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ + else echo "WARNING: could not find \`runtest'" 1>&2; :;\ + fi +site.exp: Makefile + @echo 'Making a new site.exp file...' + @test ! -f site.bak || rm -f site.bak + @echo '## these variables are automatically generated by make ##' > $@-t + @echo '# Do not edit here. If you wish to override these values' >> $@-t + @echo '# edit the last section' >> $@-t + @echo 'set tool $(DEJATOOL)' >> $@-t + @echo 'set srcdir $(srcdir)' >> $@-t + @echo 'set objdir' `pwd` >> $@-t + @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t + @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t + @test ! -f site.exp || mv site.exp site.bak + @mv $@-t site.exp info-am: info: info-recursive dvi-am: dvi: dvi-recursive -check-am: +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU check: check-recursive installcheck-am: installcheck: installcheck-recursive -install-info-am: -install-info: install-info-recursive -install-exec-am: install-binSCRIPTS +install-exec-am: install-binSCRIPTS install-libexecSCRIPTS install-exec: install-exec-recursive install-data-am: install-pkgdataSCRIPTS install-data-local @@ -322,8 +387,8 @@ install-data: install-data-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-recursive -uninstall-am: uninstall-binSCRIPTS uninstall-pkgdataSCRIPTS \ - uninstall-local +uninstall-am: uninstall-binSCRIPTS uninstall-libexecSCRIPTS \ + uninstall-pkgdataSCRIPTS uninstall-local uninstall: uninstall-recursive all-am: Makefile $(SCRIPTS) all-redirect: all-recursive @@ -331,7 +396,8 @@ install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: installdirs-recursive installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(pkgdatadir) + $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(libexecdir) \ + $(DESTDIR)$(pkgdatadir) mostlyclean-generic: @@ -364,21 +430,54 @@ maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \ maintainer-clean: maintainer-clean-recursive -rm -f config.status -.PHONY: uninstall-binSCRIPTS install-binSCRIPTS uninstall-pkgdataSCRIPTS \ -install-pkgdataSCRIPTS install-data-recursive uninstall-data-recursive \ -install-exec-recursive uninstall-exec-recursive installdirs-recursive \ -uninstalldirs-recursive all-recursive check-recursive \ -installcheck-recursive info-recursive dvi-recursive \ -mostlyclean-recursive distclean-recursive clean-recursive \ +.PHONY: uninstall-binSCRIPTS install-binSCRIPTS uninstall-libexecSCRIPTS \ +install-libexecSCRIPTS uninstall-pkgdataSCRIPTS install-pkgdataSCRIPTS \ +install-data-recursive uninstall-data-recursive install-exec-recursive \ +uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ +all-recursive check-recursive installcheck-recursive info-recursive \ +dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ -distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ -dvi-am dvi check check-am installcheck-am installcheck install-info-am \ -install-info install-exec-am install-exec install-data-local \ -install-data-am install-data install-am install uninstall-local \ -uninstall-am uninstall all-redirect all-am all installdirs-am \ -installdirs mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean - +distclean-tags clean-tags maintainer-clean-tags distdir check-DEJAGNU \ +info-am info dvi-am dvi check check-am installcheck-am installcheck \ +install-exec-am install-exec install-data-local install-data-am \ +install-data install-am install uninstall-local uninstall-am uninstall \ +all-redirect all-am all installdirs-am installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean + + +# Set ourselves up to build a RedHat package +dist2: rpmspec overview.html + -rm -fr dejagnu-${VERSION}.0 + cp -fpr $(srcdir) dejagnu-${VERSION}.0 + @echo "clean up stuff we don't want in the source file" + (cd dejagnu-${VERSION}.0 ; $(srcdir)/Clean.tcl) + -mkdir -p doc/overview + -cp -fr doc/overview dejagnu-${VERSION}.0/doc/ + tar cvf ../dejagnu-${VERSION}.tar dejagnu-${VERSION}.0 + gzip -9fv ../dejagnu-${VERSION}.tar + cp -f ../dejagnu-${VERSION}.tar.gz /usr/src/redhat/SOURCES/ + cp -f $(srcdir)/redhat/dejagnu.spec /usr/src/redhat/SPECS/ + +rpmspec: + cp -f $(srcdir)/redhat/dejagnu.spec /usr/src/redhat/SPECS/ + +rpm: dist rpmspec + cp -f $(distdir).tar.gz /usr/src/redhat/SOURCES/ + rpm -ba /usr/src/redhat/SPECS/dejagnu.spec + +overview.html install-doc doc html dvi ps pdf rtf: + cd doc && $(MAKE) $(FLAGS_TO_PASS) $@ + +# Automake sucks when it comes to building a distribution, so +# we just copy the source tree onto of what Automake did, and +# then we Clean it. Automake only includes the source files. +# We want all the testsuites, data files, and html versions of the doc. +dist-hook: rpmspec overview.html + -rm -fr $(distdir) + cp -fpr $(srcdir) $(distdir) + (cd $(distdir) ; $(TCLSH) $(srcdir)/Clean.tcl) + -cp -fr doc/overview $(distdir)/doc/ install-data-local: $(mkinstalldirs) $(lib_dest) diff --git a/README b/README index 0e22eab..886cae0 100644 --- a/README +++ b/README @@ -19,7 +19,7 @@ several advantages for testing: the testing framework and the testsuites themselves. Tests are usually written in expect using Tcl. - Bugs can be reported to bug-dejagnu@prep.ai.mit.edu. + Bugs can be reported to bug-dejagnu@gnu.org. How To Configure and Build @@ -280,4 +280,6 @@ Andy Oram O'Reilly & Associates, Inc. andyo@ora.com There is a new listserv based mailing list for the FROST project. To subscribe, send email to "listserv@cygnus.com" and the body should contain "SUBSCRIBE FROST ". Messages sent to -frost@cygnus.com go to the mailing list. \ No newline at end of file +frost@cygnus.com go to the mailing list. + + diff --git a/TODO b/TODO index 2f77cd5..15f08a8 100644 --- a/TODO +++ b/TODO @@ -6,3 +6,7 @@ record/playback. . Add a "testing methodologies" section to the manual. + +. Add a configure test to make sure Tcl and expect are installed. +. Add support to runtest to produce a better error message when expect + can't be found. \ No newline at end of file diff --git a/acinclude.m4 b/acinclude.m4 new file mode 100644 index 0000000..20497d0 --- /dev/null +++ b/acinclude.m4 @@ -0,0 +1,87 @@ +AC_DEFUN(DJ_AC_PATH_TCLSH, [ +dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../ +../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../.. +/../../../../../.." +no_itcl=true +AC_MSG_CHECKING(for the tclsh program) +AC_ARG_WITH(tclinclude, [ --with-tclinclude directory where tcl header +s are], with_tclinclude=${withval}) +AC_CACHE_VAL(ac_cv_path_tclsh,[ +dnl first check to see if --with-itclinclude was specified +if test x"${with_tclinclude}" != x ; then + if test -f ${with_tclinclude}/tclsh ; then + ac_cv_path_tclsh=`(cd ${with_tclinclude}; pwd)` + elif test -f ${with_tclinclude}/src/tclsh ; then + ac_cv_path_tclsh=`(cd ${with_tclinclude}/src; pwd)` + else + AC_MSG_ERROR([${with_tclinclude} directory doesn't contain tclsh]) + fi +fi +]) + +dnl next check in private source directory +dnl since ls returns lowest version numbers first, reverse its output +if test x"${ac_cv_path_tclsh}" = x ; then + dnl find the top level Itcl source directory + for i in $dirlist; do + if test -n "`ls -dr $srcdir/$i/tcl* 2>/dev/null`" ; then + tclpath=$srcdir/$i + break + fi + done + + dnl find the exact Itcl source dir. We do it this way, cause there + dnl might be multiple version of Itcl, and we want the most recent one. + for i in `ls -dr $tclpath/tcl* 2>/dev/null ` ; do + if test -f $i/src/tclsh ; then + ac_cv_path_tclsh=`(cd $i/src; pwd)`/tclsh + break + fi + done +fi + +dnl see if one is installed +if test x"${ac_cv_path_tclsh}" = x ; then + AC_MSG_RESULT(none) + AC_PATH_PROG(tclsh, tclsh) +else + AC_MSG_RESULT(${ac_cv_path_tclsh}) +fi +TCLSH="${ac_cv_path_tclsh}" +AC_SUBST(TCLSH) +]) + + +AC_DEFUN(DJ_AC_PATH_DOCBOOK, [ +dirlist=".. ../../ ../../.. ../../../.. ../../../../.. ../../../../../.. ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." +AC_MSG_CHECKING(for docbook tools) +AC_ARG_WITH(oskith, [ --with-docbook directory where the db2 sgml tools are], with_docbook=${withval}) +AC_CACHE_VAL(ac_cv_c_docbook,[ +dnl first check to see if --with-docbook was specified +if test x"${with_docbook}" != x ; then + if test -f ${with_docbook}/db2html ; then + ac_cv_c_docbook=`(cd ${with_docbook}; pwd)` + else + AC_MSG_ERROR([${with_docbook} directory doesn't contain SGML tools]) + fi +fi +]) +if test x"${ac_cv_c_docbook}" = x ; then + for i in $ac_default_prefix/bin /usr/local/bin $OSKITHDIR/../bin /usr/bin /bin /opt /home; do + dnl See is we have an SGML tool in that directory. + if test -f $i/db2html ; then + ac_cv_c_docbook=$i + break + fi + done +fi + +if test x"${ac_cv_c_docbook}" = x ; then + AC_MSG_RESULT(none) +else + DOCBOOK="${ac_cv_c_docbook}" + AC_MSG_RESULT(${ac_cv_c_docbook}) +fi + +AC_SUBST(DOCBOOK) +]) diff --git a/aclocal.m4 b/aclocal.m4 index f5379a5..4884dc2 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -10,6 +10,94 @@ dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. +AC_DEFUN(DJ_AC_PATH_TCLSH, [ +dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../ +../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../.. +/../../../../../.." +no_itcl=true +AC_MSG_CHECKING(for the tclsh program) +AC_ARG_WITH(tclinclude, [ --with-tclinclude directory where tcl header +s are], with_tclinclude=${withval}) +AC_CACHE_VAL(ac_cv_path_tclsh,[ +dnl first check to see if --with-itclinclude was specified +if test x"${with_tclinclude}" != x ; then + if test -f ${with_tclinclude}/tclsh ; then + ac_cv_path_tclsh=`(cd ${with_tclinclude}; pwd)` + elif test -f ${with_tclinclude}/src/tclsh ; then + ac_cv_path_tclsh=`(cd ${with_tclinclude}/src; pwd)` + else + AC_MSG_ERROR([${with_tclinclude} directory doesn't contain tclsh]) + fi +fi +]) + +dnl next check in private source directory +dnl since ls returns lowest version numbers first, reverse its output +if test x"${ac_cv_path_tclsh}" = x ; then + dnl find the top level Itcl source directory + for i in $dirlist; do + if test -n "`ls -dr $srcdir/$i/tcl* 2>/dev/null`" ; then + tclpath=$srcdir/$i + break + fi + done + + dnl find the exact Itcl source dir. We do it this way, cause there + dnl might be multiple version of Itcl, and we want the most recent one. + for i in `ls -dr $tclpath/tcl* 2>/dev/null ` ; do + if test -f $i/src/tclsh ; then + ac_cv_path_tclsh=`(cd $i/src; pwd)`/tclsh + break + fi + done +fi + +dnl see if one is installed +if test x"${ac_cv_path_tclsh}" = x ; then + AC_MSG_RESULT(none) + AC_PATH_PROG(tclsh, tclsh) +else + AC_MSG_RESULT(${ac_cv_path_tclsh}) +fi +TCLSH="${ac_cv_path_tclsh}" +AC_SUBST(TCLSH) +]) + + +AC_DEFUN(DJ_AC_PATH_DOCBOOK, [ +dirlist=".. ../../ ../../.. ../../../.. ../../../../.. ../../../../../.. ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." +AC_MSG_CHECKING(for docbook tools) +AC_ARG_WITH(oskith, [ --with-docbook directory where the db2 sgml tools are], with_docbook=${withval}) +AC_CACHE_VAL(ac_cv_c_docbook,[ +dnl first check to see if --with-docbook was specified +if test x"${with_docbook}" != x ; then + if test -f ${with_docbook}/db2html ; then + ac_cv_c_docbook=`(cd ${with_docbook}; pwd)` + else + AC_MSG_ERROR([${with_docbook} directory doesn't contain SGML tools]) + fi +fi +]) +if test x"${ac_cv_c_docbook}" = x ; then + for i in $ac_default_prefix/bin /usr/local/bin $OSKITHDIR/../bin /usr/bin /bin /opt /home; do + dnl See is we have an SGML tool in that directory. + if test -f $i/db2html ; then + ac_cv_c_docbook=$i + break + fi + done +fi + +if test x"${ac_cv_c_docbook}" = x ; then + AC_MSG_RESULT(none) +else + DOCBOOK="${ac_cv_c_docbook}" + AC_MSG_RESULT(${ac_cv_c_docbook}) +fi + +AC_SUBST(DOCBOOK) +]) + # Do all the work for Automake. This macro actually does too much -- # some checks are only needed if your package does certain things. # But this isn't really a big deal. diff --git a/baseboards/arc-sim.exp b/baseboards/arc-sim.exp index 4bb9d4a..8ca7c2e 100644 --- a/baseboards/arc-sim.exp +++ b/baseboards/arc-sim.exp @@ -11,7 +11,7 @@ load_generic_config "sim" # basic-sim.exp is a basic description for the standard Cygnus simulator. load_base_board_description "basic-sim" -# "arc" is the name of the sim subdir in devo/sim. +# "arc" is the name of the sim subdir. setup_sim arc # No multilib options needed by default. diff --git a/baseboards/arm-sim.exp b/baseboards/arm-sim.exp index 9e96c1b..32b5eeb 100644 --- a/baseboards/arm-sim.exp +++ b/baseboards/arm-sim.exp @@ -26,15 +26,12 @@ setup_sim arm; # The compiler used to build for this board. This has *nothing* to do # with what compiler is tested if we're testing gcc. set_board_info compiler "[find_gcc]" - # The basic set of flags needed to build "hello world" for this # board. This board uses libgloss and newlib. set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]" set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags] $additional_options" - # This board doesn't use a linker script. set_board_info ldscript ""; - # The simulator doesn't return exit statuses and we need to indicate this. set_board_info needs_status_wrapper 1 diff --git a/baseboards/fr30-sim.exp b/baseboards/fr30-sim.exp index 73fad4c..aed4809 100644 --- a/baseboards/fr30-sim.exp +++ b/baseboards/fr30-sim.exp @@ -8,7 +8,7 @@ load_generic_config "sim" # basic-sim.exp is a basic description for the standard Cygnus simulator. load_base_board_description "basic-sim" -# "fr30" is the name of the sim subdir in devo/sim. +# "fr30" is the name of the sim subdir. setup_sim fr30 # No multilib options needed by default. diff --git a/baseboards/m32r-sim.exp b/baseboards/m32r-sim.exp index eaa7145..5bc73d4 100644 --- a/baseboards/m32r-sim.exp +++ b/baseboards/m32r-sim.exp @@ -8,7 +8,7 @@ load_generic_config "sim" # basic-sim.exp is a basic description for the standard Cygnus simulator. load_base_board_description "basic-sim" -# "m32r" is the name of the sim subdir in devo/sim. +# "m32r" is the name of the sim subdir. setup_sim m32r # No multilib options needed by default. diff --git a/baseboards/mcore-sim.exp b/baseboards/mcore-sim.exp index ae863ca..21ef68a 100644 --- a/baseboards/mcore-sim.exp +++ b/baseboards/mcore-sim.exp @@ -8,7 +8,7 @@ load_generic_config "sim" # basic-sim.exp is a basic description for the standard Cygnus simulator. load_base_board_description "basic-sim" -# "mcore" is the name of the sim subdir in devo/sim. +# "mcore" is the name of the sim subdir. setup_sim mcore # No multilib options needed by default. diff --git a/baseboards/mn10200-sim.exp b/baseboards/mn10200-sim.exp index 2356e3a..01c5673 100644 --- a/baseboards/mn10200-sim.exp +++ b/baseboards/mn10200-sim.exp @@ -9,7 +9,7 @@ load_generic_config "sim" # basic-sim.exp is a basic description for the standard Cygnus simulator. load_base_board_description "basic-sim" -# This is the name of the sim subdir in devo/sim (and in the build tree). +# This is the name of the sim subdir. setup_sim mn10200 # No multilib flags are set by default. diff --git a/baseboards/mn10300-sim.exp b/baseboards/mn10300-sim.exp index eff6a62..a4f3bfd 100644 --- a/baseboards/mn10300-sim.exp +++ b/baseboards/mn10300-sim.exp @@ -9,7 +9,7 @@ load_generic_config "sim" # basic-sim.exp is a basic description for the standard Cygnus simulator. load_base_board_description "basic-sim" -# This is the name of the sim subdir in devo/sim (and in the build tree). +# This is the name of the sim subdir. setup_sim mn10300 # No multilib flags are set by default. diff --git a/baseboards/tx39-sim.exp b/baseboards/tx39-sim.exp index 20fc722..8af9912 100644 --- a/baseboards/tx39-sim.exp +++ b/baseboards/tx39-sim.exp @@ -1,3 +1,8 @@ -# This file is unnecessary, but we'll keep it for now. -# We're the same as the standard MIPS simulator. +# We need mips16. +add_multilib_option "" + +# And we use the lsi linker script. +set_board_info ldscript "-Wl,-Tdve.ld" + +# Otherwise we're the same as the standard MIPS simulator. load_base_board_description "mips-sim"; diff --git a/config.sub b/config.sub new file mode 100755 index 0000000..edfef57 --- /dev/null +++ b/config.sub @@ -0,0 +1,1337 @@ +#! /bin/sh +# Configuration validation subroutine script, version 1.1. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 +# Free Software Foundation, Inc. + +version='2000-11-02' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file 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 of the License, or +# (at your option) any later version. +# +# This program 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 this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -V, --version print version number, then exit" + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case "$1" in + --version | --vers* | -V ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + exec >&2 + echo "$me: invalid option $1" + echo "$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | storm-chaos*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm | xscale \ + | arme[lb] | armv[2345] | armv[345][lb] | pyramid | mn10200 | mn10300 | tron | a29k \ + | 580 | i960 | h8300 \ + | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \ + | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ + | hppa64 \ + | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ + | alphaev6[78] \ + | we32k | ns16k | clipper | i370 | sh | sh[34] \ + | powerpc | powerpcle \ + | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ + | mips64orion | mips64orionel | mipstx39 | mipstx39el \ + | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ + | mips64vr5000 | miprs64vr5000el | mcore \ + | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ + | thumb | d10v | d30v | fr30 | avr) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[234567]86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + # FIXME: clean up the formatting here. + vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ + | xmp-* | ymp-* \ + | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ + | hppa2.0n-* | hppa64-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ + | alphaev6[78]-* \ + | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ + | clipper-* | orion-* \ + | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ + | mipstx39-* | mipstx39el-* | mcore-* \ + | f301-* | armv*-* | s390-* | s390x-* | sv1-* | t3e-* \ + | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ + | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \ + | bs2000-* | tic54x-* | c54x-* | x86_64-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [ctj]90-cray) + basic_machine=c90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[34567]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i[34567]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i[34567]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i[34567]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + i386-go32 | go32) + basic_machine=i386-unknown + os=-go32 + ;; + i386-mingw32 | mingw32) + basic_machine=i386-unknown + os=-mingw32 + ;; + i[34567]86-pw32 | pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + msdos) + basic_machine=i386-unknown + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=rs6000-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sparclite-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=t3e-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4) + basic_machine=sh-unknown + ;; + sparc | sparcv9) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + c4x*) + basic_machine=c4x-none + os=-coff + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -storm-chaos*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i[34567]86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto*) + os=-nto-qnx + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -*MiNT) + os=-mint + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f301-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -*MiNT) + vendor=atari + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "version='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config/arc.exp b/config/arc.exp index 3fffb06..e38e8e2 100644 --- a/config/arc.exp +++ b/config/arc.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,6 +15,6 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org load_generic_config "gdb-comm"; diff --git a/config/arm-ice.exp b/config/arm-ice.exp index 3fffb06..e38e8e2 100644 --- a/config/arm-ice.exp +++ b/config/arm-ice.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,6 +15,6 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org load_generic_config "gdb-comm"; diff --git a/config/base-config.exp b/config/base-config.exp index 2cd9581..8e16dcf 100644 --- a/config/base-config.exp +++ b/config/base-config.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # # reboot_hook -- called to reboot a target board. Returns 1 on diff --git a/config/base68k.exp b/config/base68k.exp index d105ce8..ca0afb2 100644 --- a/config/base68k.exp +++ b/config/base68k.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1994 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # This file was written by Bob Manson (manson@cygnus.com) # based on earlier work by JT Conklin (jtc@cygnus.com) @@ -80,8 +80,8 @@ proc base68k_ld { dest prog } { # dbug has problems if we go into binary mode, so this allows us to # disable entry into binary mode. if ![board_info $dest exists no_binary_mode] { - remote_binary $dest; - } + remote_binary $dest; + } } # if we built the srecord on a remote host, copy it back here so we diff --git a/config/bug.exp b/config/bug.exp index 881eccc..5155978 100644 --- a/config/bug.exp +++ b/config/bug.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org # This file was written by Bob Manson (manson@cygnus.com). diff --git a/config/cfdbug.exp b/config/cfdbug.exp index 2db0ac7..182f023 100644 --- a/config/cfdbug.exp +++ b/config/cfdbug.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1999 Free Software Foundation, Inc. +# Copyright (C) 1999 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org # This file was written by Bob Manson (manson@cygnus.com). diff --git a/config/cygmon.exp b/config/cygmon.exp index 2378a12..321fce7 100644 --- a/config/cygmon.exp +++ b/config/cygmon.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 1998 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org load_generic_config "gdb-comm"; diff --git a/config/d10v.exp b/config/d10v.exp index 3fffb06..e38e8e2 100644 --- a/config/d10v.exp +++ b/config/d10v.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,6 +15,6 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org load_generic_config "gdb-comm"; diff --git a/config/ddb-ether.exp b/config/ddb-ether.exp index 140c0d2..3a8716b 100644 --- a/config/ddb-ether.exp +++ b/config/ddb-ether.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 1998 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # This file was written by Bob Manson (manson@cygnus.com) diff --git a/config/ddb.exp b/config/ddb.exp index 13a18e0..f2ecf86 100644 --- a/config/ddb.exp +++ b/config/ddb.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # This file was written by Bob Manson (manson@cygnus.com) diff --git a/config/dos.exp b/config/dos.exp index d1b440d..f455acb 100644 --- a/config/dos.exp +++ b/config/dos.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # This file was written by Bob Manson (manson@cygnus.com) diff --git a/config/dve.exp b/config/dve.exp index 3582b5b..668f078 100644 --- a/config/dve.exp +++ b/config/dve.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1998 Free Software Foundation, Inc. +# Copyright (C) 1998 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-gcc@prep.ai.mit.edu +# bug-dejagnu@gnu.org # For Densan MIPS boards we use gdb to load and execute programs. diff --git a/config/gdb-comm.exp b/config/gdb-comm.exp index 3f4fffc..1f3fda7 100644 --- a/config/gdb-comm.exp +++ b/config/gdb-comm.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +# Copyright (C) 1996 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # Note: some of this was cribbed from the gdb testsuite since we need # to use some pretty standard gdb features (breakpoints in particular). diff --git a/config/gdb_stub.exp b/config/gdb_stub.exp index 127c6eb..f1e7fc5 100644 --- a/config/gdb_stub.exp +++ b/config/gdb_stub.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1996-98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # This file was written by Michael Snyder . @@ -494,7 +494,7 @@ proc gdb_stub_load { dest prog args } { if { $status == 0 } { return [list "pass" $output]; - } elseif { $status > 0 } { + } else if { $status > 0 } { return [list "fail" $output]; } else { global gdb_stub_retry; diff --git a/config/h8300.exp b/config/h8300.exp index 3fffb06..e38e8e2 100644 --- a/config/h8300.exp +++ b/config/h8300.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,6 +15,6 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org load_generic_config "gdb-comm"; diff --git a/config/i386-bozo.exp b/config/i386-bozo.exp index 563da32..9175d69 100644 --- a/config/i386-bozo.exp +++ b/config/i386-bozo.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org load_generic_config "gdb-comm"; diff --git a/config/i960.exp b/config/i960.exp index dcca835..07f1982 100644 --- a/config/i960.exp +++ b/config/i960.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # # Initialize the board on initial connection or after rebooting. diff --git a/config/m32r-stub.exp b/config/m32r-stub.exp index 7cdfd23..7952f4a 100644 --- a/config/m32r-stub.exp +++ b/config/m32r-stub.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,6 +15,6 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org load_generic_config "gdb_stub"; diff --git a/config/m32r.exp b/config/m32r.exp index 3fffb06..e38e8e2 100644 --- a/config/m32r.exp +++ b/config/m32r.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,6 +15,6 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org load_generic_config "gdb-comm"; diff --git a/config/mips-idt.exp b/config/mips-idt.exp index eacdb4d..8c566b8 100644 --- a/config/mips-idt.exp +++ b/config/mips-idt.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-gcc@prep.ai.mit.edu +# bug-dejagnu@gnu.org # For MIPS/IDT we use gdb to load and execute programs. diff --git a/config/mn10200-eval.exp b/config/mn10200-eval.exp index 9af6ae5..1f9c444 100644 --- a/config/mn10200-eval.exp +++ b/config/mn10200-eval.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1998 Free Software Foundation, Inc. +# Copyright (C) 1998 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-gcc@prep.ai.mit.edu +# bug-dejagnu@gnu.org # For MN10200 evaluation boards we use gdb to load and execute programs. diff --git a/config/mn10300-eval.exp b/config/mn10300-eval.exp index 1070b42..45b0e2a 100644 --- a/config/mn10300-eval.exp +++ b/config/mn10300-eval.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1998 Free Software Foundation, Inc. +# Copyright (C) 1998 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-gcc@prep.ai.mit.edu +# bug-dejagnu@gnu.org # For MN10300 evaluation boards we use gdb to load and execute programs. diff --git a/config/netware.exp b/config/netware.exp index 75d8149..ef47838 100644 --- a/config/netware.exp +++ b/config/netware.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1994 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-gcc@prep.ai.mit.edu +# bug-dejagnu@gnu.org # This file was written by J.T. Conklin. (jtc@cygnus.com) diff --git a/config/powerpc-bug.exp b/config/powerpc-bug.exp index 3fffb06..e38e8e2 100644 --- a/config/powerpc-bug.exp +++ b/config/powerpc-bug.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,6 +15,6 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org load_generic_config "gdb-comm"; diff --git a/config/proelf.exp b/config/proelf.exp index 310af21..4d822c5 100644 --- a/config/proelf.exp +++ b/config/proelf.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org load_generic_config "base68k"; set_board_info shell_prompt "#" diff --git a/config/rom68k.exp b/config/rom68k.exp index 63721f8..88257cd 100644 --- a/config/rom68k.exp +++ b/config/rom68k.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1995 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # This file was written by Bob Manson (manson@cygnus.com) # based on earlier work by J.T. Conklin (jtc@cygnus.com) diff --git a/config/sh.exp b/config/sh.exp index 3fffb06..e38e8e2 100644 --- a/config/sh.exp +++ b/config/sh.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,6 +15,6 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org load_generic_config "gdb-comm"; diff --git a/config/sim.exp b/config/sim.exp index 74edc6f..3143b31 100644 --- a/config/sim.exp +++ b/config/sim.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1993, 1994, 1996, 1997, 1998 Free Software Foundation, Inc. +# Copyright (C) 1993 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org # # sim_load -- load the program and execute it diff --git a/config/slite.exp b/config/slite.exp index 19bf612..52e9807 100644 --- a/config/slite.exp +++ b/config/slite.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1996 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,6 +15,6 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org load_generic_config "gdb_stub"; diff --git a/config/sparclet.exp b/config/sparclet.exp index 3f86098..c0b7296 100644 --- a/config/sparclet.exp +++ b/config/sparclet.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1996 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # This file was written by Michael Snyder . diff --git a/config/udi.exp b/config/udi.exp index 4e10c4f..298ee83 100644 --- a/config/udi.exp +++ b/config/udi.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1994 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,9 +15,9 @@ # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org -# This file was originally written by Rob Savoye. (rob@cygnus.com) +# This file was originally written by Rob Savoye. (rob@welcomehome.org) # and modified by Bob Manson (manson@cygnus.com) # When using the simulator (-n iss) and running nice'd, things can naturally diff --git a/config/unix.exp b/config/unix.exp index d3e7fab..170ae94 100644 --- a/config/unix.exp +++ b/config/unix.exp @@ -1,4 +1,4 @@ -# Copyright (C) 92, 1993, 1994, 1996, 1997, 1998 Free Software Foundation, Inc. +# Copyright (C) 1992 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,9 +15,9 @@ # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-gcc@prep.ai.mit.edu +# bug-dejagnu@gnu.org -# This file was written by Rob Savoye. (rob@cygnus.com) +# This file was written by Rob Savoye. (rob@welcomehome.org) if ![info exists board] { error "must set $board before loading unix.exp" diff --git a/config/vr4100.exp b/config/vr4100.exp index 16d20b8..49943ac 100644 --- a/config/vr4100.exp +++ b/config/vr4100.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # We're using a ddb monitor. load_generic_config "ddb"; diff --git a/config/vr4300.exp b/config/vr4300.exp index 16d20b8..49943ac 100644 --- a/config/vr4300.exp +++ b/config/vr4300.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # We're using a ddb monitor. load_generic_config "ddb"; diff --git a/config/vr5000.exp b/config/vr5000.exp index 01945cf..d52f1f8 100644 --- a/config/vr5000.exp +++ b/config/vr5000.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # We're using a ddb monitor, but we want to use the ethernet to load files. load_generic_config "ddb-ether"; diff --git a/config/vrtx.exp b/config/vrtx.exp index cff962c..ff0cd4a 100644 --- a/config/vrtx.exp +++ b/config/vrtx.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1994 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,9 +15,9 @@ # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-gcc@prep.ai.mit.edu +# bug-dejagnu@gnu.org -# This file was written by Rob Savoye. (rob@cygnus.com) +# This file was written by Rob Savoye. (rob@welcomehome.org) # This file uses the xsh protocol. diff --git a/config/vxworks.exp b/config/vxworks.exp index 3ab4a71..2b04e24 100644 --- a/config/vxworks.exp +++ b/config/vxworks.exp @@ -1,4 +1,4 @@ -# Copyright (C) 92, 93, 94, 95, 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1992 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,9 +15,9 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org -# This file was originally written by Rob Savoye. (rob@cygnus.com) +# This file was originally written by Rob Savoye. (rob@welcomehome.org) # and modified by Bob Manson (manson@cygnus.com) # diff --git a/configure b/configure index 3fc078c..23337d6 100755 --- a/configure +++ b/configure @@ -14,6 +14,11 @@ ac_default_prefix=/usr/local ac_help="$ac_help --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer" +ac_help="$ac_help + --with-docbook directory where the db2 sgml tools are" +ac_help="$ac_help + --with-tclinclude directory where tcl header +s are" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -31,7 +36,6 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= -sitefile= srcdir= target=NONE verbose= @@ -146,7 +150,6 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages - --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -317,11 +320,6 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; - -site-file | --site-file | --site-fil | --site-fi | --site-f) - ac_prev=sitefile ;; - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) - sitefile="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -487,16 +485,12 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$sitefile"; then - if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -535,8 +529,9 @@ else fi + ac_aux_dir= -for ac_dir in .. $srcdir/..; do +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" @@ -548,13 +543,12 @@ for ac_dir in .. $srcdir/..; do fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; } + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -567,7 +561,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:571: checking for a BSD compatible install" >&5 +echo "configure:565: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -620,7 +614,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:624: checking whether build environment is sane" >&5 +echo "configure:618: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -677,7 +671,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:681: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:675: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -706,7 +700,7 @@ fi PACKAGE=dejagnu -VERSION=20000518 +VERSION=1.4 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -723,7 +717,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:727: checking for working aclocal" >&5 +echo "configure:721: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -736,7 +730,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:740: checking for working autoconf" >&5 +echo "configure:734: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -749,7 +743,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:753: checking for working automake" >&5 +echo "configure:747: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -762,7 +756,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:766: checking for working autoheader" >&5 +echo "configure:760: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -775,7 +769,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:779: checking for working makeinfo" >&5 +echo "configure:773: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -789,7 +783,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:793: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:787: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -812,7 +806,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:816: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:810: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -838,106 +832,11 @@ else SET_MAKE="MAKE=${MAKE-make}" fi -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:843: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cygwin=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cygwin" 1>&6 -CYGWIN= -test "$ac_cv_cygwin" = yes && CYGWIN=yes -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:876: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_mingw32=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_mingw32" 1>&6 -MINGW32= -test "$ac_cv_mingw32" = yes && MINGW32=yes - - -echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:907: checking for executable suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then - ac_cv_exeext=.exe -else - rm -f conftest* - echo 'int main () { return 0; }' > conftest.$ac_ext - ac_cv_exeext= - if { (eval echo configure:917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then - for file in conftest.*; do - case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; - *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; - esac - done - else - { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } - fi - rm -f conftest* - test x"${ac_cv_exeext}" = x && ac_cv_exeext=no -fi -fi - -EXEEXT="" -test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} -echo "$ac_t""${ac_cv_exeext}" 1>&6 -ac_exeext=$EXEEXT - # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:941: checking for $ac_word" >&5 +echo "configure:840: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -967,7 +866,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:971: checking for $ac_word" >&5 +echo "configure:870: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1018,7 +917,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1022: checking for $ac_word" >&5 +echo "configure:921: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1050,7 +949,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1054: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:953: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1061,12 +960,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1065 "configure" +#line 964 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1092,12 +991,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1096: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:995: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1101: checking whether we are using GNU C" >&5 +echo "configure:1000: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1106,7 +1005,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1125,7 +1024,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1129: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1028: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1168,7 +1067,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1172: checking for a BSD compatible install" >&5 +echo "configure:1071: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1220,12 +1119,240 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 +echo "configure:1124: checking for Cygwin environment" >&5 +if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cygwin=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cygwin=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cygwin" 1>&6 +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes +echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +echo "configure:1157: checking for mingw32 environment" >&5 +if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_mingw32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_mingw32=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_mingw32" 1>&6 +MINGW32= +test "$ac_cv_mingw32" = yes && MINGW32=yes + + +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:1188: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_exeext=.exe +else + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= + if { (eval echo configure:1198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } + fi + rm -f conftest* + test x"${ac_cv_exeext}" = x && ac_cv_exeext=no +fi +fi + +EXEEXT="" +test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} +echo "$ac_t""${ac_cv_exeext}" 1>&6 +ac_exeext=$EXEEXT + + + +dirlist=".. ../../ ../../.. ../../../.. ../../../../.. ../../../../../.. ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." +echo $ac_n "checking for docbook tools""... $ac_c" 1>&6 +echo "configure:1222: checking for docbook tools" >&5 +# Check whether --with-oskith or --without-oskith was given. +if test "${with_oskith+set}" = set; then + withval="$with_oskith" + with_docbook=${withval} +fi + +if eval "test \"`echo '$''{'ac_cv_c_docbook'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test x"${with_docbook}" != x ; then + if test -f ${with_docbook}/db2html ; then + ac_cv_c_docbook=`(cd ${with_docbook}; pwd)` + else + { echo "configure: error: ${with_docbook} directory doesn't contain SGML tools" 1>&2; exit 1; } + fi +fi + +fi + +if test x"${ac_cv_c_docbook}" = x ; then + for i in $ac_default_prefix/bin /usr/local/bin $OSKITHDIR/../bin /usr/bin /bin /opt /home; do + if test -f $i/db2html ; then + ac_cv_c_docbook=$i + break + fi + done +fi + +if test x"${ac_cv_c_docbook}" = x ; then + echo "$ac_t""none" 1>&6 +else + DOCBOOK="${ac_cv_c_docbook}" + echo "$ac_t""${ac_cv_c_docbook}" 1>&6 +fi + + + + + +dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../ +../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../.. +/../../../../../.." +no_itcl=true +echo $ac_n "checking for the tclsh program""... $ac_c" 1>&6 +echo "configure:1268: checking for the tclsh program" >&5 +# Check whether --with-tclinclude or --without-tclinclude was given. +if test "${with_tclinclude+set}" = set; then + withval="$with_tclinclude" + with_tclinclude=${withval} +fi + +if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test x"${with_tclinclude}" != x ; then + if test -f ${with_tclinclude}/tclsh ; then + ac_cv_path_tclsh=`(cd ${with_tclinclude}; pwd)` + elif test -f ${with_tclinclude}/src/tclsh ; then + ac_cv_path_tclsh=`(cd ${with_tclinclude}/src; pwd)` + else + { echo "configure: error: ${with_tclinclude} directory doesn't contain tclsh" 1>&2; exit 1; } + fi +fi + +fi + + +if test x"${ac_cv_path_tclsh}" = x ; then + for i in $dirlist; do + if test -n "`ls -dr $srcdir/$i/tcl* 2>/dev/null`" ; then + tclpath=$srcdir/$i + break + fi + done + + for i in `ls -dr $tclpath/tcl* 2>/dev/null ` ; do + if test -f $i/src/tclsh ; then + ac_cv_path_tclsh=`(cd $i/src; pwd)`/tclsh + break + fi + done +fi + +if test x"${ac_cv_path_tclsh}" = x ; then + echo "$ac_t""none" 1>&6 + # Extract the first word of "tclsh", so it can be a program name with args. +set dummy tclsh; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1313: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$tclsh" in + /*) + ac_cv_path_tclsh="$tclsh" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_tclsh="$tclsh" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_tclsh="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +tclsh="$ac_cv_path_tclsh" +if test -n "$tclsh"; then + echo "$ac_t""$tclsh" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + echo "$ac_t""${ac_cv_path_tclsh}" 1>&6 +fi +TCLSH="${ac_cv_path_tclsh}" + + BOARDS='$(boards)' CONFIG='$(config)' - + subdirs="example/calc" @@ -1342,7 +1469,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "Makefile doc/Makefile example/Makefile testsuite/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "Makefile doc/Makefile testsuite/Makefile example/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then diff --git a/configure.in b/configure.in index 263f043..93bbc55 100644 --- a/configure.in +++ b/configure.in @@ -1,24 +1,30 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.13) AC_INIT(runtest.exp) -AC_CONFIG_AUX_DIR(..) +dnl AC_CONFIG_AUX_DIR(..) dnl These are required by automake -AM_INIT_AUTOMAKE(dejagnu, 20000518) +AM_INIT_AUTOMAKE(dejagnu, 1.4) AM_MAINTAINER_MODE AC_PROG_MAKE_SET -AC_EXEEXT AC_PROG_CC AC_PROG_INSTALL +AC_EXEEXT + +dnl we need the path to Docbook so we can build packages. +DJ_AC_PATH_DOCBOOK + +dnl we need the path to the tcl shell to build a release +DJ_AC_PATH_TCLSH dnl Level of indirection for automake macro (baseboards:boards_DATA) BOARDS='$(boards)' AC_SUBST(BOARDS) CONFIG='$(config)' AC_SUBST(CONFIG) - + AC_CONFIG_SUBDIRS(example/calc) -AC_OUTPUT(Makefile doc/Makefile example/Makefile testsuite/Makefile) +AC_OUTPUT(Makefile doc/Makefile testsuite/Makefile example/Makefile) diff --git a/doc/Makefile.am b/doc/Makefile.am index 9521a40..6e367d5 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,10 +1,9 @@ ## Process this file with automake to generate Makefile.in -AUTOMAKE_OPTIONS = cygnus +# AUTOMAKE_OPTIONS = -info_TEXINFOS = dejagnu.texi - -TARGETS = overview.rtf overview.html overview.dvi overview.ps +DOCBOOK = @DOCBOOK@ +TARGETS = overview.html overview.rtf # overview.dvi overview.ps docs: $(TARGETS) @@ -12,13 +11,13 @@ docs: $(TARGETS) dvips -o $@ $< %.pdf: %.sgml - db2pdf $< + $(DOCBOOK)/db2pdf $< %.dvi: %.sgml - db2dvi $< + $(DOCBOOK)/db2dvi $< %.rtf: %.sgml - db2rtf -o $@ $< + $(DOCBOOK)/db2rtf -o $@ $< %.gif: %.fig convert -transparency white $< $@ # .fig -> .gif @@ -30,18 +29,18 @@ docs: $(TARGETS) fig2dev -L ps -m 0.7 -p dummy $< > $@ # .fig -> .eps/portrait %.html: %.sgml - db2html $< + $(DOCBOOK)/db2html $< # now for some extra dependencies that the automatic rules will not # catch: -overview.pdf overview.ps overview.dvi overview.rtf overview.html: overview.sgml ref.sgml user.sgml +html rtf overview.pdf overview.ps overview.dvi overview.rtf overview.html: overview.sgml ref.sgml user.sgml clean: rm -f $(TARGETS) -# install-data-local: overview.pdf overview.html -# $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/html -# $(INSTALL_DATA) overview/*.html $(DESTDIR)$(pkgdatadir)/html +install-doc: $(TARGETS) + $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/html + $(INSTALL_DATA) overview/*.html $(DESTDIR)$(pkgdatadir)/html # $(INSTALL_DATA) overview.ps $(DESTDIR)$(pkgdatadir)/dejagnu.ps # $(INSTALL_DATA) overview.pdf $(DESTDIR)$(pkgdatadir)/dejagnu.pdf diff --git a/doc/Makefile.in b/doc/Makefile.in index 31d809b..0666f86 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -10,6 +10,8 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +# AUTOMAKE_OPTIONS = + SHELL = @SHELL@ @@ -64,149 +66,30 @@ EXEEXT = @EXEEXT@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ +TCLSH = @TCLSH@ VERSION = @VERSION@ +tclsh = @tclsh@ -AUTOMAKE_OPTIONS = cygnus - -info_TEXINFOS = dejagnu.texi - -TARGETS = overview.rtf overview.html overview.dvi overview.ps -mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +DOCBOOK = @DOCBOOK@ +TARGETS = overview.html overview.rtf # overview.dvi overview.ps +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = -TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then echo $(top_srcdir)/../texinfo/util/texi2dvi; else echo texi2dvi; fi` -TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex -INFO_DEPS = dejagnu.info -DVIS = dejagnu.dvi -TEXINFOS = dejagnu.texi DIST_COMMON = README Makefile.am Makefile.in configure configure.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: -.SUFFIXES: .dvi .info .ps .texi .texinfo .txi $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - -dejagnu.info: dejagnu.texi -dejagnu.dvi: dejagnu.texi - - -DVIPS = dvips - -.texi.info: - @rm -f $@ $@-[0-9] $@-[0-9][0-9] - $(MAKEINFO) -I $(srcdir) $< - -.texi.dvi: - TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \ - MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< - -.texi: - @rm -f $@ $@-[0-9] $@-[0-9][0-9] - $(MAKEINFO) -I $(srcdir) $< - -.texinfo.info: - @rm -f $@ $@-[0-9] $@-[0-9][0-9] - $(MAKEINFO) -I $(srcdir) $< - -.texinfo: - @rm -f $@ $@-[0-9] $@-[0-9][0-9] - $(MAKEINFO) -I $(srcdir) $< - -.texinfo.dvi: - TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \ - MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< - -.txi.info: - @rm -f $@ $@-[0-9] $@-[0-9][0-9] - $(MAKEINFO) -I $(srcdir) $< - -.txi.dvi: - TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \ - MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< - -.txi: - @rm -f $@ $@-[0-9] $@-[0-9][0-9] - $(MAKEINFO) -I $(srcdir) $< -.dvi.ps: - $(DVIPS) $< -o $@ - -install-info-am: $(INFO_DEPS) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(infodir) - @list='$(INFO_DEPS)'; \ - for file in $$list; do \ - if test -f $$file; then d=.; else d=$(srcdir); fi; \ - for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ - if test -f $$d/$$ifile; then \ - echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ - $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ - else : ; fi; \ - done; \ - done - @$(POST_INSTALL) - @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ - list='$(INFO_DEPS)'; \ - for file in $$list; do \ - echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\ - install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\ - done; \ - else : ; fi - -uninstall-info: - $(PRE_UNINSTALL) - @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ - ii=yes; \ - else ii=; fi; \ - list='$(INFO_DEPS)'; \ - for file in $$list; do \ - test -z "$ii" \ - || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ - done - @$(NORMAL_UNINSTALL) - list='$(INFO_DEPS)'; \ - for file in $$list; do \ - (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ - done - -dist-info: $(INFO_DEPS) - list='$(INFO_DEPS)'; \ - for base in $$list; do \ - if test -f $$base; then d=.; else d=$(srcdir); fi; \ - for file in `cd $$d && eval echo $$base*`; do \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file; \ - done; \ - done - -mostlyclean-aminfo: - -rm -f dejagnu.aux dejagnu.cp dejagnu.cps dejagnu.dvi dejagnu.fn \ - dejagnu.fns dejagnu.ky dejagnu.kys dejagnu.ps dejagnu.log \ - dejagnu.pg dejagnu.toc dejagnu.tp dejagnu.tps dejagnu.vr \ - dejagnu.vrs dejagnu.op dejagnu.tr dejagnu.cv dejagnu.cn - -clean-aminfo: - -distclean-aminfo: - -maintainer-clean-aminfo: - for i in $(INFO_DEPS); do \ - rm -f $$i; \ - if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \ - rm -f $$i-[0-9]*; \ - fi; \ - done -clean-info: mostlyclean-aminfo tags: TAGS TAGS: @@ -216,27 +99,29 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = doc distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu doc/Makefile @for file in $(DISTFILES); do \ - if test -f $$file; then d=.; else d=$(srcdir); fi; \ + d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done - $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info -info-am: $(INFO_DEPS) +info-am: info: info-am -dvi-am: $(DVIS) +dvi-am: dvi: dvi-am -check-am: +check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am -install-info-am: -install-info: install-info-am install-exec-am: install-exec: install-exec-am @@ -264,29 +149,26 @@ distclean-generic: -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: -mostlyclean-am: mostlyclean-aminfo mostlyclean-generic +mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am -clean-am: clean-aminfo clean-generic mostlyclean-am +clean-am: clean-generic mostlyclean-am clean: clean-am -distclean-am: distclean-aminfo distclean-generic clean-am +distclean-am: distclean-generic clean-am distclean: distclean-am -maintainer-clean-am: maintainer-clean-aminfo maintainer-clean-generic \ - distclean-am +maintainer-clean-am: maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am -.PHONY: install-info-am uninstall-info mostlyclean-aminfo \ -distclean-aminfo clean-aminfo maintainer-clean-aminfo tags distdir \ -info-am info dvi-am dvi check check-am installcheck-am installcheck \ -install-info-am install-info install-exec-am install-exec \ +.PHONY: tags distdir info-am info dvi-am dvi check check-am \ +installcheck-am installcheck install-exec-am install-exec \ install-data-am install-data install-am install uninstall-am uninstall \ all-redirect all-am all installdirs mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ @@ -299,13 +181,13 @@ docs: $(TARGETS) dvips -o $@ $< %.pdf: %.sgml - db2pdf $< + $(DOCBOOK)/db2pdf $< %.dvi: %.sgml - db2dvi $< + $(DOCBOOK)/db2dvi $< %.rtf: %.sgml - db2rtf -o $@ $< + $(DOCBOOK)/db2rtf -o $@ $< %.gif: %.fig convert -transparency white $< $@ # .fig -> .gif @@ -317,19 +199,19 @@ docs: $(TARGETS) fig2dev -L ps -m 0.7 -p dummy $< > $@ # .fig -> .eps/portrait %.html: %.sgml - db2html $< + $(DOCBOOK)/db2html $< # now for some extra dependencies that the automatic rules will not # catch: -overview.pdf overview.ps overview.dvi overview.rtf overview.html: overview.sgml ref.sgml user.sgml +html rtf overview.pdf overview.ps overview.dvi overview.rtf overview.html: overview.sgml ref.sgml user.sgml clean: rm -f $(TARGETS) -# install-data-local: overview.pdf overview.html -# $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/html -# $(INSTALL_DATA) overview/*.html $(DESTDIR)$(pkgdatadir)/html +install-doc: $(TARGETS) + $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/html + $(INSTALL_DATA) overview/*.html $(DESTDIR)$(pkgdatadir)/html # $(INSTALL_DATA) overview.ps $(DESTDIR)$(pkgdatadir)/dejagnu.ps # $(INSTALL_DATA) overview.pdf $(DESTDIR)$(pkgdatadir)/dejagnu.pdf diff --git a/doc/dejagnu.texi b/doc/dejagnu.texi index 68c4008..0d06cea 100644 --- a/doc/dejagnu.texi +++ b/doc/dejagnu.texi @@ -4,7 +4,7 @@ o\input texinfo @c -*- Texinfo -*- @c @c This file documents the GNU Testing Framework ``DejaGnu'' @c -@c Copyright (C) 92, 93, 94, 95, 1996 Free Software Foundation, Inc. +@c Copyright (C) 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. @c @c This text may be freely distributed under the terms of the GNU @c General Public License. @@ -43,7 +43,7 @@ END-INFO-DIR-ENTRY @end tex @vskip 0pt plus 1filll -Copyright @copyright{} 92, 93, 94, 95, 1996 Free Software Foundation, Inc. +Copyright @copyright{} 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -60,7 +60,7 @@ into another language, under the above conditions for modified versions. @end titlepage @ifinfo -Copyright @copyright{} 92, 93, 94, 95, 1996 Free Software Foundation, Inc. +Copyright @copyright{} 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice diff --git a/doc/overview.sgml b/doc/overview.sgml index 58bce0c..4d86d25 100644 --- a/doc/overview.sgml +++ b/doc/overview.sgml @@ -4,18 +4,19 @@ - + 1998 + 2000 Free Software Foundation, Inc."> &dj; The GNU Testing Framework - 1998 Nov 24 + 2000 Jan 24 &version for circulation within Cygnus @@ -83,8 +85,8 @@ into another language, under the above conditions for modified versions. - 0.1 - 1998-11 + 0.5 + 2000-1-24 rob@welcomehome.org Initial version after conversion to DocBook. @@ -226,7 +228,7 @@ into another language, under the above conditions for modified versions. NT support. There is beta level support for NT that is still a work in progress. This requires the Cygwin POSIX system + URL="http://sources.redhat.com">Cygwin POSIX system for NT. @@ -235,13 +237,13 @@ into another language, under the above conditions for modified versions. NT Support To use DejaGnu on NT, you need to first install the - Cygwin + Cygwin release. This works as of the B20.1 release. Cygwin is a POSIX system for NT. This covers both utility programs, and a libray that adds POSIX system calls to NT. Among them is pseudo tty support for NT that emulates the POSIX pty standard. The latest Cygwin is always available from this location. This + URL="http://sources.redhat.com">this location. This works well enough to run "make check" of the GNU development tree on NT after a native build. But the nature of pty's on NT is still evolving. Your mileage may @@ -259,16 +261,18 @@ into another language, under the above conditions for modified versions. in many different environments, and we needed a testing tool that: - is useful to developers while fixing bugs. + is useful to developers while fixing + bugs. automates running many tests during a software - release process. + release process. is portable among a variety of host - computers. - supports cross-development testing. + computers. + supports cross-development + testing. permits testing interactive programs, like - GDB; and + GDB; and permits testing batch oriented programs, like - GCC. + GCC. Some of the requirements proved challenging. For example, @@ -323,7 +327,8 @@ into another language, under the above conditions for modified versions. POSIX conforming systems, and a fifth for a conditional feature. DejaGnu supports the use of all five output messages; in this sense a test suite that uses exactly these messages can be considered POSIX conforming. - These definitions specify the output of a test case: + These definitions specify the output of a test + case: @@ -374,30 +379,38 @@ into another language, under the above conditions for modified versions. code. Here are some of the ways a test may wind up - UNRESOLVED: + UNRESOLVED: - - A test's execution is interrupted. + + - A test does not produce a clear result. This is - usually because there was an ERROR from - DejaGnu while processing the test, or because there were three or - more WARNING messages. Any - WARNING or ERROR messages - can invalidate the output of the test. This usually requires a - human being to examine the output to determine what really - happened---and to improve the test case. + + A test's execution is + interrupted. + + A test does not produce a clear + result. This is usually because there was an + ERROR from DejaGnu while processing + the test, or because there were three or more + WARNING messages. Any + WARNING or ERROR + messages can invalidate the output of the test. This + usually requires a human being to examine the output to + determine what really happened---and to improve the test + case. A test depends on a previous test, which fails. - The test was set up incorrectly. + The test was set up + incorrectly. + UNTESTED A test was not run. This is a placeholder, used - when there is no real test case yet. + when there is no real test case yet. @@ -414,7 +427,8 @@ into another language, under the above conditions for modified versions. a testing environment (often a ``bare board'' target) lacks basic support for compiling or running the test case. For example, a test for the system subroutine gethostname - would never work on a target board running only a boot monitor. + would never work on a target board running only a boot + monitor. @@ -425,7 +439,7 @@ into another language, under the above conditions for modified versions. described in the PASS section above, and you must be careful to return UNRESOLVED where appropriate, as described in the UNRESOLVED section - above. + above. diff --git a/doc/overview/addboard.html b/doc/overview/addboard.html new file mode 100644 index 0000000..37463c7 --- /dev/null +++ b/doc/overview/addboard.html @@ -0,0 +1,261 @@ +Adding A New Board
DejaGnu
PrevChapter 4. Extending DejaGnuNext

Adding A New Board

Adding a new board consists of creating a new board config + file. Examples are in + dejagnu/baseboards. Usually to make a new + board file, it's easiest to copy an existing one. It is also + possible to have your file be based on a + baseboard file with only one or two + changes needed. Typically, this can be as simple as just + changing the linker script. Once the new baseboard file is done, + add it to the boards_DATA list in the + dejagnu/baseboards/Makefile.am, and regenerate the + Makefile.in using automake. Then just rebuild and install DejaGnu. You + can test it by:

There is a crude inheritance scheme going on with board files, so + you can include one board file into another, The two main procedures used + to do this are load_generic_config and + load_base_board_description. The generic config file + contains other procedures used for a certain class of target. The + board description file is where the board specfic settings go. Commonly + there are similar target environments with just different + processors.

Example 4-6. Testing a New Board Config File

      make check RUNTESTFLAGS="--target_board=newboardfile".
+      

Here's an example of a board config file. There are + several helper procedures used in this + example. A helper procedure is one that look for a tool of files + in commonly installed locations. These are mostly used when + testing in the build tree, because the executables to be tested + are in the same tree as the new dejagnu files. The helper + procedures are the ones in square braces + [], which is the Tcl execution characters.

Example 4-7. Example Board Config File


      # Load the generic configuration for this board. This will define a basic
+      # set of routines needed by the tool to communicate with the board.
+      load_generic_config "sim"
+
+      # basic-sim.exp is a basic description for the standard Cygnus simulator.
+      load_base_board_description "basic-sim"
+
+      # The compiler used to build for this board. This has *nothing* to do
+      # with what compiler is tested if we're testing gcc.
+      set_board_info compiler "[find_gcc]"
+
+      # We only support newlib on this target.
+      # However, we include libgloss so we can find the linker scripts.
+      set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]"
+      set_board_info ldflags "[newlib_link_flags]"
+
+      # No linker script for this board.
+      set_board_info ldscript "-Tsim.ld";
+
+      # The simulator doesn't return exit statuses and we need to indicate this.
+      set_board_info needs_status_wrapper 1
+
+      # Can't pass arguments to this target.
+      set_board_info noargs 1
+
+      # No signals.
+      set_board_info gdb,nosignals 1
+
+      # And it can't call functions.
+      set_board_info gdb,cannot_call_functions 1
+
+      

PrevHomeNext
Adding A New TargetUpBoard Config File Values
\ No newline at end of file diff --git a/doc/overview/adding.html b/doc/overview/adding.html new file mode 100644 index 0000000..cac339d --- /dev/null +++ b/doc/overview/adding.html @@ -0,0 +1,244 @@ +Adding A Test Case To A Test Suite.
DejaGnu
PrevChapter 4. Extending DejaGnuNext

Adding A Test Case To A Test Suite.

There are two slightly different ways to add a test + case. One is to add the test case to an existing directory. The + other is to create a new directory to hold your test. The + existing test directories represent several styles of testing, + all of which are slightly different; examine the directories for + the tool of interest to see which (if any) is most suitable.

Adding a GCC test can be very simple: just add the C code + to any directory beginning with gcc. and it + runs on the next
runtest --tool
+      gcc
.

To add a test to GDB, first add any source code you will + need to the test directory. Then you can either create a new + expect file, or add your test to an existing one (any + file with a .exp suffix). Creating a new + .exp file is probably a better idea if the test is significantly + different from existing tests. Adding it as a separate file also + makes upgrading easier. If the C code has to be already compiled + before the test will run, then you'll have to add it to the + Makefile.in file for that test directory, + then run configure and + make.

Adding a test by creating a new directory is very + similar:

  • Create the new directory. All subdirectory names + begin with the name of the tool to test; e.g. G++ tests might be + in a directory called g++.other. There can + be multiple test directories that start with the same tool name + (such as g++).

  • Add the new directory name to the + configdirs definition in the + configure.in file for the test suite + directory. This way when make and + configure next run, they include the new + directory.

  • Add the new test case to the directory, as + above.

  • To add support in the new directory for + configure and make, you must also create a + Makefile.in and a + configure.in.


PrevHomeNext
Debugging A Test CaseUpHints On Writing A Test Case
\ No newline at end of file diff --git a/doc/overview/addtarget.html b/doc/overview/addtarget.html new file mode 100644 index 0000000..609a6ac --- /dev/null +++ b/doc/overview/addtarget.html @@ -0,0 +1,206 @@ +Adding A New Target
DejaGnu
PrevChapter 4. Extending DejaGnuNext

Adding A New Target

DejaGnu has some additional requirements for target support, beyond + the general-purpose provisions of configure. DejaGnu must actively + communicate with the target, rather than simply generating or managing + code for the target architecture. Therefore, each tool requires an + initialization module for each target. For new targets, you must supply + a few Tcl procedures to adapt DejaGnu to the target. This permits + DejaGnu itself to remain target independent.

Usually the best way to write a new initialization module is to + edit an existing initialization module; some trial and error will be + required. If necessary, you can use the @samp{--debug} option to see what + is really going on.

When you code an initialization module, be generous in printing + information controlled by the verbose + procedure.

For cross targets, most of the work is in getting the + communications right. Communications code (for several situations + involving IP networks or serial lines) is available in a DejaGnu library + file.

If you suspect a communication problem, try running the connection + interactively from Expect. (There are three + ways of running Expect as an interactive + interpreter. You can run Expect with no + arguments, and control it completely interactively; or you can use + expect -i together with other command-line options and + arguments; or you can run the command interpreter from + any Expect procedure. Use + return to get back to the calling procedure (if any), + or return -tcl to make the calling procedure itself + return to its caller; use exit or end-of-file to leave + Expect altogether.) Run the program whose name is recorded in + $connectmode, with the arguments in + $targetname, to establish a connection. You should at + least be able to get a prompt from any target that is physically + connected.


PrevHomeNext
Adding A New ToolUpAdding A New Board
\ No newline at end of file diff --git a/doc/overview/addtool.html b/doc/overview/addtool.html new file mode 100644 index 0000000..a5f7330 --- /dev/null +++ b/doc/overview/addtool.html @@ -0,0 +1,577 @@ +Adding A New Tool
DejaGnu
PrevChapter 4. Extending DejaGnuNext

Adding A New Tool

In general, the best way to learn how to write (code or even prose) + is to read something similar. This principle applies to test cases and + to test suites. Unfortunately, well-established test suites have a way + of developing their own conventions: as test writers become more + experienced with DejaGnu and with Tcl, they accumulate more utilities, + and take advantage of more and more features of + Expect and Tcl in + general.

Inspecting such established test suites may make the prospect of + creating an entirely new test suite appear overwhelming. Nevertheless, + it is quite straightforward to get a new test suite going.

There is one test suite that is guaranteed not to grow more + elaborate over time: both it and the tool it tests were created expressly + to illustrate what it takes to get started with DejaGnu. The + example/ directory of the DejaGnu distribution + contains both an interactive tool called calc, and a + test suite for it. Reading this test suite, and experimenting with it, + is a good way to supplement the information in this section. (Thanks to + Robert Lupton for creating calc and its test suite---and also the first + version of this section of the manual!)

To help orient you further in this task, here is an outline of the + steps to begin building a test suite for a program example.

  • Create or select a directory to contain your new + collection of tests. Change into that directory (shown here as + testsuite):

    Create a configure.in file in this directory, + to control configuration-dependent choices for your tests. So far as + DejaGnu is concerned, the important thing is to set a value for the + variable target_abbrev; this value is the link to the + init file you will write soon. (For simplicity, we assume the + environment is Unix, and use unix as the + value.)

    What else is needed in configure.in depends on + the requirements of your tool, your intended test environments, and which + configure system you use. This example is a minimal configure.in for use + with GNU Autoconf.

  • Create Makefile.in (if you are using + Autoconf), or Makefile.am(if you are using + Automake), the source file used by configure to build your + Makefile. If you are using GNU Automake.just add the + keyword dejagnu to the + AUTOMAKE_OPTIONS variable in your + Makefile.am file. This will add all the Makefile + support needed to run DejaGnu, and support the Make Check + target.

    You also need to include two targets important to DejaGnu: + check, to run the tests, and + site.exp, to set up the Tcl copies of + configuration-dependent values. This is called the Local Config File + The check target must run the runtest program to + execute the tests.

    The site.exp target should usually set up + (among other things) the $tool variable for the name of your program. If + the local site.exp file is setup correctly, it is possible to execute the + tests by merely typing runtest on the command + line.

    Example 4-1. Sample Makefile.in Fragment

    	# Look for a local version of DejaGnu, otherwise use one in the path
    +	RUNTEST = `if test -f $(top_srcdir)/../dejagnu/runtest; then \
    +	      echo $(top_srcdir) ../dejagnu/runtest; \
    +	    else \
    +	       echo runtest; \
    +	     fi`
    +
    +	# The flags to pass to runtest
    +	RUNTESTFLAGS =
    +
    +	# Execute the tests 
    +	check: site.exp all
    +        $(RUNTEST) $(RUNTESTFLAGS) \
    +            --tool ${example} --srcdir $(srcdir) 
    +
    +	# Make the local config file
    +	site.exp: ./config.status Makefile
    +	    @echo "Making a new config file..."
    +            -@rm -f ./tmp?
    +            @touch site.exp
    +
    +            -@mv site.exp site.bak
    +            @echo "## these variables are automatically\
    + generated by make ##" > ./tmp0
    +	    @echo "# Do not edit here. If you wish to\
    + override these values" >> ./tmp0
    +            @echo "# add them to the last section" >> ./tmp0
    +            @echo "set host_os ${host_os}" >> ./tmp0
    +            @echo "set host_alias ${host_alias}" >> ./tmp0
    +            @echo "set host_cpu ${host_cpu}" >> ./tmp0
    +            @echo "set host_vendor ${host_vendor}" >> ./tmp0
    +            @echo "set target_os ${target_os}" >> ./tmp0
    +            @echo "set target_alias ${target_alias}" >> ./tmp0
    +            @echo "set target_cpu ${target_cpu}" >> ./tmp0
    +            @echo "set target_vendor ${target_vendor}" >> ./tmp0
    +            @echo "set host_triplet ${host_canonical}" >> ./tmp0
    +            @echo "set target_triplet ${target_canonical}">>./tmp0
    +            @echo "set tool binutils" >> ./tmp0
    +            @echo "set srcdir ${srcdir}" >> ./tmp0
    +            @echo "set objdir `pwd`" >> ./tmp0
    +            @echo "set ${examplename} ${example}" >> ./tmp0
    +            @echo "## All variables above are generated by\
    + configure. Do Not Edit ##" >> ./tmp0
    +            @cat ./tmp0 > site.exp
    +            @sed < site.bak \
    +               -e '1,/^## All variables above are.*##/ d' \
    +               >> site.exp
    +            -@rm -f ./tmp?
    +
    +	    
  • Create a directory (in testsuite) + called config. Make a Tool Init + File in this directory. Its name must start with the + target_abbrev value, or be named + default.exp so call it + config/unix.exp for our Unix based example. This + is the file that contains the target-dependent procedures. + Fortunately, on Unix, most of them do not have to do very much in + order for runtest to run.

    If the program being tested is not interactive, you can get + away with this minimal unix.exp to begin + with:

    Example 4-2. Simple Batch Program Tool Init File

    	  
    +	  proc foo_exit {} {}
    +	  proc foo_version {} {}
    +
    +	  

    If the program being tested is interactive, however, you might + as well define a start routine and invoke it by + using an init file like this:

    Example 4-3. Simple Interactive Program Tool Init File

    	
    +	  proc foo_exit {} {}
    +	  proc foo_version {} {}
    +
    +	  proc foo_start {} {
    +	    global ${examplename}
    +	    spawn ${examplename}
    +	    expect {
    +	        -re "" {}
    +	    }
    +	  }
    +
    +	  # Start the program running we want to test
    +	  foo_start
    +
    +	  
  • Create a directory whose name begins with your tool's + name, to contain tests. For example, if your tool's name is + gcc, then the directories all need to start with + "gcc.".

  • Create a sample test file. Its name must end with + .exp. You can use + first-try.exp. To begin with, just write there a + line of Tcl code to issue a message.

    Example 4-4. Testing A New Tool Config

    
	  send_user "Testing: one, two...\n"
    +
    +	  
  • Back in the testsuite (top + level) directory, run configure. Typically you do + this while in the build directory. You may have to specify more of a + path, if a suitable configure is not available in your execution + path.

  • e now ready to triumphantly type make + check or runtest. You should see + something like this:

    Example 4-5. Example Test Case Run

    	  Test Run By rhl on Fri Jan 29 16:25:44 EST 1993
    +
    +                === example tests ===
    +
    +	  Running ./example.0/first-try.exp ...
    +	  Testing: one, two...
    +
    +                === example Summary ===
    +
    +	 

    There is no output in the summary, because so far the example + does not call any of the procedures that establish a test + outcome.

  • Write some real tests. For an interactive tool, you + should probably write a real exit routine in fairly short order. In + any case, you should also write a real version routine + soon.


PrevHomeNext
Extending DejaGnuUpAdding A New Target
\ No newline at end of file diff --git a/doc/overview/boardconfig.html b/doc/overview/boardconfig.html new file mode 100644 index 0000000..95d6643 --- /dev/null +++ b/doc/overview/boardconfig.html @@ -0,0 +1,254 @@ +Board Config File
DejaGnu
PrevChapter 3. Customizing DejaGnuNext

Board Config File

The board config file is where board specfic config data + is stored. A board config file contains all the higher-level + configuration settings. There is a rough inheritance scheme, where it is + possible to base a new board description file on an existing one. There + are also collections of custom procedures for common environments. For + more information on adding a new board config file, go to the Adding A New Board chapter.

An example board config file for a GNU simulator is as + follows. set_board_info is a procedure that sets the + field name to the specified value. The procedures in square brackets + [] are helper procedures. Thes + are used to find parts of a tool chain required to build an executable + image that may reside in various locations. This is mostly of use for + when the startup code, the standard C lobraries, or the tool chain itself + is part of your build tree.

Example 3-5. Board Config File

      # This is a list of toolchains that are supported on this board.
+      set_board_info target_install {sparc64-elf}
+
+      # Load the generic configuration for this board. This will define any
+      # routines needed by the tool to communicate with the board.
+      load_generic_config "sim"
+
+      # We need this for find_gcc and *_include_flags/*_link_flags.
+      load_base_board_description "basic-sim"
+
+      # Use long64 by default.
+      process_multilib_options "long64"
+
+      setup_sim sparc64
+
+      # We only support newlib on this target. We assume that all multilib
+      # options have been specified before we get here.
+      set_board_info compiler  "[find_gcc]"
+      set_board_info cflags  "[libgloss_include_flags] [newlib_include_flags]"
+      set_board_info ldflags  "[libgloss_link_flags] [newlib_link_flags]"
+      # No linker script.
+      set_board_info ldscript "";
+
+      # Used by a few gcc.c-torture testcases to delimit how large the
+      # stack can be.
+      set_board_info gcc,stack_size 16384
+      # The simulator doesn't return exit statuses and we need to indicate this
+      # the standard GCC wrapper will work with this target.
+      set_board_info needs_status_wrapper 1
+      # We can't pass arguments to programs.
+      set_board_info noargs 1
+      

There are five helper procedures used in this example. The first + one, find gcc looks for a copy of the GNU compiler in + your build tree, or it uses the one in your path. This will also return + the proper transformed name for a cross compiler if you whole build tree + is configured for one. The next helper procedures are + libgloss_include_flags & + libgloss_link_flags. These return the proper flags to + compiler and link an executable image using Libgloss, the GNU BSP (Board Support Package). The final + procedures are newlib_include_flag & + newlib_include_flag. These find the Newlib C + library, which is a reentrant standard C library for embedded systems + comprising of non GPL'd code.


PrevHomeNext
Global Config FileUpRemote Host Testing
\ No newline at end of file diff --git a/doc/overview/boarddefs.html b/doc/overview/boarddefs.html new file mode 100644 index 0000000..d89694c --- /dev/null +++ b/doc/overview/boarddefs.html @@ -0,0 +1,887 @@ +Board Config File Values
DejaGnu
PrevChapter 4. Extending DejaGnuNext

Board Config File Values

These fields are all in the board_info These are + all set by using the set_board_info procedure. The + parameters are the field name, followed by the value to set the field + to.

Table 4-1. Common Board Info Fields

FieldSample ValueDescription
compiler"[find_gcc]"The path to the compiler to use.
cflags"-mca"Compilation flags for the compiler.
ldflags"[libgloss_link_flags] [newlib_link_flags]"Linking flags for the compiler.
ldscript"-Wl,-Tidt.ld"The linker script to use when cross compiling.
libs"-lgcc"Any additional libraries to link in.
shell_prompt"cygmon>"The command prompt of the remote shell.
hex_startaddr"0xa0020000"The Starting address as a string.
start_addr0xa0008000The starting address as a value.
startaddr"a0020000" 
exit_statuses_bad1Whether there is an accurate exit status.
reboot_delay10The delay between power off and power on.
unreliable1Whether communication with the board is unreliable.
sim[find_sim]The path to the simulator to use.
objcopy$tempfilThe path to the objcopy program.
support_libs"${prefix_dir}/i386-coff/"Support libraries needed for cross compiling.
addl_link_flags"-N"Additional link flags, rarely used.
+

These fields are used by the GCC and GDB tests, and are mostly + only useful to somewhat trying to debug a new board file for one of + these tools. Many of these are used only by a few testcases, and their + purpose is esoteric. These are listed with sample values as a guide to + better guessing if you need to change any of these.

Table 4-2. Board Info Fields For GCC & GDB

FieldSample ValueDescription
strip$tempfileStrip the executable of symbols.
gdb_load_offset"0x40050000" 
gdb_protocol"remote"The GDB debugging protocol to use.
gdb_sect_offset"0x41000000"; 
gdb_stub_ldscript"-Wl,-Teva-stub.ld"The linker script to use with a GDB stub.
gdb_init_command"set mipsfpu none" 
gdb,cannot_call_functions1Whether GDB can call functions on the target,
gdb,noargs1Whether the target can take command line arguments.
gdb,nosignals1Whether there are signals on the target.
gdb,short_int1 
gdb,start_symbol"_start";The starting symbol in the executable.
gdb,target_sim_options"-sparclite"Special options to pass to the simulator.
gdb,timeout540Timeout value to use for remote communication.
gdb_init_command"print/x \$fsr = 0x0" 
gdb_load_offset"0x12020000" 
gdb_opts"--command gdbinit" 
gdb_prompt"\\(gdb960\\)"The prompt GDB is using.
gdb_run_command"jump start" 
gdb_stub_offset"0x12010000" 
use_gdb_stub1Whether to use a GDB stub.
use_vma_offset1 
wrap_m68k_aout1 
gcc,no_label_values1 
gcc,no_trampolines1 
gcc,no_varargs1 
gcc,stack_size16384Stack size to use with some GCC testcases.
ieee_multilib_flags"-mieee"; 
is_simulator1 
needs_status_wrapper1 
no_double1 
no_long_long1 
noargs1 
nullstone,lib"mips-clock.c" 
nullstone,ticks_per_sec3782018 
sys_speed_value200 
target_install{sh-hms} 
+


PrevHomeNext
Adding A New BoardUpWriting A Test Case
\ No newline at end of file diff --git a/doc/overview/book1.html b/doc/overview/book1.html new file mode 100644 index 0000000..68347e0 --- /dev/null +++ b/doc/overview/book1.html @@ -0,0 +1,403 @@ +DejaGnu

DejaGnu

The GNU Testing Framework

Rob Savoye

Free Software Foundation

Copyright © 2000 by Free Software Foundation, Inc.


Table of Contents
Abstract
1. Overview
What is DejaGnu ?
What's New In This Release
NT Support
Design Goals
A POSIX conforming test framework
2. Running Tests
Make check
Runtest
Output States
Invoking Runtest
Common Options
The files DejaGnu produces.
Summary File
Log File
Debug Log File
3. Customizing DejaGnu
Local Config File
Global Config File
Board Config File
Remote Host Testing
Config File Values
Command Line Option Variables
Personal Config File
4. Extending DejaGnu
Adding A New Test Suite
Adding A New Tool
Adding A New Target
Adding A New Board
Board Config File Values
Writing A Test Case
Debugging A Test Case
Adding A Test Case To A Test Suite.
Hints On Writing A Test Case
Special variables used by test cases.
5. Reference
Installation
Configuring DejaGnu
Installing DejaGnu
Builtin Procedures
Core Internal Procedures
Procedures For Remote Communication
Procedures For Using Utilities to Connect
Procedures For Target Boards
Target Database Procedures
Platform Dependant Procedures
Utility Procedures
Libgloss, A Free BSP
Procedures for debugging your Tcl code.
File Map

  Next
  Abstract
\ No newline at end of file diff --git a/doc/overview/builtins.html b/doc/overview/builtins.html new file mode 100644 index 0000000..8a01039 --- /dev/null +++ b/doc/overview/builtins.html @@ -0,0 +1,10723 @@ +Builtin Procedures
DejaGnu
PrevChapter 5. ReferenceNext

Builtin Procedures

DejaGnu provides these Tcl procedures.

Core Internal Procedures

Mail_file Procedure

mail_file(file to subject);

Isbuild Procedure

Tests for a particular build host environment. If the + currently configured host matches the argument string, the result is + 1; otherwise the result is + 0. host must be a full + three-part configure host name; in particular, you may not use the + shorter nicknames supported by configure (but you can use wildcard + characters, using shell syntax, to specify sets of names). If it is + passed a NULL string, then it returns the name of the build canonical + configuration.

isbuild(pattern);

pattern

Is_remote Procedure

is_remote(board);

is3way Procedure

Tests for a canadian cross. This is when the tests will be run + on a remotly hosted cross compiler. If it is a canadian cross, then + the result is 1; otherwise the result is + 0.

is3way();

Ishost Procedure

Tests for a particular host environment. If the currently + configured host matches the argument string, the result is + 1; otherwise the result is + 0. host must be a full + three-part configure host name; in particular, you may not use the + shorter nicknames supported by configure (but you can use wildcard + characters, using shell syntax, to specify sets of names).

ishost(pattern);

Istarget Procedure

Tests for a particular target environment. If the currently + configured target matches the argument string, the result is + 1 ; otherwise the result is + 0. target must be a full three-part configure + target name; in particular, you may not use the shorter nicknames + supported by configure (but you can use wildcard characters, using + shell syntax, to specify sets of names). If it is passed a + NULL string, then it returns the name of the + build canonical configuration.

istarget(args);

Isnative Procedure

Tests whether the current configuration has the same host and + target. When it runs in a native configuration this procedure returns + a 1; otherwise it returns a + 0.

isnative();

Unknown Procedure

unknown(args);

args

Clone_output Procedure

clone_output(message);

message

Log_and_exit Procedure

log_and_exit();

Log_summary Procedure

log_summary(args);

args

Setup_xfail Procedure

Declares that the test is expected to fail on a particular set + of configurations. The config argument must be a list of full + three-part configure target name; in particular, you may not use the + shorter nicknames supported by configure (but you can use the common + shell wildcard characters to specify sets of names). The + bugid argument is optional, and used only in the + logging file output; use it as a link to a bug-tracking system such + as GNATS.

Once you use setup_xfail, the + fail and pass procedures + produce the messages XFAIL and + XPASS respectively, allowing you to distinguish + expected failures (and unexpected success!) from other test + outcomes.

Warning

Warning you must clear the expected failure after + using setup_xfail in a test case. Any call to pass + or faill clears the expected failure + implicitly; if the test has some other outcome, e.g. an error, you + can call clear_xfail to clear the expected + failure explicitly. Otherwise, the expected-failure declaration + applies to whatever test runs next, leading to surprising + results.

setup_xfail(config + bugid);

config

The config triplet to trigger whether this is an + unexpected or expect failure.

bugid

The optional bugid, used to tie it this test case + to a bug tracking system.

Record_test Procedure

record_test(type + message + args);

type

message

args

Pass Procedure

Declares a test to have passed. pass + writes in the log files a message beginning with + PASS (or XPASS, if failure + was expected), appending the argument + string.

pass(string);

string

The string to use for this PASS + message.

Fail Procedure

Declares a test to have failed. fail + writes in the log files a message beginning with + FAIL (or XFAIL, if failure + was expected), appending the argument + string.

fail(string);

string

The string to use for this FAIL + message.

Xpass Procedure

Declares a test to have unexpectably passed, when it was + expected to be a failure. xpass + writes in the log files a message beginning with + XPASS (or XFAIL, if failure + was expected), appending the argument + string.

xpass(string);

string

The string to use for this output + state.

Xfail Procedure

Declares a test to have expectably + failed. xfail + writes in the log files a message beginning with + XFAIL (or PASS, if success + was expected), appending the argument + string.

xpass(string);

string

The string to use for this output + state.

Set_warning_threshold Procedure

Sets the value of warning_threshold. A value + of 0 disables it: calls to + warning will not turn a + PASS or FAIL into an + UNRESOLVED.

set_warning_threshold(threshold);

threshold

This is the value of the new warning + threshold.

Get_warning_threshold Procedure

Returns the current value of + {warning_threshold. The default value is 3. This + value controls how many warning procedures can + be called before becoming UNRESOLVED.

get_warning_threshold();

Warning Procedure

Declares detection of a minor error in the test case + itself. warning writes in the log files a message + beginning with WARNING, appending the argument + string. Use warning rather + than perror for cases (such as communication + failure to be followed by a retry) where the test case can recover from + the error. If the optional number is supplied, + then this is used to set the internal count of warnings to that + value.

As a side effect, warning_threshold or more + calls to warning in a single test case also changes the effect of the + next pass or fail command: + the test outcome becomes UNRESOLVED since an + automatic PASS or FAIL may + not be trustworthy after many warnings. If the optional numeric value + is 0, then there are no further side effects to + calling this function, and the following test outcome doesn't become + UNRESOLVED. This can be used for errors with no + known side effects.

warning(string + number + );

string

number

The optional number to set the error counter. Thius + is only used to fake out the counter when using the + xfail procedure to control when it flips the + output over to UNRESOLVED + state.

Perror Procedure

Declares a severe error in the testing framework + itself. perror writes in the log files a message + beginning with ERROR, appending the argument + string.

As a side effect, perror also changes the effect of the next + pass or fail command: the + test outcome becomes UNRESOLVED, since an + automatic PASS or FAIL cannot + be trusted after a severe error in the test framework. If the optional + numeric value is 0, then there are no further side + effects to calling this function, and the following test outcome + doesn't become UNRESOLVED. This can be used for + errors with no known side effects.

perror(string + number + );

string

number

The optional number to set the error counter. Thius + is only used to fake out the counter when using the + xfail procedure to control when it flips the + output over to UNRESOLVED + state.

Note Procedure

Appends an informational message to the log + file. note writes in the log files a message + beginning with NOTE, appending the argument + string. Use note + sparingly. The verbose should be used for most + such messages, but in cases where a message is needed in the log file + regardless of the verbosity level use note.

note(string);

string

The string to use for this note.

Untested Procedure

Declares a test was not run. untested writes + in the log file a message beginning with UNTESTED, + appending the argument string. For example, you + might use this in a dummy test whose only role is to record that a test + does not yet exist for some feature.

untested(string);

string

The string to use for this output + state.

Unresolved Procedure

Declares a test to have an unresolved + outcome. unresolved writes in the log file a + message beginning with UNRESOLVED, appending the + argument string. This usually means the test did + not execute as expected, and a human being must go over results to + determine if it passed or failed (and to improve the test case).

unresolved(string);

string

The string to use for this output + state.

Unsupported Procedure

Declares that a test case depends on some facility that does not + exist in the testing environment. unsupported + writes in the log file a message beginning with + UNSUPPORTED, appending the argument string.

unsupported(string);

string

The string to use for this output + state.

Init_testcounts Procedure

init_testcounts();

Incr_count Procedure

incr_count(name + args);

name

args

transform Procedure

Generates a string for the name of a tool as it was configured + and installed, given its native name (as the argument + toolname). This makes the assumption that all + tools are installed using the same naming conventions: For example, + for a cross compiler supporting the m68k-vxworks + configuration, the result of transform gcc is + m68k-vxworks-gcc.

transform(toolname);

toolname

The name of the cross-development program to + transform.

Check_conditional_xfail Procedure

This procedure adds a condition xfail, based on compiler + options used to create a test case executable. If an include options + is found in the compiler flags, and it's the right architecture, + it'll trigger an XFAIL. Otherwise it'll produce + an ordinary FAIL. You can also specify flags to + exclude. This makes a result be a FAIL, even if + the included options are found. To set the conditional, set + the variable compiler_conditional_xfail_data to the + fields
"[message string] [targets list] [includes
+	  list] [excludes list]"
(descriptions below). This is + the checked at pass/fail decision time, so there is no need to call + the procedure yourself, unless you wish to know if it gets + triggered. After a pass/fail, the variable is reset, so it doesn't + effect other tests. It returns 1 if the + conditional is true, or 0 if the conditional is + false.

check_conditional_xfail(message + targets + includes + excludes);

message

This is the message to print with the normal test + result.

targets

This is a string with the list targets to activate + this conditional on.

includes

This is a list of sets of options to search for in + the compiler options to activate this conditional. If any set of + the options matches, then this conditional is + true.

excludes

This is a list of sets of options to search for in + the compiler options to activate this conditional. If any set of + the options matches, (regardless of whether any of the include sets + match) then this conditional is de-activated.

Example 5-1. Specifying the conditional xfail data

	  set compiler_conditional_xfail_data { \
+	       "I sure wish I knew why this was hosed" \
+               "sparc*-sun*-* *-pc-*-*" \
+               {"-Wall -v" "-O3"} \
+               {"-O1" "-Map"} \
+          }
+	  

What this does is it matches only for these two targets if + "-Wall -v" or "-O3" is set, but neither "-O1" or "-Map" is set. For + a set to match, the options specified are searched for independantly + of each other, so a "-Wall -v" matches either "-Wall -v" or "-v + -Wall". A space seperates the options in the string. Glob-style + regular expressions are also permitted.

Clear_xfail Procedure

Cancel an expected failure (previously declared with + setup_xfail) for a particular set of + configurations. The config argument is a list + of configuration target names. It is only necessary to call + clear_xfail if a test case ends without calling + either pass or fail, after + calling setup_xfail.

clear_xfail(config);

config

The configuration triplets to + clear.

Verbose Procedure

Test cases can use this function to issue helpful messages + depending on the number of --verbose options on the + runtest command line. It prints string if the value of the variable + verbose is higher than or equal to the optional + number. The default value for number is 1. Use + the optional -log argument to cause string to always + be added to the log file, even if it won't be printed. Use the + optional -n argument to print string without a + trailing newline. Use the optional -- argument if + string begins with "-".

verbose(-log + -n + -r + string + number);

-log

-n

--

string

number

Load_lib Procedure

Loads a DejaGnu library file by searching a fixed path built + into DejaGnu. If DejaGnu has been installed, it looks in a path + starting with the installed library directory. If you are running + DejaGnu directly from a source directory, without first running + make install, this path defaults to the current + directory. In either case, it then looks in the current directory + for a directory called lib. If there are + duplicate definitions, the last one loaded takes precedence over the + earlier ones.

load_lib(filespec);

filespec

The name of the DejaGnu library file to + load.

Procedures For Remote Communication

lib/remote.exp defines these + functions, for establishing and managing communications. Each + of these procedures tries to establish the connection up to + three times before returning. Warnings (if retries will + continue) or errors (if the attempt is abandoned) report on + communication failures. The result for any of these + procedures is either -1, when the + connection cannot be established, or the spawn ID returned by + the Expect command + spawn.

It use the value of the connect field + in the target_info array (was + connectmode as the type of connection to + make. Current supported connection types are tip, kermit, + telnet, rsh, rlogin, and netdata. If the --reboot + option was used on the runtest command line, then the target + is rebooted before the connection is made.

Call_remote Procedure

call_remote(type + proc + dest + args);

proc

dest

args

Check_for_board_status Procedure

check_for_board_status(variable);

variable

File_on_build Procedure

file_on_build(op + file + args);

op

file

args

File_on_host Procedure

file_on_host(op + file + args);

op

file

args

Local_exec Procedure

local_exec(commandline + inp + outp + timeout);

inp

outp

timeout

Remote_binary Procedure

remote_binary(host);

host

Remote_close Procedure

remote_close(shellid);

shellid

This is the value returned by a call + to remote_open. This closes the + connection to the target so resources can be used by + others. This parameter can be left off if the + fileid field in the + target_info array is set.

Remote_download Procedure

remote_download(dest + file + args);

dest

file

args

Remote_exec Procedure

remote_exec(hostname + program + args);

hostname

program

args

Remote_expect Procedure

remote_expect(board + timeout + args);

board

timeout

args

Remote_file Procedure

remote_file(dest + args);

dest

args

Remote_ld Procedure

remote_ld(dest + prog);

dest

prog

Remote_load Procedure

remote_load(dest + prog + args);

dest

prog

args

Remote_open Procedure

remote_open(type);

type

This is passed host or + target. Host or target refers to + whether it is a connection to a remote target, or a + remote host. This opens the connection to the desired + target or host using the default values in the + configuration system. It returns that + spawn_id of the process that manages + the connection. This value can be used in + Expect or + exp_send statements, or passed to + other procedures that need the connection process's + id. This also sets the fileid field in + the target_info array.

Remote_pop_conn Procedure

remote_pop_conn(host);

host

Remote_push_conn Procedure

remote_push_conn(host);

host

Remote_raw_binary Procedure

remote_raw_binary(host);

host

Remote_raw_close Procedure

remote_raw_close(host);

host

Remote_raw_file Procedure

remote_raw_file(dest + args);

dest

args

remote_raw_ld Procedure

remote_raw_ld(dest + prog);

dest

prog

Remote_raw_load Procedure

remote_raw_load(dest + prog + args);

dest

prog

args

Remote_raw_open Procedure

remote_raw_open(args);

args

Remote_raw_send Procedure

remote_raw_send(dest + string);

dest

string

Remote_raw_spawn Procedure

remote_raw_spawn(dest + commandline);

dest

commandline

Remote_raw_transmit Procedure

remote_raw_transmit(dest + file);

dest

file

Remote_raw_wait Procedure

remote_raw_wait(dest + timeout);

dest

timeout

Remote_reboot Procedure

remote_reboot(host);

host

Remote_send Procedure

remote_send(dest + string);

dest

string

Remote_spawn Procedure

remote_spawn(dest + commandline + args);

dest

commandline

args

Remote_swap_conn Procedure

remote_swap_conn(host);

Remote_transmit Procedure

remote_transmit(dest + file);

dest

file

Remote_upload Procedure

remote_upload(dest + srcfile + arg);

dest

srcfile

arg

Remote_wait Procedure

remote_wait(dest + timeout);

dest

timeout

Standard_close Procedure

standard_close(host);

host

Standard_download Procedure

standard_download(dest + file + destfile);

dest

file

destfile

Standard_exec Procedure

standard_exec(hostname + args);

hostname

args

Standard_file Procedure

standard_file(dest, op, args);

Standard_load Procedure

standard_load(dest + prog + args);

dest

prog

args

Standard_reboot Procedure

standard_reboot(host);

host

Standard_send Procedure

standard_send(dest + string);

dest

string

Standard_spawn Procedure

standard_spawn(dest + commandline);

dest

commndline

Standard_transmit Procedure

standard_transmit(dest + file);

dest

file

Standard_upload Procedure

standard_upload(dest srcfile destfile);

dest

srcfile

destfile

Standard_wait Procedure

standard_wait(dest + timeout);

dest

timeout

Unix_clean_filename Procedure

unix_clean_filename(dest + file);

dest

file

Procedures For Using Utilities to Connect

telnet, rsh, tip, kermit

telnet Procedure

telnet(hostname + port);

rlogin(hostname);

rsh Procedure

rsh(hostname);

hostname

This refers to the IP address or name + (for example, an entry in + /etc/hosts) for this target. The + procedure names reflect the Unix utility used to + establish a connection. The optional + port is used to specify the IP + port number. The value of the + netport field in the + target_info array is used. (was + $netport) This value has two parts, + the hostname and the port number, seperated by a + :. If host or target is used in + the hostname field, than the + config array is used for all information.

Tip Procedure

tip(port);

port

Connect using the Unix utility + tip. Portmust + be a name from the tip + configuration file + /etc/remote. Often, this is called + hardwire, or something like + ttya. This file holds all the + configuration data for the serial port. The value of + the serial field in the + target_info array is used. (was + $serialport) If host + or target is used in the + port field, than the config + array is used for all information. the + config array is used for all information.

Kermit Procedure

kermit(port + bps);

port

Connect using the program + kermit. Port + is the device name, + e.g. /dev/ttyb. +

bps

bps is the line + speed to use (in its per second) for the + connection. The value of the serial + field in the target_info array is + used. (was $serialport) If + host or target is + used in the port field, than the + config array is used for all information. the + config array is used for all information.

kermit_open Procedure

kermit_open(dest + args);

dest

args

Kermit_command Procedure

kermit_command(dest + args);

dest

args

Kermit_send Procedure

kermit_send(dest string args);

dest

string

args

Kermit_transmit Procedure

kermit_transmit(dest + file + args);

dest

file

args

Telnet_open Procedure

telnet_open(hostname + args);

hostname

args

Telnet_binary Procedure

telnet_binary(hostname);

hostname

Telnet_transmit Procedure

telnet_transmit(dest + file + args);

dest

file

args

Tip_open Procedure

tip_open(hostname);

hostname

Rlogin_open Procedure

rlogin_open(arg);

arg

Rlogin_spawn Procedure

rlogin_spawn(dest + cmdline);

dest

cmdline

Rsh_open Procedure

rsh_open(hostname);

hostname

Rsh_download Procedure

rsh_download(desthost + srcfile + destfile);

desthost

srcfile

destfile

Rsh_upload Procedure

rsh_upload(desthost + srcfile + destfile);

desthost

srcfile

destfile

Rsh_exec Procedure

rsh_exec(boardname + cmd + args);

boardname

cmd

args

Ftp_open Procedure

ftp_open(host);

host

Ftp_upload Procedure

ftp_upload(host + remotefile + localfile);

host

remotefile

localfile

Ftp_download Procedure

ftp_download(host + localfile + remotefile);

host

localfile

remotefile

Ftp_close Procedure

ftp_close(host);

host

Tip_download Procedure

tip_download(spawnid + file);

spawnid

Download file to the + process spawnid (the value returned + when the connection was established), using the + ~put command under + tip. Most often used for + single board computers that require downloading + programs in ASCII S-records. Returns + 1 if an error occurs, + 0 otherwise.

file

This is the filename to + downlaod.

Procedures For Target Boards

Default_link Procedure

default_link(board + objects + destfile + flags);

board

objects

destfile

flags

Default_target_assemble Procedure

default_target_assemble(source + destfile + flags);

source

destfile

flags

default_target_compile Procedure

default_target_compile(source + destfile + type + options);

source

destfile

type

options

Pop_config Procedure

pop_config(type);

type

Prune_warnings Procedure

prune_warnings(text);

text

Push_build Procedure

push_build(name);

name

push_config Procedure

push_config(type + name);

type

name

Reboot_target Procedure

reboot_target();

Target_assemble Procedure

target_assemble(source destfile flags);

source

destfile

flags

Target_compile Procedure

target_compile(source + destfile + type + options);

source

destfile

type

options

Target Database Procedures

Board_info Procedure

board_info(machine + op + args);

machine

op

args

Host_info Procedure

host_info(op + args);

op

args

Set_board_info Procedure

set_board_info(entry + value);

entry

value

Set_currtarget_info Procedure

set_currtarget_info(entry + value);

entry

value

Target_info Procedure

target_info(op + args);

op

args

Unset_board_info Procedure

unset_board_info(entry);

entry

Unset_currtarget_info Procedure

unset_currtarget_info(entry);

entry

Push_target Procedure

This makes the target named name be the + current target connection. The value of name is + an index into the target_info array and is set in + the global config file.

push_target(name);

name

The name of the target to make current + connection.

Pop_target Procedure

This unsets the current target connection.

pop_target();

List_targets Procedure

This lists all the supported targets for this + architecture.

list_targets();

Push_host Procedure

This makes the host named name be the + current remote host connection. The value of + name is an index into the + target_info array and is set in the global config + file.

push_host(name);

name

Pop_host Procedure

This unsets the current host connection.

pop_host();

Compile Procedure

This invokes the compiler as set by CC to compile the + file file. The default options for many cross + compilation targets are guessed by DejaGnu, and + these options can be added to by passing in more parameters as + arguments to compile. Optionally, this will also + use the value of the cflags field in the target + config array. If the host is not the same as the build machines, then + then compiler is run on the remote host using + execute_anywhere.

compile(file);

file

Archive Procedure

This produces an archive file. Any parameters passed to + archive are used in addition to the default + flags. Optionally, this will also use the value of the + arflags field in the target config array. If the + host is not the same as the build machines, then then archiver is run + on the remote host using execute_anywhere.

archive(file);

file

Ranlib Procedure

This generates an index for the archive file for systems that + aren't POSIX yet. Any parameters passed to ranlib + are used in for the flags.

ranlib(file);

file

Execute_anywhere Procedure

This executes the cmdline on the proper + host. This should be used as a replacement for the Tcl command + exec as this version utilizes the target config + info to execute this command on the build machine or a remote + host. All config information for the remote host must be setup to + have this command work. If this is a canadian cross, (where we test a + cross compiler that runs on a different host then where DejaGnu is + running) then a connection is made to the remote host and the command + is executed there. It returns either REMOTERROR (for an error) or the + output produced when the command was executed. This is used for + running the tool to be tested, not a test case.

execute_anywhere(cmdline);

cmdline

Platform Dependant Procedures

Each combination of target and tool requires some + target-dependent procedures. The names of these procedures have + a common form: the tool name, followed by an underbar + _, and finally a suffix describing the + procedure's purpose. For example, a procedure to extract the + version from GDB is called + gdb_version.

runtest itself calls only two of these + procedures, ${tool}_exit and + ${tool}_version; these procedures use no + arguments.

The other two procedures, ${tool}_start + and ${tool}_load}, are only called by the test + suites themselves (or by testsuite-specific initialization + code); they may take arguments or not, depending on the + conventions used within each test suite.

The usual convention for return codes from any of these + procedures (although it is not required by + runtest) is to return 0 + if the procedure succeeded, 1 if it failed, + and -1 if there was a communication error.

${tool}_start Procedure

Starts a particular tool. For an interactive tool, + ${tool}_start starts and initializes the + tool, leaving the tool up and running for the test cases; an + example is gdb_start, the start function + for GDB. For a batch oriented tool, + ${tool}_start is optional; the recommended + convention is to let ${tool}_start run the + tool, leaving the output in a variable called + comp_output. Test scripts can then analyze + $comp_output to determine the test results. + An example of this second kind of start function is + gcc_start, the start function for GCC.

DejaGnu itself does not call + ${tool}_start. The initialization + module ${tool}_init.exp must call + ${tool}_start for interactive tools; + for batch-oriented tools, each individual test script calls + ${tool}_start (or makes other + arrangements to run the tool).

${tool}_start();

${tool}_load Procedure

Loads something into a tool. For an interactive tool, + this conditions the tool for a particular test case; for + example, gdb_load loads a new + executable file into the debugger. For batch oriented tools, + ${tool}_load may do nothing---though, + for example, the GCC support uses + gcc_load to load and run a binary on + the target environment. Conventionally, + ${tool}_load leaves the output of any + program it runs in a variable called + $exec_output. Writing + ${tool}_load can be the most complex + part of extending DejaGnu to a new tool or a new target, if + it requires much communication coding or file + downloading. Test scripts call + ${tool}_load.

${tool}_load();

${tool}_exit Procedure

Cleans up (if necessary) before DejaGnu exits. For + interactive tools, this usually ends the interactive + session. You can also use ${tool}_exit + to remove any temporary files left over from the + tests. runtest calls + ${tool}_exit.

${tool}_exit();

${tool}_version Procedure

Prints the version label and number for + ${tool}. This is called by the DejaGnu + procedure that prints the final summary report. The output + should consist of the full path name used for the tested + tool, and its version number.

${tool}_version();

Utility Procedures

Getdirs Procedure

Returns a list of all the directories in the single + directory a single directory that match an optional + pattern.

getdirs(rootdir + pattern);

args

pattern

If you do not specify + pattern, + Getdirs assumes a default pattern of + *. You may use the common shell + wildcard characters in the pattern. If no directories + match the pattern, then a NULL string is + returned

Find Procedure

Search for files whose names match pattern + (using shell wildcard characters for filename expansion). Search + subdirectories recursively, starting at + rootdir. The result is the list of files whose + names match; if no files match, the result is empty. Filenames in the + result include all intervening subdirectory names. If no files match + the pattern, then a NULL string is returned.

find(rootdir + pattern);

rootdir

The top level directory to search the search + from.

pattern

A csh "glob" style regular expression reprsenting + the files to find.

Which Procedure

Searches the execution path for an executable file + binary, like the the BSD which + utility. This procedure uses the shell environment variable + PATH. It returns 0 if the + binary is not in the path, or if there is no PATH + environment variable. If binary is in the path, it + returns the full path to binary.

which(file);

binary

The executable program or shell script to look + for.

Grep Procedure

Search the file called filename (a fully + specified path) for lines that contain a match for regular expression + regexp. The result is a list of all the lines that + match. If no lines match, the result is an empty string. Specify + regexp using the standard regular expression style + used by the Unix utility program grep.

Use the optional third argument line to + start lines in the result with the line number in + filename. (This argument is simply an option + flag; type it just as shown --line.)

grep(filename + regexp + --line);

filename

The file to search.

regexp

The Unix style regular expression (as used by the + grep Unix utility) to search + for.

--line

Prefix the line number to each line where the + regexp matches.

Prune Procedure

Remove elements of the Tcl list list. + Elements are fields delimited by spaces. The result is a copy of + list, without any elements that match pattern. + You can use the common shell wildcard characters to specify the + pattern.

prune(list + pattern);

list

A Tcl list containing the original data. Commonly + this is the output of a batch executed command, like running a + compiler.

pattern

The csh shell "glob" style pattern to search + for.

Slay Procedure

This look in the process table for name + and send it a unix SIGINT, killing the process. This will only work + under NT if you have Cygwin or another Unix system for NT + installed.

slay(name);

name

The name of the program to kill.

Absolute Procedure

This procedure takes the relative path, + and converts it to an absolute path.

absolute(path);

path

The path to convert.

Psource Procedure

This sources the file filename, and traps + all errors. It also ignores all extraneous output. If there was an + error it returns a 1, otherwise it returns a + 0.

psource(file);

filename

The filename to Tcl script to + source.

Runtest_file_p Procedure

Search runtests for + testcase and return 1 if + found, 0 if not. runtests + is a list of two elements. The first is the pathname of the + testsuite expect script running. The second is a copy of what was on + the right side of the = if +
foo.exp="..."
" was specified, or + an empty string if no such argument is present. This is used by tools + like compilers where each testcase is a file.

runtest_file_p(runtests + testcase);

runtests

The pathname of the testsuite expect script + running

testcase

The test case filename.

Diff Procedure

Compares the two files and returns a 1 if + they match, or a 0 if they don't. If + verbose is set, then it'll print the differences to + the screen.

diff(file_1 + file_2);

file_1

The first file to compare.

file_2

The second file to compare.

Setenv Procedure

Sets the environment variable var to the + value val.

setenv(var + val);

var

The environment variable to set.

val

The value to set the variable to.

unsetenv Procedure

Unsets the environment variable + var.

unsetenv(var);

var

The environment variable to + unset.

Getenv Procedure

Returns the value of var in the + environment if it exists, otherwise it returns NULL.

getenv(var);

var

The environment variable to get the value + of.

Prune_system_crud Procedure

For system system, delete text the host or + target operating system might issue that will interfere with pattern + matching of program output in text. An example + is the message that is printed if a shared library is out of + date.

prune_system_crud(system + test);

system

The system error messages to look for to screen out + .

text

The Tcl variable containing the + text.

Libgloss, A Free BSP

Libgloss is a free BSP (Board Support + Package) commonly used with GCC and G++ to produce a fully linked + executable image for an embedded systems.

Libgloss_link_flags Procedure

libgloss_link_flags(args);

args

Libgloss_include_flags Procedure

libgloss_include_flags(args);

args

Newlib_link_flags Procedure

newlib_link_flags(args);

args

Newlib_include_flags Procedure

newlib_include_flags(args);

args

Libio_include_flags Procedure

libio_include_flags(args);

args

Libio_link_flags Procedure

libio_link_flags(args);

args

G++_include_flags Procedure

g++_include_flags(args);

args

G++_link_flags Procedure

g++_link_flags(args);

args

Libstdc++_include_flags Procedure

libstdc++_include_flags(args);

args

Libstdc++_link_flags Procedure

libstdc++_link_flags(args);

args

Get_multilibs Procedure

get_multilibs(args);

args

Find_binutils_prog Procedure

find_binutils_prog(name);

name

Process_multilib_options Procedure

process_multilib_options(args);

args

Add_multilib_option Procedure

add_multilib_option(args);

args

Build_wrapper Procedure

build_wrapper(gluefile);

gluefile

Winsup_include_flags Procedure

winsup_include_flags(args);

args

Winsup_link_flags Procedure

winsup_link_flags(args);

args

Procedures for debugging your Tcl code.

lib/debugger.expdefines these utility + procedures:

Dumpvars Procedure

This takes a csh style regular expression (glob rules) and prints + the values of the global variable names that match. It is abbreviated + as dv.

dumpvars(vars);

vars

The variables to dump.

Dumplocals Procedure

This takes a csh style regular expression (glob rules) and + prints the values of the local variable names that match. It is + abbreviated as dl.

dumplocals(args);

args

Dumprocs Procedure

This takes a csh style regular expression (glob rules) and + prints the body of all procs that match. It is abbreviated as + dp.

dumprocs(pattern);

pattern

The csh "glob" style pattern to look + for.

Dumpwatch Procedure

This takes a csh style regular expression (glob rules) and + prints all the watchpoints. It is abbreviated as + dw.

dumpwatch(pattern);

pattern

The csh "glob" style pattern to look + for.

Watcharray Procedure

watcharray(element + type);

type

The csh "glob" style pattern to look + for.

Watchvar Procedure

watchvar(var + type);

Watchunset Procedure

This breaks program execution when the variable + var is unset. It is abbreviated as + wu.

watchunset(arg);

args

Watchwrite Procedure

This breaks program execution when the variable + var is written. It is abbreviated as + ww.

watchwrite(var);

var

The variable to watch.

Watchread Procedure

This breaks program execution when the variable + var is read. It is abbreviated as + wr.

watchread(var);

var

The variable to watch.

Watchdel Procedure

This deletes a the watchpoint from the watch list. It is + abbreviated as wd.

watchdel(args);

args

Print Procedure

This prints the value of the variable + var. It is abbreviated as + p.

print(var);

var

Quit Procedure

This makes runtest exit. It is abbreviated as + q.

quit();


PrevHomeNext
ReferenceUpFile Map
\ No newline at end of file diff --git a/doc/overview/configfile.html b/doc/overview/configfile.html new file mode 100644 index 0000000..da718e5 --- /dev/null +++ b/doc/overview/configfile.html @@ -0,0 +1,513 @@ +Config File Values
DejaGnu
PrevChapter 3. Customizing DejaGnuNext

Config File Values

DejaGnu uses a named array in Tcl to hold all the info for + each machine. In the case of a canadian cross, this means host + information as well as target information. The named array is + called target_info, and it has two indices. The + following fields are part of the array.

Command Line Option Variables

In the user editable second section of the Personal Config File you can not only override the configuration + variables captured in the first section, but also specify + default values for all on the runtest + command line options. Save for --debug, + --help, and --version, each + command line option has an associated Tcl variable. Use the + Tcl set command to specify a new default + value (as for the configuration variables). The following + table describes the correspondence between command line + options and variables you can set in + site.exp. Invoking Runtest, for + explanations of the command-line options.

Table 3-1. Tcl Variables For Command Line Options

runtestTcloptionvariabledescription
--allall_flagdisplay all test results if set
--baudbaudset the default baud rate to something other than + 9600.
--connectconnectmoderlogin, + telnet, rsh, + kermit, tip, or + mondfe
--outdiroutdirdirectory for tool.sum and + tool.log.
--objdirobjdirdirectory for pre-compiled binaries
--rebootrebootreboot the target if set to + "1"; do not reboot if set to + "0" (the default).
--srcdirsrcdirdirectory of test subdirectories
--stracetracelevela number: Tcl trace depth
--tooltoolname of tool to test; identifies init, test subdir
--verboseverboseverbosity level. As option, use multiple times; as + variable, set a number, 0 or greater.
--targettarget_tripletThe canonical configuration string for the target.
--hosthost_tripletThe canonical configuration string for the host.
--buildbuild_tripletThe canonical configuration string for the build + host.
+

Personal Config File

The personal config file is used to customize + runtest's behaviour for each person. It's + typically used to set the user prefered setting for verbosity, + and any experimental Tcl procedures. My personal + ~/.dejagnurc file looks like:

Example 3-12. Personal Config File

	set all_flag 1
+	set RLOGIN /usr/ucb/rlogin
+	set RSH /usr/local/sbin/ssh
+	

Here I set all_flag so I see all the test + cases that PASS along with the ones that FAIL. I also set + RLOGIN to the BSD version. I have + Kerberos installed, and when I rlogin + to a target board, it usually isn't supported. So I use the non + secure version rather than the default that's in my path. I also + set RSH to the SSH + secure shell, as rsh is mostly used to test unix + machines within a local network here.


PrevHomeNext
Remote Host TestingUpExtending DejaGnu
\ No newline at end of file diff --git a/doc/overview/customizing.html b/doc/overview/customizing.html new file mode 100644 index 0000000..e42ce19 --- /dev/null +++ b/doc/overview/customizing.html @@ -0,0 +1,470 @@ +Customizing DejaGnu
DejaGnu
PrevNext

Chapter 3. Customizing DejaGnu

The site configuration file, site.exp, + captures configuration-dependent values and propagates them to the + DejaGnu test environment using Tcl variables. This ties the + DejaGnu test scripts into the configure and + make programs. If this file is setup correctly, + it is possible to execute a test suite merely by typing + runtest.

DejaGnu supports two site.exp + files. The multiple instances of site.exp are + loaded in a fixed order built into DejaGnu. The first file loaded + is the local file site.exp, and then the + optional global site.exp file as + pointed to by the DEJAGNU environment + variable.

There is an optional master + site.exp, capturing configuration values that + apply to DejaGnu across the board, in each configuration-specific + subdirectory of the DejaGnu library directory. + runtest loads these values first. The master + site.exp contains the default values for all + targets and hosts supported by DejaGnu. This master file is + identified by setting the environment variable + DEJAGNU to the name of the file. This is also + refered to as the ``global'' config file.

Any directory containing a configured test suite also has a + local site.exp, capturing configuration values + specific to the tool under test. Since runtest + loads these values last, the individual test configuration can + either rely on and use, or override, any of the global values from + the global site.exp file.

You can usually generate or update the testsuite's local + site.exp by typing make + site.exp in the test suite directory, after the test + suite is configured.

You can also have a file in your home directory called + .dejagnurc. This gets loaded first before the + other config files. Usually this is used for personal stuff, like + setting the all_flag so all the output gets + printed, or your own verbosity levels. This file is usually + restricted to setting command line options.

You can further override the default values in a + user-editable section of any site.exp, or by + setting variables on the runtest command + line.

Local Config File

It is usually more convenient to keep these manual + overrides in the site.exp + local to each test directory, rather than in the global + site.exp in the installed DejaGnu + library. This file is mostly for supplying tool specific info + that is required by the test suite.

All local site.exp files have + two sections, separated by comment text. The first section is + the part that is generated by make. It is + essentially a collection of Tcl variable definitions based on + Makefile environment variables. Since they + are generated by make, they contain the + values as specified by configure. (You can + also customize these values by using the --site + option to configure.) In particular, this + section contains the Makefile + variables for host and target configuration data. Do not edit + this first section; if you do, your changes are replaced next + time you run make.

Example 3-1. The first section starts with

	## these variables are automatically generated by make ##
+	# Do not edit here. If you wish to override these values
+	# add them to the last section
+	

In the second section, you can override any default values + (locally to DejaGnu) for all the variables. The second section + can also contain your preferred defaults for all the command + line options to runtest. This allows you to + easily customize runtest for your preferences + in each configured test-suite tree, so that you need not type + options repeatedly on the command line. (The second section may + also be empty, if you do not wish to override any defaults.)

Example 3-2. The first section ends with this line

	## All variables above are generated by configure. Do Not Edit ##
+	

You can make any changes under this line. If you wish to + redefine a variable in the top section, then just put a + duplicate value in this second section. Usually the values + defined in this config file are related to the configuration of + the test run. This is the ideal place to set the variables + host_triplet, build_triplet, + target_triplet. All other variables are tool + dependant. ie for testing a compiler, the value for + CC might be set to a freshly built binary, as + opposed to one in the user's path.

Here's an example local site.exp file, as used for + GCC/G++ testing.

Example 3-3. Local Config File

  
+      ## these variables are automatically generated by make ##
+      # Do not edit here. If you wish to override these values
+      # add them to the last section
+      set rootme "/build/devo-builds/i586-pc-linux-gnulibc1/gcc"
+      set host_triplet i586-pc-linux-gnulibc1
+      set build_triplet i586-pc-linux-gnulibc1
+      set target_triplet i586-pc-linux-gnulibc1
+      set target_alias i586-pc-linux-gnulibc1
+      set CFLAGS ""
+      set CXXFLAGS "-I/build/devo-builds/i586-pc-linux-gnulibc1/gcc/../libio -I$srcdir/../libg++/src -I$srcdir/../libio -I$srcdir/../libstdc++ -I$srcdir/../libstdc++/stl -L/build/devo-builds/i586-pc-linux-gnulibc1/gcc/../libg++ -L/build/devo-builds/i586-pc-linux-gnulibc1/gcc/../libstdc++"
+      append LDFLAGS " -L/build/devo-builds/i586-pc-linux-gnulibc1/gcc/../ld"
+      set tmpdir /build/devo-builds/i586-pc-linux-gnulibc1/gcc/testsuite
+      set srcdir "${srcdir}/testsuite"
+      ## All variables above are generated by configure. Do Not Edit ##
+    
+      

This file defines the required fields for a local config + file, namely the three config triplets, and the srcdir. It also + defines several other Tcl variables that are used exclusivly by + the GCC test suite. For most test cases, the CXXFLAGS and LDFLAGS + are supplied by DejaGnu itself for cross testing, but to test a + compiler, GCC needs to manipulate these itself.


PrevHomeNext
The files DejaGnu produces. Global Config File
\ No newline at end of file diff --git a/doc/overview/debugging.html b/doc/overview/debugging.html new file mode 100644 index 0000000..9dc71f0 --- /dev/null +++ b/doc/overview/debugging.html @@ -0,0 +1,248 @@ +Debugging A Test Case
DejaGnu
PrevChapter 4. Extending DejaGnuNext

Debugging A Test Case

These are the kinds of debugging information available + from DejaGnu:

  • Output controlled by test scripts themselves, + explicitly allowed for by the test author. This kind of + debugging output appears in the detailed output recorded in the + DejaGnu log file. To do the same for new tests, use the + verbose procedure (which in turn uses the + variable also called verbose) to control + how much output to generate. This will make it easier for other + people running the test to debug it if necessary. Whenever + possible, if $verbose is + 0, there should be no output other than the + output from pass, + fail, error, and + warning. Then, to whatever extent is + appropriate for the particular test, allow successively higher + values of $verbose to generate more + information. Be kind to other programmers who use your tests: + provide for a lot of debugging information.

  • Output from the internal debugging functions of + Tcl and Expect. There is a command + line options for each; both forms of debugging output are + recorded in the file dbg.log in the current + directory.

    Use --debug for information from the + expect level; it generates displays of the expect attempts to + match the tool output with the patterns specified. This output + can be very helpful while developing test scripts, since it + shows precisely the characters received. Iterating between the + latest attempt at a new test script and the corresponding + dbg.log can allow you to create the final + patterns by ``cut and paste''. This is sometimes the best way + to write a test case.

  • Use --strace to see more + detail at the Tcl level; this shows how Tcl procedure + definitions expand, as they execute. The associated number + controls the depth of definitions expanded.

  • Finally, if the value of + verbose is 3 or greater,DejaGnu turns on + the expect command log_user. This command + prints all expect actions to the expect standard output, to the + detailed log file, and (if --debug is on) to + dbg.log.


PrevHomeNext
Writing A Test CaseUpAdding A Test Case To A Test Suite.
\ No newline at end of file diff --git a/doc/overview/designgoals.html b/doc/overview/designgoals.html new file mode 100644 index 0000000..d2d88a4 --- /dev/null +++ b/doc/overview/designgoals.html @@ -0,0 +1,219 @@ +Design Goals
DejaGnu
PrevChapter 1. OverviewNext

Design Goals

DejaGnu grew out of the internal needs of Cygnus Solutions. (then + Cygnus Support). Cygnus maintains and enhances a variety of free programs + in many different environments, and we needed a testing tool that:

  • is useful to developers while fixing + bugs.

  • automates running many tests during a software + release process.

  • is portable among a variety of host + computers.

  • supports cross-development + testing.

  • permits testing interactive programs, like + GDB; and

  • permits testing batch oriented programs, like + GCC.

Some of the requirements proved challenging. For example, + interactive programs do not lend themselves very well to automated testing. + But all the requirements are important: for instance, it is imperative to + make sure that GDB works as well when cross-debugging + as it does in a native configuration.

Probably the greatest challenge was testing in a cross-development + environment (which can be a real nightmare). Most cross-development + environments are customized by each developer. Even when buying packaged + boards from vendors there are many differences. The communication + interfaces vary from a serial line to ethernet. DejaGnu was designed with + a modular communication setup, so that each kind of communication can be + added as required, and supported thereafter. Once a communication + procedure is coded, any test can use it. Currently DejaGnu can use + rsh, rlogin, + telnet, tip, + kermit, and mondfe for remote + communications.


PrevHomeNext
What's New In This ReleaseUpA POSIX conforming test framework
\ No newline at end of file diff --git a/doc/overview/docbook.css b/doc/overview/docbook.css new file mode 100755 index 0000000..b42fb27 --- /dev/null +++ b/doc/overview/docbook.css @@ -0,0 +1,20 @@ +.BOOK .TITLE { text-align: center } +.BOOK .SUBTITLE { text-align: center } +.BOOK .CORPAUTHOR { text-align: center } +.BOOK .AUTHOR { text-align: center } +.BOOK .AFFILIATION { text-align: center } +.BOOK .EDITEDBY { text-align: center } +.BOOK .EDITOR { text-align: center } +.BOOK .GRAPHIC { text-align: center } + +.ARTICLE .TITLE { text-align: center } +.ARTICLE .SUBTITLE { text-align: center } +.ARTICLE .CORPAUTHOR { text-align: center } +.ARTICLE .AUTHOR { text-align: center } +.ARTICLE .AFFILIATION { text-align: center } +.ARTICLE .EDITEDBY { text-align: center } +.ARTICLE .EDITOR { text-align: center } +.ARTICLE .GRAPHIC { text-align: center } +.ARTICLE .ABSTRACT { margin-left: 0.5in; + margin-right: 0.5in; + font-style: italic } diff --git a/doc/overview/extending.html b/doc/overview/extending.html new file mode 100644 index 0000000..4cce3b7 --- /dev/null +++ b/doc/overview/extending.html @@ -0,0 +1,206 @@ +Extending DejaGnu
DejaGnu
PrevNext

Chapter 4. Extending DejaGnu

Adding A New Test Suite

The testsuite for a new tool should always be located in that tools + source directory. DejaGnu require the directory be named + testsuite. Under this directory, the test cases go + in a subdirectory whose name begins with the tool name. For example, for + a tool named flubber, each subdirectory containing + testsuites must start with "flubber.".


PrevHomeNext
Config File Values Adding A New Tool
\ No newline at end of file diff --git a/doc/overview/filemap.html b/doc/overview/filemap.html new file mode 100644 index 0000000..bb894c9 --- /dev/null +++ b/doc/overview/filemap.html @@ -0,0 +1,222 @@ +File Map
DejaGnu
PrevChapter 5. Reference 

File Map

This is a map of the files in DejaGnu.

  • runtest

  • runtest.exp

  • stub-loader.c

  • testglue.c

  • config

  • baseboards

  • lib/debugger.exp

  • lib/dg.exp

  • lib/framework.exp

  • lib/ftp.exp

  • lib/kermit.exp

  • lib/libgloss.exp

  • lib/mondfe.exp

  • lib/remote.exp

  • lib/rlogin.exp

  • lib/rsh.exp

  • lib/standard.exp

  • lib/target.exp

  • lib/targetdb.exp

  • lib/telnet.exp

  • lib/tip.exp

  • lib/util-defs.exp

  • lib/utils.exp

  • lib/xsh.exp


PrevHome 
Builtin ProceduresUp 
\ No newline at end of file diff --git a/doc/overview/global.html b/doc/overview/global.html new file mode 100644 index 0000000..cc102f3 --- /dev/null +++ b/doc/overview/global.html @@ -0,0 +1,245 @@ +Global Config File
DejaGnu
PrevChapter 3. Customizing DejaGnuNext

Global Config File

The master config file is where all the target specific + config variables get set for a whole site get set. The idea is + that for a centralized testing lab where people have to share a + target between multiple developers. There are settings for both + remote targets and remote hosts. Here's an example of a Master + Config File (also called the Global config file) for a + canadian cross. A canadian cross is when + you build and test a cross compiler on a machine other than the + one it's to be hosted on.

Here we have the config settings for our California + office. Note that all config values are site dependant. Here we + have two sets of values that we use for testing m68k-aout cross + compilers. As both of these target boards has a different + debugging protocol, we test on both of them in sequence.

Example 3-4. Global Config file


      # Make sure we look in the right place for the board description files.
+      if ![info exists boards_dir] {
+          set boards_dir {}
+      }
+      lappend boards_dir "/nfs/cygint/s1/cygnus/dejagnu/boards"
+
+      verbose "Global Config File: target_triplet is $target_triplet" 2
+      global target_list
+
+      case "$target_triplet" in {
+          { "native" } {
+              set target_list "unix"
+          }
+          { "sparc64-*elf" } {
+              set target_list "sparc64-sim"
+          }
+          { "mips-*elf" } {
+              set target_list "mips-sim wilma barney"
+          }
+          { "mips-lsi-elf" } {
+              set target_list "mips-lsi-sim{,soft-float,el}"
+          }
+          { "sh-*hms" } {
+              set target_list { "sh-hms-sim" "bloozy" }
+          }
+      }
+      

In this case, we have support for several cross compilers, + that all run on this host. For testing on operating systems that + don't support Expect, DejaGnu can be run on the local build + machine, and it can connect to the remote host and run all the + tests for this cross compiler on that host. All the remote OS + requires is a working telnetd.

As you can see, all one does is set the variable + target_list to the list of targets and options to + test. The simple settings, like for + sparc64-elf only require setting the name of + the single board config file. The mips-elf + target is more complicated. Here it sets the list to three target + boards. One is the default mips target, and both + wilma barney are + symbolic names for other mips boards. Symbolic names are covered + in the Adding A New Board chapter. The more complicated + example is the one for mips-lsi-elf. This one + runs the tests with multiple iterations using all possible + combinations of the --soft-float and the + --el (little endian) option. Needless to say, + this last feature is mostly compiler specific.


PrevHomeNext
Customizing DejaGnuUpBoard Config File
\ No newline at end of file diff --git a/doc/overview/hints.html b/doc/overview/hints.html new file mode 100644 index 0000000..aaf59ee --- /dev/null +++ b/doc/overview/hints.html @@ -0,0 +1,258 @@ +Hints On Writing A Test Case
DejaGnu
PrevChapter 4. Extending DejaGnuNext

Hints On Writing A Test Case

It is safest to write patterns that match all the output + generated by the tested program; this is called closure. + If a pattern does not match the entire output, any output that + remains will be examined by the next expect + command. In this situation, the precise boundary that determines + which expect command sees what is very + sensitive to timing between the Expect task and the task running + the tested tool. As a result, the test may sometimes appear to + work, but is likely to have unpredictable results. (This problem + is particularly likely for interactive tools, but can also + affect batch tools---especially for tests that take a long time + to finish.) The best way to ensure closure is to use the + -re option for the expect + command to write the pattern as a full regular expressions; then + you can match the end of output using a $. + It is also a good idea to write patterns that match all + available output by using .*\ after the + text of interest; this will also match any intervening blank + lines. Sometimes an alternative is to match end of line using + \r or \n, but this is + usually too dependent on terminal settings.

Always escape punctuation, such as ( + or ", in your patterns; for example, write + \(. If you forget to escape punctuation, + you will usually see an error message like
extra
+      characters after close-quote.

If you have trouble understanding why a pattern does not + match the program output, try using the --debug + option to runtest, and examine the debug log + carefully.

Be careful not to neglect output generated by setup rather + than by the interesting parts of a test case. For example, + while testing GDB, I issue a send set height + 0\n command. The purpose is simply to make sure GDB + never calls a paging program. The set + height command in GDB does not generate any + output; but running any command makes GDB issue a new + (gdb) prompt. If there were no + expect command to match this prompt, the + output (gdb) begins the text seen by the + next expect command---which might make that + pattern fail to match.

To preserve basic sanity, I also recommended that no test + ever pass if there was any kind of problem in the test case. To + take an extreme case, tests that pass even when the tool will + not spawn are misleading. Ideally, a test in this sort of + situation should not fail either. Instead, print an error + message by calling one of the DejaGnu procedures + error or warning.


PrevHomeNext
Adding A Test Case To A Test Suite.UpSpecial variables used by test cases.
\ No newline at end of file diff --git a/doc/overview/new.html b/doc/overview/new.html new file mode 100644 index 0000000..edf4c6d --- /dev/null +++ b/doc/overview/new.html @@ -0,0 +1,228 @@ +What's New In This Release
DejaGnu
PrevChapter 1. OverviewNext

What's New In This Release

This release has a number of substantial changes over version + 1.3. The most visible change is that the version of Expect and Tcl + included in the release are up-to-date with the current stable net + releases. The biggest change is years of modifications to the + target configuration system, used for cross testing. While this + greatly improved cross testing, is has made that subsystem very + complicated. The goal is to have this entirely rewritten using + iTcl by the next release. Other changes + are:

  • More builtin support for building target binaries + with the correct linker flags. Currently this only works with + GCC as the cross compiler, + preferably with a target supported by + Libgloss.

  • Lots of little bug fixes from years of heavy + use at Cygnus Solutions.

  • DejaGnu now uses + Automake for Makefile + configuration.

  • Updated documentation, now in SGML + (using the free + GNU DocBook tools) format.

  • NT support. There is beta level support for NT + that is still a work in progress. This requires the Cygwin POSIX system + for NT.

NT Support

To use DejaGnu on NT, you need to first install the + Cygwin + release. This works as of the B20.1 release. Cygwin is a POSIX + system for NT. This covers both utility programs, and a libray + that adds POSIX system calls to NT. Among them is pseudo tty + support for NT that emulates the POSIX pty standard. The + latest Cygwin is always available from this location. This + works well enough to run "make check" of + the GNU development tree on NT after a native build. But the + nature of pty's on NT is still evolving. Your mileage may + vary...


PrevHomeNext
OverviewUpDesign Goals
diff --git a/doc/overview/outputfiles.html b/doc/overview/outputfiles.html new file mode 100644 index 0000000..97931b3 --- /dev/null +++ b/doc/overview/outputfiles.html @@ -0,0 +1,596 @@ +The files DejaGnu produces.
DejaGnu
PrevChapter 2. Running TestsNext

The files DejaGnu produces.

DejaGnu always writes two kinds of output files: summary + logs and detailed logs. The contents of both of these are + determined by your tests.

For troubleshooting, a third kind of output file is useful: + use --debug to request an output file showing + details of what Expect is doing + internally.

Summary File

DejaGnu always produces a summary output file + tool.sum. This summary shows the names of + all test files run; for each test file, one line of output from + each pass command (showing status + PASS or XPASS) or + fail command (status + FAIL or XFAIL); + trailing summary statistics that count passing and failing tests + (expected and unexpected); and the full pathname and version + number of the tool tested. (All possible outcomes, and all + errors, are always reflected in the summary output file, + regardless of whether or not you specify + --all.)

If any of your tests use the procedures + unresolved, unsupported, + or runtested, the summary output also + tabulates the corresponding outcomes.

For example, after runtest --tool + binutils, look for a summary log in + binutils.sum. Normally, DejaGnu writes this + file in your current working directory; use the + --outdir option to select a different + directory.

Example 2-1. Here is a short sample summary log

	Test Run By rob on Mon May 25 21:40:57 PDT 1992
+		 === gdb tests ===
+	Running ./gdb.t00/echo.exp ...
+	PASS:   Echo test
+	Running ./gdb.all/help.exp ...
+	PASS:   help add-symbol-file
+	PASS:   help aliases
+	PASS:   help breakpoint "bre" abbreviation
+	FAIL:   help run "r" abbreviation
+	Running ./gdb.t10/crossload.exp ...
+	PASS:   m68k-elf (elf-big) explicit format; loaded
+	XFAIL:  mips-ecoff (ecoff-bigmips) "ptype v_signed_char" signed C types 
+                === gdb Summary ===
+	# of expected passes 5
+	# of expected failures 1
+	# of unexpected failures 1
+	/usr/latest/bin/gdb version 4.6.5 -q
+      

Log File

DejaGnu also saves a detailed log file + tool.log, showing any output generated by + tests as well as the summary output. For example, after + runtest --tool binutils, look for a detailed + log in binutils.log. Normally, DejaGnu + writes this file in your current working directory; use the + --outdir option to select a different + directory.

Example 2-2. Here is a brief example showing a detailed log for + G++ tests

	Test Run By rob on Mon May 25 21:40:43 PDT 1992
+
+                === g++ tests ===
+
+	--- Running ./g++.other/t01-1.exp ---
+        PASS:   operate delete
+
+	--- Running ./g++.other/t01-2.exp ---
+        FAIL:   i960 bug EOF
+	p0000646.C: In function `int  warn_return_1 ()':
+	p0000646.C:109: warning: control reaches end of non-void function
+	p0000646.C: In function `int  warn_return_arg (int)':
+	p0000646.C:117: warning: control reaches end of non-void function
+	p0000646.C: In function `int  warn_return_sum (int, int)':
+	p0000646.C:125: warning: control reaches end of non-void function
+	p0000646.C: In function `struct foo warn_return_foo ()':
+	p0000646.C:132: warning: control reaches end of non-void function
+
+	--- Running ./g++.other/t01-4.exp ---
+        FAIL:   abort
+	900403_04.C:8: zero width for bit-field `foo'
+	--- Running ./g++.other/t01-3.exp ---
+        FAIL:   segment violation
+	900519_12.C:9: parse error before `;'
+	900519_12.C:12: Segmentation violation
+	/usr/latest/bin/gcc: Internal compiler error: program cc1plus got fatal signal
+
+                === g++ Summary ===
+
+	# of expected passes 1
+	# of expected failures 3
+	/usr/latest/bin/g++ version cygnus-2.0.1
+	

Debug Log File

With the --debug option, you can request + a log file showing the output from + Expect itself, running in debugging + mode. This file (dbg.log, in the directory + where you start runtest) shows each pattern + Expect considers in analyzing test + output.

This file reflects each send command, + showing the string sent as input to the tool under test; and + each Expect command, showing each + pattern it compares with the tool output.

Example 2-3. The log messages begin with a message of the form


	expect: does {tool output} (spawn_id n)
+	 match pattern {expected pattern}?
+
+        

For every unsuccessful match, + Expect issues a + no after this message; if other patterns + are specified for the same Expect + command, they are reflected also, but without the first part of + the message (expect... match pattern).

When Expect finds a match, the + log for the successful match ends with yes, + followed by a record of the Expect + variables set to describe a successful match.

Example 2-4. Here is an excerpt from the debugging log for a + GDB test:

	send: sent {break gdbme.c:34\n} to spawn id 6
+	expect: does {} (spawn_id 6) match pattern {Breakpoint.*at.* file
+	gdbme.c, line 34.*\(gdb\) $}? no
+	{.*\(gdb\) $}? no
+	expect: does {} (spawn_id 0) match pattern {return} ? no
+	{\(y or n\) }? no
+	{buffer_full}? no
+	{virtual}? no
+	{memory}? no
+	{exhausted}? no
+	{Undefined}? no
+	{command}? no
+	break gdbme.c:34
+	Breakpoint 8 at 0x23d8: file gdbme.c, line 34.
+	(gdb) expect: does {break gdbme.c:34\r\nBreakpoint 8 at 0x23d8: 
+	file gdbme.c, line 34.\r\n(gdb) } (spawn_id 6) match pattern
+	{Breakpoint.*at.* file gdbme.c, line 34.*\(gdb\) $}? yes
+	expect: set expect_out(0,start) {18}
+	expect: set expect_out(0,end) {71}
+	expect: set expect_out(0,string) {Breakpoint 8 at 0x23d8: file
+	gdbme.c, line 34.\r\n(gdb) }
+	epect: set expect_out(spawn_id) {6}
+	expect: set expect_out(buffer) {break gdbme.c:34\r\nBreakpoint 8
+	at 0x23d8: file gdbme.c, line 34.\r\n(gdb) }
+        PASS:   70      0       breakpoint line number in file
+	

This example exhibits three properties of + Expect and + DejaGnu that might be surprising at + first glance:

  • Empty output for the first attempted match. The + first set of attempted matches shown ran against the output + {} --- that is, no + output. Expect begins + attempting to match the patterns supplied immediately; often, + the first pass is against incomplete output (or completely + before all output, as in this case).

  • Interspersed tool output. The beginning of + the log entry for the second attempted match may be hard to + spot: this is because the prompt {(gdb) } + appears on the same line, just before the + expect: that marks the beginning of the + log entry.

  • Fail-safe patterns. Many of the patterns + tested are fail-safe patterns provided by + GDB testing utilities, to reduce + possible indeterminacy. It is useful to anticipate potential + variations caused by extreme system conditions + (GDB might issue the message + virtual memory exhausted in rare + circumstances), or by changes in the tested program + (Undefined command is the likeliest + outcome if the name of a tested command changes).

    The pattern {return} is a + particularly interesting fail-safe to notice; it checks for an + unexpected RET prompt. This may happen, + for example, if the tested tool can filter output through a + pager.

    These fail-safe patterns (like the debugging log itself) + are primarily useful while developing test scripts. Use the + error procedure to make the actions for + fail-safe patterns produce messages starting with + ERROR on standard output, and in the + detailed log file.


PrevHomeNext
RuntestUpCustomizing DejaGnu
\ No newline at end of file diff --git a/doc/overview/overview.html b/doc/overview/overview.html new file mode 100644 index 0000000..6be010f --- /dev/null +++ b/doc/overview/overview.html @@ -0,0 +1,279 @@ +Overview
DejaGnu
PrevNext

Chapter 1. Overview

What is DejaGnu ?

DejaGnu is a framework for + testing other programs. Its purpose is to provide a single + front end for all tests. Think of it as a custom library of + Tcl procedures crafted to support writing a test harness. A + Test Harness is the testing + infrastructure that is created to support a specific program + or tool. Each program can have multiple test suites, all + supported by a single test harness. DejaGnu is written in + Expect, which in turn uses + Tcl -- Tool command + language. There is more information on Tcl at the Scriptics web site, and the + Expect web site is at NIST.

DejaGnu offers several advantages for testing:

  • The flexibility and consistency of the DejaGnu + framework make it easy to write tests for any program, with + either batch oriented, or interactive programs.

  • DejaGnu provides a layer of abstraction which + allows you to write tests that are portable to any host or + target where a program must be tested. For instance, a test + for GDB can run (from any Unix + based host) on any target architecture that DejaGnu + supports. Currently DejaGnu runs tests on many single board + computers, whose operating software ranges from just a boot + monitor to a full-fledged, Unix-like realtime OS.

  • All tests have the same output format. This + makes it easy to integrate testing into other software + development processes. DejaGnu's output is designed to be + parsed by other filtering script, and it is also human + readable.

  • Using Tcl and expect, it's easy to create wrappers + for existing test suites. By incorporating existing tests under + DejaGnu, it's easier to have a single set of report analyse + programs..

Running tests requires two things: the testing framework, and + the test suites themselves. Tests are usually written in + Expect using Tcl, but you can also use a + Tcl script to run a test suite that is not based on + Expect. + (expect script filenames conventionally + use .exp as a suffix; for example, the main + implementation of the DejaGnu test driver is in the file + runtest.exp.)

Julia Menapace first coined the term ``Deja Gnu'' to describe an + earlier testing framework at Cygnus Support she had written for + GDB. When we replaced it with the Expect-based + framework, it was like DejaGnu all over again... But more importantly, it + was also named after my daughter,Deja Snow Savoye (now 9 + years old in Dec of 1998), who was a toddler during DejaGnu's + creation.


PrevHomeNext
Abstract What's New In This Release
\ No newline at end of file diff --git a/doc/overview/posix.html b/doc/overview/posix.html new file mode 100644 index 0000000..4a35a55 --- /dev/null +++ b/doc/overview/posix.html @@ -0,0 +1,365 @@ +A POSIX conforming test framework
DejaGnu
PrevChapter 1. OverviewNext

A POSIX conforming test framework

DejaGnu conforms to the POSIX 1003.3 standard for test + frameworks. I was also a member of that committe.

The POSIX standard 1003.3 defines what a testing framework needs to + provide, in order to permit the creation of POSIX conformance test + suites. This standard is primarily oriented to running POSIX conformance + tests, but its requirements also support testing of features not related + to POSIX conformance. POSIX 1003.3 does not specify a particular testing + framework, but at this time there is only one other POSIX conforming test + framework: TET. TET was created by Unisoft for a consortium comprised of + X/Open, Unix International, and the Open Software Foundation.

The POSIX documentation refers to assertions. + An assertion is a description of behavior. For example, if a standard + says ``The sun shall shine'', a corresponding assertion might be ``The + sun is shining.'' A test based on this assertion would pass or fail + depending on whether it is daytime or nighttime. It is important to note + that the standard being tested is never 1003.3; the standard being tested + is some other standard, for which the assertions were written.

As there is no test suite to test testing frameworks for POSIX + 1003.3 conformance, verifying conformance to this standard is done by + repeatedly reading the standard and experimenting. One of the main + things 1003.3 does specify is the set of allowed output messages, and + their definitions. Four messages are supported for a required feature of + POSIX conforming systems, and a fifth for a conditional feature. DejaGnu + supports the use of all five output messages; in this sense a test suite + that uses exactly these messages can be considered POSIX conforming. + These definitions specify the output of a test + case:

PASS

A test has succeeded. That is, it demonstrated that + the assertion is true.

XFAIL

POSIX 1003.3 does not incorporate the notion of + expected failures, so PASS, instead of + XPASS, must also be returned for test cases + which were expected to fail and did not. This means that + PASS is in some sense more ambiguous than if + XPASS is also used.

FAIL

A test has produced the bug it was intended to + capture. That is, it has demonstrated that the assertion is false. + The FAIL message is based on the test case only. + Other messages are used to indicate a failure of the framework. As + with PASS, POSIX tests must return + FAIL rather than XFAIL even + if a failure was expected.

UNRESOLVED

A test produced indeterminate results. Usually, this + means the test executed in an unexpected fashion; this outcome + requires that a human being go over results, to determine if the test + should have passed or failed. This message is also used for any test + that requires human intervention because it is beyond the abilities + of the testing framework. Any unresolved test should resolved to + PASS or FAIL before a test + run can be considered finished.

Note that for POSIX, each assertion must produce a test result + code. If the test isn't actually run, it must produce + UNRESOLVED rather than just leaving that test + out of the output. This means that you have to be careful when + writing tests, to not carelessly use tcl statements like + return---if you alter the flow of control of the + tcl code you must insure that every test still produces some result + code.

Here are some of the ways a test may wind up + UNRESOLVED:

  • A test's execution is + interrupted.

  • A test does not produce a clear + result. This is usually because there was an + ERROR from DejaGnu while processing + the test, or because there were three or more + WARNING messages. Any + WARNING or ERROR + messages can invalidate the output of the test. This + usually requires a human being to examine the output to + determine what really happened---and to improve the test + case.

  • A test depends on a previous test, which + fails.

  • The test was set up + incorrectly.

UNTESTED

A test was not run. This is a placeholder, used + when there is no real test case yet.

The only remaining output message left is intended to test + features that are specified by the applicable POSIX standard as + conditional:

UNSUPPORTED

There is no support for the tested case. This may + mean that a conditional feature of an operating system, or of a + compiler, is not implemented. DejaGnu also uses this message when + a testing environment (often a ``bare board'' target) lacks basic + support for compiling or running the test case. For example, a + test for the system subroutine gethostname + would never work on a target board running only a boot + monitor.

DejaGnu uses the same output procedures to produce these messages + for all test suites, and these procedures are already known to conform + to POSIX 1003.3. For a DejaGnu test suite to conform to POSIX 1003.3, + you must avoid the setupxfail} procedure as + described in the PASS section above, and you must + be careful to return UNRESOLVED where appropriate, + as described in the UNRESOLVED section + above.


PrevHomeNext
Design GoalsUpRunning Tests
\ No newline at end of file diff --git a/doc/overview/preface.html b/doc/overview/preface.html new file mode 100644 index 0000000..acceb36 --- /dev/null +++ b/doc/overview/preface.html @@ -0,0 +1,157 @@ +Abstract
DejaGnu
PrevNext

Abstract

This document attempts to describe the functionality of + DejaGnu, the GNU Testing Framework. DejaGnu is entirely written in + Expect, which uses + Tcl as a command + language. Expect serves as a very + programmable shell; you can run any program, as with the usual + Unix command shells---but once the program is started, your + test script has fully programmable control of + its input and output. This does not just apply to the programs + under test; expect can also run any auxiliary + program, such as diff or sh, + with full control over its input and output.

DejaGnu itself is merely a framework for creation of a test + suites. Test suites are distributed separately for each GNU + tool.


PrevHomeNext
DejaGnu Overview
\ No newline at end of file diff --git a/doc/overview/reference.html b/doc/overview/reference.html new file mode 100644 index 0000000..9c2f57b --- /dev/null +++ b/doc/overview/reference.html @@ -0,0 +1,373 @@ +Reference
DejaGnu
PrevNext

Chapter 5. Reference

Installation

Once you have the DejaGnu source unpacked and available, you must + first configure the software to specify where it is to run (and the + associated defaults); then you can proceed to installing it.

Configuring DejaGnu

It is usually best to configure in a directory separate from the + source tree, specifying where to find the source with the optional + --srcdir option to + configure. DejaGnu uses the GNU + autoconf to configure itself. For more info on using + autoconf, read the GNU autoconf manual. To configure, execute the + configure program, no other options are + required. For an example, to configure in a seperate tree for objects, + execute the configure script from the source tree like this:

        ../dejagnu-1.4/configure
+      

DejaGnu doesn't care at config time if it's for testing a native + system or a cross system. That is determined at runtime by using the + config files.

You may also want to use the configure option + --prefix to specify where you want DejaGnu and its + supporting code installed. By default, installation is in subdirectories + of /usr/local, but you can select any alternate + directory altdir by including + --prefix{altdir}} on the + configure command line. (This value is captured in + the Makefile variables prefix and + execprefix}.)

Save for a small number of example tests, the DejaGnu distribution + itself does not include any test suites; these are available + separately. Test suites for the GNU development tools are included in + those releases. After configuring the top-level DejaGnu directory, unpack + and configure the test directories for the tools you want to test; then, + in each test directory, run make check to build + auxiliary programs required by some of the tests, and run the test + suites.

Installing DejaGnu

To install DejaGnu in your filesystem (either in + /usr/local, or as specified by your + --prefix option to configure), + execute.

        eg$ make install
+      

make installdoes thes things for + DejaGnu:

  • Look in the path specified for executables + $exec_prefix) for directories called + lib and bin. If these + directories do not exist, make install creates + them.

  • Create another directory in the + share directory, called + dejagnu, and copy all the library files into + it.

  • Create a directory in the + dejagnu/share directory, called + config, and copy all the configuration files into + it.

  • Copy the runtest shell script into + $exec_prefix/bin.

  • Copy runtest.exp into + $exec_prefix/lib/dejagnu. This is the main Tcl + code implementing DejaGnu.


PrevHomeNext
Special variables used by test cases. Builtin Procedures
\ No newline at end of file diff --git a/doc/overview/releng.html b/doc/overview/releng.html new file mode 100644 index 0000000..58f9cd4 --- /dev/null +++ b/doc/overview/releng.html @@ -0,0 +1,354 @@ +Remote Host Testing
DejaGnu
PrevChapter 3. Customizing DejaGnuNext

Remote Host Testing

Note: Thanks to Dj Delorie for the original paper that + this section is based on.

DejaGnu also supports running the tests on a remote + host. To set this up, the remote host needs an ftp server, and a + telnet server. Currently foreign operating systems used as + remote hosts are VxWorks, VRTX, Dos/Win3.1, MacOS, and + win95/win98/NT.

The recommended source for a win95/win98/NT based ftp + server is to get IIS (either IIS 1 or Personal Web Server) from + http://www.microsoft.com. + When you install it, make sure you install the FTP server - it's + not selected by default. Go into the IIS manager and change the + FTP server so that it does not allow anonymous ftp. Set the home + directory to the root directory (i.e. c:\) of a suitable + drive. Allow writing via ftp.

It will create an account like IUSR_FOOBAR where foobar is + the name of your machine. Go into the user editor and give that + account a password that you don't mind hanging around in the + clear (i.e. not the same as your admin or personal + passwords). Also, add it to all the various permission groups.

You'll also need a telnet server. For win95/win98/NT, go + to the Ataman web site, + pick up the Ataman Remote Logon Services for Windows, and + install it. You can get started on the eval period anyway. Add + IUSR_FOOBAR to the list of allowed users, set the HOME directory + to be the same as the FTP default directory. Change the Mode + prompt to simple.

Ok, now you need to pick a directory name to do all the + testing in. For the sake of this example, we'll call it piggy + (i.e. c:\piggy). Create this directory.

You'll need a unix machine. Create a directory for the + scripts you'll need. For this example, we'll use + /usr/local/swamp/testing. You'll need to have a source tree + somewhere, say /usr/src/devo. Now, copy some files from + releng's area in SV to your machine:

Example 3-6. Remote host setup

      cd /usr/local/swamp/testing
+      mkdir boards
+      scp darkstar.welcomehome.org:/dejagnu/cst/bin/MkTestDir .
+      scp darkstar.welcomehome.org:/dejagnu/site.exp .
+      scp darkstar.welcomehome.org:/dejagnu/boards/useless98r2.exp boards/foobar.exp
+      export DEJAGNU=/usr/local/swamp/testing/site.exp
+
+      

You must edit the boards/foobar.exp file to reflect your + machine; change the hostname (foobar.com), username + (iusr_foobar), password, and ftp_directory (c:/piggy) to match + what you selected.

Edit the global site.exp to reflect your + boards directory:

Example 3-7. Add The Board Directory

	lappend boards_dir "/usr/local/swamp/testing/boards"
+	

Now run MkTestDir, which is in the contrib + directory. The first parameter is the toolchain prefix, the + second is the location of your devo tree. If you are testing a + cross compiler (ex: you have sh-hms-gcc.exe in your PATH on + the PC), do something like this:

Example 3-8. Setup Cross Remote Testing

	./MkTestDir sh-hms /usr/dejagnu/src/devo
+	

If you are testing a native PC compiler (ex: you have + gcc.exe in your PATH on the PC), do this:

Example 3-9. Setup Native Remote Testing

	./MkTestDir '' /usr/dejagnu/src/devo
+	

To test the setup, ftp to your PC + using the username (iusr_foobar) and password you selected. CD + to the test directory. Upload a file to the PC. Now telnet to + your PC using the same username and password. CD to the test + directory. Make sure the file is there. Type "set" and/or "gcc + -v" (or sh-hms-gcc -v) and make sure the default PATH contains + the installation you want to test.

Example 3-10. Run Test Remotely

	cd /usr/local/swamp/testing
+	make  -k -w check RUNTESTFLAGS="--host_board foobar --target_board foobar -v -v" > check.out 2>&1
+	

To run a specific test, use a command like this (for + this example, you'd run this from the gcc directory that + MkTestDir created):

Example 3-11. Run a Test Remotely

	make check RUNTESTFLAGS="--host_board sloth --target_board sloth -v compile.exp=921202-1.c"
+	

Note: if you are testing a cross-compiler, put in the + correct target board. You'll also have to download more .exp + files and modify them for your local configuration. The -v's + are optional.


PrevHomeNext
Board Config FileUpConfig File Values
\ No newline at end of file diff --git a/doc/overview/runningtests.html b/doc/overview/runningtests.html new file mode 100644 index 0000000..54e3291 --- /dev/null +++ b/doc/overview/runningtests.html @@ -0,0 +1,257 @@ +Running Tests
DejaGnu
PrevNext

Chapter 2. Running Tests

There are two ways to execute a test suite. The most + common way is when there is existing support in the + Makefile. This support consists of a + check target. The other way is to execute the + runtest program directly. To run + runtest directcly from the command line requires + either all the correct options, or the Local Config File must be setup + correctly.

Make check

To run tests from an existing collection, first use + configure as usual to set up the + build directory. Then try typing:

      make check
+      

If the check target exists, it + usually saves you some trouble. For instance, it can set up any + auxiliary programs or other files needed by the tests. The most + common file the check builds is the + site.exp. The site.exp file contains + various variables that DejaGnu used to dertermine the + configuration of the program being tested. This is mostly for + supporting remote testing.

The check target is supported by GNU + Automake. To have DejaGnu support added to your + generated Makefile.in, just add the keyword + dejagnu to the AUTOMAKE_OPTIONS variable in your + Makefile.am file.

Once you have run make check to build + any auxiliary files, you can invoke the test driver + runtest directly to repeat the tests. + You will also have to execute runtest + directly for test collections with no + check target in the + Makefile.


PrevHomeNext
A POSIX conforming test framework Runtest
\ No newline at end of file diff --git a/doc/overview/runtest.html b/doc/overview/runtest.html new file mode 100644 index 0000000..8188e4b --- /dev/null +++ b/doc/overview/runtest.html @@ -0,0 +1,1142 @@ +Runtest
DejaGnu
PrevChapter 2. Running TestsNext

Runtest

runtest is the executable test driver + for DejaGnu. You can specify two kinds of things on the + runtest command line: command line options, + and Tcl variables for the test scripts. The options are listed + alphabetically below.

runtest returns an exit code of + 1 if any test has an unexpected result; otherwise + (if all tests pass or fail as expected) it returns 0 + as the exit code.

Output States

runtest flags the outcome of each + test as one of these cases. A POSIX Conforming Test Framework for a + discussion of how POSIX specifies the meanings of these + cases.

PASS

The most desirable outcome: the test succeeded, and + was expected to succeed.

XPASS

A pleasant kind of failure: a test was expected to + fail, but succeeded. This may indicate progress; inspect the test + case to determine whether you should amend it to stop expecting + failure.

FAIL

A test failed, although it was expected to succeed. + This may indicate regress; inspect the test case and the failing + software to ocate the bug.

XFAIL

A test failed, but it was expected to fail. This + result indicates no change in a known bug. If a test fails because + the operating system where the test runs lacks some facility required + by the test, the outcome is UNSUPPORTED + instead.

UNRESOLVED

Output from a test requires manual inspection; the + test suite could not automatically determine the outcome. For + example, your tests can report this outcome is when a test does not + complete as expected.

UNTESTED

A test case is not yet complete, and in particular + cannot yet produce a PASS or + FAIL. You can also use this outcome in dummy + ``tests'' that note explicitly the absence of a real test case for a + particular property.

UNSUPPORTED

A test depends on a conditionally available feature + that does not exist (in the configured testing environment). For + example, you can use this outcome to report on a test case that does + not work on a particular target because its operating system support + does not include a required subroutine.

runtest may also display the following messages:

ERROR

Indicates a major problem (detected by the test case + itself) in running the test. This is usually an unrecoverable error, + such as a missing file or loss of communication to the target. (POSIX + test suites should not emit this message; use + UNSUPPORTED, UNTESTED, or + UNRESOLVED instead, as + appropriate.)

WARNING

Indicates a possible problem in running the + test. Usually warnings correspond to recoverable errors, or display + an important message about the following tests.

NOTE

An informational message about the test + case.

Invoking Runtest

This is the full set of command line options that + runtest recognizes. Arguments may be + abbreviated to the shortest unique string.

--all (-a)

Display all test output. By default, + runtest shows only the output of tests that + produce unexpected results; that is, tests with status + FAIL (unexpected failure), + XPASS (unexpected success), or + ERROR (a severe error in the test case + itself). Specify --all to see output for tests + with status PASS (success, as expected) + XFAIL (failure, as expected), or + WARNING (minor error in the test case + itself).

--build [string]

string is a full configuration + ``triple'' name as used by configure. This + is the type of machine DejaGnu and the tools to be tested are built + on. For a normal cross this is the same as the host, but for a + canadian cross, they are seperate.

--host [string]

string is a full configuration + ``triple'' name as used by configure. Use this + option to override the default string recorded by your + configuration's choice of host. This choice does not change how + anything is actually configured unless --build is also specified; it + affects only DejaGnu procedures that compare the + host string with particular values. The procedures + ishost, istarget, + isnative, and setupxfail} + are affected by --host. In this usage, + host refers to the machine that the tests are to + be run on, which may not be the same as the + build machine. If --build + is also specified, then --host refers to the + machine that the tests wil, be run on, not the machine DejaGnu is run + on.

--host_board [name]

The host board to use.

--target [string]

Use this option to override the default setting + (running native tests). string is a full + configuration ``triple'' name of the form + cpu-vendor-os as used by + configure. This option changes the + configuration runtest uses for the default tool + names, and other setup information.

--debug (-de)

Turns on the expect internal + debugging output. Debugging output is displayed as part of the + runtest output, and logged to a file called + dbg.log. The extra debugging output does + not appear on standard output, unless the + verbose level is greater than 2 (for instance, to see debug output + immediately, specify --debug-v -v}). The + debugging output shows all attempts at matching the test output of + the tool with the scripted patterns describing expected output. The + output generated with --strace also goes into + dbg.log.

--help (-he)

Prints out a short summary of the + runtest options, then exits (even if you also + specify other options).

--ignore [name(s)]

The names of specific tests to + ignore.

--objdir [path]

Use path as the top directory + containing any auxiliary compiled test code. This defaults to + .. Use this option to locate pre-compiled test + code. You can normally prepare any auxiliary files needed with + make.

--outdir [path]

Write output logs in directory + path. The default is .}, + the directory where you start + runtest. This option affects only the summary + and the detailed log files + tool.sum and + tool.log. The DejaGnu debug + log dbg.log always appears (when requested) in + the local directory.

--reboot [name]

Reboot the target board when + runtest initializes. Usually, when running tests + on a separate target board, it is safer to reboot the target to be + certain of its state. However, when developing test scripts, + rebooting takes a lot of time.

--srcdir [path]

Use path as the top directory + for test scripts to run. runtest looks in this + directory for any subdirectory whose name begins with the toolname + (specified with --tool). For instance, with + --toolgdb}, runtest uses + tests in subdirectories gdb.* (with the usual + shell-like filename expansion). If you do not use + --srcdir, runtest looks for + test directories under the current working + directory.

--strace [number]

Turn on internal tracing for + expect, to n levels deep. By adjusting the + level, you can control the extent to which your output expands + multi-level Tcl statements. This allows you to ignore some levels of + case or if statements. + Each procedure call or control structure counts as one ``level''. The + output is recorded in the same file, dbg.log, + used for output from --debug.

--connect [program]

Connect to a target testing environment as specified + by type, if the target is not the computer + running runtest. For example, use + --connect to change the program used to connect + to a ``bare board'' boot monitor. The choices for + type in the DejaGnu 1.4 distribution are + rlogin, telnet, + rsh, tip, + kermit, and mondfe.

The default for this option depends on the configuration most + convenient communication method available, but often other + alternatives work as well; you may find it useful to try alternative + connect methods if you suspect a communication problem with your + testing target.

--baud [number]

Set the default baud rate to something other than + 9600. (Some serial interface programs, like tip, + use a separate initialization file instead of this + value.)

--target_board [name(s)]

The list of target boards to run tests + on.

--tool[name(s)]

Specifies which test suite to run, and what + initialization module to use. --tool is used + only for these two purposes. It is + not used to name the executable program to + test. Executable tool names (and paths) are recorded in + site.exp and you can override them by specifying + Tcl variables on the command line.

For example, including "--tool gcc" on the + runtest command line runs tests from all test + subdirectories whose names match gcc.*, and uses + one of the initialization modules named + config/*-gcc.exp. To specify the name of the + compiler (perhaps as an alternative path to what + runtest would use by default), use + GCC=binname on the runtest + command line.

--tool_exec [name]

The path to the tool executable to + test.

--tool_opts [options]

A list of additional options to pass to the + tool.

--verbose (-v)

Turns on more output. Repeating this option increases + the amount of output displayed. Level one (-v) + is simply test output. Level two (-v-v}) shows + messages on options, configuration, and process control. Verbose + messages appear in the detailed (*.log) log + file, but not in the summary (*.sum) log + file.

--version (-V)

Prints out the version numbers of DejaGnu, + expect and Tcl, and exits without running any + tests.

--D[0-1]

Start the internal Tcl debugger. The Tcl debugger + supports breakpoints, single stepping, and other common debugging + activities. See the document "Debugger for Tcl Applications} by Don + Libes. (Distributed in PostScript form with + expect as the file + expect/tcl-debug.ps.. If you specify + -D1, the expect shell stops + at a breakpoint as soon as DejaGnu invokes it. If you specify + -D0, DejaGnu starts as usual, but you can enter + the debugger by sending an interrupt (e.g. by typing + C-c). +

testfile.exp[=arg(s)]

Specify the names of testsuites to run. By default, + runtest runs all tests for the tool, but you can + restrict it to particular testsuites by giving the names of the + .exp expect scripts that control + them. testsuite.exp may not include path + information; use plain filenames.

testfile.exp="testfile1 ..."

Specify a subset of tests in a suite to run. For + compiler or assembler tests, which often use a single + .exp script covering many different source + files, this option allows you to further restrict the tests by + listing particular source files to compile. Some tools even support + wildcards here. The wildcards supported depend upon the tool, but + typically they are ?, *, + and [chars].

tclvar=value

You can define Tcl variables for use by your test + scripts in the same style used with make for + environment variables. For example, runtest + GDB=gdb.old defines a variable called + GDB; when your scripts refer to + $GDB in this run, they use the value + gdb.old.

The default Tcl variables used for most tools are defined in + the main DejaGnu Makefile; their values are + captured in the site.exp file.

Common Options

Typically, you don't need must to use any command-line options. + --tool used is only required when there are more than + one test suite in the same directory. The default options are in the + local site.exp file, created by "make site.exp".

For example, if the directory gdb/testsuite + contains a collection of DejaGnu tests for GDB, you can run them like + this:

	  eg$ cd gdb/testsuite
+	  eg$ runtest --tool gdb
+	

Test output follows, ending with:

		=== gdb Summary ===
+
+		# of expected passes 508
+		# of expected failures 103
+		/usr/latest/bin/gdb version 4.14.4 -nx
+	

You can use the option --srcdir to point to + some other directory containing a collection of tests:

	  eg$ runtest--srcdir /devo/gdb/testsuite
+	

By default, runtest prints only the + names of the tests it runs, output from any tests that have unexpected + results, and a summary showing how many tests passed and how many + failed. To display output from all tests (whether or not they behave + as expected), use the --all option. For more + verbose output about processes being run, communication, and so on, use + --verbose. To see even more output, use multiple + --verbose options. for a more detailed explanation + of each runtest option.

Test output goes into two files in your current directory: + summary output in tool.sum, + and detailed output in tool.log. (tool + refers to the collection of tests; for example, after a run with + --tool gdb, look for output files + gdb.sum and + gdb.log.)


PrevHomeNext
Running TestsUpThe files DejaGnu produces.
\ No newline at end of file diff --git a/doc/overview/tvariables.html b/doc/overview/tvariables.html new file mode 100644 index 0000000..0bcb733 --- /dev/null +++ b/doc/overview/tvariables.html @@ -0,0 +1,208 @@ +Special variables used by test cases.
DejaGnu
PrevChapter 4. Extending DejaGnuNext

Special variables used by test cases.

There are special variables used by test cases. These contain + other information from DejaGnu. Your test cases can use these variables, + with conventional meanings (as well as the variables saved in + site.exp. You can use the value of these variables, + but they should never be changed.

$prms_id

The tracking system (e.g. GNATS) number identifying + a corresponding bugreport. (0} if you do not + specify it in the test script.)

$item bug_id

An optional bug id; may reflect a bug + identification from another organization. (0 + if you do not specify it.)

$subdir

The subdirectory for the current test + case.

$expect_out(buffer)

The output from the last command. This is an + internal variable set by Expect. More information can be found in + the Expect manual.

$exec_output

This is the output from a + ${tool}_load command. This only applies to + tools like GCC and GAS which produce an object file that must in + turn be executed to complete a test.

$comp_output

This is the output from a + ${tool}_start command. This is conventionally + used for batch oriented programs, like GCC and GAS, that may + produce interesting output (warnings, errors) without further + interaction.


PrevHomeNext
Hints On Writing A Test CaseUpReference
\ No newline at end of file diff --git a/doc/overview/writing.html b/doc/overview/writing.html new file mode 100644 index 0000000..b8b8e0f --- /dev/null +++ b/doc/overview/writing.html @@ -0,0 +1,202 @@ +Writing A Test Case
DejaGnu
PrevChapter 4. Extending DejaGnuNext

Writing A Test Case

The easiest way to prepare a new test case is to base it + on an existing one for a similar situation. There are two major + categories of tests: batch or interactive. Batch oriented tests + are usually easier to write.

The GCC tests are a good example of batch oriented tests. + All GCC tests consist primarily of a call to a single common + procedure, Since all the tests either have no output, or only + have a few warning messages when successfully compiled. Any + non-warning output is a test failure. All the C code needed is + kept in the test directory. The test driver, written in Tcl, + need only get a listing of all the C files in the directory, and + compile them all using a generic procedure. This procedure and a + few others supporting for these tests are kept in the library + module lib/c-torture.exp in the GCC test + suite. Most tests of this kind use very few + expect features, and are coded almost + purely in Tcl.

Writing the complete suite of C tests, then, consisted of + these steps:

  • Copying all the C code into the test directory. + These tests were based on the C-torture test created by Torbjorn + Granlund (on behalf of the Free Software Foundation) for GCC + development.

  • Writing (and debugging) the generic Tcl procedures for + compilation.

  • Writing the simple test driver: its main task is to + search the directory (using the Tcl procedure + glob for filename expansion with wildcards) + and call a Tcl procedure with each filename. It also checks for + a few errors from the testing procedure.

Testing interactive programs is intrinsically more + complex. Tests for most interactive programs require some trial + and error before they are complete.

However, some interactive programs can be tested in a + simple fashion reminiscent of batch tests. For example, prior + to the creation of DejaGnu, the GDB distribution already + included a wide-ranging testing procedure. This procedure was + very robust, and had already undergone much more debugging and + error checking than many recent DejaGnu test cases. + Accordingly, the best approach was simply to encapsulate the + existing GDB tests, for reporting purposes. Thereafter, new GDB + tests built up a family of Tcl procedures specialized for GDB + testing.


PrevHomeNext
Board Config File ValuesUpDebugging A Test Case
\ No newline at end of file diff --git a/doc/ref.sgml b/doc/ref.sgml index 6a1a7d6..1256e00 100644 --- a/doc/ref.sgml +++ b/doc/ref.sgml @@ -75,15 +75,15 @@ Create another directory in the share directory, called dejagnu, and copy all the library files into - it. + it. Create a directory in the dejagnu/share directory, called config, and copy all the configuration files into - it. + it. Copy the runtest shell script into - $exec_prefix/bin. + $exec_prefix/bin. Copy runtest.exp into $exec_prefix/lib/dejagnu. This is the main Tcl @@ -539,6 +539,7 @@ + Warning Procedure @@ -584,6 +585,7 @@ + Perror Procedure @@ -623,6 +625,7 @@ + Note Procedure @@ -3118,6 +3121,7 @@ + Platform Dependant Procedures @@ -3210,7 +3214,7 @@ session. You can also use ${tool}_exit to remove any temporary files left over from the tests. runtest calls - ${tool}_exit. + ${tool}_exit. ${tool}_exit @@ -3335,7 +3339,7 @@ Use the optional third argument line to start lines in the result with the line number in filename. (This argument is simply an option - flag; type it just as shown .) + flag; type it just as shown .) grep @@ -3360,8 +3364,8 @@ regexp matches. - + Prune Procedure @@ -3437,7 +3441,7 @@ This sources the file filename, and traps all errors. It also ignores all extraneous output. If there was an error it returns a 1, otherwise it returns a - 0. + 0. psource @@ -3530,6 +3534,7 @@ + unsetenv Procedure @@ -3553,7 +3558,7 @@ Getenv Procedure Returns the value of var in the - environment if it exists, otherwise it returns NULL. + environment if it exists, otherwise it returns NULL. getenv @@ -3567,6 +3572,7 @@ + Prune_system_crud Procedure diff --git a/doc/runtest.1 b/doc/runtest.1 index 2c3a357..861ec66 100644 --- a/doc/runtest.1 +++ b/doc/runtest.1 @@ -53,9 +53,8 @@ The configuration string for the host. .TP .BI --ignore \ test1.exp\ test2.exp\ ... Do not run the specified tests. -.BI --mail \ \'name1\ name2\ ...\' Electronic mail addresses to receive test results. -.TP +.TP .BI --name \ hostname The network hostname of the target board. .TP diff --git a/doc/user.sgml b/doc/user.sgml index 2154d74..143e1ac 100644 --- a/doc/user.sgml +++ b/doc/user.sgml @@ -490,7 +490,7 @@ verbose output about processes being run, communication, and so on, use --verbose. To see even more output, use multiple --verbose options. for a more detailed explanation - of each runtest option. + of each runtest option. Test output goes into two files in your current directory: summary output in tool.sum, @@ -498,7 +498,8 @@ tool.log. (tool refers to the collection of tests; for example, after a run with --tool gdb, look for output files - gdb.sum and gdb.log.) + gdb.sum and + gdb.log.) @@ -529,7 +530,8 @@ (expected and unexpected); and the full pathname and version number of the tool tested. (All possible outcomes, and all errors, are always reflected in the summary output file, - regardless of whether or not you specify .) + regardless of whether or not you specify + .) If any of your tests use the procedures unresolved, unsupported, @@ -1137,7 +1139,7 @@ If you are testing a native PC compiler (ex: you have - gcc.exe in your PATH on the PC), do this: + gcc.exe in your PATH on the PC), do this: Setup Native Remote Testing @@ -1192,7 +1194,7 @@ called target_info, and it has two indices. The following fields are part of the array. - + Command Line Option Variables In the user editable second section of the - + - + Personal Config File The personal config file is used to customize @@ -1342,6 +1344,7 @@ secure shell, as rsh is mostly used to test unix machines within a local network here. + @@ -2146,13 +2149,13 @@ appropriate for the particular test, allow successively higher values of $verbose to generate more information. Be kind to other programmers who use your tests: - provide for a lot of debugging information. + provide for a lot of debugging information. Output from the internal debugging functions of Tcl and Expect. There is a command line options for each; both forms of debugging output are recorded in the file dbg.log in the current - directory. + directory. Use for information from the expect level; it generates displays of the expect attempts to @@ -2162,7 +2165,7 @@ latest attempt at a new test script and the corresponding dbg.log can allow you to create the final patterns by ``cut and paste''. This is sometimes the best way - to write a test case. + to write a test case. Use to see more detail at the Tcl level; this shows how Tcl procedure @@ -2174,7 +2177,7 @@ the expect command log_user. This command prints all expect actions to the expect standard output, to the detailed log file, and (if is on) to - dbg.log. + dbg.log. @@ -2225,7 +2228,7 @@ directory. Add the new test case to the directory, as - above. + above. To add support in the new directory for configure and make, you must also create a diff --git a/example/Makefile.am b/example/Makefile.am index ae19604..9408769 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -1,6 +1,5 @@ ## Process this file with automake to generate Makefile.in -AUTOMAKE_OPTIONS = dejagnu cygnus +AUTOMAKE_OPTIONS = dejagnu -all-local: - cd calc; $(MAKE) all +SUBDIRS = calc diff --git a/example/Makefile.in b/example/Makefile.in index 8131e73..7b5faf6 100644 --- a/example/Makefile.in +++ b/example/Makefile.in @@ -60,52 +60,158 @@ POST_UNINSTALL = : BOARDS = @BOARDS@ CC = @CC@ CONFIG = @CONFIG@ +DOCBOOK = @DOCBOOK@ EXEEXT = @EXEEXT@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ +TCLSH = @TCLSH@ VERSION = @VERSION@ +tclsh = @tclsh@ -AUTOMAKE_OPTIONS = dejagnu cygnus -mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +AUTOMAKE_OPTIONS = dejagnu + +SUBDIRS = calc +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best -EXPECT = `if test -f $(top_builddir)/../expect/expect; then echo $(top_builddir)/../expect/expect; else echo expect; fi` -RUNTEST = `if test -f $(top_srcdir)/../dejagnu/runtest; then echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi` +EXPECT = expect +RUNTEST = runtest all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --cygnus example/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu example/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. + +@SET_MAKE@ + +all-recursive install-data-recursive install-exec-recursive \ +installdirs-recursive install-recursive uninstall-recursive \ +check-recursive installcheck-recursive info-recursive dvi-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ + test "$$subdir" = "." && dot_seen=yes; \ + done; \ + test "$$dot_seen" = "no" && rev=". $$rev"; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done + tags: TAGS -TAGS: +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = example distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu example/Makefile @for file in $(DISTFILES); do \ - if test -f $$file; then d=.; else d=$(srcdir); fi; \ + d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done + for subdir in $(SUBDIRS); do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + chmod 777 $(distdir)/$$subdir; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \ + || exit 1; \ + fi; \ + done RUNTESTFLAGS = @@ -116,10 +222,6 @@ RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir check-DEJAGNU: site.exp srcdir=`cd $(srcdir) && pwd`; export srcdir; \ EXPECT=$(EXPECT); export EXPECT; \ - if [ -f $(top_builddir)/../expect/expect ]; then \ - TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \ - export TCL_LIBRARY; \ - fi; \ runtest=$(RUNTEST); \ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ $$runtest $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ @@ -139,32 +241,31 @@ site.exp: Makefile @test ! -f site.exp || mv site.exp site.bak @mv $@-t site.exp info-am: -info: info-am +info: info-recursive dvi-am: -dvi: dvi-am -check-am: +dvi: dvi-recursive +check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU -check: check-am +check: check-recursive installcheck-am: -installcheck: installcheck-am -install-info-am: -install-info: install-info-am +installcheck: installcheck-recursive install-exec-am: -install-exec: install-exec-am +install-exec: install-exec-recursive install-data-am: -install-data: install-data-am +install-data: install-data-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-am +install: install-recursive uninstall-am: -uninstall: uninstall-am -all-am: Makefile all-local -all-redirect: all-am +uninstall: uninstall-recursive +all-am: Makefile +all-redirect: all-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: +installdirs: installdirs-recursive +installdirs-am: mostlyclean-generic: @@ -176,35 +277,39 @@ distclean-generic: -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: -mostlyclean-am: mostlyclean-generic +mostlyclean-am: mostlyclean-tags mostlyclean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive -clean-am: clean-generic mostlyclean-am +clean-am: clean-tags clean-generic mostlyclean-am -clean: clean-am +clean: clean-recursive -distclean-am: distclean-generic clean-am +distclean-am: distclean-tags distclean-generic clean-am -distclean: distclean-am +distclean: distclean-recursive -maintainer-clean-am: maintainer-clean-generic distclean-am +maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \ + distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -.PHONY: tags distdir check-DEJAGNU info-am info dvi-am dvi check \ -check-am installcheck-am installcheck install-info-am install-info \ +.PHONY: install-data-recursive uninstall-data-recursive \ +install-exec-recursive uninstall-exec-recursive installdirs-recursive \ +uninstalldirs-recursive all-recursive check-recursive \ +installcheck-recursive info-recursive dvi-recursive \ +mostlyclean-recursive distclean-recursive clean-recursive \ +maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir check-DEJAGNU \ +info-am info dvi-am dvi check check-am installcheck-am installcheck \ install-exec-am install-exec install-data-am install-data install-am \ -install uninstall-am uninstall all-local all-redirect all-am all \ +install uninstall-am uninstall all-redirect all-am all installdirs-am \ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean -all-local: - cd calc; $(MAKE) all - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/example/calc/AUTHORS b/example/calc/AUTHORS new file mode 100644 index 0000000..e69de29 diff --git a/example/calc/COPYING b/example/calc/COPYING new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/example/calc/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program 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 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/example/calc/INSTALL b/example/calc/INSTALL new file mode 100644 index 0000000..b42a17a --- /dev/null +++ b/example/calc/INSTALL @@ -0,0 +1,182 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. diff --git a/example/calc/Makefile.am b/example/calc/Makefile.am new file mode 100644 index 0000000..4767579 --- /dev/null +++ b/example/calc/Makefile.am @@ -0,0 +1,23 @@ +# Copyright (C) 1992 - 2001 Free Software Foundation, Inc. +# +# This program 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 1, or (at your option) +# any later version. +# +# This program 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 this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# + +AUTOMAKE_OPTIONS = dejagnu + +bin_PROGRAMS = calc +calc_SOURCES = calc.c + +RUNTESTDEFAULTFLAGS = --tool calc CALC=`pwd`/calc --srcdir $$srcdir/testsuite \ No newline at end of file diff --git a/example/calc/Makefile.in b/example/calc/Makefile.in index f892c7b..8951ec0 100644 --- a/example/calc/Makefile.in +++ b/example/calc/Makefile.in @@ -1,4 +1,16 @@ -# Copyright (C) 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# Copyright (C) 1992 - 2001 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,100 +27,411 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # -# target name -PROG= calc -# compiler specifics -CC = @CC@ -CFLAGS = -g -I$(srcdir) -I. -CALC = calc +SHELL = @SHELL@ -# directory specifics -VPATH = @srcdir@ srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ -# testsuite specifics -# Setup the testing framework, if you have one -# Flags that we pass when building the testsuite. -EXPECT = ` \ - if [ -f $${rootme}/../../../expect/expect ] ; then \ - echo $${rootme}/../../../expect/expect ; \ - else echo expect ; fi` - -RUNTEST = ` \ - if [ -f $${srcdir}/../../../dejagnu/runtest ] ; then \ - echo $${srcdir}/../../../dejagnu/runtest ; \ - else echo runtest ; fi` - -RUNTESTFLAGS= - -## --- NOTHING BELOW HERE SHOULD REQUIRE MODIFICATIONS --- ## - -SRCS= calc.c - -OBJS= calc.o - -all: ${PROG} - -calc.o: calc.c - -.c.o: - ${CC} ${CFLAGS} -I$(srcdir) -I. -c $< - -${PROG}: ${OBJS} ${DPADD} - ${CC} ${LDFLAGS} ${CFLAGS} -o $@ ${OBJS} ${DPADD} ${LDADD} - -check: site.exp all - rootme=`pwd`; export rootme; \ - srcdir=${srcdir} ; export srcdir ; \ - EXPECT=${EXPECT} ; export EXPECT ; \ - if [ -f $${rootme}/../../expect/expect ] ; then \ - TCL_LIBRARY=$${srcdir}/../../tcl/library ; \ - export TCL_LIBRARY ; fi ; \ - ${RUNTEST} ${RUNTESTFLAGS} --tool ${PROG} CALC=${PROG} --srcdir ${srcdir}/testsuite - -site.exp: ./config.status Makefile - @echo "Making a new config file..." - -@rm -f ./tmp? - @touch site.exp - - -@mv site.exp site.bak - @echo "## these variables are automatically generated by make ##" > ./tmp0 - @echo "# Do not edit here. If you wish to override these values" >> ./tmp0 - @echo "# add them to the last section" >> ./tmp0 - @echo "set tool calc" >> ./tmp0 - @echo "set srcdir ${srcdir}" >> ./tmp0 - @echo "set objdir `pwd`" >> ./tmp0 - @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0 - @cat ./tmp0 > site.exp - @cat site.bak | sed \ - -e '1,/^## All variables above are.*##/ d' >> site.exp - -@rm -f ./tmp? - -install: ${PROG} - -clean mostlyclean: - rm -f a.out [Ee]rrs tags mklog core ${OBJS} ${PROG} - -distclean maintainer-clean realclean: clean - rm -f config.status Makefile calc.h calc.log calc.plog calc.psum - rm -f calc.sum site.exp config.log - -Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) config.status - @echo "Rebuilding the Makefile..." - $(SHELL) ./config.status - -configure: $(srcdir)/configure.in $(srcdir)/Makefile.in $(srcdir)/../../aclocal.m4 - @echo "Rebuilding configure..." - @cd ${srcdir} ;\ - autoconf --localdir=${srcdir}/../.. - -config.status: - @echo "Rebuilding config.status..." +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = . + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CC = @CC@ +MAKEINFO = @MAKEINFO@ +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +AUTOMAKE_OPTIONS = dejagnu + +bin_PROGRAMS = calc +calc_SOURCES = calc.c + +RUNTESTDEFAULTFLAGS = --tool calc CALC=`pwd`/calc --srcdir $$srcdir/testsuite +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs +CONFIG_HEADER = calc.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(bin_PROGRAMS) + + +DEFS = @DEFS@ -I. -I$(srcdir) -I. +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +calc_OBJECTS = calc.o +calc_LDADD = $(LDADD) +calc_DEPENDENCIES = +calc_LDFLAGS = +CFLAGS = @CFLAGS@ +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +DIST_COMMON = ./stamp-h.in COPYING INSTALL Makefile.am Makefile.in \ +aclocal.m4 calc.h.in configure configure.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +DEP_FILES = .deps/calc.P +EXPECT = expect +RUNTEST = runtest +SOURCES = $(calc_SOURCES) +OBJECTS = $(calc_OBJECTS) + +all: all-redirect +.SUFFIXES: +.SUFFIXES: .S .c .o .s +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +$(ACLOCAL_M4): configure.in + cd $(srcdir) && $(ACLOCAL) + +config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck +$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) + cd $(srcdir) && $(AUTOCONF) + +calc.h: stamp-h + @if test ! -f $@; then \ + rm -f stamp-h; \ + $(MAKE) stamp-h; \ + else :; fi +stamp-h: $(srcdir)/calc.h.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES= CONFIG_HEADERS=calc.h \ + $(SHELL) ./config.status + @echo timestamp > stamp-h 2> /dev/null +$(srcdir)/calc.h.in: $(srcdir)/stamp-h.in + @if test ! -f $@; then \ + rm -f $(srcdir)/stamp-h.in; \ + $(MAKE) $(srcdir)/stamp-h.in; \ + else :; fi +$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOHEADER) + @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null + +mostlyclean-hdr: + +clean-hdr: + +distclean-hdr: + -rm -f calc.h + +maintainer-clean-hdr: + +mostlyclean-binPROGRAMS: + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +distclean-binPROGRAMS: + +maintainer-clean-binPROGRAMS: + +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(bindir) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + list='$(bin_PROGRAMS)'; for p in $$list; do \ + rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + done + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +mostlyclean-compile: + -rm -f *.o core *.core + +clean-compile: + +distclean-compile: + -rm -f *.tab.c + +maintainer-clean-compile: + +calc: $(calc_OBJECTS) $(calc_DEPENDENCIES) + @rm -f calc + $(LINK) $(calc_LDFLAGS) $(calc_OBJECTS) $(calc_LDADD) $(LIBS) + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: $(HEADERS) $(SOURCES) calc.h.in $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)calc.h.in$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags calc.h.in $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + -rm -rf $(distdir) + GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz + mkdir $(distdir)/=build + mkdir $(distdir)/=inst + dc_install_base=`cd $(distdir)/=inst && pwd`; \ + cd $(distdir)/=build \ + && ../configure --srcdir=.. --prefix=$$dc_install_base \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) dist + -rm -rf $(distdir) + @banner="$(distdir).tar.gz is ready for distribution"; \ + dashes=`echo "$$banner" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + echo "$$dashes" +dist: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +dist-all: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +distdir: $(DISTFILES) + -rm -rf $(distdir) + mkdir $(distdir) + -chmod 777 $(distdir) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) + +-include $(DEP_FILES) + +mostlyclean-depend: + +clean-depend: + +distclean-depend: + -rm -rf .deps + +maintainer-clean-depend: + +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp + +RUNTESTFLAGS = + +DEJATOOL = $(PACKAGE) + +check-DEJAGNU: site.exp + srcdir=`cd $(srcdir) && pwd`; export srcdir; \ + EXPECT=$(EXPECT); export EXPECT; \ + runtest=$(RUNTEST); \ + if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ + $$runtest $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ + else echo "WARNING: could not find \`runtest'" 1>&2; :;\ + fi +site.exp: Makefile + @echo 'Making a new site.exp file...' + @test ! -f site.bak || rm -f site.bak + @echo '## these variables are automatically generated by make ##' > $@-t + @echo '# Do not edit here. If you wish to override these values' >> $@-t + @echo '# edit the last section' >> $@-t + @echo 'set tool $(DEJATOOL)' >> $@-t + @echo 'set srcdir $(srcdir)' >> $@-t + @echo 'set objdir' `pwd` >> $@-t + @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t + @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t + @test ! -f site.exp || mv site.exp site.bak + @mv $@-t site.exp +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU +check: check-am +installcheck-am: +installcheck: installcheck-am +all-recursive-am: calc.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +install-exec-am: install-binPROGRAMS +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: uninstall-binPROGRAMS +uninstall: uninstall-am +all-am: Makefile $(PROGRAMS) calc.h +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + $(mkinstalldirs) $(DESTDIR)$(bindir) + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \ + mostlyclean-compile mostlyclean-tags mostlyclean-depend \ + mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-tags \ + clean-depend clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile \ + distclean-tags distclean-depend distclean-generic \ + clean-am + +distclean: distclean-am + -rm -f config.status + +maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ + maintainer-clean-compile maintainer-clean-tags \ + maintainer-clean-depend maintainer-clean-generic \ + distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + -rm -f config.status + +.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ +maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ +mostlyclean-compile distclean-compile clean-compile \ +maintainer-clean-compile tags mostlyclean-tags distclean-tags \ +clean-tags maintainer-clean-tags distdir mostlyclean-depend \ +distclean-depend clean-depend maintainer-clean-depend check-DEJAGNU \ +info-am info dvi-am dvi check check-am installcheck-am installcheck \ +all-recursive-am install-exec-am install-exec install-data-am \ +install-data install-am install uninstall-am uninstall all-redirect \ +all-am all installdirs mostlyclean-generic distclean-generic \ +clean-generic maintainer-clean-generic clean mostlyclean distclean \ +maintainer-clean + -info: -install-info: -# Nothing. +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/example/calc/NEWS b/example/calc/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/example/calc/README b/example/calc/README new file mode 100644 index 0000000..e69de29 diff --git a/example/calc/aclocal.m4 b/example/calc/aclocal.m4 new file mode 100644 index 0000000..bd4779c --- /dev/null +++ b/example/calc/aclocal.m4 @@ -0,0 +1,127 @@ +dnl aclocal.m4 generated automatically by aclocal 1.4 + +dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +dnl PARTICULAR PURPOSE. + +# Like AC_CONFIG_HEADER, but automatically create stamp file. + +AC_DEFUN(AM_CONFIG_HEADER, +[AC_PREREQ([2.12]) +AC_CONFIG_HEADER([$1]) +dnl When config.status generates a header, we must update the stamp-h file. +dnl This file resides in the same directory as the config header +dnl that is generated. We must strip everything past the first ":", +dnl and everything past the last "/". +AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl +ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, +<>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, +<>; do + case " <<$>>CONFIG_HEADERS " in + *" <<$>>am_file "*<<)>> + echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx + ;; + esac + am_indx=`expr "<<$>>am_indx" + 1` +done<<>>dnl>>) +changequote([,]))]) + +# Do all the work for Automake. This macro actually does too much -- +# some checks are only needed if your package does certain things. +# But this isn't really a big deal. + +# serial 1 + +dnl Usage: +dnl AM_INIT_AUTOMAKE(package,version, [no-define]) + +AC_DEFUN(AM_INIT_AUTOMAKE, +[AC_REQUIRE([AC_PROG_INSTALL]) +PACKAGE=[$1] +AC_SUBST(PACKAGE) +VERSION=[$2] +AC_SUBST(VERSION) +dnl test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi +ifelse([$3],, +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) +AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) +AC_REQUIRE([AM_SANITY_CHECK]) +AC_REQUIRE([AC_ARG_PROGRAM]) +dnl FIXME This is truly gross. +missing_dir=`cd $ac_aux_dir && pwd` +AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) +AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) +AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) +AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) +AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) +AC_REQUIRE([AC_PROG_MAKE_SET])]) + +# +# Check to make sure that the build environment is sane. +# + +AC_DEFUN(AM_SANITY_CHECK, +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftestfile +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "[$]*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "[$]*" != "X $srcdir/configure conftestfile" \ + && test "[$]*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "[$]2" = conftestfile + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +rm -f conftest* +AC_MSG_RESULT(yes)]) + +dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) +dnl The program must properly implement --version. +AC_DEFUN(AM_MISSING_PROG, +[AC_MSG_CHECKING(for working $2) +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if ($2 --version) < /dev/null > /dev/null 2>&1; then + $1=$2 + AC_MSG_RESULT(found) +else + $1="$3/missing $2" + AC_MSG_RESULT(missing) +fi +AC_SUBST($1)]) + diff --git a/example/calc/calc.c b/example/calc/calc.c index 784e39b..119971a 100644 --- a/example/calc/calc.c +++ b/example/calc/calc.c @@ -1,12 +1,17 @@ +#include "calc.h" + #ifdef HAVE_STDLIB_H #include #endif #include #include -#include "calc.h" static int words(); +#define NWORD 10 +#define SIZE 100 +#define VERSION "1.1" + int main() { char line[SIZE]; diff --git a/example/calc/calc.h.in b/example/calc/calc.h.in index 1e420a7..1fddcd0 100644 --- a/example/calc/calc.h.in +++ b/example/calc/calc.h.in @@ -1,18 +1,11 @@ -/* - * Check for headers - */ -#ifndef __CALC_H__ -#define __CALC_H__ +/* calc.h.in. Generated automatically from configure.in by autoheader. */ +/* Define if you have the header file. */ #undef HAVE_STDLIB_H -/* - * Check for functions - */ -#undef HAVE_STRCMP +/* Name of package */ +#undef PACKAGE -#define NWORD 10 -#define SIZE 100 -#define VERSION "1.0 Beta" +/* Version number of package */ +#undef VERSION -#endif /* __CALC_H__ */ diff --git a/example/calc/configure b/example/calc/configure index e58d5cf..bf67346 100755 --- a/example/calc/configure +++ b/example/calc/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12.1 +# Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -333,7 +333,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12.1" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -503,9 +503,11 @@ ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross +ac_exeext= +ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then @@ -520,13 +522,552 @@ fi -CC=${CC-cc} + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:559: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 +echo "configure:612: checking whether build environment is sane" >&5 +# Just in case +sleep 1 +echo timestamp > conftestfile +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "$*" != "X $srcdir/configure conftestfile" \ + && test "$*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { echo "configure: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" 1>&2; exit 1; } + fi + + test "$2" = conftestfile + ) +then + # Ok. + : +else + { echo "configure: error: newly created file is older than distributed files! +Check your system clock" 1>&2; exit 1; } +fi +rm -f conftest* +echo "$ac_t""yes" 1>&6 +if test "$program_transform_name" = s,x,x,; then + program_transform_name= +else + # Double any \ or $. echo might interpret backslashes. + cat <<\EOF_SED > conftestsed +s,\\,\\\\,g; s,\$,$$,g +EOF_SED + program_transform_name="`echo $program_transform_name|sed -f conftestsed`" + rm -f conftestsed +fi +test "$program_prefix" != NONE && + program_transform_name="s,^,${program_prefix},; $program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + +# sed with no file args requires a program. +test "$program_transform_name" = "" && program_transform_name="s,x,x," + +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:669: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +PACKAGE=calc + +VERSION=1.1 + +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } +fi +cat >> confdefs.h <> confdefs.h <&6 +echo "configure:715: checking for working aclocal" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (aclocal --version) < /dev/null > /dev/null 2>&1; then + ACLOCAL=aclocal + echo "$ac_t""found" 1>&6 +else + ACLOCAL="$missing_dir/missing aclocal" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 +echo "configure:728: checking for working autoconf" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoconf --version) < /dev/null > /dev/null 2>&1; then + AUTOCONF=autoconf + echo "$ac_t""found" 1>&6 +else + AUTOCONF="$missing_dir/missing autoconf" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working automake""... $ac_c" 1>&6 +echo "configure:741: checking for working automake" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (automake --version) < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake + echo "$ac_t""found" 1>&6 +else + AUTOMAKE="$missing_dir/missing automake" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 +echo "configure:754: checking for working autoheader" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoheader --version) < /dev/null > /dev/null 2>&1; then + AUTOHEADER=autoheader + echo "$ac_t""found" 1>&6 +else + AUTOHEADER="$missing_dir/missing autoheader" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 +echo "configure:767: checking for working makeinfo" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (makeinfo --version) < /dev/null > /dev/null 2>&1; then + MAKEINFO=makeinfo + echo "$ac_t""found" 1>&6 +else + MAKEINFO="$missing_dir/missing makeinfo" + echo "$ac_t""missing" 1>&6 +fi + + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:784: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:814: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:865: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:897: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 908 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:939: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:944: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:972: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:1015: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # # Look for various header files # echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:530: checking how to run the C preprocessor" >&5 +echo "configure:1071: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -541,14 +1082,14 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -558,14 +1099,31 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -578,6 +1136,8 @@ fi rm -f conftest* fi rm -f conftest* +fi +rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" @@ -586,20 +1146,22 @@ else fi echo "$ac_t""$CPP" 1>&6 -ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6 -echo "configure:592: checking for stdlib.h" >&5 +for ac_hdr in stdlib.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1154: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" @@ -614,26 +1176,27 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - : + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 -cat >> confdefs.h <<\EOF -#define HAVE_STDLIB_H 1 -EOF - fi +done # # Look for various functions # echo $ac_n "checking for strcmp""... $ac_c" 1>&6 -echo "configure:632: checking for strcmp" >&5 +echo "configure:1195: checking for strcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_strcmp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strcmp=yes" else @@ -670,10 +1233,7 @@ fi if eval "test \"`echo '$ac_cv_func_'strcmp`\" = yes"; then echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_STRCMP 1 -EOF - + : else echo "$ac_t""no" 1>&6 fi @@ -705,7 +1265,7 @@ EOF # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - case `(ac_space=' '; set) 2>&1 | grep ac_space` in + case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). @@ -772,7 +1332,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12.1" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -781,6 +1341,7 @@ do done ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile calc.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF @@ -795,6 +1356,7 @@ s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g @@ -813,8 +1375,19 @@ s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g -s%@CPP@%$CPP%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@PACKAGE@%$PACKAGE%g +s%@VERSION@%$VERSION%g +s%@ACLOCAL@%$ACLOCAL%g +s%@AUTOCONF@%$AUTOCONF%g +s%@AUTOMAKE@%$AUTOMAKE%g +s%@AUTOHEADER@%$AUTOHEADER%g +s%@MAKEINFO@%$MAKEINFO%g +s%@SET_MAKE@%$SET_MAKE%g s%@CC@%$CC%g +s%@CPP@%$CPP%g CEOF EOF @@ -891,6 +1464,10 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then top_srcdir="$ac_dots$ac_given_srcdir" ;; esac + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac echo creating "$ac_file" rm -f "$ac_file" @@ -906,6 +1483,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* @@ -1020,8 +1598,10 @@ fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h exit 0 EOF diff --git a/example/calc/configure.in b/example/calc/configure.in index 3ee022a..73a3204 100644 --- a/example/calc/configure.in +++ b/example/calc/configure.in @@ -1,18 +1,20 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.5) AC_INIT(calc.c) -AC_CONFIG_HEADER(calc.h) -CC=${CC-cc} +AM_CONFIG_HEADER(calc.h) +AM_INIT_AUTOMAKE(calc, 1.1) +AC_PROG_CC +AC_PROG_INSTALL # # Look for various header files # -AC_HEADER_CHECK(stdlib.h, ,AC_DEFINE(HAVE_STDLIB_H)) +AC_CHECK_HEADERS(stdlib.h) # # Look for various functions # -AC_FUNC_CHECK(strcmp, AC_DEFINE(HAVE_STRCMP)) +AC_CHECK_FUNC(strcmp) # # Output Makefile with substitutions diff --git a/example/calc/stamp-h.in b/example/calc/stamp-h.in new file mode 100644 index 0000000..9788f70 --- /dev/null +++ b/example/calc/stamp-h.in @@ -0,0 +1 @@ +timestamp diff --git a/example/calc/testsuite/calc.test/calc.exp b/example/calc/testsuite/calc.test/calc.exp index 8986cf5..6a904ad 100644 --- a/example/calc/testsuite/calc.test/calc.exp +++ b/example/calc/testsuite/calc.test/calc.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org set timeout 3 # diff --git a/example/calc/testsuite/config/unix.exp b/example/calc/testsuite/config/unix.exp index 9b73ac7..5686564 100644 --- a/example/calc/testsuite/config/unix.exp +++ b/example/calc/testsuite/config/unix.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org if ![info exists prompt] then { set prompt "calc: " diff --git a/lib/debugger.exp b/lib/debugger.exp index f00076d..3b7fa5a 100644 --- a/lib/debugger.exp +++ b/lib/debugger.exp @@ -1,4 +1,4 @@ -# Copyright (C) 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1992 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,9 +15,9 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org -# This file was written by Rob Savoye. (rob@cygnus.com) +# This file was written by Rob Savoye. (rob@welcomehome.org) # # Dump the values of a shell expression representing variable diff --git a/lib/dg.exp b/lib/dg.exp index 35c4afa..3c9b4e1 100644 --- a/lib/dg.exp +++ b/lib/dg.exp @@ -1,5 +1,5 @@ # `dg' general purpose testcase driver. -# Copyright (C) 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1994 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# dje@cygnus.com. +# bug-dejagnu@gnu.org # This file was written by Doug Evans (dje@cygnus.com). @@ -587,11 +587,11 @@ proc dg-runtest { testcases flags default-extra-flags } { } # dg-trim-dirname -- rip DIR_NAME out of FILE_NAME -# +# # Syntax: dg-trim-dirname dir_name file_name # We need to go through this contorsion in order to properly support # directory-names which might have embedded regexp special characters. - + proc dg-trim-dirname { dir_name file_name } { set special_character "\[\?\+\-\.\(\)\$\|\]" regsub -all $special_character $dir_name "\\\\&" dir_name @@ -612,7 +612,7 @@ proc dg-test { args } { global dg-do-what-default dg-interpreter-batch-mode dg-linenum-format global errorCode errorInfo global tool - global srcdir ;# eg: /calvin/dje/devo/gcc/./testsuite/ + global srcdir ;# eg: /calvin/dje/build/gcc/./testsuite/ global host_triplet target_triplet set keep 0 diff --git a/lib/framework.exp b/lib/framework.exp index b72d38e..2b26fb2 100644 --- a/lib/framework.exp +++ b/lib/framework.exp @@ -1,5 +1,4 @@ -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,9 +15,9 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org -# This file was written by Rob Savoye. (rob@cygnus.com) +# This file was written by Rob Savoye. (rob@welcomehome.org) # These variables are local to this file. # This or more warnings and a test fails. diff --git a/lib/ftp.exp b/lib/ftp.exp index 641f112..bdc6bfd 100644 --- a/lib/ftp.exp +++ b/lib/ftp.exp @@ -1,4 +1,4 @@ -# Copyright (C) 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1992 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org # # Support downloading files using ftp. diff --git a/lib/kermit.exp b/lib/kermit.exp index 6e1ac37..ab8747e 100644 --- a/lib/kermit.exp +++ b/lib/kermit.exp @@ -1,4 +1,4 @@ -# Copyright (C) 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1992 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org # # Connect to DEST using kermit. Note that we're just using kermit as a diff --git a/lib/mondfe.exp b/lib/mondfe.exp index b46484e..912f0f7 100644 --- a/lib/mondfe.exp +++ b/lib/mondfe.exp @@ -1,4 +1,4 @@ -# Copyright (C) 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1992 - 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,9 +15,9 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org -# This file was written by Rob Savoye. (rob@cygnus.com) +# This file was written by Rob Savoye. (rob@welcomehome.org) # # Connect to udi using mondfe diff --git a/lib/remote.exp b/lib/remote.exp index 0bc8ed0..1c2941d 100644 --- a/lib/remote.exp +++ b/lib/remote.exp @@ -1,4 +1,4 @@ -# Copyright (C) 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1992 - 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,9 +15,9 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org -# This file was written by Rob Savoye. (rob@cygnus.com) +# This file was written by Rob Savoye. (rob@welcomehome.org) # load various protocol support modules @@ -212,7 +212,7 @@ proc local_exec { commandline inp outp timeout } { } verbose "output is $output"; if { $outp == "" } { - return [list $status $output]; + return [list $status $output]; } else { return [list $status ""]; } @@ -602,7 +602,7 @@ proc remote_raw_file { dest args } { proc standard_file { dest op args } { set file [lindex $args 0]; - verbose "dest in standard_file is $dest"; + verbose "dest in proc standard_file is $dest" 3; if { ![is_remote $dest] } { switch $op { cmp { diff --git a/lib/rlogin.exp b/lib/rlogin.exp index 78745ba..3676481 100644 --- a/lib/rlogin.exp +++ b/lib/rlogin.exp @@ -1,4 +1,4 @@ -# Copyright (C) 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1992 - 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org # # Connect to ARG using rlogin. This is for systems using rlogin to diff --git a/lib/rsh.exp b/lib/rsh.exp index b099fd5..13c0feb 100644 --- a/lib/rsh.exp +++ b/lib/rsh.exp @@ -1,4 +1,4 @@ -# Copyright (C) 97, 98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # # Connect to hostname using rlogin diff --git a/lib/standard.exp b/lib/standard.exp index f1822e4..5c6a71c 100644 --- a/lib/standard.exp +++ b/lib/standard.exp @@ -1,4 +1,4 @@ -# Copyright (C) 97, 98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # # A set of standard functions for tools. Calls the diff --git a/lib/target.exp b/lib/target.exp index f71c6f6..5cb6288 100644 --- a/lib/target.exp +++ b/lib/target.exp @@ -1,4 +1,4 @@ -# Copyright (C) 92, 93, 94, 95, 96, 97, 98, 1999, 2000 Free Software Foundation, Inc. +# Copyright (C) 1992 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,9 +15,9 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org -# This file was written by Rob Savoye. (rob@cygnus.com) +# This file was written by Rob Savoye. (rob@welcomehome.org) # and extensively modified by Bob Manson. (manson@cygnus.com) # a hairy pattern to recognize text diff --git a/lib/targetdb.exp b/lib/targetdb.exp index b682d04..28e06ad 100644 --- a/lib/targetdb.exp +++ b/lib/targetdb.exp @@ -1,4 +1,4 @@ -# Copyright (C) 97, 98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # # Searches in the appropriate place (the board_info array) for the specified diff --git a/lib/telnet.exp b/lib/telnet.exp index 48c72ac..397822d 100644 --- a/lib/telnet.exp +++ b/lib/telnet.exp @@ -1,4 +1,4 @@ -# Copyright (C) 97, 98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # # Connect using telnet. This takes two arguments. The first one is the diff --git a/lib/tip.exp b/lib/tip.exp index 25877a9..3c1598d 100644 --- a/lib/tip.exp +++ b/lib/tip.exp @@ -1,4 +1,4 @@ -# Copyright (C) 97, 98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # # Connect via tip as part of remote_open. diff --git a/lib/util-defs.exp b/lib/util-defs.exp index 6048242..35c468e 100644 --- a/lib/util-defs.exp +++ b/lib/util-defs.exp @@ -1,4 +1,4 @@ -# Copyright (C) 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1992 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,9 +15,9 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org -# This file was written by Rob Savoye. (rob@cygnus.com) +# This file was written by Rob Savoye. (rob@welcomehome.org) # # Run a utility and test the result. diff --git a/lib/utils.exp b/lib/utils.exp index 565f18e..39e1150 100644 --- a/lib/utils.exp +++ b/lib/utils.exp @@ -1,4 +1,4 @@ -# Copyright (C) 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1992 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,9 +15,9 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org -# This file was written by Rob Savoye. (rob@cygnus.com) +# This file was written by Rob Savoye. (rob@welcomehome.org) # # Most of the procedures found here mimic their unix counter-part. @@ -72,7 +72,7 @@ proc getdirs { args } { } } } - } + } } else { perror "$tmp" return "" diff --git a/lib/xsh.exp b/lib/xsh.exp index 694241d..ed1043c 100644 --- a/lib/xsh.exp +++ b/lib/xsh.exp @@ -1,4 +1,4 @@ -# Copyright (C) 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1992 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,9 +15,9 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org -# This file was written by Rob Savoye. (rob@cygnus.com) +# This file was written by Rob Savoye. (rob@welcomehome.org) # # Connect to Spectra (VTRX) using xsh diff --git a/runtest b/runtest index 7c4fe7d..8bc6a53 100755 --- a/runtest +++ b/runtest @@ -3,7 +3,7 @@ # runtest -- basically all this script does is find the proper expect # shell and then run DejaGnu. # -# Written by Rob Savoye +# Written by Rob Savoye # # @@ -65,7 +65,7 @@ fi if [ -x "$expectbin-bld.sh" ]; then expectbin="${CONFIG_SHELL-/bin/sh} $expectbin-bld.sh" fi - + # # Extract a few options from the option list. # diff --git a/runtest.exp b/runtest.exp index cfc2ea8..28663d3 100755 --- a/runtest.exp +++ b/runtest.exp @@ -1,5 +1,5 @@ # Test Framework Driver -# Copyright (C) 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. +# Copyright (C) 1992 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,11 +16,11 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org -# This file was written by Rob Savoye. (rob@cygnus.com) +# This file was written by Rob Savoye. (rob@welcomehome.org) -set frame_version 1.3.1 +set frame_version 1.4.0 if ![info exists argv0] { send_error "Must use a version of Expect greater than 5.0\n" exit 1 @@ -661,7 +661,7 @@ unset arg_host_triplet arg_build_triplet if [expr { $build_triplet == "" && $host_triplet == ""} ] { # find config.guess - foreach dir "$libdir $libdir/.. $srcdir/.. $srcdir/../.." { + foreach dir "$libdir $libdir/libexec $libdir/.. $srcdir/.. $srcdir/../.." { verbose "Looking for ${dir}/config.guess" 2 if [file exists ${dir}/config.guess] { set config_guess ${dir}/config.guess diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index 88dab63..13fe9da 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -1,5 +1,9 @@ ## Process this file with automake to generate Makefile.in -AUTOMAKE_OPTIONS = cygnus dejagnu +AUTOMAKE_OPTIONS = dejagnu + +all: + @echo "Nothing to be done for all" + +RUNTESTDEFAULTFLAGS = --tool runtest --srcdir $$srcdir -DEJATOOL = runtest diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index eea1b06..11d0fa1 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -60,32 +60,35 @@ POST_UNINSTALL = : BOARDS = @BOARDS@ CC = @CC@ CONFIG = @CONFIG@ +DOCBOOK = @DOCBOOK@ EXEEXT = @EXEEXT@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ +TCLSH = @TCLSH@ VERSION = @VERSION@ +tclsh = @tclsh@ -AUTOMAKE_OPTIONS = cygnus dejagnu +AUTOMAKE_OPTIONS = dejagnu -DEJATOOL = runtest -mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +RUNTESTDEFAULTFLAGS = --tool runtest --srcdir $$srcdir +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = -DIST_COMMON = Makefile.am Makefile.in +DIST_COMMON = Makefile.am Makefile.in configure.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best -EXPECT = `if test -f $(top_builddir)/../expect/expect; then echo $(top_builddir)/../expect/expect; else echo expect; fi` -RUNTEST = `if test -f $(top_srcdir)/../dejagnu/runtest; then echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi` +EXPECT = expect +RUNTEST = runtest all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --cygnus testsuite/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -98,10 +101,15 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = testsuite distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu testsuite/Makefile @for file in $(DISTFILES); do \ - if test -f $$file; then d=.; else d=$(srcdir); fi; \ + d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ @@ -111,15 +119,11 @@ distdir: $(DISTFILES) RUNTESTFLAGS = -RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir +DEJATOOL = $(PACKAGE) check-DEJAGNU: site.exp srcdir=`cd $(srcdir) && pwd`; export srcdir; \ EXPECT=$(EXPECT); export EXPECT; \ - if [ -f $(top_builddir)/../expect/expect ]; then \ - TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \ - export TCL_LIBRARY; \ - fi; \ runtest=$(RUNTEST); \ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ $$runtest $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \ @@ -142,13 +146,11 @@ info-am: info: info-am dvi-am: dvi: dvi-am -check-am: +check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU check: check-am installcheck-am: installcheck: installcheck-am -install-info-am: -install-info: install-info-am install-exec-am: install-exec: install-exec-am @@ -195,13 +197,16 @@ maintainer-clean-am: maintainer-clean-generic distclean-am maintainer-clean: maintainer-clean-am .PHONY: tags distdir check-DEJAGNU info-am info dvi-am dvi check \ -check-am installcheck-am installcheck install-info-am install-info \ -install-exec-am install-exec install-data-am install-data install-am \ -install uninstall-am uninstall all-redirect all-am all installdirs \ -mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean +check-am installcheck-am installcheck install-exec-am install-exec \ +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean +all: + @echo "Nothing to be done for all" + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/testsuite/config/default.exp b/testsuite/config/default.exp index 0d427d0..81f153d 100644 --- a/testsuite/config/default.exp +++ b/testsuite/config/default.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1988, 90-93, 1995, 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1992 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,9 +15,9 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org -# This file was written by Rob Savoye. (rob@cygnus.com) +# This file was written by Rob Savoye. (rob@welcomehome.org) global RUNTEST if ![info exists RUNTEST] then { diff --git a/testsuite/lib/libsup.exp b/testsuite/lib/libsup.exp index eecf5f7..cfdd547 100644 --- a/testsuite/lib/libsup.exp +++ b/testsuite/lib/libsup.exp @@ -1,4 +1,4 @@ -# Copyright (C) 92, 93, 94, 95, 1996 Free Software Foundation, Inc. +# Copyright (C) 1992 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,9 +15,9 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org -# This file was written by Rob Savoye. (rob@cygnus.com) +# This file was written by Rob Savoye. (rob@welcomehome.org) # # Setup an environment so we can execute library procs without DejaGnu diff --git a/testsuite/runtest.all/libs.exp b/testsuite/runtest.all/libs.exp index eb5e1af..a03d9e2 100644 --- a/testsuite/runtest.all/libs.exp +++ b/testsuite/runtest.all/libs.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org load_lib libsup.exp diff --git a/testsuite/runtest.all/options.exp b/testsuite/runtest.all/options.exp index 0c396ce..c6ae172 100644 --- a/testsuite/runtest.all/options.exp +++ b/testsuite/runtest.all/options.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1988, 90-92, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1992 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,9 +15,9 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org -# This file was written by Rob Savoye. (rob@cygnus.com) +# This file was written by Rob Savoye. (rob@welcomehome.org) load_lib util-defs.exp diff --git a/testsuite/runtest.all/stats-sub.exp b/testsuite/runtest.all/stats-sub.exp index deb52f8..fc686e2 100644 --- a/testsuite/runtest.all/stats-sub.exp +++ b/testsuite/runtest.all/stats-sub.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1997 Free Software Foundation, Inc. +# Copyright (C) 1997 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Please email any bugs, comments, and/or additions to this file to: -# DejaGnu@cygnus.com +# bug-dejagnu@gnu.org # Subordinate to stats.exp. diff --git a/testsuite/runtest.all/stats.exp b/testsuite/runtest.all/stats.exp index 157cb27..4349cbd 100644 --- a/testsuite/runtest.all/stats.exp +++ b/testsuite/runtest.all/stats.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc. +# Copyright (C) 1995 - 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Please email any bugs, comments, and/or additions to this file to: -# bug-dejagnu@prep.ai.mit.edu +# bug-dejagnu@gnu.org # This file tests pass/fail/etc. # The way we do this is to recursively invoke ourselves on a small testsuite -- 2.7.4