summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS4
-rw-r--r--COPYING340
-rw-r--r--ChangeLog5493
-rw-r--r--INSTALL183
-rw-r--r--Makefile.am50
-rw-r--r--Makefile.in412
-rw-r--r--NEWS3
-rw-r--r--README283
-rw-r--r--TODO8
-rw-r--r--aclocal.m4137
-rw-r--r--baseboards/README15
-rw-r--r--baseboards/a29k-udi.exp23
-rw-r--r--baseboards/arc-sim.exp37
-rw-r--r--baseboards/arm-ice.exp48
-rw-r--r--baseboards/arm-sim.exp52
-rw-r--r--baseboards/basic-sim.exp51
-rw-r--r--baseboards/cf.exp73
-rw-r--r--baseboards/cygmon.exp31
-rw-r--r--baseboards/cygwin.exp12
-rw-r--r--baseboards/d10v-sim.exp48
-rw-r--r--baseboards/d10v.exp60
-rw-r--r--baseboards/d30v-sim.exp33
-rw-r--r--baseboards/danlite-elf.exp42
-rw-r--r--baseboards/dos.exp25
-rw-r--r--baseboards/fr30-cygmon.exp31
-rw-r--r--baseboards/fr30-elf.exp40
-rw-r--r--baseboards/fr30-sim.exp34
-rw-r--r--baseboards/h8300-sim.exp44
-rw-r--r--baseboards/h8300.exp68
-rw-r--r--baseboards/i386-bozo.exp51
-rw-r--r--baseboards/i960-cyclone.exp47
-rw-r--r--baseboards/i960-sim.exp28
-rw-r--r--baseboards/jmr3904-sim.exp14
-rw-r--r--baseboards/linux-gdbserver.exp36
-rw-r--r--baseboards/linux-libremote.exp36
-rw-r--r--baseboards/m32r-elf.exp40
-rw-r--r--baseboards/m32r-sim.exp34
-rw-r--r--baseboards/m68k-emc.exp35
-rw-r--r--baseboards/mcore-elf.exp35
-rw-r--r--baseboards/mcore-moto-sim.exp125
-rw-r--r--baseboards/mcore-pe.exp35
-rw-r--r--baseboards/mcore-sim.exp37
-rw-r--r--baseboards/mips-idt.exp31
-rw-r--r--baseboards/mips-lnews-sim.exp5
-rw-r--r--baseboards/mips-lsi-sim.exp8
-rw-r--r--baseboards/mips-sim.exp30
-rw-r--r--baseboards/mips64-sim.exp29
-rw-r--r--baseboards/mips64vr4100-sim.exp33
-rw-r--r--baseboards/mn10200-cygmon.exp32
-rw-r--r--baseboards/mn10200-sim.exp45
-rw-r--r--baseboards/mn10300-cygmon.exp32
-rw-r--r--baseboards/mn10300-sim.exp41
-rw-r--r--baseboards/msparc-cygmon.exp1
-rw-r--r--baseboards/op50n.exp36
-rw-r--r--baseboards/powerpc-bug.exp29
-rw-r--r--baseboards/powerpc-bug1.exp5
-rw-r--r--baseboards/powerpc-sim.exp28
-rw-r--r--baseboards/powerpcle-sim.exp28
-rw-r--r--baseboards/rom68k-idp.exp69
-rw-r--r--baseboards/sh-hms-sim.exp48
-rw-r--r--baseboards/sh-hms.exp47
-rw-r--r--baseboards/sparc64-sim.exp31
-rw-r--r--baseboards/sparclet-aout.exp48
-rw-r--r--baseboards/sparclite-coff.exp41
-rw-r--r--baseboards/sparclite-cygmon.exp6
-rw-r--r--baseboards/sparclite-sim-le.exp47
-rw-r--r--baseboards/sparclite-sim.exp37
-rw-r--r--baseboards/strongarm-cygmon.exp41
-rw-r--r--baseboards/tic80-sim.exp28
-rw-r--r--baseboards/tx39-dve.exp48
-rw-r--r--baseboards/tx39-sim.exp3
-rw-r--r--baseboards/unix.exp8
-rw-r--r--baseboards/usparc-cygmon.exp48
-rw-r--r--baseboards/v850-sim.exp31
-rw-r--r--baseboards/vr4100-ddb.exp33
-rw-r--r--baseboards/vr4100-sim.exp12
-rw-r--r--baseboards/vr4111-sim.exp12
-rw-r--r--baseboards/vr4300-ddb.exp19
-rw-r--r--baseboards/vr4300-sim.exp12
-rw-r--r--baseboards/vr4300.exp41
-rw-r--r--baseboards/vr5000-ddb.exp40
-rw-r--r--baseboards/vx4300.exp25
-rw-r--r--baseboards/vx68k.exp25
-rw-r--r--baseboards/vx960.exp29
-rw-r--r--baseboards/vxsparc.exp25
-rw-r--r--baseboards/x86-cygmon.exp11
-rw-r--r--baseboards/xscale-cygmon.exp37
-rwxr-xr-xconfig.guess1090
-rw-r--r--config/README34
-rw-r--r--config/arc.exp20
-rw-r--r--config/arm-ice.exp20
-rw-r--r--config/base-config.exp48
-rw-r--r--config/base68k.exp323
-rw-r--r--config/bug.exp29
-rw-r--r--config/cfdbug.exp31
-rw-r--r--config/cygmon.exp22
-rw-r--r--config/d10v.exp20
-rw-r--r--config/ddb-ether.exp190
-rw-r--r--config/ddb.exp96
-rw-r--r--config/dos.exp484
-rw-r--r--config/dve.exp22
-rw-r--r--config/gdb-comm.exp566
-rw-r--r--config/gdb_stub.exp638
-rw-r--r--config/h8300.exp20
-rw-r--r--config/i386-bozo.exp46
-rw-r--r--config/i960.exp221
-rw-r--r--config/m32r-stub.exp20
-rw-r--r--config/m32r.exp20
-rw-r--r--config/m68k-emc.exp52
-rw-r--r--config/mips-idt.exp24
-rw-r--r--config/mn10200-eval.exp22
-rw-r--r--config/mn10300-eval.exp22
-rw-r--r--config/netware.exp214
-rw-r--r--config/powerpc-bug.exp20
-rw-r--r--config/proelf.exp27
-rw-r--r--config/rom68k.exp32
-rw-r--r--config/sh.exp20
-rw-r--r--config/sim.exp124
-rw-r--r--config/slite.exp20
-rw-r--r--config/sparclet.exp26
-rw-r--r--config/tic80.exp81
-rw-r--r--config/udi.exp158
-rw-r--r--config/unix.exp134
-rw-r--r--config/vr4100.exp21
-rw-r--r--config/vr4300.exp21
-rw-r--r--config/vr5000.exp21
-rw-r--r--config/vrtx.exp50
-rw-r--r--config/vxworks.exp511
-rwxr-xr-xconfigure1605
-rw-r--r--configure.in24
-rw-r--r--contrib/README16
-rw-r--r--contrib/bluegnu2.0.3/Makefile.in185
-rw-r--r--contrib/bluegnu2.0.3/README.bluegnu325
-rw-r--r--contrib/bluegnu2.0.3/README.dejagnu283
-rw-r--r--contrib/bluegnu2.0.3/TODO.dejagnu7
-rw-r--r--contrib/bluegnu2.0.3/aclocal.m4605
-rwxr-xr-xcontrib/bluegnu2.0.3/bluegnu136
-rwxr-xr-xcontrib/bluegnu2.0.3/bluegnutk5
-rw-r--r--contrib/bluegnu2.0.3/bluegnutk.itcl216
-rw-r--r--contrib/bluegnu2.0.3/bluegnutk.rc29
-rw-r--r--contrib/bluegnu2.0.3/bluegnutkUtils.itcl436
-rwxr-xr-xcontrib/bluegnu2.0.3/config.guess592
-rwxr-xr-xcontrib/bluegnu2.0.3/configure974
-rw-r--r--contrib/bluegnu2.0.3/configure.in9
-rw-r--r--contrib/bluegnu2.0.3/contents232
-rw-r--r--contrib/bluegnu2.0.3/contrib/README16
-rwxr-xr-xcontrib/bluegnu2.0.3/contrib/test-g++84
-rwxr-xr-xcontrib/bluegnu2.0.3/contrib/test-tool346
-rwxr-xr-xcontrib/bluegnu2.0.3/contrib/testit1149
-rwxr-xr-xcontrib/bluegnu2.0.3/dejagnu93
-rw-r--r--contrib/bluegnu2.0.3/doc/Makefile.in170
-rw-r--r--contrib/bluegnu2.0.3/doc/README.tex253
-rw-r--r--contrib/bluegnu2.0.3/doc/READMEdvi.dvibin0 -> 10840 bytes
-rw-r--r--contrib/bluegnu2.0.3/doc/READMEdvi.tex5
-rw-r--r--contrib/bluegnu2.0.3/doc/READMEdvi.title1
-rw-r--r--contrib/bluegnu2.0.3/doc/READMEtxt.dvibin0 -> 9344 bytes
-rw-r--r--contrib/bluegnu2.0.3/doc/READMEtxt.tex6
-rwxr-xr-xcontrib/bluegnu2.0.3/doc/configure657
-rw-r--r--contrib/bluegnu2.0.3/doc/configure.in4
-rw-r--r--contrib/bluegnu2.0.3/doc/dejagnu.1120
-rw-r--r--contrib/bluegnu2.0.3/doc/dejagnu.dvibin0 -> 263684 bytes
-rw-r--r--contrib/bluegnu2.0.3/doc/dejagnu.info77
-rw-r--r--contrib/bluegnu2.0.3/doc/dejagnu.info-11163
-rw-r--r--contrib/bluegnu2.0.3/doc/dejagnu.info-21137
-rw-r--r--contrib/bluegnu2.0.3/doc/dejagnu.info-31016
-rwxr-xr-xcontrib/bluegnu2.0.3/install-sh238
-rwxr-xr-xcontrib/bluegnu2.0.3/mkinstalldirs32
-rwxr-xr-xcontrib/bluegnu2.0.3/runtest90
-rwxr-xr-xcontrib/bluegnu2.0.3/runtest.exp1146
-rw-r--r--contrib/bluegnu2.0.3/site.tmpl307
-rw-r--r--contrib/bluegnu2.0.3/tcl-mode.el2223
-rwxr-xr-xcontrib/test-g++89
-rwxr-xr-xcontrib/test-tool378
-rwxr-xr-xcontrib/testit1149
-rw-r--r--i960glue.c19
-rwxr-xr-xinstall-sh250
-rwxr-xr-xmkinstalldirs32
-rwxr-xr-xruntest122
-rwxr-xr-xruntest.exp1873
-rw-r--r--site.tmpl48
-rw-r--r--stub-loader.c7
-rw-r--r--tcl-mode.el2223
-rw-r--r--testglue.c147
183 files changed, 37457 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..3d634ad
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,4 @@
+The primary maintainer and creator of DejaGnu is Rob Savoye.
+ rob@welcomehome.org
+ www.welcomehome.org/rob.html
+
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..eeb586b
--- /dev/null
+++ b/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.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ 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) 19yy 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.
+
+ <signature of Ty Coon>, 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/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..bcd99ce
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,5493 @@
+2001-01-24 Fernando Nasser <fnasser@redhat.com>
+
+ From Gabriel Dos Reis <gdr@codesourcery.com>
+ * 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 <bje@redhat.com>
+
+ * runtest.exp (usage): Replace --mail in usage output.
+ * doc/runtest.1: Re-document --mail option, which was erroneously
+ removed from this man page in 1994.
+
+2001-01-19 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * lib/target.exp (prune_warnings): Avoid ``.*'' in NetBSD warnings
+ pattern.
+
+2001-01-15 Ben Elliston <bje@redhat.com>
+
+ * lib/framework.exp (record_test): Invoke a user-defined procedure
+ if one is named in local_record_procs($type).
+
+2001-01-12 Richard Earnshaw <rearnsha@arm.com>
+
+ * target.exp (prune_warnings): Prune warnings from NetBSD linker.
+
+2000-11-29 Drew Moseley <dmoseley@redhat.com>
+
+ * baseboards/xscale-cygmon.exp: New file for xscale board testing.
+
+2000-10-19 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * baseboards/linux-gdbserver.exp: New file.
+ * baseboards/linux-libremote.exp: New file.
+
+2000-08-14 Jimmy Guo <guo@cup.hp.com>
+
+ * runtest.exp: Eliminate from test_top_dirs entries that
+ are subdirectories of other entries, to avoid redundant
+ testing on *.exp files in these subdirectories.
+
+2000-08-14 Jimmy Guo <guo@cup.hp.com>
+
+ * runtest.exp: Reapply part of the backed out change to
+ runtest.exp -- handle multiple directories in TCL variables
+ dir_to_run and cmdline_dir_to_run.
+
+2000-08-04 Geoff Keating <geoffk@cygnus.com>
+
+ Back out this change:
+
+ * lib/utils.exp: Add support for a -maxdepth <n>
+ option to limit find to <n> directories deep.
+ * runtest.exp: Handle multiple directories in TCL variables
+ dir_to_run and cmdline_dir_to_run; limit *.exp find to
+ one directory level to avoid foo/bar/baz.exp getting tested
+ twice (when ${dir} is 'foo', and when ${dir} is 'foo/bar').
+
+2000-08-02 Jimmy Guo <guo@hpcleara.cup.hp.com>
+
+ * lib/target.exp (default_target_compile,default_target_assemble,
+ default_link): Remove env() interface for *_FOR_TARGET TCL vars.
+
+ * lib/framework.exp (setup_xfail): Relax PRMS string pattern
+ to allow a more general bug ID specification (without '-').
+
+ * lib/utils.exp: Add support for a -maxdepth <n>
+ option to limit find to <n> directories deep.
+ * runtest.exp: Handle multiple directories in TCL variables
+ dir_to_run and cmdline_dir_to_run; limit *.exp find to
+ one directory level to avoid foo/bar/baz.exp getting tested
+ twice (when ${dir} is 'foo', and when ${dir} is 'foo/bar').
+
+ * runtest.exp: Cleanup reference to $env(MULTIPASS) and
+ $env(PASS). These were added by HP but unused since.
+
+ * lib/framework.exp (pass): make compiler_conditional_xfail_data
+ a global, corresponding to a recent change to 'proc fail'.
+
+2000-07-21 Frank Ch. Eigler <fche@redhat.com>
+
+ * example/Makefile.am (SUBDIRS): Remove to prevent automatic recursion
+ into `calc'.
+ (all-local): Add at least `calc' building back.
+ * example/Makefile.in: Regenerated.
+
+Fri Jul 21 16:01:43 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ From 2000-04-25 Felix Lee <flee@cygnus.com>:
+ * baseboards/tx39-sim.exp: Use idt, not dve linker script. Delete
+ misleading comments and null statements.
+
+2000-07-08 Angela Marie Thomas <angela@cygnus.com>
+
+ * lib/framework.exp: Use compiler_conditional_xfail_data as a global
+ rather than assuming it's set in the level above us.
+
+Fri Jun 9 09:10:48 2000 Catherine Moore <clm@cygnus.com>
+
+ * lib/libgloss.exp (proc_get_multilibs): Handle multilib
+ pathnames for ports that have defined MULTILIB_EXTRA_OPTS.
+
+Sun Jun 4 12:59:06 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * lib/target.exp (reboot_target): Don't reboot target twice.
+
+Wed May 3 19:41:07 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ From Felix Lee <flee@cygnus.com>:
+ * example/calc/Makefile.in (install-info): Add target.
+
+Fri Apr 21 13:33:36 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * example/calc/Makefile.in: Add target info.
+
+Tue Apr 18 15:49:00 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.am (SUBDIRS): Add directory example.
+ * Makefile.in: Re-generate.
+
+2000-04-10 Tom Tromey <tromey@cygnus.com>
+
+ * lib/target.exp (default_target_compile): Put sources before
+ $add_flags unless building an object file.
+
+Thu Dec 16 18:27:47 1999 Anthony Green <green@cygnus.com>
+
+ * lib/target.exp: Put the source file after options, for
+ compatibility with libtool.
+
+Fri Mar 31 00:15:54 2000 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * runtest (expectbin): After choosing expectbin, try
+ $expectbin-bld.sh and use it instead.
+
+Wed Mar 29 16:13:46 2000 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * lib/target.exp (prune_warnings): Discard not-implemented
+ warnings from libgloss/libnosys non-functional functions.
+
+Thu Feb 17 20:24:21 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * baseboards/d10v.exp (gdb_init_command): Force register DMAP2 to
+ 0x2000 so that the d10v VM matches the simulator.
+
+2000-02-15 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * lib/target.exp: Strip warnings about dangerous functions.
+
+1999-12-14 Geoff Keating <geoffk@cygnus.com>
+
+ * baseboards/rom68k-idp.exp: Don't pass -nostdlib to the IDP
+ boards when using ELF, they need crtbegin and crtend.
+
+1999-11-09 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * config.guess: Copy current top-level config.guess down to
+ the dejagnu/ subdir. The dejagnu automake configuation should
+ probably be changed to grab the top-level config.guess instead
+ of the random one in this dir.
+
+1999-11-04 Nick Clifton <nickc@cygnus.com>
+
+ * baseboards/arm-sim.exp: Underscore no longer needed for arm-pe
+ ports.
+
+Tue Oct 12 11:44:53 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * lib/libgloss.exp (process_multilib_options): Add support for
+ generic gdb variable option - ``gdb:VARIABLE=VALUE''.
+
+1999-09-28 Angela Marie Thomas <angela@cygnus.com>
+
+ * lib/rsh.exp (rsh_download, rsh_upload): Use rcp_prog if set.
+
+1999-09-15 Stan Shebs <shebs@andros.cygnus.com>
+
+ * baseboards/d10v.exp: Request disable of X- and Z-packets
+ from GDB, all D10V boards respond incorrectly to these.
+
+1999-08-31 Doug Evans <devans@casey.cygnus.com>
+
+ * lib/target.exp (default_link): New local proc only--Ls.
+ Use it to pick out -L arguments in $ldflags.
+ Strip -Wl, from $ldscript.
+
+1999-07-12 Felix Lee <flee@cygnus.com>
+
+ * config/i960.exp: complain if 'sx' not found.
+
+1999-07-12 Drew Moseley <dmoseley@cygnus.com>
+
+ * baseboards/strongarm-cygmon.exp: Rename the StrongARM boards as
+ follows:
+ EBIX-DB -> SA-IOP
+ EBSA285 -> EBSA-285
+ BRUTUS -> SA1100DP
+ SA1100-MULTIMEDIA -> SA1100MM
+
+1999-06-08 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * lib/framework.exp (record_test): Remove weird recursion and
+ make sure exit_status is properly set to 1.
+
+1999-06-08 Felix Lee <flee@cygnus.com>
+
+ * lib/telnet.exp (telnet_open): need to match '(Advanced or Simple)'
+
+1999-06-06 Felix Lee <flee@cygnus.com>
+
+ * lib/utils.exp (getdirs): When -all, return parents of
+ subdirectories too.
+
+1999-06-03 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * lib/remote.exp (standard_send): Add -- to protect strings that
+ start with a '-'; also added a verbose 3 statement with the send
+ command that is being issued.
+
+Fri May 21 17:36:56 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * lib/target.exp: Don't import CC_FOR_TARGET, CXX_FOR_TARGET or
+ F77_FOR_TARGET from environment.
+
+Thu May 20 10:28:23 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * lib/target.exp: Do not import CFLAGS_FOR_TARGET,
+ LDFLAGS_FOR_TARGET and ASFLAGS_FOR_TARGET from external
+ environment. GNUMAKE in conjunction with the top level Makefile
+ will set/export these variables according to the needs of the
+ target libraries. Such a configuration may not be applicable to
+ testsuites.
+
+1999-05-17 Keith Seitz <keiths@cygnus.com>
+
+ * baseboards/mcore-elf.exp: New file.
+ * baseboards/mcore-pe.exp: New file.
+ * baseboards/mcore-sim.exp: Don't run gdb's float tests
+ and increase timeout.
+
+1999-05-09 Nick Clifton <nickc@cygnus.com>
+
+ * baseboards/mcore-moto-sim.exp: New file: Support Motorola's
+ proprietry MCore simulator.
+
+1999-05-07 Stan Shebs <shebs@andros.cygnus.com>
+
+ From HP's WDB group:
+ * lib/target.exp: Add ability to pick CC_FOR_TARGET,
+ CFLAGS_FOR_TARGET, etc from env vars, add ability to use HP F77
+ compiler.
+
+1999-05-05 Stan Shebs <shebs@andros.cygnus.com>
+
+ * lib/utils.exp (getdirs): Add option -all to get subdirs too.
+
+1999-05-05 Jason Merrill <jason@yorick.cygnus.com>
+
+ * baseboards/sparclite-sim.exp: Set needs_status_wrapper.
+ * baseboards/sparclite-sim-le.exp: Likewise.
+
+1999-05-05 Angela Marie Thomas <angela@cygnus.com>
+
+ * baseboards/strongarm-cygmon.exp: Use "boardtype" instead of "name"
+ to avoid variable name clash in lib/target.exp. Add support for
+ ebsa and ebix boards.
+
+1999-05-04 Stan Shebs <shebs@andros.cygnus.com>
+
+ Finer control over test runs, from HP's WDB group:
+ * runtest.exp: Look for MULTIPASS in env also, define variable or
+ env var PASS to choose particular pass in multipass, search for
+ subdirs recursively, and if ignoredirs is set, skip over those
+ directories.
+ (--directory): New argument to limit test running to
+ a single directory.
+ (usage): Document, fix tabbing.
+
+Mon May 3 11:14:37 1999 Jim Wilson <wilson@cygnus.com>
+
+ * config/dos.exp (dos_load): Look for cygwin1.dll in addition to
+ cygwin.dll. New variable dll_name for use in download command.
+ * lib/libgloss.exp (winsup_include_flags): Change windows to windows.h.
+
+1999-04-27 Felix Lee <flee@cygnus.com>
+
+ * testsuite/runtest.all/stats.exp: make sure tmpdir is set
+
+ * baseboards/Makefile.am: deleted.
+ * config/Makefile.am: deleted.
+ * lib/Makefile.am: deleted.
+ * configure.in: delete references to the above.
+ * Makefile.am: install things correctly.
+
+ * testsuite/Makefile.am: set DEJATOOL.
+
+ * configure, Makefile.in, */Makefile.in: regenerated.
+
+ * runtest.exp: fix location of config.guess.
+
+1999-04-26 Felix Lee <flee@cygnus.com>
+
+ * lib/libgloss.exp (libgloss_link_flags): remove bogus -L flag.
+
+1999-04-23 Angela Marie Thomas <angela@cygnus.com>
+
+ * baseboards/cf.exp: gdb protocol is case-sensitive.
+
+1999-04-19 Nick Clifton <nickc@cygnus.com>
+
+ * baseboards/Makefile.am (boards): Add mcore-sim.exp
+
+1999-04-13 Angela Marie Thomas <angela@cygnus.com>
+
+ * baseboards/sh-hms-sim.exp: Pass "-m 18" to standalone sim.
+
+1999-04-08 Nick Clifton <nickc@cygnus.com>
+
+ * baseboards/mcore-sim.exp: New file: Definitions for MCore
+ simulator support.
+
+1999-04-07 Michael Meissner <meissner@cygnus.com>
+
+ * baseboards/d30v-sim.exp (cflags): Add -Wa,-C to suppress
+ warnings about symbols being the same as registers.
+
+Fri Apr 2 13:13:51 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * lib/target.exp (prune_warnings): Ignore cc1, cc1plus warnings when
+ called with -g and -mabi=32.
+
+1999-03-28 Angela Marie Thomas <angela@cygnus.com>
+
+ * baseboards/x86-cygmon.exp: New file.
+
+1999-03-19 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * lib/libgloss.exp (get_multilibs): Handle MULTILIB_MATCHES.
+
+1999-03-18 James Ingham <jingham@cygnus.com>
+
+ * baseboards/strongarm-cygmon.exp: Add a baseboard for the
+ strongARM boards.
+
+Fri Mar 12 14:01:31 1999 Jim Wilson <wilson@cygnus.com>
+
+ * baseboards/d10v-sim.exp, baseboards/d10v.exp (ldflags): Add
+ libgloss_link_flags.
+ * lib/libgloss.exp (libgloss_link_flags): Map d10v to libnosys.
+
+1999-03-12 Nick Clifton <nickc@cygnus.com>
+
+ * baseboards/arm-sim.exp: Set timeout to 800.
+
+1999-03-01 Jim Wilson <wilson@cygnus.com>
+
+ * baseboards/cf.exp: New file for coldfire.
+ * config/cfdbug.exp: Likewise.
+ * config/base68k.exp (base68k_ld): Don't call remote_binary if
+ no_binary_mode set. Send return and wait for prompt before sending
+ download command.
+
+Sun Feb 28 23:26:36 1999 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: AC_EXEEXT, not AM_EXEEXT. Require Autoconf 2.13.
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+
+1999-02-25 Felix Lee <flee@cygnus.com>
+
+ * config/dos.exp (dos_send): rewrite. add short delay.
+
+1999-02-18 Nick Clifton <nickc@cygnus.com>
+
+ * baseboards/arm-sim.exp: Disable uses_underscores for COFF
+ targets as the linker now works correctly.
+
+1999-02-11 Nick Clifton <nickc@cygnus.com>
+
+ * lib/remote.exp (proc remote_exec): Display timeout in log
+ message.
+
+ * lib/target.exp (proc default_target_compile): Add support for
+ timeout option.
+
+ * baseboards/arm-sim.exp: Set gcc,timeout to 500.
+
+1999-02-10 Nick Clifton <nickc@cygnus.com>
+
+ * config/dos.exp: Fix typo: need_status_wrapper ->
+ needs_status_wrapper.
+
+1999-02-09 Nick Clifton <nickc@cygnus.com>
+
+ * baseboards/arm-sim.exp: Enable uses_underscores for the COFF
+ based targets.
+
+1999-02-06 Felix Lee <flee@cygnus.com>
+
+ * runtest.exp: Don't trap SEGV.
+
+Fri Feb 5 15:43:59 1999 Jeffrey A Law (law@cygnus.com)
+
+ * lib/target.exp (prune_warnings): Prune +vcompatwarnings output
+ from the HP linker.
+
+1999-02-02 Felix Lee <flee@cygnus.com>
+
+ * lib/libgloss.exp (find_nm): new function.
+
+1999-01-31 Felix Lee <flee@cygnus.com>
+
+ * Makefile.am: Add cygnus option. Add doc to SUBDIRS
+ * doc/Makefile.am: Add cygnus option. Add info_TEXINFOS.
+ * Makefile.in, */Makefile.in: Regenerated.
+
+1999-01-29 Felix Lee <flee@cygnus.com>
+
+ * baseboards/fr30-cygmon.exp: New file.
+
+ * config/gdb_stub.exp (gdb_stub_load): Fix another typo.
+
+Fri Jan 29 17:16:25 1999 Edith Epstein <eepstein@sophia.cygnus.com>
+
+ * lib/remote.exp: Added check for value of $outp.
+
+ * lib/target.exp: Ignore some hppa specific warning messages. Added
+ checks for CC_FOR_TARGET and CXX_FOR_TARGET. Check for redirection
+ and optimization flags.
+
+1999-01-26 Frank Ch. Eigler <fche@cygnus.com>
+
+ * configure.in: Define BOARDS/CONFIG for automake.
+ * baseboards/Makefile.am: Use $(boards) for public files.
+ * config/Makefile.am: Use $(config) for public files.
+
+ * configure: Regenerated.
+ * Makefile.in: Regenerated.
+ * doc/Makefile.in: Regenerated.
+ * baseboards/Makefile.in: Regenerated.
+ * config/Makefile.in: Regenerated.
+ * example/Makefile.in: Regenerated.
+ * lib/Makefile.in: Regenerated.
+
+ * testsuite/aclocal.m4: Deleted obsolete file.
+ * testsuite/configure.in: Deleted obsolete file.
+
+Sun Jan 17 17:11:52 1999 Jeffrey A Law (law@cygnus.com)
+
+ * lib/target.exp (prune_warnings): Ignore osf4 NFS messages.
+
+Fri Jan 15 14:19:31 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * lib/libgloss.exp (get_multilibs): Multilib directories can
+ contain '=', too.
+
+Thu Jan 14 00:10:25 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * lib/target.exp (prune_warnings): Ignore -g not supported
+ warnings. Ignore o32 as warning when called with -O3 (IRIX 6).
+
+1999-01-07 Felix Lee <flee@cygnus.com>
+
+ * runtest.exp (setup_target_hook): add missing globals.
+
+1998-12-31 Felix Lee <flee@cygnus.com>
+
+ * config/dos.exp (dos_spawn): ignore optional args.
+
+ * lib/ftp.exp (ftp_upload): ftp error messages vary.
+
+1998-12-30 Rob Savoye <rob@chinadoll.welcomehome.org>
+
+ * doc/{overview,user,ref},sgml: New manual in DocBook format. This
+ includes most of the old manual, but is tottally up to date.
+ * /doc/Makefile.am, baseboards/Makefile.am, config/Makefile.am,
+ example/Makefile.am, lib/Makefile.am, Makefile.am,
+ testsuite/Makefile.am: New Makefiles for automake support.
+ * /doc/Makefile.in, baseboards/Makefile.in, config/Makefile.in,
+ example/Makefile.in, lib/Makefile.in, Makefile.in,
+ testsuite/Makefile.in: New Makefiles for autoconf as generated by
+ automake.
+ * runtest.exp: Look for config.guess in a libexec directory.
+ * config.guess: Add so it gets installed correctly.
+ * Most Files: Update copyright message, add 1998 and 1999.
+
+1998-10-19 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * lib/rsh.exp(rsh_exec): Check the board info before blindly
+ setting RSH to remsh.
+ * lib/remote.exp(remote_reboot): Don't close the shell connection,
+ or all the remote procedures stop working.
+
+1998-12-29 Ken Raeburn <raeburn@cygnus.com>
+
+ * lib/framework.exp (istarget): Do string compare on first
+ argument, not tcl list containing first argument, against actual
+ target name.
+
+1998-12-29 Felix Lee <flee@cygnus.com>
+
+ * runtest.exp: option --a=b=c wasn't handled right.
+
+ * lib/ftp.exp (ftp_download): ftp error messages vary.
+
+Fri Dec 18 21:48:25 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/gdb-comm.exp(quit_gdb): Don't close connection to the
+ host if it's remote.
+ (gdb_comm_go_idle): The "No exec file" prompt has mysteriously
+ changed; detect either.
+
+1998-12-11 Felix Lee <flee@cygnus.com>
+
+ * contrib/test-tool: diagnostic if no test summary,
+ and add summary headers, in case of multiple test runs.
+
+ * contrib/test-tool: don't print location of log file if it's not
+ really there.
+
+1998-12-10 Felix Lee <flee@cygnus.com>
+
+ * lib/remote.exp (remote_download): in the non-remote case, try to
+ make the copy writable as well as readable.
+
+1998-12-09 Felix Lee <flee@cygnus.com>
+
+ * contrib/test-tool: spit out test summary first.
+
+1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
+
+ * baseboards/i960-sim.exp: New file.
+
+Thu Dec 3 14:03:27 1998 Dave Brolley <brolley@cygnus.com>
+
+ * baseboards/fr30-elf.exp: New file.
+ * baseboards/fr30-sim.exp: New file.
+
+1998-11-30 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * lib/libgloss.exp (get_multilibs): Multilib options can contain '='.
+
+1998-11-27 Felix Lee <flee@cygnus.com>
+
+ * config/gdb-comm.exp (gdb_comm_reload): give up after N reboot
+ failures.
+
+Mon Nov 23 10:19:06 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * lib/target.exp (prune_warnings): Kill NFS server not responding
+ warnings too.
+
+1998-11-18 Jim Wilson <wilson@cygnus.com>
+
+ * baseboards/tx39-dve.exp: Add cygmon support.
+
+1998-11-05 Jim Wilson <wilson@cygnus.com>
+
+ * baseboards/vx960.exp (cflags): Set to -mca if cpu is I960CA.
+ * config/vxworks.exp (vxworks_unld): Don't run unld if os is
+ vxworks5.0.
+ (vxworks_load): Sed out carriage returns.
+
+Thu Oct 15 16:33:01 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * lib/remote.exp (remote_spawn): Properly pass trailing args
+ to call_remote.
+
+Tue Oct 13 21:04:04 1998 Felix Lee <flee@cygnus.com>
+
+ * config/vxworks.exp: grok preload_obj_flags. recognize
+ "Operation Fault" messages from the board. increase reboot_delay
+ so we don't interrupt the countdown-to-autoboot
+ * i960glue.c: add missing file.
+
+Mon Oct 12 20:08:06 1998 Mark Alexander <marka@cygnus.com>
+
+ * baseboards/danlite-elf.exp: New file.
+
+1998-10-11 Michael Meissner <meissner@cygnus.com>
+
+ * baseboards/powerpc{,le}-sim.exp (needs_status_wrapper): Don't
+ set, normal exit returns the appropriate status.
+
+Thu Oct 8 13:49:04 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * lib/standard.exp (${tool}_load): Clear up argument order.
+
+ * config/sim.exp: Fix typo in inpfile computation.
+
+ * lib/remote.exp (remote_spawn): Pass $args to call_remote.
+
+Fri Oct 2 00:02:51 1998 Tom Tromey <tromey@cygnus.com>
+
+ * config/unix.exp (unix_load): Pass `--' to verbose when
+ displaying program output.
+ * lib/remote.exp (standard_load): Pass `--' to verbose when
+ displaying program output.
+
+1998-09-29 Felix Lee <flee@cygnus.com>
+
+ * config/gdb_stub.exp: watch for the exitcodes generated by the
+ testglue wrapper. workaround for failing to hit _exit breakpoint.
+
+1998-09-18 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * testsuite/runtest.all/options.exp: Also pass --srcdir to the
+ child runtest being tested, so it doesn't try to execute the
+ config files.
+
+Thu Sep 17 18:03:16 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * runtest.exp: Allow // at beginning of path spec since
+ this is a valid Windows (Posix?) construction.
+
+Tue Sep 15 17:06:17 1998 Nick Clifton <nickc@cygnus.com>
+
+ * config/gdb-comm.exp: Catch RDI_open failure.
+
+Mon Sep 14 20:00:57 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * baseboards/m68k-emc.exp: New file.
+ * config/m68k-emc.exp: New file.
+
+1998-09-12 Michael Meissner <meissner@cygnus.com>
+
+ * baseboards/powerpc{,le}-sim.exp: Call process_multilib_options
+ so multilib tests can be run.
+
+Fri Sep 4 09:26:47 1998 Nick Clifton <nickc@cygnus.com>
+
+ * lib/utils.exp (proc prune): Initialise $tmp to an empty list.
+
+Mon Aug 31 13:43:47 1998 Tom Tromey <tromey@cygnus.com>
+
+ * lib/libgloss.exp (find_gcj): Renamed from find_gjavac; compiler
+ now named `gcj'.
+
+Tue Aug 25 13:31:18 1998 Anthony Green <green@cygnus.com>
+
+ * lib/libgloss.exp (find_gjavac): New function.
+
+1998-08-25 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * lib/framework.exp(check_conditional_xfail): Add spaces to the
+ search pattern, so it doesn't match just part of an option.
+
+1998-08-24 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * runtest: Update copyright date.
+ * runtest.exp: Add compiler_flags as a new global variable.
+ * lib/framework.exp: Add new proc, check_conditional_xfail. This
+ is like xfail, only it looks in all the compiler options for
+ options to determine the actual test result state.
+ (pass,fail): If there is a conditional xfail setup, check the
+ condition to determine the actual test result state.
+ * lib/target.exp(default_target_compile): Set the global
+ compiler_opts to the compiler flags used to invoke the compiler.
+
+Sat Aug 1 08:02:15 1998 Mark Alexander <marka@cygnus.com>
+
+ * config/mn10200-eval.exp: New file.
+ * baseboards/mn10200-cygmon.exp: New file.
+
+Wed Jul 8 11:41:21 1998 Jeffrey A Law (law@cygnus.com)
+
+ * baseboards/mn10200-sim.exp: Update for recent mn10200 newlib/libgloss
+ changes.
+
+Fri Jun 5 11:29:26 1998 Felix Lee <flee@cygnus.com>
+
+ * config/gdb_stub.exp (gdb_stub_load): fix typo
+
+Thu Jun 4 14:16:32 1998 Felix Lee <flee@zog.cygnus.com>
+
+ * config/gdb_stub.exp (gdb_stub_wait): watch for "Program exited",
+ which may happen on segv or similar.
+ (gdb_stub_start,gdb_stub_wait): need to save exit_brnum and
+ abort_brnum.
+ (gdb_stub_ld): delete old breakpoints when loading a new program.
+ (gdb_stub_spawn): return the right result.
+
+ * baseboards/d10v-sim.exp: add process_multilib_options.
+
+Tue Jun 2 01:51:47 1998 Mark Alexander <marka@cygnus.com>
+
+ * baseboards/sparclite-sim-le.exp: New file.
+
+Mon Jun 1 00:15:34 1998 Angela Marie Thomas (angela@cygnus.com)
+
+ * config/sim.exp (spawn_sim): Pass sim,options to the standalone
+ simulator if set.
+ * baseboards/sparclite-sim.exp: Set sim,options and
+ gdb,target_sim_options.
+
+Mon Jun 1 01:40:26 1998 Felix Lee <flee@zog.cygnus.com>
+
+ * runtest.exp(iterate_target_variants_two): concat multiple globs
+ correctly.
+
+Tue May 26 17:56:57 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/dos.exp(dos_send): Handle text without newlines
+ properly.
+
+Sun May 17 17:08:46 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/sh-hms-sim.exp: Need to pass "18" to the target sim
+ command in GDB.
+
+ * baseboards/sparclite-sim.exp: Need to pass "-sparclite" to the
+ target sim command in GDB.
+
+Thu May 14 12:03:36 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(remote_exec): Add optional timeout
+ parameter. Move local execution code to...
+ (local_exec): New procedure.
+
+Wed May 13 18:41:23 1998 John Metzler <jmetzler@cygnus.com>
+
+ * runtest.exp (main) : Add printout of schedule of variations
+
+Fri May 8 14:36:49 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * baseboards/basic-sim.exp (find_sim): Check $SIM first.
+ (setup_sim): Rename arg `name' to `subdir_name'. Print message
+ of simulator found.
+
+Tue Apr 28 14:12:01 1998 Mark Alexander <marka@cygnus.com>
+
+ * lib/libgloss.exp (libgloss_link_flags): Recognize sparc86x target.
+
+Sun Apr 19 09:29:44 1998 Mark Alexander <marka@cygnus.com>
+
+ * baseboards/sparclite-sim.exp: New file.
+
+Tue Apr 14 09:55:37 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/telnet.exp: Look for "VxWorks Boot"; be a bit more picky about
+ looking for "account name" prompt.
+
+Mon Apr 6 13:14:52 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/ddb-ether.exp(remote_wait): If we see "Exception Cause"
+ from the board, reboot it.
+
+Thu Apr 2 18:22:33 1998 Jim Wilson <wilson@cygnus.com>
+
+ * lib/target.exp (prune_warning): Extend regexp for Irix6 warnings
+ to handle all 3 linker names.
+
+Thu Apr 2 15:39:38 1998 Felix Lee <flee@zog.cygnus.com>
+
+ * config/sim.exp(sim_spawn): code for remote host was wrong.
+
+Tue Mar 31 00:31:53 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/dos.exp: Disable GDB interrupt tests if we're testing
+ on a DOS host.
+
+Mon Mar 30 23:44:19 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/dos.exp(dos_send): Don't send string if we've already
+ sent it once.
+
+Thu Mar 26 11:34:18 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(remote_exec): Need to look at the result from
+ wait if we used spawn.
+
+Wed Mar 25 22:20:25 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(remote_exec): More attempts at working around
+ tcl/expect's inadequacies in dealing with processes.
+
+1998-03-25 Brendan Kehoe <brendan@cygnus.com>
+
+ * contrib/test-g++: Only do the libg++ tests if the directory exists.
+
+Wed Mar 25 12:24:25 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/basic-sim.exp(find_sim): Search for the sim rather than
+ assuming tool_root_dir points to the right place.
+
+Tue Mar 24 16:07:51 1998 Stu Grossman <grossman@bhuna.cygnus.co.uk>
+
+ * configure doc/configure example/configure example/calc/configure
+ testsuite/configure: Regenerate with autoconf 2.12.1 to fix shell
+ issues for NT native builds.
+
+Sun Mar 15 23:25:06 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/target.exp(default_target_compile): If the compiler produced
+ no output and the compiler execution failed, return a string
+ signifying this. (This is the wrong fix, but...)
+
+ * lib/remote.exp(remote_exec): Don't append arbitary strings to
+ the output from the program; callers must check the exit status.
+ Also, when killing a runaway process, try sending a SIGINT before
+ sending a SIGTERM (may help to terminate gcc properly).
+
+Mon Mar 9 01:54:39 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(remote_exec): Use spawn directly, rather than
+ trying to potentially manage multiple spawn processes on the same
+ host.
+
+Sun Mar 8 21:40:40 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(remote_exec): Use remote_spawn and remote_wait
+ if the machine is local.
+
+Fri Mar 6 23:28:59 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/sparclite-cygmon.exp: New file.
+
+Wed Mar 4 18:05:46 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/basic-sim.exp(find_sim): Don't search tool_root_dir
+ because it's always the root of the tree.
+ (setup_sim): Don't pass tool_root_dir to find_sim.
+
+Tue Mar 3 00:08:53 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/unix.exp: Tell the benchmark code to use alarms.
+ * baseboards/basic-sim.exp(find_sim): Use tool_root_dir.
+ * baseboards/i960-cyclone.exp: Ditto.
+ * baseboards/op50n.exp: Ditto.
+ * baseboards/rom68k-idp.exp: Ditto.
+ * baseboards/sparclet-aout.exp: Ditto.
+
+Mon Mar 2 21:54:30 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/utils.exp(runtest_file_p): Be a bit more lenient about
+ what files we match.
+
+ * lib/telnet.exp: Clean up regexps.
+
+ * lib/target.exp(default_target_compile): Use tool_root_dir.
+ (target_link, default_link): New functions.
+
+ * lib/remote.exp: Wrap close statements with catch.
+
+ * lib/framework.exp(cleanup): Remove unused global declaration.
+
+ * config/unix.exp(unix_load): Unset LD_LIBRARY_PATH and
+ SHLIB_PATH after loading.
+
+ * config/sim.exp(sim_spawn, sim_wait): New functions.
+
+ * config/i960.exp(i960_spawn, i960_wait): New functions.
+ (i960_load): Use spawn and wait.
+
+ * config/gdb-comm.exp: Use tool_root_dir instead of objdir.
+ * config/ddb.exp: Ditto.
+
+ * config/gdb_stub.exp: Use tool_root_dir.
+ (gdb_stub_spawn, gdb_stub_wait): New functions.
+ (gdb_stub_load): Use spawn and wait.
+
+ * config/dos.exp(dos_send): Send strings one line at a time.
+ (dos_file): Delete files using del instead of rm.
+
+ * config/ddb-ether.exp(ddb_ether_spawn, ddb_ether_wait): New functions.
+
+ * config/cygmon.exp: Set send_initial_cr.
+
+ * runtest.exp: Must process tool_root_dir option in multiple
+ places (should be fixed!)
+
+Mon Feb 23 09:08:43 1998 Mark Alexander <marka@cygnus.com>
+
+ * baseboards/mn10300-sim.exp: Use libgloss when compiling/linking,
+ and new linker script sim.ld when linking.
+ * baseboards/mn10300-cygmon.exp: New file for MN10300 Cygmon.
+ * config/mn10300-eval.exp: New file for MN10300 eval board.
+
+Thu Feb 19 18:23:17 1998 John Metzler <jmetzler@cygnus.com>
+
+ * baseboards/mips64vr4100-sim.exp
+ Defines simulated test target for mips46vr4100-*-elf
+
+Wed Feb 18 15:29:12 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/libgloss.exp: Use tool_root_dir instead of base_dir or
+ objdir when searching for uninstalled libraries or executables.
+
+ * runtest.exp(tool_root_dir): New variable.
+
+Sat Feb 14 15:06:25 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/vxworks.exp(${board}_init): If we don't get useful info
+ from the 'p' command in the VxWorks boot ROM, reboot the board.
+ (vxworks_exec): Check more closely for problems executing the
+ testcase.
+
+Mon Feb 9 16:48:55 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/libgloss.exp(get_multilibs): If the compiler doesn't exist,
+ return nothing.
+ (find_ld): New function.
+
+ * config/powerpc-bug.exp: New file.
+
+ * baseboards/powerpc-bug.exp: Load the generic powerpc-bug
+ configuration.
+
+Mon Feb 2 15:44:10 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * contrib/test-tool (patterns): Glob pattern to match log files.
+ Add appropriate glob for new logfile naming scheme.
+
+Sun Feb 1 14:29:16 1998 Joseph H. Buehler <jhpb@sarto.gaithersburg.md.us>
+
+ * runtest: Handle finding runtest.exp better automounted
+ environments.
+
+Mon Jan 19 10:37:13 1998 Mark Alexander <marka@cygnus.com>
+
+ * config/dve.exp: New file to support Densan boards.
+ * baseboards/tx39-sim.exp: New file to support TX39 simulator.
+ * baseboards/tx39-dve.exp: New file to support Densan TX39 board.
+
+Tue Jan 13 01:21:14 1998 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * lib/libgloss.exp: Handle setting of LD_LIBRARY_PATH/SHLIB_PATH
+ when testing with installed libraries.
+
+1998-01-12 Brendan Kehoe <brendan@cygnus.com>
+
+ * contrib/test-tool (todayname): Refer to and use ChangeLog.egcs
+ instead of ChangeLog.fsf.
+
+Mon Jan 5 17:25:25 1998 Michael Meissner <meissner@cygnus.com>
+
+ * baseboards/d30v-sim.exp ({c,ld}flags): Set libgloss flags in
+ addition to newlib flags.
+
+Sun Dec 28 11:06:49 1997 Jeffrey A Law (law@cygnus.com)
+
+ * Makefile.in: Change "gxx_includedir" to "gxx_include_dir".
+
+Tue Dec 23 14:46:44 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/gdb-comm.exp(gdb_comm_load): Use "signal 0" instead of
+ continue. Check for testcase_timeout board feature to determine
+ how long we wait before we decide the testcase has gone into
+ an infinite loop.
+
+ * baseboards/cygmon.exp: Set shell_prompt and send_initial_cr.
+
+ * lib/libgloss.exp(libgloss_link_flags): Add case for sparc64.
+
+ * baseboards/usparc-cygmon.exp: New file.
+
+Sat Dec 13 18:43:16 1997 Michael Meissner <meissner@cygnus.com>
+
+ * baseboards/d30v-sim.exp (ldflags): Fix typo.
+
+Thu Dec 11 20:23:28 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/unix.exp (unix_load): Set LD_LIBRARY_PATH and SHLIB_PATH
+ for native tests if ld_library_path is defined.
+ * lib/libgloss.exp (g++_link_flags): Build up ld_library_path.
+ (libstdc++_link_flags): Likewise.
+
+Thu Dec 11 12:35:12 1997 Michael Meissner <meissner@cygnus.com>
+
+ * baseboards/d30v-sim.exp (ldflags): Also set stack to end of
+ default 8 meg external area.
+
+Wed Dec 10 16:11:47 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/gdb-comm.exp(gdb_comm_load): Add more possible error
+ messages.
+
+ * lib/remote.exp(standard_close): Make sure we close both file
+ descriptors, if there are two.
+
+Wed Dec 10 14:35:05 1997 Michael Meissner <meissner@cygnus.com>
+
+ * baseboards/d30v-sim.exp (ldflags): Add -mextmem to allow testing
+ larger tests.
+
+Tue Dec 9 21:38:03 1997 Fred Fish <fnf@cygnus.com>
+
+ * lib/libgloss.exp (get_multilibs): Use previously set value
+ of "target_board" rather than "board", since it may not exist.
+
+Tue Dec 9 10:54:34 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(standard_wait): We have to call wait, even though
+ it can't possibly work.
+
+Mon Dec 8 11:55:33 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(remote_spawn): Use -leaveopen.
+ (standard_wait): If we used -leaveopen, call close ourselves.
+ (standard_close): Ditto.
+
+ * lib/libgloss.exp(get_multilibs): Remove bogus tests for board
+ variable. Only set the board's multitop variable if we didn't
+ get an explicit list of multilib options to use.
+
+Sun Dec 7 08:29:40 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(remote_spawn): Fix typo.
+ (standard_wait): If the process was created with a pipeline, we
+ have to use close instead of wait.
+
+Fri Dec 5 14:21:18 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(remote_spawn): If the "spawn -open" command
+ fails, clean up after the command we just spawned.
+
+Thu Dec 4 11:32:06 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(remote_open): Use catch.
+
+Tue Dec 2 22:44:42 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(remote_close): Move close statement after we
+ determine the PID. Look at fileid_pid feature.
+ (remote_spawn): If we're invoking a pipeline, stash the PID we
+ get in the board's fileid_pid feature.
+
+Sun Nov 30 19:09:49 1997 Jeffrey A Law (law@cygnus.com)
+
+ * lib/target.exp (prune_warning): Prune some unwanted warnings
+ from the HP assembler and gcc when using the HP assembler.
+
+Fri Nov 28 10:42:30 1997 Michael Meissner <meissner@cygnus.com>
+
+ * baseboards/d30v-sim.exp: Re-enable trampolines.
+
+Tue Nov 25 09:24:13 1997 Michael Meissner <meissner@cygnus.com>
+
+ * baseboards/d30v-sim.exp: Re-enable using label values.
+
+Mon Nov 24 09:56:20 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/cygmon.exp, baseboards/cygmon.exp,
+ baseboards/msparc-cygmon.exp: New files.
+
+ * config/i960.exp: Don't call perror.
+
+Sun Nov 16 20:55:59 1997 Michael Meissner <meissner@cygnus.com>
+
+ * baseboards/d30v-sim.exp: Turn off trampolines and label values
+ temporarily.
+
+Thu Nov 13 22:51:42 1997 Michael Meissner <meissner@cygnus.com>
+
+ * baseboards/d30v-sim.exp: New file for d30v support.
+
+Wed Nov 12 23:45:48 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/unix.exp(unix_load): Call remote_spawn and remote_wait
+ instead of using exec.
+
+ * lib/remote.exp(remote_wait): Use $dest, not host.
+
+Tue Nov 4 17:39:58 1997 Jim Wilson <wilson@cygnus.com>
+
+ * lib/target.exp (default_target_compile): Put math library
+ before linker script.
+
+Sun Oct 26 20:00:34 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/base68k.exp(base68k_wait): New procedure.
+ (base68k_load): Use remote_spawn and remote_wait.
+
+Sat Oct 25 21:48:36 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/base68k.exp(base68k_spawn): New procedure.
+
+Fri Oct 24 10:55:17 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/gdb-comm.exp: Add missing -re. If we get an EXIT message
+ from the remote system, we know that we've exited gdb.
+
+ * lib/remote.exp(standard_wait): Keep the timer running even if we
+ get output from the remote program.
+
+ * config/dos.exp(dos_wait): Ditto.
+
+Fri Oct 17 22:20:35 1997 Jeffrey A Law (law@cygnus.com)
+
+ * lib/libgloss.exp (find_g77): No longer need --driver stuff.
+
+Wed Oct 15 21:13:39 1997 Philippe De Muyter <phdm@macqel.be>
+
+ * runtest (mypath): Scan $PATH to set mypath if $0 does not give it.
+
+Mon Oct 13 11:09:09 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/base68k.exp(base68k_load): Don't call exp_continue
+ outside of an expect statement.
+
+Sun Oct 12 21:29:28 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in: Replace datadir with dejadatadir throughout.
+
+Mon Oct 6 10:52:25 1997 Jeffrey A Law (law@cygnus.com)
+
+ * lib/libgloss.exp (find_g77): New function.
+
+Fri Oct 3 14:13:30 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/vr4100-ddb.exp: Fix start addresses.
+
+ * config/vxworks.exp: Remove 'set timeout' statements.
+
+ * runtest.exp: Always output board name of target.
+
+Tue Sep 30 15:35:03 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/arm-sim.exp: No longer uses underscores.
+ * baseboards/arm-ice.exp: Ditto.
+
+Tue Sep 30 12:47:19 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * lib/remote.exp (standard_file, cmp): Ensure file exists before
+ computing file size.
+
+Sun Sep 28 14:30:52 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/powerpc-sim.exp: The simulator directory is
+ named "ppc", not "powerpc".
+
+ * config/mips-idt.exp: Set the "syn-garbage-limit" gdb
+ value to 0.
+
+Sat Sep 27 22:11:45 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/libgloss.exp(get_multilibs): Return the multilib directory
+ that matches closest to the specified set of options.
+
+Fri Sep 26 10:20:56 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/libgloss.exp(find_binutils_prog): Changed from find_objdump.
+
+ * lib/remote.exp(remote_load): Use objcopy instead of objdump.
+
+Thu Sep 25 10:54:55 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/h8300.exp: Use global prefix_dir instead of
+ explicitly putting a pathname in the file.
+ * baseboards/i386-bozo.exp: Ditto.
+ * baseboards/i960-cyclone.exp: Ditto.
+
+Wed Sep 24 13:06:47 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/ddb.exp: Close the connection to the board after we've
+ initialized it.
+
+ * testglue.c: Add support for atexit() and _exit() if VXWORKS
+ is defined.
+
+ * lib/libgloss.exp(build_wrapper): Define VXWORKS if is_vxworks
+ target feature is set.
+
+ * config/vxworks.exp: Set is_vxworks and gdb,nosignals target
+ features.
+
+Tue Sep 23 17:56:43 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(remote_load): If is_simulator board feature is
+ set, don't try to cache executables for this target.
+
+ * baseboards/basic-sim.exp: Set is_simulator board feature.
+
+Thu Sep 18 20:31:57 1997 Jeffrey A Law (law@cygnus.com)
+
+ * lib/libgloss.exp (libio_include_flags): If we can't find
+ _G_config.h, look for iostream.list in the same directory.
+
+1997-09-18 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * contrib/test-tool: Put all of the failure stuff up above the
+ pass stuff.
+
+Tue Sep 16 22:15:20 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(remote_load): Skip all the caching code if the
+ REMOTELOAD_CACHE env variable isn't set. Use objdump to get only
+ the executable contents, so we avoid problems with timestamps in
+ the executable.
+ (remote_expect): Check remote_suppress_flag instead of
+ suppress_flag.
+
+ * config/tic80.exp: Set gdb,use_breakpoint_for_stub. Don't
+ bother skipping the float tests, as the gdb stub now traps
+ FPU errors.
+ * config/dos.exp: If there is a timeout, try to interrupt
+ the remote job.
+ (dos_interrupt_job): Return a null string on success.
+ (dos_copy_download): Make the files on the destination world-writable
+ as well.
+ (dos_copy_upload): Ditto.
+
+Fri Sep 12 11:10:42 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * testsuite/runtest.all/options.exp: Commented out failing strace
+ test--test is probably failing because of a TCL8 interaction.
+
+Thu Sep 11 18:13:11 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/tic80-board.exp: Added support for running gdb.
+
+ * config/dos.exp(dos_exec): Add support for an output file.
+
+ * lib/remote.exp(remote_load): Only cache executables that
+ pass. Allow use of a checksum program in place of caching the
+ entire executable.
+
+ * lib/libgloss.exp(find_objdump): New procedure.
+
+ * config/gdb_stub.exp: Don't loop forever in gdb_stub_ld.
+ (gdb_stub_retry_ld): New procedure.
+
+Wed Sep 10 12:58:11 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/tic80.exp: Add new procedure tic80_ld. Call
+ tic80_ld from tic80_load. Add settings for gdb testing.
+
+ * lib/remote.exp: Add missing quotes around eval arguments.
+
+Tue Sep 9 14:45:24 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/tic80.exp: Remove bogus call to "fix" program.
+ Add timeout to remote_wait.
+
+Tue Sep 9 11:40:01 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/arc.exp: New file.
+ * baseboards/arc-sim.exp: New file.
+
+Fri Sep 5 15:17:38 1997 Jeffrey A Law (law@cygnus.com)
+
+ * lib/libgloss.exp (get_multilibs): Search for "libraries" directory
+ as the toplevel multilib directory too.
+ (libstdc++_link_flags, libstdc++_include_flags): New functions.
+
+Wed Sep 3 16:55:52 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(standard_file): cmp now returns 0 on "files
+ identical", some other value if the files are different.
+
+ * baseboards/sh-hms-sim.exp: Need to pass -mieee when building
+ testcases that rely on IEEE-compliant behavior.
+ * baseboards/sh-hms.exp: Ditto.
+
+ * lib/remote.exp(remote_load): Remove spurious debug output.
+ Use "remote_file cmp" instead of invoking cmp directly.
+ (standard_file): Added cmp operation to compare two binary
+ files.
+
+ * lib/libgloss.exp: Add dwarf2 target variant.
+
+ * lib/target.exp: Make sure the CC_FOR_TARGET variable overrides
+ any default compiler.
+
+Tue Sep 2 18:28:53 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/gdb_stub.exp: Detect gratuitous change to sparclet
+ gdb target mode.
+
+ * lib/remote.exp(remote_expect): Added timeout setting.
+
+Tue Sep 2 16:39:21 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * dg.exp (dg-test): New arg -keep-output.
+
+Wed Aug 27 13:16:32 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/vxworks.exp: Set the gdb_prompt target feature to be
+ (vxgdb).
+
+Fri Aug 22 13:24:58 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/vxworks.exp: Check for negative values from the "value ="
+ return string. If preload_obj is a target feature, load the
+ specified object file after a reboot.
+
+Thu Aug 21 18:06:20 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/vx4300.exp: New file.
+
+Wed Aug 13 12:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * lib/target.exp (prune_warnings): Generalize alpha ld warning.
+ Also handle IRIX 6 linker "I give up" message.
+
+Tue Aug 12 21:44:58 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/framework.exp(clone_output): Don't use lindex on things that
+ aren't really lists.
+
+Mon Aug 11 20:51:08 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(remote_expect): Nasty ugliness to work around
+ change in behavior of lrange in tcl8.
+
+Sat Aug 9 00:59:47 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/netware.exp (${board}_init): Change ld.new to ld-new.
+
+Wed Aug 6 18:41:24 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * lib/libgloss.exp (libio_include_flags): Look for _G_config.h, not
+ libio.a.
+
+Wed Aug 6 00:41:46 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * lib/libgloss.exp (find_gas): Look for as-new, not as.new.
+
+Sat Aug 2 20:44:55 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/gdb-comm.exp: Look for "Program exited with" exit status,
+ even though this should *never* appear (we're setting a breakpoint
+ in _exit and abort, duh).
+
+Fri Aug 1 15:56:06 1997 Felix Lee <flee@yin.cygnus.com>
+
+ * runtest.exp: "runtest gcc.c-torture/execute/execute.exp" didn't
+ work because expected global vars weren't set.
+
+Wed Jul 30 09:05:41 1997 Felix Lee <flee@yin.cygnus.com>
+
+ * lib/ftp.exp (ftp_download): and needed an -re flag. and changed
+ "Timeout" to "421", to catch other premature disconnects.
+
+Wed Jul 30 00:15:04 1997 Felix Lee <flee@cygnus.com>
+
+ * lib/ftp.exp (ftp_download): "Timeout ..." pattern wasn't listed
+ early enough to ever get matched.
+
+Mon Jul 28 21:20:59 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/libgloss.exp(get_multilibs): Iterate through the list of
+ compiler-specified options looking for a match, rather than
+ farting around with regexps.
+
+Mon Jul 28 15:28:09 1997 Felix Lee <flee@cygnus.com>
+
+ * lib/ftp.exp (ftp_upload): return localfilename, not
+ remotefilename.
+
+Mon Jul 28 15:28:09 1997 Felix Lee <flee@cygnus.com>
+
+ * config/base68k.exp (base68k_ld): need global objdir.
+
+Tue Jul 22 10:24:54 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * runtest.exp: More cleanups for setting isremote board feature.
+ Leave the previous setting alone if the board already has one.
+
+ * lib/framework.exp(is_remote): Add debugging info.
+
+ * lib/remote.exp(remote_spawn): If the local spawn fails, return
+ -1 instead of falling through.
+
+Mon Jul 21 14:30:01 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/target.exp(list_targets): Deleted, no longer meaningful.
+ (default_target_compile): Use warning instead of perror when
+ download fails. Delete an existing a.out object file if we're
+ running on a remote host.
+
+ * lib/libgloss.exp(libgloss_ld): Deleted, not used.
+
+ * config/dos.exp(dos_copy_download): If the local file doesn't
+ exist, don't try to download it.
+
+ * runtest.exp: Change tests for setting isremote board feature.
+ We assume the board is remote unless the name is the same as
+ the local hostname or we're defining the build board.
+
+Wed Jul 16 12:45:30 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/dos.exp(dos_copy_upload): If the remote file doesn't
+ exist, don't try to upload it.
+
+ * baseboards/basic-sim.exp: Don't transform the simulator name
+ using the target alias if no_transform_name is set on the host.
+
+ * lib/kermit.exp: Don't try to unset the file descriptor if it
+ isn't set.
+
+Mon Jul 7 12:01:54 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/m32r-sim.exp(ldflags): Use libgloss_link_flags, not
+ libgloss_include_flags.
+ * baseboards/m32r-elf.exp: Ditto.
+
+Sat Jul 5 18:42:52 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/libgloss.exp(libgloss_link_flags): Add sparclet->sparc CPU
+ mapping. (This needs to be fixed.)
+
+Thu Jul 3 15:34:21 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/ddb.exp: Use base68k instead of gdb-comm.
+
+ * stub-loader.c: Renamed from sparclet-loader.c.
+ * config/gdb_stub.exp: Refer to stub-loader.c now.
+
+Tue Jul 1 17:48:43 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * runtest.exp: Allow boards_dir to be a list of directories to
+ search for board descriptions.
+
+Mon Jun 30 19:12:14 1997 Stan Shebs <shebs@andros.cygnus.com>
+
+ * baseboards/arm-ice.exp: Board doesn't do I/O, signals,
+ or call functions from GDB.
+
+Mon Jun 30 18:32:44 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/arm-ice.exp: New file.
+ * baseboards/arm-ice.exp: New file.
+
+Sun Jun 29 22:12:51 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/arm-sim.exp: New file.
+
+ * lib/libgloss.exp(process_multilib_options): Added pe object format.
+
+ * baseboards/armpe-sim.exp: Removed file.
+
+Sat Jun 28 13:37:27 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/gdb_stub.exp: Use gdb_opts feature instead of a random
+ check if the host is remote.
+
+ * runtest.exp: Use the no_transform_name feature instead of
+ looking for a specific host triplet.
+
+ * baseboards/*-sim.exp: Use load_base_board_description, not
+ load_board_description.
+
+ * lib/target.exp(default_target_compile): If we're compiling
+ with the C++ compiler, include g++_include_flags and
+ g++_link_flags as appropriate.
+
+Fri Jun 27 15:17:12 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ (load_board_description): Set the board feature isremote if the
+ board appears to be remote.
+ Call setup_build_hook with the local hostname.
+
+ * lib/target.exp(push_build): New procedure.
+
+ * lib/framework.exp(is_remote): Detect if the board name specified
+ is the name of the build or host, and handle appropriately.
+
+ * lib/remote.exp(check_for_board_status): Be a bit more aggressive
+ about stripping trailing CRLFs.
+
+ * config/dos.exp(dos_exec): Add support for an input file.
+ (dos_load): Pass program arguments and input file to remote_exec.
+
+Wed Jun 25 20:01:37 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/target.exp(target_compile): Always add the target's cflags
+ spec. Use find_g++ to find a compiler if we've been asked to use a
+ C++ compiler.
+
+ * lib/remote.exp(remote_spawn): Wrap open and spawn
+ statements with catch.
+
+ * lib/libgloss.exp(g++_link_flags): Add -L options to point to the
+ correct libiberty and librx directories.
+ (find_g++): New routine.
+
+ * lib/kermit.exp: Loosen up the regexp matching the connect
+ string.
+
+ * lib/ftp.exp: Look for a "Timeout after..." message from
+ ftp.
+
+ * config/sparclet.exp: The gdb prompt is "gdbslet".
+
+ * config/gdb_stub.exp: If running on a remote host, add --command
+ gdbinit to the gdb command line. Use the gdb_is_running target
+ feature to keep track of whether or not we started gdb. Replace
+ errors with warnings in many cases.
+ (gdb_stub_load): Always set a breakpoint on exit if the
+ target feature always_break_exit is set. Retry the testcase
+ if it times out.
+ (gdb_stub_close): New routine.
+
+ * baseboards/sparclet-aout.exp: varargs and label values
+ apparently don't work. Always set a breakpoint at
+ exit() even if we can break at _exit instead.
+
+ * sparclet-loader.c: Add global variable "remote_debug"
+ initialized to 0.
+
+ * runtest.exp: If running on a DOS host, don't canonicalize
+ the tool names.
+
+ * config/i386-bozo.exp(${board}_reboot): Return 1.
+
+Mon Jun 23 14:55:13 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/gdb_stub.exp: Clean up a few regexps. Check for either
+ the breakpoint function name (preferred) or the breakpoint number.
+
+Sun Jun 22 12:31:02 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(standard_file): Add dirname, join, and absolute
+ operators.
+ (unix_clean_filename): New procedure.
+
+ * runtest.exp(lookfor_file): Call 'remote_file build dirname'
+ instead of appending "/..".
+
+ * lib/framework.exp(is_remote): Really fix the problem with
+ "unix/cpu=v8" this time. Minor cleanups.
+
+Wed Jun 18 21:21:00 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/ddb-ether.exp(ddb_ether_try): Fix typo.
+
+Tue Jun 17 16:18:00 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/base68k.exp: Wait for an entire line before appending
+ it to the result buffer.
+ (base68k_load): Check every optional argument, and don't allow
+ any (yet). Use -re in front of regular expressions.
+
+ * lib/framework.exp(is_remote): Strip off any variant info from
+ the board name before determining if the board is remote.
+
+Tue Jun 17 02:32:07 1997 Bob Manson <manson@farmer>
+
+ * config/gdb-comm.exp(gdb_comm_load): Check for parameters we don't
+ support, and return UNSUPPORTED as appropriate. Don't set a
+ breakpoint in exit if we can set one in _exit.
+ * config/gdb_stub.exp: Ditto.
+
+Mon Jun 16 16:07:32 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/dos.exp(dos_wait): Add timeout parameter.
+
+ * lib/remote.exp(remote_expect): Add timeout parameter.
+ (remote_wait): Ditto.
+ (standard_wait): Ditto. Also give up if the program outputs
+ more than 512,000 bytes.
+
+ * config/vxworks.exp: Use timeout parameter instead of setting
+ timeout variable.
+ * config/dos.exp: Ditto.
+ * config/ddb.exp: Ditto.
+ * lib/mondfe.exp: Ditto.
+ * lib/rlogin.exp: Ditto.
+ * lib/telnet.exp: Ditto.
+ * config/base68k.exp: Ditto.
+ * config/i386-bozo.exp: Ditto.
+ * config/gdb-comm.exp: Ditto.
+ * config/gdb_stub.exp: Ditto.
+ * config/i960.exp: Ditto.
+ * config/ddb-ether.exp: Ditto.
+ * config/sim.exp: Ditto.
+
+Fri Jun 13 19:54:24 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * contrib/test-tool: Default to assuming a standard tree
+ structure. Don't die if we don't have a previous file to
+ diff against--diff against /dev/null instead.
+
+ * config/m32r.exp: Misc fixes.
+
+ * config/m32r-stub.exp: New file.
+
+ * config/gdb_stub.exp: Download the loader program to the host
+ before we try to load it.
+
+ * config/dos.exp: Move the cygwin exception check to a point
+ earlier in the expect sequence.
+ (dos_copy_upload): New routine.
+
+Thu Jun 12 19:05:21 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * testglue.c (write_int): write_int takes two args.
+
+ * lib/target.exp(target_compile): Must insert spaces when
+ appending flags.
+
+ * lib/remote.exp(remote_reboot): Print a message stating that
+ the board is being rebooted.
+
+ * config/dos.exp(dos_exec): Call remote_wait instead of
+ doing it ourselves.
+ (dos_wait): Minor cleanups.
+
+Wed Jun 11 10:07:10 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/dos.exp: Look for "cygwin except" string and reboot
+ the board if we see it. Make sure we get output from the
+ right place.
+ (dos_exec): We always need to return a result list.
+
+ * lib/target.exp(target_compile): Strip extra newlines/CRs from
+ the start of the compiler output.
+
+ * config/dos.exp: Make sure we can have multiple spawned commands
+ open to the board without reusing the same batch file name. Use
+ the new conninfo board feature to hold the name of the batch file
+ being used for the current connection.
+ (dos_interrupt_job): New procedure.
+
+ * config/tic80.exp, baseboards/tic80-board.exp: New files.
+
+ * lib/remote.exp(remote_swap_conn): New procedure.
+ (remote_pop_conn,remote_push_conn): The conninfo board feature
+ is used to store data specific to the current connection; make
+ sure we update it correctly when we push and pop connections.
+
+Fri Jun 6 14:24:36 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/gdb-comm.exp: Fix typo (missing call to list).
+
+ * lib/libgloss.exp(g++_link_flags): Put spaces in appropriate
+ places. If we don't have a multilib pathname to use, try
+ global $objdir instead.
+ (g++_include_flags): Don't bother checking to see if the libraries
+ are there, just look for the source directories.
+
+Thu Jun 5 18:09:55 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/ddb.exp: Fix typo.
+
+ * lib/remote.exp(remote_close): Use nasty ugly shell stuff to kill
+ the program being closed.
+ (remote_expect): Make sure expect fails if there isn't a
+ connection open to the requested board.
+
+ * lib/libgloss.exp(winsup_include_flags,winsup_link_flags): New
+ functions.
+
+ * baseboards/dos.exp: Fix link flags and prompt regexp.
+
+ * config/dos.exp(dos_load): New function.
+
+Tue Jun 3 12:04:15 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/unix.exp: Add call to process_multilib_options.
+
+ * runtest.exp: Clean up target iteration expansion.
+
+ * testglue.c: Add #ifndef NO_UNISTD_H test.
+
+ * config/vxworks.exp: Try to boot the system into the desired OS.
+
+ * lib/telnet.exp(telnet_open): Remove the option of passing
+ the port #. If the first optional argument is "raw", return
+ immediately rather than trying to look for a shell prompt.
+
+ * lib/util-defs.exp: Remove expect_before statement.
+
+ * config/gdb-comm.exp(gdb_comm_add_breakpoints): Check for "No
+ symbol table" message from gdb.
+
+ * config/vxworks.exp(*_load): Don't set global exec_output
+ variable. We return a list of two members, the first containing
+ the pass/fail string, and the second containing the output
+ from the executable.
+ * lib/dg.exp(dg-test): Ditto.
+
+ * config/rom68k.exp: Fix shell_prompt value (add a space at the
+ end).
+
+ * baseboards/h8300.exp: Put back magic linker script brain-damage.
+
+ * baseboards/mips-sim.exp: Check for ecoff object file format,
+ and use idtecoff.ld instead of idt.ld.
+
+ * config/dos.exp(dos_wait): Wait for a shell prompt from
+ the board before returning.
+
+ * config/i960.exp: Detect if the board starts spewing nonsense,
+ and reboot it if it does.
+ * config/base68k.exp: Ditto. Also tighten up the checks for
+ a shell prompt.
+
+ * lib/remote.exp: Add a bit more debugging output. Use -9 when
+ killing the process.
+
+Mon Jun 2 09:50:33 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(standard_close): Check the return value from
+ catch. Fix quoting on the after command.
+
+ * baseboards/rom68k-idp.exp: Look for a.out object file format.
+
+ * baseboards/vr4300-sim.exp: Look for ecoff object file format.
+ * baseboards/vr4300-ddb.exp: Ditto.
+ * baseboards/mips-idt.exp: Ditto.
+
+ * lib/libgloss.exp: Set the board's obj_format feature according
+ to the specified object file format. Handle "stabs" variant.
+
+ * baseboards/i960-cyclone.exp: Mark the board as being unreliable.
+
+ * config/i960.exp: Check for a couple of common failure modes and
+ reboot the board as needed. Also reboot if the testcase fails and
+ the board is marked as "unreliable".
+
+Sun Jun 1 16:48:30 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/base68k.exp: Add base68k_ld procedure. Clean up a few
+ regexps.
+
+ * baseboards/rom68k-idp-aout.exp: We need to pass the load offset
+ to gdb's load command.
+
+ * baseboards/rom68k-idp.exp: Use -msoft-float by default.
+
+ * lib/telnet.exp: If dont_wait_for_prompt is set, don't bother
+ trying to get a prompt back before returning.
+
+ * config/i960.exp(${board}_init): Send several CRs in order to get
+ a prompt from the board (fun with autobaud). Set
+ dont_wait_for_prompt. Clear exec_output.
+
+Sat May 31 00:29:33 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/base68k.exp: Handle various errors more gracefully.
+
+ * config/dos.exp(dos_start_command): Flush any pending output
+ before sending the new command to be run. Make regexp for
+ prompt more strict.
+
+ * contrib/test-tool: Add support for compressed log files.
+ (Can't compress ChangeLog files yet.)
+
+Fri May 30 15:08:15 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/libgloss.exp(build_wrapper): New procedure.
+
+ * config/base68k.exp: Check for use_vma_offset target feature.
+ Make sure we keep in sync with the remote target.
+
+ * baseboards/rom68k-idp-aout.exp: Try using objcopy again.
+ Make sure we link with -N.
+
+ * testglue.c: Handle m68k-aout specially.
+
+Thu May 29 19:57:47 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * testglue.c: Include sys/unistd.h.
+
+ * lib/telnet.exp: Use $connhost correctly.
+
+ * lib/remote.exp(remote_wait, remote_raw_wait, standard_wait): New
+ procedures.
+
+ * config/sim.exp(sim_load): Use remote_wait to wait on the
+ spawned child.
+
+ * config/dos.exp(dos_spawn): Make sure we can return an exit
+ status from the spawned command.
+ (dos_wait): New procedure.
+
+Thu May 29 15:08:07 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/rom68k-idp-aout.exp: Status wrapper seems to be
+ working in devo.
+
+Wed May 28 12:34:28 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/sparc64-sim.exp: New file.
+
+ * baseboards/vx68k.exp: New file.
+
+ * lib/libgloss.exp(newlib_link_flags): Also look for the linker
+ script directory that's part of ld, and include it if it
+ exists.
+
+Tue May 27 20:00:01 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/libgloss.exp(libgloss_link_flags): If we're building
+ for a powerpc target, the cpu is rs6000, not powerpc.
+
+Sat May 24 11:31:26 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/gdb-comm.exp: Strip off "Continuing." response
+ from gdb. Set the height and width to 0 so GDB doesn't
+ try to scroll.
+
+Fri May 23 12:02:29 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/i960-cyclone.exp: It's noargs now.
+
+ * lib/remote.exp(call_remote): Make sure we set the
+ board's database name entry if we tried to load it.
+
+ * lib/libgloss.exp(process_multilib_options): Look for aout and
+ elf board variants, and set is_aout/is_elf as appropriate.
+
+ * lib/targetdb.exp(set_currtarget_info,unset_currtarget_info):
+ New functions.
+
+ * config/gdb-comm.exp: Check for gdb_sect_offset target feature;
+ if it's set, adjust the sections in the executable with the
+ .sect command.
+
+ * config/i386-bozo.exp: New file.
+ * baseboards/i386-bozo.exp: New file.
+
+Thu May 22 15:24:48 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/op50n.exp: Set gdb,timeout to 9 minutes.
+
+ * config/base68k.exp: Display the output from the board in
+ verbose mode.
+
+ * config/proelf.exp: Use base68k to load programs instead of
+ GDB.
+
+ * baseboards/hppa-proelf.exp: Renamed to baseboards/op50n.exp.
+
+ * lib/libgloss.exp: Make sure we don't include the libio
+ stdio directory.
+
+Wed May 21 22:58:05 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/i960-cyclone.exp: Link with i960.ld linker
+ script.
+
+Tue May 20 19:03:54 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/sim.exp: Check for magic CHILDKILLED nonsense from
+ wait.
+
+Mon May 19 13:07:01 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/i960-cyclone.exp: New file.
+ * config/i960.exp: New file.
+
+Tue May 20 17:55:39 1997 Jeffrey A Law (law@cygnus.com)
+
+ * config/sim.exp: Set "slow_simulator".
+
+Tue May 20 08:54:55 1997 Jeffrey A Law (law@cygnus.com)
+
+ * baseboards/*: Change "gdb,noargs" to just "noargs".
+
+Mon May 19 13:07:01 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/telnet.exp: Backquote the braces in "VxWorks Boot"
+ correctly this time.
+
+ * lib/remote.exp: Use catch to wrap exp_pid calls.
+
+Sat May 17 21:44:08 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(standard_close): Don't wait forever on close; if
+ it's a process, give it a SIGTERM after 10 seconds.
+ (remote_spawn): Make sure stderr and stdout all go to the same
+ place.
+
+Sat May 17 19:10:36 1997 Fred Fish <fnf@cygnus.com>
+
+ * Makefile.in (install): Add missing ';' to datadir for...done.
+
+Fri May 16 23:30:27 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/powerpc-sim.exp: Can't call functions from within
+ GDB.
+
+Wed May 14 20:59:11 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/libgloss.exp: Add spaces before options passed to
+ the compiler.
+
+Fri May 16 10:11:54 1997 Jeffrey A Law (law@cygnus.com)
+
+ * baseboards/mn10200-sim.exp: Remove redundant setting of
+ "cflags".
+ * baseboards/mn10300-sim.exp: Likewise.
+
+Thu May 15 14:26:20 1997 Mike Meissner <meissner@cygnus.com>
+
+ * baseboards/tic80-sim.exp (gcc,no_varargs): Set to 1, the TIC80
+ doesn't support varargs.
+
+Tue May 13 11:51:06 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * Makefile.in (install): Take out errant semicolon.
+
+Mon May 12 21:48:52 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/libgloss.exp(find_gas): New procedure.
+
+ * lib/target.exp(default_target_compile): Look for
+ CC_FOR_TARGET and CFLAGS_FOR_TARGET global variables.
+ (target_assemble,default_target_assemble): New procedures.
+
+Thu May 8 21:53:03 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * runtest.exp: Add more informative startup messages describing
+ the various files that are being loaded.
+ (setup_target_hook): Give a warning if a target board is the local
+ machine and a "non-native" test is being run; check if the user
+ has set their DEJAGNU variable.
+
+Tue May 6 14:27:11 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * runtest.exp(lookfor_file): Use .. instead of [file dirname].
+
+Mon May 5 22:06:14 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/vxsparc.exp: New file.
+
+ * config/vxworks.exp: Look for [VxWorks Boot] prompt.
+ * lib/telnet.exp: Ditto.
+
+Fri May 2 15:19:00 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(remote_spawn): Add new argument for readonly
+ or writeonly processes, and use open to create a pipeline when
+ it is given.
+ * config/sim.exp(sim_load): Use it.
+
+Fri May 2 10:47:40 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/tic80-sim.exp: New file.
+
+Thu May 1 14:42:51 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/d10v.exp: Set gdb,short_int.
+ * baseboards/d10v-sim.exp: Ditto.
+ * baseboards/h8300.exp: Ditto.
+ * baseboards/h8300-sim.exp: Ditto.
+
+ * lib/remote.exp(remote_download): Ignore "files are identical"
+ error from cp.
+
+ * testglue.c: Renamed from test-glue.c.
+
+Tue Apr 29 17:42:22 1997 Jeffrey A Law (law@cygnus.com)
+
+ * baseboards/h8300-sim.exp: Remove magic linker script braindamage.
+ Set gdb,noinferiorio, gdb/noresults, gcc,stacksize and no_long_long.
+ * baseboards/h8300.exp: Similarly.
+
+Tue Apr 29 12:56:53 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/rlogin.exp: Misc cleanups.
+
+ * lib/libgloss.exp(g++_include_flags): Don't skip if native. We're
+ also building multilib versions of the libraries now, so don't
+ pass a null argument to get_multilibs.
+ (g++_link_flags): Ditto.
+
+Mon Apr 28 12:14:27 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/telnet.exp: Default to /usr/kerberos/bin/telnet if it
+ exists.
+
+ * lib/target.exp(target_compile): Add use_at target feature, to
+ support using the @file syntax of GCC on a go32 host.
+
+ * lib/rlogin.exp(rlogin_open): Don't try to open a connection if
+ we already have one open. Use hostname and shell_prompt features of
+ target. Remove gratuitous $type variable. Don't use $board here.
+ Don't die if we get Kerberos login failures; the destination may
+ not support kerberos.
+ (rlogin_spawn): New function.
+
+ * lib/libgloss.exp(g++_include_flags): Use spaces in
+ appropriate places when appending flags.
+
+Fri Apr 25 19:03:55 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/sim.exp(sim_load): Stop using bash/ulimit. If an input
+ file is supplied, feed it into the simulator using
+ remote_transmit.
+
+Thu Apr 24 14:37:01 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/libgloss.exp(g++_include_flags): Make sure libg++/src
+ is part of the include path.
+
+ * lib/telnet.exp(telnet_open): Look for "simple or advanced"
+ prompt from ataman. Use $connhost instead of $hostname
+ correctly. Check for hostname feature of target machine.
+
+Fri Apr 18 16:43:39 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/sh-hms.exp: Set exit_statuses_bad.
+
+ * lib/telnet.exp: Handle more unexpected responses from telnet.
+ Don't give a warning if we don't get a prompt back after sending
+ the escape character.
+
+ * config/gdb-comm.exp: Check for SIGTRAP; retry if we get one.
+ Also reboot if the program gets any other signal. Check for
+ exit_statuses_bad on the target.
+
+ * config/base68k.exp: Retry if we didn't get a real exit status.
+
+Thu Apr 10 20:04:14 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/h8300.exp: The board is unreliable, make sure failing
+ commands get retried.
+
+ * Makefile.in: Make sure we copy in any .c stub files.
+
+ * config/dos.exp: Use the pid as part of the file in /tmp;
+ delete the file after we're done. Don't create the file
+ locally until we're ready to download it (in case we're
+ being called recursively).
+
+Thu Apr 10 14:35:02 1997 Jeffrey A Law (law@cygnus.com)
+
+ * baseboards/mn10300-sim.c: The mn10300 can perform inferior
+ function calls.
+
+Wed Apr 2 19:35:13 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/h8300.exp: Add appropriate references to linker
+ scripts. Set noinferiorio, and noresults.
+
+Sun Mar 30 00:25:59 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/ddb-ether.exp: Check for "Exception Cause" from the
+ monitor, and also retry 3 times on "invalid executable" message.
+
+ * config/ddb.exp: Add timeout section. Reboot the
+ board if we can't get any sort of a prompt.
+
+ * config/dos.exp(dos_exec): Return an error status
+ when the connection fails to the remote host. Retry
+ connecting several times, and also call remote_reboot
+ as appropriate.
+
+ * lib/ftp.exp: Check return value from ftp_open.
+
+Sat Mar 29 00:42:59 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/*.exp: General cleanup, yet again. Take
+ advantage of the new target variant support.
+
+ * runtest.exp: Fix everyone's favorite bug; now it says
+ "interrupted by user" instead of "segmentation violation"
+ when ^C is pressed.
+
+ * baseboards/vr4300-ddb.exp: Set gdb,noargs and gdb,nosignals.
+
+ * config/dos.exp: Increase timeout on program execution
+ to 5 minutes. Pass target alias to initialization
+ script. Don't delete the remote batch file.
+
+Thu Mar 27 01:38:35 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/framework.exp(is_remote): Use current_target_name, not
+ current_target.
+
+ * baseboards/m32r-sim.exp: Don't set unnecessary options here.
+
+ * lib/target.exp(default_target_compile): Add ldscript
+ option.
+
+ * config/gdb_stub.exp: Check for netport as well as serial. Use
+ gdb,start_symbol as appropriate.
+
+Wed Mar 26 16:45:42 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * runtest.exp(process_target_variants,iterate_target_variants): New
+ procedures, called as part of building up the list of targets
+ to test.
+
+ * lib/libgloss.exp(process_multilib_options,add_multilib_option): New
+ procedures.
+
+ * baseboards/*.exp: Call process_multilib_options instead of setting
+ multilib_flags directly.
+
+Wed Mar 26 16:04:48 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * baseboards/m32r-sim.exp (multilib_flags): Test all code models.
+
+Wed Mar 26 13:55:19 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/a29k-udi.exp: Don't use libio.
+
+Tue Mar 25 15:22:24 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/libgloss.exp(libgloss_link_flags): Always add a -L
+ pointing to the libgloss source directory, if it exists.
+
+ * lib/telnet.exp(telnet_binary): Thanks, HPsUX.
+ * lib/rsh.exp:(rsh_exec) Likewise, I'm sure.
+
+Mon Mar 24 22:20:18 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/dos.exp: Grab the exit status from the command we
+ executed.
+
+Sat Mar 22 13:07:52 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/mondfe.exp: General cleanups; don't be quite so
+ picky about when a prompt should appear (the last
+ step may not always be clearing the BSS section).
+
+ * config/gdb-comm.exp: Check for response when setting
+ baud rate.
+
+ * config/udi.exp: Don't be quite so picky when checking
+ for "Halt instruction encountered".
+
+ * testsuite/runtest.all/*.test: $srcdir/$subdir, not
+ $srcdir$subdir.
+
+Fri Mar 21 17:36:29 1997 Michael Meissner <meissner@cygnus.com>
+
+ * baseboards/d10v-sim.exp (sim_time_limit): Bump the default time
+ limit to 10 minutes, since gcc.c-torture/execute/920501-6.c takes
+ quite a while to do 64 bit arithmetic on a 16 bit host.
+
+Fri Mar 21 01:02:39 1997 Jeffrey A Law (law@cygnus.com)
+
+ * baseboards/mn10300-sim.exp: The mn10300 can't perform
+ inferior function calls yet.
+
+Thu Mar 20 22:45:18 1997 Jeffrey A Law (law@cygnus.com)
+
+ * testsuite/runtest.all/options.exp: Remove "baud" test.
+
+Tue Mar 18 15:15:16 1997 Jeffrey A Law (law@cygnus.com)
+
+ * baseboards/mn10300-sim.exp: Various updates from mn10200-sim.exp.
+
+Mon Mar 17 15:11:03 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * testsuite/runtest.all/stats-sub.exp: Add missing brace.
+
+ * config/sim.exp: If bash isn't in the user's path, then use spawn
+ and expect to try and catch cases where the simulator has gone
+ into an infinite loop.
+
+Thu Mar 13 11:59:52 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * runtest.exp: If running on multiple targets, output a summary
+ for each target. Use log_and_exit instead of log_summary.
+
+ * lib/framework.exp: Use an array (test_count) instead of
+ separate variables for each pass/fail/xpass/... count.
+ (log_and_exit, init_testcounts,incr_count): New procedures.
+
+ * lib/debugger.exp: Call log_and_exit instead of log_summary.
+
+ * lib/libgloss.exp(get_multilibs): Use -all. Substitute " -"
+ with " ", not the null string.
+
+Thu Mar 13 11:21:56 1997 Angela Marie Thomas (angela@cygnus.com)
+
+ * baseboards/mips-lsi-sim{,-EL,-sf,-sfEL}.exp: New files.
+
+Wed Mar 12 16:37:03 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/h8300-sim.exp: Add noargs and nosignals.
+ * baseboards/h8300.exp: Ditto.
+
+Tue Mar 11 17:17:43 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/gdb-comm.exp: If we're talking to a remote host,
+ download the executable being loaded before starting GDB.
+ Check for the gdb_opts feature of the host.
+ (gdb_comm_leave): New procedure. If we're talking to a
+ remote host, always start and exit gdb for each download.
+
+ * config/dos.exp: Use remote_expect.
+
+ * config/ddb.exp: If we're talking to a remote host, don't
+ try to init the prompt.
+
+ * baseboards/vr4300-ddb.exp: Don't link in libio.
+
+ * baseboards/vr4100-ddb.exp: Don't link in libio. Do use
+ -msoft-float "just in case".
+
+ * baseboards/sh-hms.exp: We need to pass in the -L options
+ for the libgloss directories so we find the linker scripts.
+
+ * baseboards/dos.exp: Make sure --command gdbinit is passed
+ to gdb.
+
+ * runtest.exp: Prefer target_alias over target_install.
+ * baseboards/basic-sim.exp: Ditto.
+
+Sat Mar 8 12:01:04 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/mn10200-sim.exp: Fix comment.
+
+ * baseboards/sh-hms.exp: Include libgloss so we can find
+ the linker scripts.
+
+ * baseboards/sh-hms-sim.exp: Ditto.
+
+ * config/vxworks.exp: Add additional error checking cases. Remove
+ unused procedure "vxworks_transform_path".
+
+Fri Mar 7 13:53:35 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/vr5000-ddb.exp: Add configury for nullstone.
+ * baseboards/vr4300-ddb.exp: Ditto.
+
+ * config/ddb-ether.exp(ddb_ether_ld): New routine.
+ (ddb_ether_try): Use ddb_ether_ld.
+ (ddb_ether_load): Make sure we return "fail" at the end of the loop.
+
+ * config/bug.exp: Use set_board_info.
+
+ * baseboards/vr4300-sim.exp: Use mips-sim as a base configuration.
+
+ * config/gdb_stub.exp: Use remote_expect.
+
+ * lib/remote.exp(remote_ld, remote_raw_ld, remote_push_conn,
+ remote_pop_conn): New routines.
+
+Thu Mar 6 09:34:39 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/ddb-ether.exp: Use remote_expect and remote_send.
+ * config/vxworks.exp: Ditto.
+
+ * runtest.exp: Remove --baud and --connect options, no longer
+ functional.
+ (setup_target_hook): Use the hostname of the local machine when
+ searching for a board file, if a board wasn't specified with
+ --host_board.
+
+Wed Mar 5 09:37:55 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/base68k.exp: Use $dest instead of target, and remote_send
+ and remote_expect.
+
+ * lib/framework.exp(clone_output): If $sum_file is null, don't try
+ to write to the file.
+
+ * config/ddb-ether.exp(ddb_ether_try): Add -re to regexp pattern.
+
+ * baseboards/mips-sim.exp: New file.
+
+ * runtest.exp: Move loading the libraries and the
+ tool initialization file before the start of the
+ file. Allow the tool to add additional options to runtest.
+ (transform): target_install is now a list kept as part of the
+ board description. Search the list for the current target alias;
+ if found, use in preference to the default target_install entry.
+
+ * lib/targetdb.exp(set_board_info,unset_board_info): New procedures.
+
+ * baseboards/*.exp: Use set_board_info instead of setting entries
+ in the board_info array directly. Also, some general cleanup,
+ removal of useless entries, etc.
+
+Tue Mar 4 22:58:37 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/vr5000-ddb.exp: Set gdb,nosignals and gdb,noargs.
+
+Tue Mar 4 14:43:50 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/powerpc-sim.exp: Set gdb,nosignals.
+
+Mon Mar 3 12:38:28 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/base68k.exp(base68k_load): Send an extra CRLF pair.
+
+ * lib/telnet.exp(telnet_binary): Only send a linefeed to telnet
+ after the command. Don't send an extra CRLF pair after the
+ command.
+
+ * config/ddb-ether.exp: Minor cleanups.
+
+ * lib/remote.exp(remote_expect): New procedure.
+
+Fri Feb 28 17:04:11 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/vr5000.exp: Use ddb-ether, as it's faster.
+
+ * baseboards/vr5000-ddb.exp: Use ddb.ld. Add setup info for
+ nullstone. Mark it as unreliable, as it gets random SIGFPEs.
+
+ * runtest.exp(setup_target_hook): Call perror instead of error.
+
+ * config/ddb-ether.exp: New file.
+
+Thu Feb 27 12:58:01 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/rom68k-idp.exp: Set gdb,noargs gdb,nosignals
+ and gdb,noresults.
+
+ * config/vr5000.exp,baseboards/vr5000-ddb.exp: New files.
+
+ * config/ddb.exp(${board}_init): Don't go into a recursive
+ tailspin.
+
+ * config/gdb-comm.exp(quit_gdb): New procedure.
+ (gdb_comm_load): Use it. Check for board feature
+ "unreliable". If the testcase times out, try rebooting the board
+ and reexecuting before deciding that the testcase is going into an
+ infinite loop.
+
+ * lib/rsh.exp(rsh_exec): Explicitly call sh.
+
+ * lib/telnet.exp(telnet_open): Make sure we wait for the telnet to
+ exit after closing it.
+
+ * test-glue.c: Include stdio.h and string.h.
+
+ * lib/remote.exp(standard_load): program args are in 0, input
+ is in 1.
+
+ * config/vxworks.exp(vxworks_open): Use password, not passwd.
+Sun Feb 23 14:32:34 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/telnet.exp(telnet_open): Add "catch" to the exp_send command
+ after telnet gets a connection refused.
+
+ * lib/framework.exp(record_test): Add global variable pf_prefix,
+ which contains a string that will be prefixed to every pass/fail
+ message.
+
+ * runtest.exp(runtest): Pass the name of the expect script to
+ the tool init function.
+
+ * baseboards/rom68k-idp.exp: Don't include libio.
+
+Sat Feb 22 21:02:01 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/telnet.exp(telnet_binary): Wait for a prompt after sending
+ the telnet escape character.
+
+Fri Feb 21 13:46:45 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * Makefile.in (install): Install the baseboards and config
+ .exp files.
+
+ * config/vxworks.exp: General cleanup and restructuring.
+ Added vxworks_exec.
+
+Thu Feb 20 17:17:08 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/vxworks.exp(vxworks_ld): Unload modules after testing them.
+ Check the results from remote_open; reboot the target if needed.
+
+ * lib/remote.exp(remote_download): Check the result code from "cp".
+
+Wed Feb 19 16:19:04 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/vr4300-sim.exp: Not "setup_sim vr4300", it's
+ mips.
+
+ * config/gdb-comm.exp: Use warning instead of perror in several
+ places.
+
+Wed Feb 19 09:36:06 1997 Michael Meissner <meissner@cygnus.com>
+
+ * baseboards/powerpc-bug{,1}.exp: New files for dealing with
+ PPCBUG monitor on ports 0 and 1.
+
+ * baseboards/powerpc-sim.exp (needs_status_wrapper): Delete,
+ simulator can return exit statuses correctly.
+
+Mon Feb 17 16:52:37 1997 Michael Meissner <meissner@cygnus.com>
+
+ * baseboards/d10v-sim.exp (needs_status_wrapper): Delete,
+ simulator can return exit statuses correctly.
+ (sim_time_limit): Delete, simulator can take more than 10 seconds
+ on some tests.
+
+Thu Feb 13 15:59:28 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * runtest.exp(runtest): Record number of seconds it took to
+ run the testcase.
+
+ * lib/framework.exp(log_summary): Log finish time.
+
+ * lib/remote.exp(check_for_board_status): If $result ends up being
+ empty, don't crash. Also, be a bit more lax about what we're
+ removing from the result being processed.
+
+Thu Feb 13 13:17:19 1997 Michael Meissner <meissner@cygnus.com>
+
+ * baseboards/d10v{,-sim}.exp: D10v has small stack, no trampoline
+ support, and can't do labels as values.
+
+Tue Feb 11 12:54:17 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/mondfe.exp: Use mondfe,name instead of remote_host.
+
+ * config/gdb_stub.exp: Remove bogus global declaration.
+
+ * lib/target.exp(default_target_compile): Append -lm at the end of
+ the argument list, so it is linked in as appropriate.
+
+Tue Feb 11 11:01:33 1997 Jeffrey A Law (law@cygnus.com)
+
+ * baseboards/mn10200-sim.exp: Remove gdb,cannot_call_functions.
+
+ * lib/remote.exp (remote_exec): Send PARGS to exec, not ARGS.
+
+ * lib/remote.exp (remote_exec): OUTP comes from argument 2, not
+ argument 1!
+
+Mon Feb 10 16:40:27 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/vxworks.exp: Return $shell_id like we should.
+
+ * baseboards/d10v.exp: Fix.
+
+ * lib/telnet.exp: Don't be quite so verbose.
+
+ * lib/remote.exp(standard_send): Quote the string being sent
+ correctly.
+ (standard_transmit): Change a few verbose message levels.
+
+ * config/dos.exp: Return the result of remote_raw_send.
+ * config/vxworks.exp: Ditto.
+
+Sun Feb 9 20:58:53 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/rom68k-idp.exp: Use objcopy by default, as
+ otherwise gdb won't work with srecords.
+ * baseboards/rom68k-idp-aout.exp: Output srecords directly.
+
+Sat Feb 8 13:40:38 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/libgloss.exp(libio_include_flags): Use the correct
+ binary directory when including _G_config.h.
+
+ * baseboards/mips-idt.exp: Add -nostdlib. Use idt.ld, not
+ pmon.ld.
+
+ * lib/remote.exp(standard_send): Use catch. Return a success
+ or fail status. Don't use error, use perror.
+
+ * config/vr4100.exp, config/ddb.exp: New files.
+
+ * config/gdb-comm.exp: Try reopening 4 times before failing,
+ rather than just once. Also, if we get a valid status result
+ from the board, use it instead of trying to check the exit
+ code passed to exit().
+
+ * lib/telnet.exp(telnet_open): Don't send the initial cr until
+ we've seen the "Escape character is..." line from telnet. Also,
+ if we got an unexpected EOF from telnet, wait 5 seconds before
+ trying again.
+
+Fri Feb 7 13:22:43 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * runtest.exp: Add --tool_exec and --tool_opt options. Clean
+ up the help messages to correspond with reality a bit better.
+
+ * lib/target.exp(prune_warnings): Merge in all the various
+ random versions of prune_system_crud and prune_warnings.
+ Nuke prune_system_crud without prejudice; replace with calls
+ to prune_warnings.
+
+ * lib/dg.exp: Use prune_warnings instead of prune_system_crud.
+
+Fri Feb 7 09:41:40 1997 Jeffrey A Law (law@cygnus.com)
+
+ * baseboards/mn10200-sim.exp: Set gdb,noresults gdb,noinferiorio
+ and no_double.
+
+Thu Feb 6 13:08:50 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp(remote_download): When copying to a local file,
+ make sure the copied file has read permissions for other.
+
+ * baseboards/vx960.exp: New file.
+
+ * config/vxworks.exp: Fix.
+
+ * lib/libgloss.exp(get_multilibs): If a list of multilib options
+ is specified, don't return the cached multilib path.
+
+Wed Feb 5 22:08:03 1997 Jeffrey A Law (law@cygnus.com)
+
+ * baseboards/mn10200-sim.exp: Random cleanups.
+ Set gdb,noargs gdb,nosignals and gdb,cannot_call_functions.
+
+Tue Feb 4 21:43:39 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * baseboards/sh-hms.exp: Set gcc,stack_size as well.
+
+ * config/gdb-comm.exp: Add gdb_run_command target feature.
+
+ * baseboards/a29k-udi.exp: Use gcc,stack_size instead of
+ defining STACK_SIZE.
+ * baseboards/armpe-sim.exp: Ditto.
+ * baseboards/mn10200-sim.exp: Ditto.
+ * baseboards/sh-hms-sim.exp: Ditto.
+
+Tue Feb 4 15:51:21 1997 Jim Wilson <wilson@cygnus.com>
+
+ * baseboards/sh-hms-sim.exp (cflags): Add -DSTACK_SIZE=16384.
+
+Mon Feb 3 12:30:02 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/remote.exp: Be a little be more lenient about what matches
+ the exit code returned from the board.
+
+ * baseboards/rom68k-idp-aout.exp: Fix.
+
+ * lib/telnet.exp: Added send_initial_cr board feature.
+ Make sure we respawn telnet if it dies.
+ * config/base68k.exp: Set it.
+ (base68k_load): Set exec_output. If we get a timeout from the
+ board, this is now considered to be a failure.
+
+ * baseboards/sh-hms.exp: This is now the baseboard for a SH board,
+ not the simulator.
+
+ * baseboards/sh-hms-sim.exp: New file.
+ * config/sh.exp: New file.
+ * baseboards/m32r-sim.exp: New file.
+
+Mon Feb 3 07:54:04 1997 Jeffrey A Law (law@cygnus.com)
+
+ * baseboards/mn10200-sim.exp: Add -DSTACK_SIZE=4096 to cflags.
+ Set no_long_long for this target.
+
+Sun Feb 2 15:29:09 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/libgloss.exp(find_gcc): Don't be quite so choosy about
+ the name of the compiler. But, make sure we look in all the
+ right places.
+
+ * lib/remote.exp(standard_close): Return 0.
+
+ * lib/mondfe.exp(mondfe_close): Return 0 if the connection is
+ already closed.
+
+Sun Feb 2 17:47:09 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * lib/target.exp: Only mention the compiler exit status if it is
+ non-zero.
+
+Sun Feb 2 00:00:39 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/dos.exp: Use $shell_prompt, not $prompt.
+ * config/netware.exp: Ditto.
+ * lib/rlogin.exp: Ditto.
+ * lib/rsh.exp: Ditto.
+ * lib/telnet.exp: Ditto.
+ * lib/tip.exp: Ditto.
+
+Sat Feb 1 12:38:05 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/unix.exp: It's $dest, not $targetname.
+
+ * runtest.exp: Add global variable boards_dir, which will
+ point to the directory containing the board description
+ files referred to by site.exp.
+
+ * lib/target.exp: Always log output from the compile.
+
+Sat Feb 1 10:36:05 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * lib/libgloss.exp (libgloss_link_flags): Add slash at the end of
+ the -B option.
+
+Fri Jan 31 11:36:12 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/gdb-comm.exp: Use $spawn_id consistently in expect.
+ Grab output from the board and stuff it into exec_output;
+ also check for status output from the status wrapper.
+
+ * baseboards/vr4300-ecoff-sim.exp: New file.
+
+ * baseboards/mips64-sim.exp: It's basic-sim, not basic-sim.exp.
+
+ * lib/target.exp(default_target_compile): If we end up with no
+ compiler, or if we can't find it and we're compiling locally, give
+ an error and return.
+
+ * lib/libgloss.exp(get_multilibs): If the host is remote, or if we
+ have no compiler, or it can't be found, don't look for multilibs.
+ (find_gcc): Don't even check to see if the compiler exists.
+ (libio_include_flags): Don't bother looking for the include dir if we
+ haven't got libio.a.
+
+Thu Jan 30 11:48:29 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * lib/libgloss.exp(get_multilibs): Options can be all caps too.
+
+ * config/gdb-comm.exp: Remove spurious quote. (Thanks, TCL!)
+ Add dest parameter to gdb_comm_reload calls.
+ Remind me not to reuse code (go_idle).
+
+ * runtest.exp(setup_target_hook): Use the non-generic name of
+ the host when searching for a host-specific target description.
+ (load_board_description): Use append correctly.
+
+ * baseboards/sparclite-coff.exp: New file.
+
+ * config/gdb_stub.exp: Add generic support for GDB stub targets
+ (derived from sparclet.exp).
+ * config/sparclet.exp: Use it.
+ * config/slite.exp: Use it.
+
+ * config/gdb-comm.exp: Rename the rest of the routines while
+ I'm at it.
+
+ * baseboards/d10v-sim.exp: Set gdb,nosignals and gdb,noargs.
+
+ * config/gdb-comm.exp: Change gdb_reload to gdb_comm_reload,
+ gdb_file_cmd to gdb_comm_file_cmd and gdb_add_breakpoint to
+ gdb_comm_add_breakpoint.
+
+ * baseboards/d10v.exp: It's d10v-elf.
+ * baseboards/d10v-sim.exp: Ditto.
+
+ * config/dos.exp: Check for errors when opening a connection.
+
+ * runtest.exp: Remove the slash after $srcdir when generating $subdir.
+
+ * config/m32r.exp: Use load_generic_config, not load_config.
+ * config/proelf.exp: Ditto.
+
+ * runtest.exp(transform): Add missing global declaration.
+
+ * lib/remote.exp(remote_reboot): Call ${board}_init after we
+ reboot the board.
+ (call_remote): If we're not working on a raw connection, look for a
+ protocol specified by the board description and use it.
+
+ * config/unix.exp: Replace ${board} with unix, and set the board's
+ protocol to unix.
+
+ * config/udi.exp: Replace ${board} with udi, and set the board's
+ protocol to udi.
+
+ * config/sim.exp: Replace ${board} with sim, and set the board's
+ protocol to sim.
+
+ * config/dos.exp: Replace ${board} with dos, and set the board's
+ protocol to dos.
+
+ * runtest.exp(load_generic_config): Don't set the generic name of
+ the board if it already has one.
+
+ * config/gdb-comm.exp: Remove definition of ${board}_init, and move
+ initialization to gdb_comm_start. Change $prompt to $gdb_prompt.
+ Look to see if the destination board has defined gdb_prompt, and use
+ it. Change ${board} to gdb_comm, and set the board's protocol as
+ gdb_comm.
+
+ * baseboards/armpe-sim.exp: Fix typo; it's "needs_status_wrapper".
+ * baseboards/d10v-sim.exp: Ditto.
+ * baseboards/vr4300.exp: Ditto.
+ * baseboards/sparclet-aout.exp: Ditto.
+ * baseboards/sh-hms.exp: Ditto.
+ * baseboards/mn10300-sim.exp: Ditto.
+ * baseboards/mn10200-sim.exp: Ditto.
+ * baseboards/m32r-elf.exp: Ditto.
+ * baseboards/h8300.exp: Ditto.
+ * baseboards/h8300-sim.exp: Ditto.
+ * baseboards/vr4300-ddb.exp: Ditto
+ * baseboards/vr4300-ddbecoff.exp: Ditto.
+
+Thu Jan 30 00:00:48 1997 Angela Marie Thomas (angela@cygnus.com)
+
+ * baseboards/vr4300-ddb*: New files.
+
+Wed Jan 29 14:19:53 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * config/sim.exp: Log which simulator is being run.
+
+ * {baseboards,config}/h8300.exp: New files.
+
+ * baseboards/vr4300.exp: Don't need to set generic_name anymore,
+ this is done by load_generic_config.
+ * baseboards/m32r-elf.exp: Ditto.
+ * baseboards/unix.exp: Ditto.
+ * baseboards/v850-sim.exp: Ditto.
+ * baseboards/vr4300-sim.exp: Ditto.
+
+ * config/vr4300.exp: It's load_generic_config now; don't need the
+ .exp suffix either.
+ * config/bug.exp: Ditto.
+ * config/mips-idt.exp: Ditto.
+ * config/rom68k.exp: Ditto.
+
+ * config/gdb-comm.exp(go_idle): Set shell_id before doing an
+ send/expect. Use "remote_send host" instead of send.
+ (gdb_comm_start): GDB and prompt are globals; declare them so.
+ (${board}_load): need to give a boardname to board_info.
+
+ * lib/remote.exp(remote_exec): Add logging.
+
+Wed Jan 29 00:19:01 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ Major revisions for cross-testing and remote hosted testing.
+
+ * runtest.exp: Remove several global variables, including variables
+ that describe target info; this is now kept in the board_info
+ array. Add new options --host_board and --target_board. Remove
+ --name option.
+ (search_and_load_file): New routine.
+ (lookfor_file): New routine.
+ (load_lib): Use search_and_load_file.
+ (setup_target_hook, setup_host_hook): New routines.
+ (load_generic_config, load_tool_target_config, load_tool_init,
+ load_board_description, load_base_board_description): New routines.
+ (runtest): New routine, code moved from main loop.
+
+ * site.tmpl: Update using new format of site.exp.
+
+ * lib/dg.exp(dg-init): Remove call to ${tool}_init, this is now done
+ by runtest.exp.
+ (dg-test): Change the format of the results returned from
+ ${tool}-dg-test to include the output from the test.
+
+ * lib/framework.exp(is_remote): New routine.
+
+ * lib/libgloss.exp: Add libgloss_{link,include}_flags,
+ newlib_{link,include}_flags, libio_{link_include}_flags,
+ g++_{link,include}_flags.
+
+ * lib/remote.exp: Major rewrite. Add remote_* functions,
+ move telnet, rlogin, ftp, kermit, et al to separate files.
+
+ * lib/target.exp(set_target_info, compile, archive, ranlib,
+ link_objects, execute_anywhere, getprompt, make): Deleted.
+ (push_target,push_config,pop_config,pop_target): Don't copy
+ the entries around, just change the name.
+ (target_compile, default_target_compile, reboot_target): New routines.
+
+Fri Jan 3 12:30:07 1997 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * site.tmpl (powerpc*-*-eabi*): Add sample entry.
+
+Thu Dec 12 18:11:24 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * lib/utils.exp (diff): Set list_a and list_b to null so diffing
+ empty files works.
+ * lib/framework.exp (unknown): Set the exit status before calling
+ log_summary.
+
+Thu Dec 5 10:24:27 1996 Fred Fish <fnf@rtl.cygnus.com>
+
+ * runtest.exp: Fix an indentation glitch. Before running a new
+ test case clear any pending errcnt so that the first test in the
+ new test case won't become a spurious "unresolved" test.
+
+Mon Dec 2 21:55:22 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * lib/utils.exp (diff): Notice the file dofferences even if the
+ file lengths are the same.
+ * lib/remote.exp (rsh_exec): Work with both csh and sh.
+ * lib/target.exp (execute_anywhere): Print an error message if
+ START & END aren't found rather than core dump.
+
+Fri Oct 18 20:54:10 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * lib/target.exp (prune_warnings): Fix typo in sunos pattern.
+
+Thu Oct 3 16:00:52 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * doc/Makefile.in (clean): Move config.log to distclean.
+ * example/calc/Makefile.in (clean): Move config.log to distclean.
+ * testsuite/Makefile.in (clean): Move config.log to distclean.
+
+Wed Oct 2 17:46:15 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * Makefile.in (distclean): Remove config.cache
+ * doc/Makefile.in (clean): Remove config.log
+ * example/calc/Makefile.in (clean): Remove config.log
+
+Wed Oct 2 16:59:24 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * testsuite/Makefile.in (clean): Remove config.log.
+
+Mon Sep 30 11:23:25 1996 Tom Tromey <tromey@cygnus.com>
+
+ * configure: Regenerated.
+ * aclocal.m4 (CY_AC_PATH_TKLIB): Typo fix.
+
+Fri Sep 27 12:17:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * contrib/test-tool (todayname): Add some echos around the "Here is"
+ lines.
+
+Thu Sep 26 17:09:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * contrib/test-tool: For g++, also track ChangeLog.fsf.
+
+Fri Aug 30 10:35:12 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * contrib/test-tool: Don't use cp -p if not supported.
+ Fix first call to grep to extract PASS/FAIL/Ufoo messages.
+
+Fri Aug 23 22:58:56 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * lib/libgloss.exp(libgloss_cflags): Convert the mips part of the
+ target triplet to just "mips", so the libgloss stuff can be found.
+
+Fri Aug 23 13:46:30 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * Makefile.in (configure): Delete dependencies.
+ (config.status): Depend on configure.
+ * example/Makefile.in: Likewise.
+ * testsuite/Makefile.in: Likewise.
+
+Thu Aug 15 16:38:52 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * lib/libgloss.exp (libgloss_flags): Add trailing slash to -B we
+ added.
+ (newlib_flags): Likewise.
+
+Mon Aug 12 16:07:21 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * lib/libgloss.exp(libgloss_cflags): Convert the hppa part of the
+ target triplet to just "pa", so the libgloss stuff can be found.
+
+Thu Aug 8 17:07:52 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * lib/libgloss.exp(libgloss_flags): Don't look in new config info,
+ just use CFLAGS & LDFLAGS as they're set as the default variables
+ by the config code.
+
+ * lib/libgloss.exp(libgloss_flags): Look for the srcdir too, so we
+ can find the linker script when libgloss isn't installed yet.
+
+Thu Aug 8 15:54:59 1996 Tom Tromey <tromey@charmed.cygnus.com>
+
+ * lib/remote.exp (telnet): Don't exp_send directly after a spawn.
+ Make line-termination-matching regexp more strict. Use "expect",
+ not "catch expect". Loop terminates when prompt is found.
+ login/password check no longer matches everything.
+
+Tue Aug 6 21:08:37 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * lib/libgloss.exp(get_multilibs): New proc to run gcc
+ --print-multi-lib and to parse out the path and option info.
+ (libgloss_flags,newlib_flags): Use get_multilibs, and set the
+ -B and -L paths right based on the -m options passed to the cross
+ compiler.
+
+Wed Jul 31 15:21:08 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * lib/libgloss.exp: Don't return an empty linker script name with
+ -T.
+
+Thu Jul 25 15:19:32 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * runtest: Add another place to look for runtest.exp.
+
+Wed Jul 24 15:41:21 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * runtest.exp: Accept "0-9_-" as legit characters for variable
+ names defined on the command line.
+
+Thu Jul 11 12:45:38 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * runtest: Find runtest.exp in $(prefix)/share, not $(prefix)/lib.
+
+Mon Jul 8 16:05:57 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * contrib/test-tool: Update gcc/g++ testing directory.
+
+Tue Jun 25 10:21:24 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * runtest.exp (load_file): Catch errors in "file exists".
+
+Mon Jun 24 17:26:20 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * Makefile.in (bindir, libdir, datadir, infodir, includedir): Use
+ autoconf-set values.
+ (docdir): Removed.
+ * configure.in (AC_PREREQ): autoconf 2.5 or higher.
+ * configure: Rebuilt.
+ * doc/Makefile.in (VPATH, mandir, infodir, INSTALL_PROGRAM,
+ INSTALL_DATA): Use autoconf set values.
+ * doc/configure.in (AC_PREREQ): autoconf 2.5 or higher.
+ * doc/configure: Rebuilt.
+ * example/Makefile.in (bindir, libdir, datadir, mandir, infodir,
+ includedir): Use autoconf set values.
+ (docdir): Removed.
+ * example/configure.in (AC_PREREQ): autoconf 2.5 or higher.
+ * example/configure: Rebuilt.
+ * example/calc/configure.in (AC_PREREQ): autoconf 2.5 or higher.
+ * example/calc/configure: Rebuilt.
+ * testsuite/configure.in (AC_PREREQ): autoconf 2.5 or higher.
+ * testsuite/configure: Rebuilt.
+ * testsuite/aclocal.m4: New. Include ../aclocal.m4.
+
+Wed Jun 12 14:18:09 1996 Tom Tromey <tromey@thepub.cygnus.com>
+
+ * configure: Regenerated.
+ * aclocal.m4 (CY_AC_PATH_TCLH, CY_AC_PATH_TKH): Use odd names to
+ avoid name clashes with SunOS headers.
+
+Tue Jun 4 17:53:16 1996 Gordon Irlam <gordoni@snuffle.cygnus.com>
+
+ * install-sh: Add MIT copyright. Fix typo.
+
+Fri May 31 14:09:32 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * QuickRef.ps: Removed.
+
+Tue May 28 13:03:48 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * testsuite/configure: Regenerated.
+ * configure: Regenerated.
+ * aclocal.m4 (CY_AC_PATH_TCLH): Don't use AC_TRY_RUN.
+ (CY_AC_PATH_TKH): Don't use AC_TRY_RUN.
+
+Tue May 21 11:40:41 1996 Doug Evans <dje@seba.cygnus.com>
+
+ * aclocal.m4 (CY_AC_PATH_TCLH): Guess Tcl version if cross compiling.
+ * testsuite/configure: Regenerated.
+
+Tue May 14 15:38:04 1996 Mark Alexander <marka@andros.cygnus.com>
+
+ * lib/target.exp (compile): Use append instead of lappend
+ to prevent cflags from being surrounded by curly braces.
+
+Wed Apr 10 13:29:15 1996 Jeffrey A Law (law@cygnus.com)
+
+ * site.tmpl (h8300*-*-*): Define STACK_SIZE and NO_LONG_LONG.
+
+Mon Apr 8 16:21:15 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * testsuite/Makefile.in (configure): Removed bogus tab.
+
+Tue Feb 20 19:43:47 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * runtest.exp (main loop): Handle a=b=c in $MULTIPASS.
+
+Fri Feb 2 10:25:32 1996 Jeffrey A Law (law@cygnus.com)
+
+ * site.tmpl (hppa*-*-proelf*): Update.
+
+ * lib/target.exp (compile): Add a space before appending $arg
+ to $options.
+
+Thu Feb 1 22:48:15 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * framework.exp (perror, warning): Add an errno global so the
+ error message is from a subroutine is accessible to the calling
+ proc.
+ * remote.exp (rlogin, telnet, rsh): Trap various kerberos message
+ when kinit is needed.
+ * testsuite/runtest.all/libs.exp: Trap untested, unsupported,
+ warnings, and errors too.
+ * testsuite/runtest.all/remote.exp: Look for kerberos messages so
+ those come up untested, rather than failures. This is only cause
+ we're testing by connecting to the localhost.
+
+Mon Jan 29 08:49:14 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * lib/dg.exp (dg-format-linenum): dg-linenum-format is global.
+
+Sun Jan 28 13:28:12 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * lib/dg.exp (dg-test): Update to handle new results from ${tool}_load.
+
+Sat Jan 27 13:04:58 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ From Anthony Green <green@cygnus.com>.
+ * lib/dg.exp (dg-do-what-default, dg-interpreter-batch-mode,
+ dg-linenum-format): New globals.
+ (dg-format-linenum): New proc.
+ (dg-{error,warning,bogus}): Call dg-format-linenum.
+ (dg-test): Set dg-do-what to ${dg-do-what-default}.
+ Use ${dg-linenum-format} in trimming line number field.
+ Don't scan for excess errors or delete output file if testing an
+ interpreter.
+
+ * lib/dg.exp (${tool}-dg-test): Delete default_flags and libs args.
+ (dg-extra-tool-flags): Renamed from dg-default-tool-flags.
+ (dg-runtest): Delete libs arg.
+ (dg-test): Likewise. Merge ${tool_flags} ${dg-extra-tool-flags} when
+ calling ${tool}-dg-test.
+
+Thu Jan 18 19:51:11 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * lib/remote.exp: All tcp/ip connection procs now are consistant
+ with each other. The all take (optionall) "target" or "host" and
+ establish a connection using the config array. plus they all do
+ three retries on each connection.
+ * runtest.exp: Minor formatting changes.
+ * lib/target.exp: Fix a few config bugs.
+ * testsuite/runtest.all/{remote,target}.exp: New test cases for
+ remote.exp and target.exp.
+
+Wed Jan 17 11:32:21 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * testsuite/Makefile.in (check): Find Tcl library directory.
+
+Tue Jan 16 11:11:44 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * testsuite/runtest.all/{remotelib,targetlib,utilslib,framelib}.exp:
+ Removed.
+ * testsuite/runtest.all/{clone_output,config,utils}.test: New
+ files for testing DejaGnu's library procs without runtest. These
+ all run standalone, as well as under DejaGnu.
+ * testsuite/runtest.all/libs.exp: Run standalone DejaGnu tests.
+
+Mon Jan 15 18:16:07 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * tcl-mode.el: Updated to version 1.49.
+
+Thu Jan 11 12:26:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * runtest.exp (--help): Fix --build description.
+
+Thu Jan 11 10:08:14 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * testsuite/configure.in: Macro now called CY_AC_PATH_TCLH.
+ * testsuite/configure: Regenerated.
+
+ Changes in sync with expect:
+ * configure.in (ENABLE_GDBTK): Use CY_AC_PATH_TCL and
+ CY_AC_PATH_TK.
+ * aclocal.m4: Replaced with version from expect.
+ * configure: Regenerated.
+
+Fri Jan 5 19:57:06 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * testsuite/lib/libsupp.exp: New support file for testing
+ DejaGnu's libraries.
+ * testsuite/runtest.all/
+ framelib.exp,remotelib.exp,targetlib.exp,utilslib.exp: New test
+ drivers, one for each library.
+ * testsuite/runtest.all/options.exp: Create mini config file so
+ the test cases still work.
+
+Thu Jan 4 22:51:46 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * doc/dejagnu.texi: Add new sections on all the new librry
+ routines. Rewrite config section, lots of other editing changes.
+
+Wed Dec 20 00:49:16 1995 Jeffrey A Law (law@cygnus.com)
+
+ * lib/utils.exp (prune_system_crud): Discard warning about
+ lack of exception sections from osf linker.
+
+Mon Dec 11 09:31:55 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * contrib/test-tool: Use TMPDIR if set.
+
+Fri Dec 1 20:58:03 1995 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * doc/Makefile.in: Don't include the expect and tcl texinfo files
+ anymore, they're incredibly out of date.
+ * doc/dejagnu.texi: Updates for version 1.3.
+
+Wed Nov 29 17:33:22 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * lib/utils.exp (prune_system_crud): Discard warning about g++ not
+ supporting -g with DWARF.
+
+Wed Nov 29 12:47:22 1995 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * lib/libgloss.exp: Look for newlib and libgloss with the new
+ configure path so stuff fully links again.
+
+Wed Nov 22 13:15:05 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * lib/utils.exp (prune_system_crud): Discard -g -O warnings from
+ native compilers on OSF/1 and SunOS.
+
+Thu Nov 2 14:50:23 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * runtest.exp: Set host_triplet to $build_triplet if it doesn't
+ exist.
+
+Thu Oct 19 21:34:55 1995 Fred Fish <fnf@cygnus.com>
+
+ * doc/Makefile.in, example/Makefile.in: Remove extraneous tabs
+ from otherwise empty line. Confuses older non-GNU versions of "make".
+
+Tue Oct 17 12:11:40 1995 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * lib/libgloss.exp (newlib_flags): Delete msoft-float support.
+ Pass a -B option instead of a -L option. Add a -I option for the
+ machine dependent header files.
+
+Mon Oct 16 13:27:27 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * lib/target.exp (execute_anywhere): Use -log argument to verbose
+ to eliminate duplicate messages in log file.
+
+Fri Oct 6 20:44:05 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * lib/libgloss.exp (newlib_flags, libgloss_flags): Just return the
+ options so they work if gcc is in your path for a canadaian cross.
+ * lib/remote.exp: Use "current" as an index into the target array
+ rather than "target". Remove the need to
+ target_info(current,prompt).
+ * lib/target.exp (prune_warnings): Filter out the other warning we
+ can safely ignore. Also strip out "\r" characters added by a
+ remote command.
+ (remote_open) Look for output between START and END rather than a
+ prompt.
+
+Fri Sep 29 12:36:43 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * lib/targets.exp (prune_warnings): Only check for ld.so warning
+ on sunos systems. Check against host, not target.
+ * lib/debugger.exp:
+ * runtest.exp: Set target_abbrev to default to "unix" rather than
+ "-unset-".
+
+Wed Sep 27 10:10:48 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * lib/targets.exp (prune_warnings): Remove certain host specific
+ warnings from the compiler and linker.
+ (compile,archive,ranlib): Use prune_warnings, and make comp_output
+ a global incase the final error message is wanted to display.
+
+Tue Sep 26 23:58:16 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * lib/framework.exp (warning, perror): Take an optional numeric
+ value to set the count to. A "0" effectively resets after the
+ message so it doesn't have side effects on unrelated tests.
+
+Fri Sep 22 13:02:00 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * runtest.exp (srcdir): Mark trailing '/' as deprecated,
+ and append it outside the main loop.
+
+Wed Sep 20 13:25:40 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (maintainer-clean): New synonym for realclean. Run
+ target in subdirectories before current directory.
+ * example/Makefile.in (maintainer-clean): Likewise.
+ * doc/Makefile.in (maintainer-clean): New synonym for realclean.
+ * example/calc/Makefile.in (maintainer-clean): Likewise.
+ * testsuite/Makefile.in (maintainer-clean): Likewise.
+
+Wed Sep 20 11:28:09 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * testsuite/runtest.all/subdirs*: Add subdirs and bogus test files
+ to use for testing the getdirs and find procs.
+ * testsuite/runtest.all/libs.exp: New test driver for library
+ procs.
+
+Tue Sep 19 16:58:57 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * lib/remote.exp (remote_open): If we can't find netdata in the
+ path, return a shell_id of -1.
+
+Mon Sep 18 10:24:51 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * lib/utils.exp (getdir): Stip out CVS, RCS, and a few other
+ directories we don't need.
+
+ * runtest.exp: Get $tool dirs first, then process the subdirs.
+ * lib/utils.exp (getdir,find): Search for directories and files
+ the old way.
+
+ * testsuite/runtest.all/options.exp: Fix broken options and add
+ tests for new options.
+
+Sat Sep 9 16:14:55 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * lib/vxworks.exp (vxworks_spawn): Add `global checktask'.
+
+Sat Sep 9 08:54:01 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * lib/utils.exp: (diff) Fix to return correct value. Also make the
+ output clearer for the differences found, and scan the whole file.
+
+Fri Sep 8 13:57:44 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * lib/remote.exp (download): Use verbose, not puts, when saying
+ how many lines we downloaded.
+
+Thu Sep 7 10:56:41 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * lib/utils.exp (find): Fix so it doesn't get duplicate
+ directories.
+
+Wed Sep 6 20:51:40 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * lib/libgloss.exp: New file. Find linker scripts and search paths
+ for the linker for libgloss supported targets.
+ * lib/framework.exp: Set default output file to testrun.sum and
+ testrun.log if --tool wasn't specified.
+ * lib/remote.exp: Change from "current" to "target" for
+ target_info index.
+
+Tue Sep 5 22:05:52 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * runtest.exp: Extract the vaules for *_cpu, *_vendor, and *_os
+ from the config triplets. Tweak a few comments. Init files can now
+ also be named $target_os.exp.
+ * lib/target.exp: Add procs to find libgloss so we can produce a
+ fully linked executable. Tweak a few comments, fixed push_target.
+
+Thu Aug 31 21:16:08 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * lib/utils.exp: (getdirs) now ignores directories named CVS, RCS,
+ and SCCS.
+ * runtest.exp: --tool is now optional. init files can also be
+ named using the target_os part of target_triplet
+
+Thu Aug 31 02:52:57 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * runtest.exp: Don't set target_triplet if already set.
+
+Wed Aug 30 21:34:16 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * runtest.exp: Use $*_triplet rather than $arg_*_triplet so
+ configfile settings don't get trashed.
+
+ * runtest.exp: Fix argument processing for --host, --build, and
+ --target.
+
+Mon Aug 28 23:39:17 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * lib/target.exp: New file containing most of the new config code.
+ * lib/framework.exp: Fix ishost, istarget, isnative to use new
+ config subsystem. Add is3way, isbuild.
+ * lib/utils.exp: Add diff, setenv, getenv, unsetenv procs that
+ function like the Unix commands of the same name.
+ * lib/remote.exp: Add support to use the new config subsystem.
+ * runtest.exp: Add support for handling the new config subsystems.
+
+Fri Aug 4 15:37:55 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * lib/dg.exp (dg-test): Also watch for unsupported from
+ ${tool}-dg-prune.
+
+Wed Aug 2 21:36:10 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * lib/dg.exp (dg-test): Watch for untested/unresolved markers
+ from ${tool}-dg-prune.
+
+ * runtest.exp (init section): Delete host, target.
+ Document host_triplet, target_triplet, target_alias.
+
+Tue Aug 1 11:34:46 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * runtest.exp (target_abbrev): Provide initial value in case
+ $DEJAGNU not set and global config file doesn't exist.
+
+Fri Jul 28 11:43:59 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * lib/vxworks.exp (checktask): New variable, default to `fp'.
+ (vxworks_spawn): Use it.
+
+ * lib/vx29k.exp: Delete file.
+
+Fri Jul 28 00:24:40 1995 Jeffrey A. Law <law@rtl.cygnus.com>
+
+ * site.tmpl: Make gdbserver the default for cross tests;
+ no easy way to make it conditional on lynx here.
+
+Thu Jul 27 16:21:05 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * config/{mh-linux, mh-sysv4}: Removed.
+
+ * Makefile.in (configure): Removed rule that automatically
+ rebuilds configure script. Users might not have autoconf.
+ * configure.in: Use AC_PROG_CC instead of AC_SUBST, but still
+ set CC to ${CC-cc} before that as per cygnus conventions.
+ * configure: Regenerated with autoconf 2.4.2.
+
+Wed Jul 26 19:41:56 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * lib/vx29k.exp: Copy of vxworks.exp, but without `filesys:' and
+ using the `tt' command instead of `fp'.
+
+Wed May 10 18:33:21 1995 Stu Grossman (grossman@andros.cygnus.com)
+
+ * site.tmpl: Create rule for Oki targets. Make Winbond rule more
+ specific.
+
+Wed May 10 14:50:12 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * lib/bug.exp (bug_load): send two carriage returns to leave
+ s-record download mode.
+ (bug_execute): set exec_output.
+
+Thu May 4 11:48:12 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * lib/remote.exp (remote_open): If $reboot is set, call
+ reboot_hook proc if it exists.
+ Added experimental new connect type "netdata".
+
+Wed May 3 15:40:55 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * runtest.exp: Redo argument parsing so that arguments of the form
+ --foo=bar are processed correctly.
+
+Sat Apr 29 12:59:18 1995 Doug Evans <dje@chestnut.cygnus.com>
+
+ * lib/dg.exp: New file.
+
+ * runtest.exp (verbose): New option -log.
+
+Wed Apr 26 12:40:23 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * runtest.exp (main loop): Set multipass_name.
+ * lib/framework.exp (record_test): Print multipass_name if not empty.
+
+ * lib/framework.exp (record_test): Handle UNTESTED, UNRESOLVED,
+ and UNSUPPORTED.
+ (untested, unresolved, unsupported): Call record_test.
+ * lib/util-defs.exp: Whitespace and verbosity cleanup.
+ * testsuite/Makefile.in (site.exp): Set tmpdir.
+ (realclean): rm -rf tmpdir.
+ * testsuite/config/default.exp: Whitespace cleanup.
+ * testsuite/runtest.all/options.exp: Likewise.
+ * testsuite/runtest.all/stats.exp: New file.
+ * testsuite/runtest.all/stats-sub.exp: New file.
+
+ * runtest.exp: Parse --tool in time for config files to use it.
+
+Mon Apr 24 14:15:21 1995 Stu Grossman (grossman@andros.cygnus.com)
+
+ * site.tmpl: Re-install hppro config lost in previous change.
+
+Mon Apr 24 11:29:51 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * runtest.exp (multipass): New global.
+ (main loop): Make multiple passes if MULTIPASS set.
+ (VAR= processing): Allow A=b=c.
+
+Sun Apr 23 10:29:37 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * site.tmpl: Revert last change, GDB isn't the only program that
+ uses dejagnu for testing.
+
+Fri Apr 21 15:46:42 1995 Stu Grossman (grossman@rtl.cygnus.com)
+
+ * site.tmpl: Change configs for monitor-based GDB targets to use
+ common startup file.
+
+Fri Apr 21 12:16:56 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * lib/remote.exp (kermit, rlogin, rsh, telnet, tip): Don't set
+ connectmode.
+ (telnet): Send "\r\n" before attempting to match prompt.
+ (remote_open): split apart $netport into host and port,
+ and pass those values to the telnet proc.
+
+Wed Apr 19 17:30:40 1995 Stu Grossman (grossman@cygnus.com)
+
+ * site.tmpl: Add support for m68k-cpu32bug-coff.
+
+Sat Apr 15 17:44:57 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * lib/utils.exp (prune_system_crud): Only define if not already
+ defined.
+
+Tue Mar 28 17:45:37 1995 Stu Grossman (grossman@cygnus.com)
+
+ * site.tmpl: Add nosignals flag to indicate targets that can't
+ use signals. Change a bunch of append commands to set commands.
+
+Tue Mar 28 15:50:44 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * lib/remote.exp (remote_open, remote_close): New procs.
+ (download): changed to not convert contents of file to
+ s-records, as file is already supposed to contain s-records.
+
+Fri Mar 24 15:40:39 1995 Stu Grossman (grossman@cygnus.com)
+
+ * site.tmpl: Add m68k-est-coff.
+
+Fri Mar 24 13:44:52 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * doc/dejagnu.texi (Posix): Remove 3 words accidentally repeated.
+
+Thu Mar 23 22:12:07 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * aclocal.m4: Split AC_PATH_T* into two pieces, one for headers
+ and one for libraries.
+ * testuite/configure.in: Use CY_PATH_TCLH so we don't get a
+ warning looking for the libraries.
+
+Wed Mar 22 21:04:26 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * testuite/configure.in: Use CY_PATH_TCL so we can set TCL_LIBRARY
+ right and run the selftests with a freshly built expect.
+ * aclocal.m4: New support for autoconf.
+ * configure.in, doc/configure.in: Use AC_PROG_INSTALL.
+ * Makefile.in, doc/Makefile.in: Use mkinstalldirs and a BSD style
+ install program.
+ * mkinstalldirs, install-sh: Borrowed from autoconf to install
+ without using special Cygnus install program.
+ * testsuite/Makefile.in: Take out a bogus dependacy for exp_test.
+
+Tue Mar 21 09:18:15 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * lib/vxworks.exp (vxworks_transform_path): New proc.
+ (vxworks_ld): Clarify return codes. Call vxworks_transform_path
+ on argument. Handle preset passwords. Clean up main loop.
+ (vxworks_spawn): Clarify return codes. Poll board until program
+ exits. Watch for AbOrT abort() marker. Only print remaining buffer
+ contents on failure.
+
+ * contrib/test-tool: Watch for framework errors that prevent
+ $tool.sum from being created.
+
+ * runtest.exp: Treat $DEJAGNU as a global config file (which it is).
+ Don't exit if there isn't a global config file, just warn the user.
+ Error if $DEJAGNU is defined but file doesn't exist.
+
+Sun Mar 19 12:01:06 1995 J.T. Conklin (jtc@rtl.cygnus.com)
+
+ * runtest.exp: Don't use site.tmpl as a global config file. It is
+ only useful as an example.
+
+Fri Mar 17 14:41:26 1995 Mike Stump <mrs@cygnus.com>
+
+ * contrib/test-tool: Don't include expected failures in the tests
+ that now fail, but worked before section.
+
+Thu Mar 16 16:52:23 1995 Mike Stump <mrs@cygnus.com>
+
+ * contrib/test-tool: Treat expected failure to unexpected failure
+ as a test that still doesn't work.
+
+Thu Mar 16 11:29:57 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * Makefile.in, example/Makefile.in, example/calc/Makefile.in,
+ testsuite/Makefile.in, doc/Makefile.in: Don't rebuild the
+ configure scripts automatically. Change how recursion works. Add
+ .PHONY targets.
+
+Wed Mar 15 16:07:25 1995 Stu Grossman (grossman@cygnus.com)
+
+ * site.tmpl (m68k-*-coff): Add config for talking to IDP board.
+
+Wed Mar 15 16:32:41 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * Makefile.in, example/Makefile.in, example/calc/Makefile.in,
+ testsuite/Makefile.in, doc/Makefile.in: Add rules to rebuild the
+ configure scripts.
+
+Tue Mar 14 20:24:19 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * configure, example/configure, example/calc/configure,
+ testsuite/configure, doc/configure: New autoconf scripts.
+ * configure.in, example/configure.in, example/calc/configure.in,
+ testsuite/configure.in, doc/configure.in: Rewritten to be autoconf
+ based.
+ * Makefile.in, example/Makefile.in, example/calc/Makefile.in,
+ testsuite/Makefile.in, doc/Makefile.in: Rewritten to use autconf
+ variables.
+
+Fri Mar 10 06:57:53 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * contrib/test-tool: Only call date once and put the result in a
+ variable. This should help behavior when run around midnight.
+
+Tue Mar 7 11:49:59 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * contrib/test-tool (testdir): binutils tests are in `.'.
+
+Tue Feb 28 09:46:42 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * doc/dejagnu.texi (Posix): Clarify discussion of expected
+ failures. Add note about what POSIX requires with respect to
+ UNRESOLVED. Editorial changes (e.g. samp -> code).
+
+Tue Feb 21 22:46:52 1995 Brendan Kehoe (brendan@lisa.cygnus.com)
+
+ * contrib/test-tool (tool): If we're testing g++, also do a make
+ check for each of libg++, libio, and libstdc++.
+
+Fri Feb 17 14:06:50 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * lib/vxworks.exp (vxworks_ld): Update pattern used to match a
+ successful load.
+
+Fri Feb 10 10:25:53 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * contrib/test-tool: Put errors and warnings into the output.
+
+Mon Feb 6 16:34:51 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * runtest.exp (transform): Return a name based on target_alias,
+ not on target_triplet.
+ (target_alias): Default to target_triplet, not host_triplet.
+
+Thu Feb 2 11:29:49 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * lib/framework.exp (setup_xfail): Clear xfail_prms. Before this
+ change, if setup_xfail was called without a PRMS number,
+ xfail_prms would have a value from the previous (completely
+ unrelated, perhaps even for a different target) setup_xfail.
+
+Tue Jan 24 11:23:40 1995 J.T. Conklin (jtc@rtl.cygnus.com)
+
+ * doc/runtest.1: Fix typos and formatting bugs.
+
+Wed Jan 11 13:09:22 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * contrib/test-tool: Treat expected things as "pass" only if
+ -expectedpass given.
+
+Fri Jan 6 10:57:12 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * contrib/test-tool: Pass 3 -v's to runtest. Don't pass -a.
+ Save output in test-$tool.log if -keepoutput given.
+
+Fri Dec 30 12:46:06 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * runtest.exp: catch takes only two arguments; quote accordingly.
+
+Sun Dec 4 01:14:49 1994 Doug Evans <dje@canuck.cygnus.com>
+
+ * contrib/test-tool: Handle gas, gld, and binutils.
+ Treat XFAIL as PASS, XPASS as FAIL.
+ Always pass options to `comm' as first argument.
+
+ * lib/remote.exp (*): Rename `retries' to `tries'.
+ (rsh): Mark as deprecated.
+ (rcp_download): Distinguish between failure and success in verbose
+ message. Call proc verbose, don't use global.
+ (rsh_exec): New proc.
+
+ * lib/framework.exp (warning_threshold, perror_threshold): New vars.
+ (record_test): Use them.
+ (reset_vars): Reset them.
+ (get_warning_threshold, set_warning_threshold): New procs.
+
+Mon Nov 14 00:21:05 1994 Doug Evans <dje@canuck.cygnus.com>
+
+ * lib/framework.exp: Lots of formatting cleanup.
+ (unknown): Delete unnecessary calls to close_logs, cleanup, exit.
+ (warning, perror): errorInfo is global.
+ (note): New proc.
+
+ * runtest.exp: Document perror vs send_error quandary.
+ (unresolvedcnt): Initialize.
+ (configfile): Use consistently in place of site.exp.
+ (verbose): Call clone_output instead of perror.
+ (load_file): New proc.
+ (argument parsing): Always call send_error for error messages.
+ (all loading of files, except testcases): Consistently exit if tcl
+ error occurs.
+ (all loading of files): Consistently handle errorInfo.
+ (main loop): Delete useless test for $test_name == "".
+
+Wed Nov 2 08:49:06 1994 Doug Evans <dje@canuck.cygnus.com>
+
+ * lib/udi.exp (shell_id): Delete.
+ (mondfe): Delete unneeded global's. Delete references to `shell_id'.
+ (mondfe_download): New argument `shell_id'.
+ Move verbose messages to level 2. Tighten up pattern matching on
+ text coming back from target. Don't set `timeout'. Only log
+ expect buffer contents if connection failed.
+ (exit_mondfe): Delete unneeded global's. New argument `shell_id'.
+ (exit_montip): Likewise.
+ * lib/remote.exp (telnet): Use -gl for shell prompt pattern.
+ (rlogin, rsh): Likewise.
+ (exit_remote_shell): Delete nilpotent resetting of `shell_id'.
+
+Fri Oct 28 10:38:41 1994 Rob Savoye (rob@cygnus.com)
+
+ * runtest: Make it an error if runtest.exp doesn't exist.
+
+Fri Oct 21 23:15:27 1994 Doug Evans <dje@canuck.cygnus.com>
+
+ * lib/utils.exp (prune_system_crud): Fix ld.so pattern to catch
+ multiple occurrences in a row.
+
+Fri Oct 14 17:26:38 1994 Doug Evans <dje@canuck.cygnus.com>
+
+ * runtest.exp (test_name): Delete unnecessary initialization.
+ * lib/framework.exp (clone_output): Reformat comment.
+ (reset_vars): Delete `test_name'.
+ (log_summary): Delete `tool.sum'.
+ (cleanup): Fix comment.
+ (record_test): New (internal) proc (taken from pass/fail).
+ Test `warncnt',`errcnt' before `xfail_flag'.
+ Don't incr `passcnt' prematurely.
+ (pass, fail, xpass, xfail): Call it.
+ (untested, unresolved, unsupported): Don't call xfail.
+ * lib/utils.exp (grep): Don't pass trailing ".*" to regexp.
+ (prune_system_crud): New proc.
+
+Fri Oct 7 19:19:12 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * lib/utils.exp (runtest_file_p): Add support for glob style
+ expressions.
+
+Mon Sep 26 12:03:16 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * runtest: Handle relative paths in $0.
+
+Sun Sep 25 16:51:11 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * runtest.exp: Add more docs on complexity of argument parsing.
+ Parse --host, --objdir, --srcdir, --target, and --verbose before
+ sourcing any config files. Don't let config files override --host
+ and --target. Don't call `verbose' until it's useful. Call
+ config.guess after $objdir/site.exp has been sourced.
+ Delete unused variable `match'. Reword verbose message for --name.
+ Delete existence check of `host_triplet' and `target_triplet'.
+
+Sat Sep 24 14:23:49 1994 Doug Evans (dje@cygnus.com)
+
+ * runtest.exp: Lots of whitespace cleanup. Update copyright.
+ Exit with nonzero status for illegal arguments and if we can't
+ determine the host.
+ (verbose): Add two new arguments (-n, --).
+ * lib/remote.exp: Formatting cleanup.
+ (exit_remote_shell): Add a note about `shell_id'.
+ * lib/udi.exp: Formatting cleanup.
+ (mondfe): Send message when trying to connect.
+ Watch and print more error messages coming from `mondfe'.
+ (mondfe_download): Use "verbose -n" so the pretty dots appear on
+ one line. Fix regexp in "Clear.*BSS section" message.
+
+Tue Sep 13 10:51:47 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * lib/framework.exp (log_summary): Clean up code that handles
+ `testcnt'.
+ (xfail, unsupported, untested): Don't set `exit_status',
+ these aren't errors.
+
+ * runtest.exp: Sort options in --help.
+
+Mon Sep 12 12:25:22 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * runtest.exp: Delete special handling of *.[Ccso] arguments.
+ Accept new argument: foo.exp[=arg(s)].
+ (all_runtests): New global.
+ (runtests): Records arguments for each .exp script.
+ (main test loop): Move setting of srcdir out of loop.
+ Set up `runtests' for each script.
+ * lib/utils.exp (find): Remove unnecessary "\n" in verbose message.
+ (runtest_file_p): New proc.
+
+Wed Sep 7 10:41:33 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * runtest.exp (verbose): Handle leading -'s in message.
+
+Mon Jul 18 11:16:02 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
+
+ * lib/vxworks.exp: no need to use system, stty is an expect
+ builtin and can be called directly.
+
+Thu Jun 30 15:23:19 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
+
+ * lib/bug.exp: replaced "rm -foreach" with "rm -f".
+
+Tue Jun 14 12:38:44 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * doc/dejagnu.texi: Fix a few typos and omissions.
+
+Tue Jun 7 13:55:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * Makefile.in (mostlyclean, realclean): New targets.
+ * doc/Makefile.in, example/Makefile.in: Likewise.
+ * example/calc/Makefile.in, testsuite/Makefile.in: Likewise.
+
+Mon Apr 25 17:11:30 1994 Bill Cox (bill@cygnus.com)
+
+ * Makefile.in: Add FSF standard comment block.
+ * example/calc/Makefile.in: Define and use EXPECT and
+ RUNTEST variables, so 'make check' will use tools in the
+ current objdir tree if they're present.
+ * lib/remote.exp: Add rcp_download proc, to download a
+ file using remote 'cp'. This was first used for the
+ Lynx cross-host tests.
+ * testsuite/Makefile.in: Update copyright date.
+ * testsuite/runtest.all/options.exp: Update copyright date.
+
+Wed Apr 13 18:05:44 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * runtest: Pass ${1+"$@"} instead of "$@", because many shells
+ incorrectly pass an empty string when no arguments were specified.
+
+Wed Apr 13 11:46:11 1994 Bill Cox (bill@cygnus.com)
+
+ * lib/remote.exp (rcp_download): New proc for using 'rcp'
+ to download (used first for Lynx cross-testing).
+
+Tue Apr 12 13:27:15 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * Makefile.in (TCLIBRARY): Define and use.
+
+Wed Mar 9 13:08:54 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * runtest.exp: Misc. formatting/typo cleanups.
+ Process ~/.dejagnurc and $base_dir/site.exp before command line
+ options and clarify search order of all config files.
+ Clean up verbose output for -v, -srcdir, -host, and -target options.
+
+Mon Feb 14 20:37:10 1994 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * runtest.exp: Re-write init file search/loading code.
+
+Tue Feb 8 19:27:07 1994 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * runtest.exp: Move transform from lib/utils.exp so it can be used
+ in config files.
+
+Thu Jan 20 20:05:39 1994 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * runtest.exp: findfile: New proc to be used in config files.
+
+Tue Jan 18 14:46:12 1994 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * runtest.exp: Fix so things don't bomb if whoami doesn't exist.
+
+Mon Jan 17 15:26:50 1994 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * lib/framework.exp (setup_xfail): Re-write so it works correctly
+ with numbers in the config string.
+
+Mon Jan 10 21:29:08 1994 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * lib/framework.exp: Create exp_continue if it doesn't exist.
+ * runtest.exp: Don't try to print errorInfo unless it exists.
+
+Tue Jan 4 16:01:40 1994 Rob Savoye (rob@rtl.cygnus.com)
+
+ * All files: Updated to 1.1.3. This version works with Tcl7.3 and
+ Expect5.2.
+
+Sat Jan 1 19:53:40 1994 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * lib/framework.exp: Fixed log_summary to cleanup all the way.
+ setup_xfail now only use canonical names, catch errors from
+ sourcing $tool_exit and $tool_version.
+ * runtest.exp: Changed the order of sourcing init files. Removed
+ all references to target_alias or host_alias. uses target and host
+ triplet only, uses config.guess to get a host type.
+
+Thu Dec 23 18:26:24 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * runtest (debug): Add an environment variable DEJAGNULIBS to
+ point to where runtest.exp and the rest live.
+
+Wed Dec 15 20:38:49 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * runtest.exp: Fix signal handling so only one ^C is required and
+ it actually exists after printing the summary.
+
+Fri Dec 3 20:58:27 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * runtest.exp: Only consider a TCL_ERROR to be a sign of a problem
+ worth handling. This is when sourcing the test case.
+
+Thu Dec 2 14:16:20 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * runtest.exp: If the verbose level is greater than 2, display
+ debugging output to the screen.
+
+Wed Dec 1 16:04:08 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * runtest.exp: Change error handling to use the return from
+ "catch" rather than depending on errorInfo.
+
+Fri Nov 19 15:08:34 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * site.tmpl: Add LDFLAGS "-r" to vxworks targets.
+
+Mon Nov 15 19:43:28 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * lib/debugger.exp: Add dumpvars which dumps the values of
+ variables specified by a regular expression.Add dumpvars
+ which dumps the body of procedures specified by a regular
+ expression.
+ * Makefile.in: Install site.exp as only config file.
+ * runtest.exp: look for site.tmpl in $srcdir, not site.exp in
+ $objdir.
+ * lib/framework.exp: Make istarget and isnative procs use
+ $target_alias rather than target_triplet.
+ * lib/framework.exp: Make warning and perror keep count. Have
+ pass or fail procs check, and change to unresolved.
+
+Mon Nov 15 10:20:42 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * runtest.exp: corrected a few typos in the comments. Added
+ test for getting user name from the environment first. Now
+ checks for USER and the LOGNAME. If unable to get the logname
+ from the environment, then try whoami and who am i
+
+Thu Nov 4 13:38:32 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * runtest: Use sed rather than expr to get the execution path and
+ the runtest name cause expr doesn't seem to work portably on all
+ machines.
+
+Wed Nov 3 11:27:34 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * Makefile.in, configure.in: Install and build with new config
+ system.
+ * config/mt-*: Set default connection parameters and name
+ transformation.
+ * lib/framework.exp: Change "error" proc to "perror" so I can use
+ Tcl's builtin error handling.
+ * runtest.exp: Re-write error handling so it's now real
+ descriptive with errors and misses nothing. Add support for new
+ config file system. Up version number to 1.1.
+ * runtest: General cleanup. Add support for passing the config
+ name down to runtest.exp.
+
+Sat Oct 16 07:47:38 1993 David J. Mackenzie (djm@thepub.cygnus.com)
+
+ * doc/runtest.1: Fix typos in font changes (\fi where \fI was meant).
+
+Wed Oct 13 11:00:55 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * runtest.exp: insert missing space
+ * lib/framework.exp: made proc verbose work as expected. Now will
+ display a message if the level is = or > than the verbose level.
+ * lib/utils.exp: replaced if $verbose>X then { send_user "foo\n" }
+ stuff with the verbose "foo" X proc call
+
+Mon Oct 11 17:11:37 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * runtest.exp: fixed stupid scoping bugs.
+
+Mon Oct 11 16:26:25 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * runtest.exp: fixed "$test_result" bug, and minor reformatting
+ changes to help make the file more readable
+
+Sat Oct 9 18:43:31 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * configure.in: recognize mips*- instead of mips-
+
+Mon Sep 27 21:09:26 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * lib/bug.exp: Add new file for procs related to "bug" boot
+ monitor.
+
+Wed Sep 22 21:01:43 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * lib/framework.exp: Added m68k-idp-* to target list.
+ * configure.in: Added m68k-idp-* to target list.
+ * config/mt-m68k-abug-aout: Fixed objobjcopy to be objcopy.
+ * config/mt-m68k-abug-coff: Fixed objobjcopy to be objcopy.
+
+Wed Sep 22 12:10:34 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * lib/framework.exp: Folded in test counting mechanism.
+
+Tue Sep 21 19:41:07 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * lib/vxworks.exp: Added a vxworks_spawn proc to execute tasks.
+
+Mon Sep 20 21:28:23 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * lib/vxworks.exp: Prompt user for password if the default login
+ fails.
+
+Mon Sep 13 11:30:37 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * runtest.exp: add global testcnt variable.
+ * lib/framework.exp: add testcnt mechanism. Gives a total
+ number of testcases run in summary. incremented by the
+ pass/fail/etc procs. Also added a "Tool version" string
+ in the summary.
+
+Thu Sep 9 12:37:27 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * lib/utils.exp: Added new procs for pwd{} and absolute{}.
+ * lib/utils.exp: Removed pwd{} proc, added a download{} proc.
+
+Mon Sep 6 12:55:54 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * lib/utils.exp: fixed scoping problem of missing ""'s
+ nasty little bugger. broken since the start.
+
+Fri Sep 3 16:47:07 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * lib/framework.exp: Added support for the h8/500.
+
+Fri Sep 03 10:42:12 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * configure.in: (h8300-*-*) (h8300h-*-*) (h8500-*-*) targets added.
+
+ * config/mt-h8300hms: new file for h8300-hitachi-hms support.
+ * config/mt-h8500hms: new file for h8500-hitachi-hms support.
+ * config/mt-h8300hhms: new file for h8300h-hitachi-hms support.
+
+Tue Aug 31 16:57:12 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * lib/utils.exp: Add a proc to kill process started within the
+ current shell session.
+
+Sun Aug 29 23:10:35 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * lib/remote.exp: wait after exiting the remote shell.
+
+Sun Aug 15 22:27:23 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * lib/framework.exp: Numeric column in summary line up and only
+ print if the sub total is greater than zero.
+
+Tue Jul 20 15:32:51 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * lib/framework.exp: Added code for initial POSIX (PCTS) support.
+
+Mon Jul 19 09:31:48 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * remote.exp: Added a supplied patch to allow specifing a port
+ to the telnet command.
+
+Mon Jul 12 17:54:58 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp: Remove support for command line options to use "++"
+ as a prefix. Also removed all the old code for the --diff option.
+ The --debug option can now be abbreviated to just -d.
+
+Sun Jul 11 20:49:49 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp: Exit after printing the version numbers.
+ * lib/utils.exp: Ignore extraneous words in the argument passed.
+
+Thu Jul 8 07:17:17 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * lib/framework.exp: Add support for the h8/300.
+
+Tue Jun 29 15:04:05 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest: Added Dje's patch so the shell stops stripping out the
+ quotes from the command line.
+
+Sun Jun 13 21:05:25 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp: Remove runtests option. Use any valid file name on
+ the command line instead.
+ * runtest: Add support for the Tcl debugger from the command line.
+
+Thu May 27 20:01:51 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * Makefile.in: Make the release image of the testsuites from the
+ special stubs.
+
+Sun May 23 18:40:01 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp: Don't flag successful return codes as errors.
+ * runtest: Don't look for expect binary anymore.
+
+Tue May 11 17:31:29 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * runtest: Pass "--" to $expectbin.
+
+Fri May 7 08:19:37 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (FLAGS_TO_PASS): Added CC, CFLAGS, LDFLAGS, RUNTEST,
+ RUNTESTFLAGS.
+ * example/Makefile.in (FLAGS_TO_PASS): Was being used, but was
+ never defined.
+ * example/calc/Makefile.in: (CFLAGS): Removed -I arguments.
+ (.c.o): Use required -I arguments.
+ (PROG): Pass CFLAGS to CC.
+
+Tue May 4 22:51:06 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp: load_lib exits if it can't find the file. It also
+ finds library files if srcdir = .
+
+Tue Apr 27 08:59:32 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (FLAGS_TO_PASS): Define.
+
+Fri Apr 23 13:12:27 1993 Mike Werner (mtw@deneb.cygnus.com)
+
+ * lib/framework.exp:
+ Made cosmetic changes to procedure "diff_logs".
+
+Wed Apr 21 18:05:30 1993 Rob Savoye (rob@cygnus.com)
+
+ * runtest: Looks in $rootme/../../expect and $rootme/../expect and
+ if there is one, it uses that to run runtest.exp.
+
+Wed Apr 21 12:34:10 1993 Mike Werner (mtw@deneb.cygnus.com)
+
+ * runtest.exp:
+ Changed how -diff and -mail affect the printing and
+ mailing of logs.
+ * lib/framwork.exp:
+ Changed format of the output of the diff log. Made
+ minor changes to "diff_logs" to acommodate the changes
+ to runtest.exp (above).
+
+Mon Apr 19 18:45:10 1993 Mike Werner (mtw@deneb.cygnus.com)
+
+ * runtest.exp:
+ Added the ability to specify, as an option parameter, the name
+ of the previous summary log to diff against. Added a call to
+ "close_logs" to the signal handlers. Enabled -mail option.
+ Cleaned up some comments.
+ * lib/framework.exp:
+ Added procedure "mail_file" for mailing test log summaries.
+ Removed support for automatically generating log file names with
+ embedded time/date stamps. Cleaned up "diff_logs".
+
+Sun Apr 18 19:54:17 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp: Fixed so signal trapping now works again. Cleaned
+ up configuration stuff and how it finds the site.exp file.
+ * Makefile.in: Remove unneeded macro definitions.
+
+Fri Apr 16 15:11:52 1993 Mike Werner (mtw@deneb.cygnus.com)
+
+ * lib/framework.exp:
+ Added the procedures "diff_logs", "open_logs", and "close_logs".
+ Changed the name of the procedure "sum" to "log_summary".
+ Changed the name of the procedure "alldone" to "cleanup".
+ "Cleanup", formerly "alldone", no longer exits; runtest
+ explicitly exits.
+ * runtest.exp:
+ Now calls "open_logs", "close_logs", and "diff_logs" to do the
+ respective goodies. We also now make explicit calls to "cleanup"
+ and exit. Enabled --diff command line option which when used
+ will cause a call to the procedure "diff_logs".
+
+Sun Apr 11 17:17:20 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * Makefile.in: Removed runtest target. Cleaned up install
+ procedure.
+ * runtest.exp: No longer uses --config option.
+ * runtest: New bourne shell script to start runtest.exp.
+
+Thu Apr 8 18:12:24 1993 Mike Werner (mtw@deneb.cygnus.com)
+
+ * lib/utils.exp: the list of directories returned by getdirs now
+ contains only directories that allow read permission.
+
+Wed Apr 7 18:30:45 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp: Now looks for init files by ${target_os}.exp as
+ well as ${target_os}-${tool}.exp.
+ * config/mt-*: Added macros for COPY and DEMANGLE, new
+ binutils.
+
+Fri Apr 2 12:23:22 1993 Mike Werner (mtw@deneb.cygnus.com)
+
+ * lib: relocated old-dejagnu.exp to devo/gcc/testsuite/lib
+
+Mon Mar 29 14:59:23 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * framework.exp: Added tests for spectra.
+
+Thu Mar 25 14:16:54 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp: Fixed command line option processing. Now
+ things like CFLAGS="-v -a" should work.
+
+Thu Mar 25 12:40:50 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * lib/udi.exp (mondfe): Return -1 on failure. Don't remove *_soc
+ files.
+ (mondfe_download): Fixed invalid expect usage which could never
+ have worked.
+
+Wed Mar 24 14:11:46 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp: Added --target and --host for specifying the config
+ strings. The old --target is now --name.
+ * lib/framework.exp: Moved all the host/target naming stuff from
+ runtests.exp.
+ * runtest.exp: Fixed bug so CFLAGS="-v" works. I changed the way
+ the verbose pattern works in $argv.
+
+Tue Mar 23 08:48:09 1993 Fred Fish (fnf@cygnus.com)
+
+ * configure.in: Use host makefile fragment config/mh-sysv4
+ on *-*-sysv4* configurations.
+ * config/mh-sysv4: New host makefile fragment for SVR4 systems.
+
+Mon Mar 22 23:26:58 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: add dvi, check and installcheck targets
+
+ * doc/Makefile.in: add defines for MAKEINFO, TEXI2DVI
+
+Sun Mar 21 17:44:11 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp: New command line option --ignore. Ignore any tests
+ specified this way.
+ * lib/framework.exp: Now uses puts send_error of send_user for
+ some procs. Now warnings and errors go to stderr, and can
+ be redirected. They still go to the logs.
+
+Tue Mar 16 18:07:56 1993 Rob Savoye (rob at poseidon.cygnus.com)
+
+ * runtest.exp: Finds site.exp file with new install.
+ * Makefile.in: Installs much better.
+
+Tue Mar 9 08:17:04 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (MAKEOVERRIDES): Set to be empty.
+
+Mon Mar 8 17:40:41 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * lib/vrtx.exp: Spectra shell procedures.
+
+Mon Mar 8 19:26:41 1993 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in, config/{mt-a29k-udi, mt-frwcom-aout, mt-i386-aout,
+ mt-i960-nindy, mt-i960-vx, mt-m68k-abug-aout, mt-m68k-abug-coff,
+ mt-m68k-aout, mt-m68k-coff, mt-m68k-vx, mt-mips, mt-sparc-aout,
+ mt-sparc-vx, mt-sparclite} (GDBFLAGS): The default is -nx, to not
+ load whatever random '.gdbinit' file might happen to be in the
+ directory where the dejagnu tests are run. If tests require
+ a specific init file, they should load them explicitly.
+
+Sun Mar 7 15:16:42 1993 Rob Savoye (rob@cygnus.com)
+
+ * runtest.exp, Makefile.in: Now sets default for objdir.
+
+Sun Feb 28 15:30:00 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp: Now find site.exp in a path list. Also now supports
+ using a short config file in each directory to override options.
+ * Makefile.in, configure.in: Removed link for lib directory. Added
+ doc as a subdir, runtest and site.exp now built as a dependancy,
+ rather than by configure.
+
+Thu Feb 25 11:07:30 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/mt-mips: New file for mt-idt-ecoff target.
+ * configure.in (mips-idt-ecoff): New target; uses mt-mips.
+ * runtest.exp: If mips-idt-ecoff, set target_abbrev to mips.
+ * runtest.exp: Print any error produced by ${tool_init}.
+ * lib/remote.exp (kermit): Made work.
+
+Mon Feb 22 17:11:18 1993 Mike Werner (mtw@poseidon.cygnus.com)
+
+ * configure.in: Removed unneccesary code from configure.in
+
+Mon Feb 22 07:54:03 1993 Mike Werner (mtw@poseidon.cygnus.com)
+
+ * devo/dejagnu: made modifications to framework, etc., to allow
+ it to work properly given the reorganization of deja-gnu and the
+ relocation of the testcases from deja-gnu to a "tool" subdirectory.
+
+Sun Feb 21 11:15:22 1993 Mike Werner (mtw@poseidon.cygnus.com)
+
+ * devo/dejagnu: Initial creation of devo/dejagnu.
+ Migrated dejagnu testcases and support files for testing software
+ tools to reside as subdirectories, currently called "testsuite",
+ within the directory of the software tool. Migrated all programs,
+ support libraries, etc. beloging to dejagnu proper from
+ devo/deja-gnu to devo/dejagnu. These files were moved "as is"
+ with no modifications. The changes to these files which will
+ allow them to configure, build, and execute properly will be made
+ in a future update.
+
+Wed Feb 17 10:51:13 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * gdb.t02/whatis.exp, gdb.t03/ptype.exp: Remove expected failures
+ for mips-*-* that now work (gcc was fixed to distinguish int and
+ long in COFF debugging output).
+
+Tue Feb 16 17:31:54 1993 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t21/demangle.exp (test_gnu_style_demangling,
+ test_cfront_style_demangling): Add tests for some cases that
+ involve const that were previously broken.
+
+Mon Feb 15 14:09:33 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * gdb.t00/default.exp (attach, core-file, r, run, target core):
+ Add more error messages used by cross gdb.
+
+Fri Feb 12 11:17:05 1993 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t21/demangle.exp: Add yet more cfront demangling tests.
+
+Thu Feb 11 12:23:53 1993 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t21/demangle.exp: Add new demangling tests, for various
+ gnu and cfront patterns, that match recent bug fixes.
+ * configure.in (configdirs): Add gdb.t23.
+ * gdb.t23/ {Makefile.in, configure.in, in-gdbme.cc,
+ templates.exp}: New test case to testing templates. Currently
+ contains just the framework, but no tests.
+ * gdb.t21/demangle.exp (demangle): Fix proc so that demangling
+ failures don't trigger two failure reports, one erroneously
+ indicating the cause as a timeout.
+ * gdb.t21/demangle.exp (various): Print number of correct
+ demanglings when suppressing remaining tests.
+ * gdb.t21/demangle.exp (test_cfront_style_demangling):
+ New test for cfront style demangling.
+ * gdb.t21/demangle.exp (do_test): Call cfront style demangling
+ test.
+
+Wed Feb 10 18:28:40 1993 Stu Grossman (grossman at cygnus.com)
+
+ * gdb.t11/list.exp (list filename:function; wrong filename not
+ rejected): Revise expected failure profile. All systems are
+ expected to fail.
+
+Mon Feb 8 21:25:47 1993 Stu Grossman (grossman at cygnus.com)
+
+ * gdb.t00/help.exp (help set): Look for prompt on next line to
+ prevent timeout error.
+ * gdb.t11/list.exp (list filename:function; wrong filename not
+ rejected): Document expected failure for general case. Set
+ expected failure for sunos.
+
+Wed Feb 3 09:42:14 1993 Mike Stump (mrs@rtl.cygnus.com)
+
+ * g++.niklas, configure.in: Add some test cases from Niklas.
+
+Mon Feb 1 18:40:27 1993 Mike Werner (mtw@rtl.cygnus.com)
+
+ * code_quality.exp, compile.exp, execute.exp, noncompile.exp,
+ special.exp, unsorted.exp: added "unset subdir_created".
+
+Fri Jan 29 14:20:11 1993 Mike Werner (mtw@rtl.cygnus.com)
+
+ * Makefile.in (install): changed the sed command, which creates
+ $(target-alias)-runtest, to have the installed
+ $(target-alias)-runtest call $(bindir)/runtest.exp instead of
+ $(srcdir)/runtest.exp . This worked earlier but was broken by a
+ change to $(EXPECT) .
+
+Thu Jan 28 14:24:56 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (info, install-info): Deleted extraneous @'s.
+
+Thu Jan 28 08:29:57 1993 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in (CC_FOR_TARGET, CFLAGS, CXX_FOR_TARGET, CXXFLAGS,
+ CXX, GCC_FOR_TARGET, FLAGS_TO_PASS): Match definitions in
+ upper level devo/Makefile.in.
+ * config/mt-unix (EXPECT): Remove definition, it is set by
+ Makefile.in to use the latest built version.
+ * Makefile.in (CHILL_FOR_TARGET, CHILLFLAGS, CHILL_LIB): Match
+ definitions in upper level devo/Makefile.in.
+
+Wed Jan 27 21:48:15 1993 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in (clean): Test if directory exists before trying
+ to run submake in it.
+ * gdb.t00/teststrategy.exp: Add cases that work when gdb is
+ compiled with ALIGN_STACK_ON_STARTUP defined. Fix "print foo"
+ expected output to match current gdb. Fix tests for finding
+ pathname to gdb executable to use the TCL "file" command.
+ * gdb.t20/classes.exp: Change error when binfile does not
+ exist to be a simple fail instead.
+ * tcl.tests/Makefile.in (tcltest): Use CC_FOR_TARGET.
+ * tcl.tests/Makefile.in (Makefile): Add target.
+ * gdb.t30/chexp.exp: Set up expected failure for printing
+ uninitialized convenience variables.
+ * gdb.t31/chillvars.exp: Set up expected failure for references
+ to string4, which chill compiler doesn't handle yet. Add tests
+ for string repetition operator.
+ * gdb.t31/in-gdbme.ch: Comment out string4, not handled yet.
+
+Mon Jan 25 15:12:41 1993 Mike Werner (mtw@rtl.cygnus.com)
+
+ * gcc.unsorted/unsorted.exp
+ gcc.special/special.exp
+ gcc.noncompile/noncompile.exp
+ gcc.execute/execute.exp
+ gcc.compile/compile.exp
+ gcc.code_quality/code_quality.exp:
+ Modified to properly find source code for the test cases,
+ create the appropriate subdirectories to hold the compiled
+ testcases, and delete the subdirectories when finished.
+
+Thu Jan 21 18:05:54 1993 Mike Werner (mtw@rtl.cygnus.com)
+
+ * Makefile.in: cosmetic changes.
+ * gcc.code_quality/code_quality.exp: repalced a "source xxx"
+ with a "load_lib xxx".
+ * gcc.compile/compile.exp: replaced a "source xxx" with a
+ "load_lib xxx".
+
+Thu Jan 21 08:03:16 1993 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in (CC, CXX): Change to CC_FOR_TARGET, CXX_FOR_TARGET.
+ * Makefile.in (FLAGS_TO_PASS): Add AR_FOR_TARGET, CC_FOR_tARGET
+ CXX_FOR_TARGET, RANLIB_FOR_TARGET.
+ * {gdb.t00, gdb.t01, gdb.t02, gdb.t03, gdb.t04, gdb.t05, gdb.t06,
+ gdb.t07, gdb.t08, gdb.t09, gdb.t10, gdb.t11, gdb.t12, gdb.t13,
+ gdb.t15, gdb.t16, gdb.t20, gdb.t21, gdb.t22}/Makefile.in:
+ Add Makefile target, dependencies, and rules, replace CC with
+ CC_FOR_TARGET and CXX with CXX_FOR_TARGET.
+ * gdb.t03/ptype.exp: Add tests for string constants and array
+ constants.
+ * gdb.t16/printcmds.exp: Add tests for string constants and array
+ constants.
+ * Makefile.in (CHILL): Change to CHILL_FOR_TARGET.
+ * Makefile.in (FLAGS_TO_PASS): Add CHILL_FOR_TARGET.
+ * {gdb.t30, gdb.t31}/Makefile.in: Add Makefile target, dependencies,
+ and rules. Replace CHILL with CHILL_FOR_TARGET.
+ * gdb.t31/chillvars.exp: Set print address off, add tests for
+ strings.
+ * gdb.t31/in-gdbme.ch: Add some initialized string variables.
+
+Tue Jan 19 14:07:38 1993 Mike Werner (mtw@rtl.cygnus.com)
+
+ * Makefile.in: corrected anchoring error in sed script, within
+ the "install" rule, which created the the file {mach}-runtest
+
+Fri Jan 15 21:16:51 1993 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t04/setvar.exp: Minor changes to match current syntax for
+ printing array-of-char in string form.
+ * gdb.t16/printcmds.exp: Fix one test case to match bug fix.
+ * gdb.t30/chexp.exp: Disable tests that check for control
+ sequence form of character literals, not supported in GNU Chill.
+
+Wed Jan 13 21:33:05 1993 Mike Stump (mrs@cygnus.com)
+
+ * doc/dejagnu.texi, Makefile.in: Change .../gcc to .../xgcc.
+
+Wed Jan 13 08:21:00 1993 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in (CHILLFLAGS): Add appropriate -L arg to find
+ libchill.a, if a freshly built one exists.
+ * gdb.t31/Makefile.in (LIBCHILL, LIBS): Define local defaults.
+
+ * Makefile.in (runtest): Fix to properly find freshly built
+ "expect" binary.
+
+Tue Jan 12 12:51:46 1993 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in (CPLUS): Remove macro.
+ * Makefile.in (CC, CXX, GDB, EXPECT): Use freshly build binaries
+ if available.
+ * Makefile.in (CFLAGS, CXXFLAGS, GDBFLAGS): Provide default
+ flags to go with CC, CXX, and GDB respectively.
+ * Makefile.in (FLAGS_TO_PASS): Add CXX, CXXFLAGS, LINK.
+ * Makefile.in (info, subdir_do, subdirs): Use rootme and
+ rootsrc to find tool directories, use FLAGS_TO_PASS.
+ * Makefile.in (runtest): Use new EXPECT macro.
+ * Makefile.in: Other minor macro rearrangements.
+ * config/{abug-g++.exp, aout-g++.exp, coff-g++.exp, mt-a29k-udi,
+ mt-i960-nindy, mt-i960-vx, mt-m68k-abug-aout, mt-m68k-abug-coff,
+ mt-m68k-aout, mt-m68k-coff, mt-m68k-vx, mt-unix, nind-g++.exp,
+ udi-g++.exp, unix-g++.exp, vx-g++.exp}, doc/deja-gnu.texi,
+ g++.mike/{misc2.exp, misc8.exp, misc9.exp}, g++.old-deja/tests/
+ g++.sun/g++.frag/1076585.C, gdb.t20/Makefile.in, gdb.t21/
+ Makefile.in, gdb.t22/Makefile.in, lib/mike-g++.exp:
+ Use CXX rather than CPLUS, CPLUSPLUS, or C++, use CXXFLAGS
+ rather than CFLAGS or CPLUSFLAGS or C++FLAGS.
+ * Makefile.in (CHILL): Use freshly built binaries if available.
+ * Makefile.in (CHILLFLAGS): Provide default flags for CHILL.
+ * Makefile.in (FLAGS_TO_PASS): Add CHILL, CHILLFLAGS.
+
+Mon Jan 11 18:02:48 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * expect.tests/exp-after.test, exp-before.test, log-file.test,
+ send-exp.test, spawn.test: Test case for expect tests.
+ * expect.tests/exp-test.exp: Test driver for expect tests.
+ * expect.tests/Makefile.in, configure.in: Configure
+ support.
+ * expect.tests/exp-test.c: Simple interactive program for expect
+ tests.
+ * expect.tests: New directory.
+ * config/unix-expect.exp: New tool.
+
+Fri Jan 8 16:41:51 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/udi-gdb.exp (gdb_start): don't require "UDI socket" in
+ the startup message.
+
+Wed Jan 6 08:53:08 1993 Fred Fish (fnf@cygnus.com)
+
+ * {gdb.t01, gdb.t02, gdb.t03, gdb.t04, gdb.t05, gdb.t06, gdb.t07,
+ gdb.t11, gdb.t12}/Makefile.in: Add explicit "all" target to
+ Makefiles missing it, supply explicit rules to make object files
+ from source files to subvert bug in GNU make that assumes gcc
+ style "-c -o" handling.
+ * tcl.texts/Makefile.in: Look in tcl sibling dir for library,
+ rather than picking up whatever happens to be installed.
+ * config/unix-gdb.exp (gdb_start): Temporarily increase timeout
+ by 60 seconds to accommodate heavily loaded or otherwise slow
+ systems during gdb startup. A similar fix was also installed in
+ a 14-Dec change, but mysteriously disappeared.
+ * gdb.t31/chillvars.exp: Go ahead and try to run test on non-
+ DWARF systems, as long as there is a chill executable to test.
+
+Mon Jan 4 17:19:08 1993 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t30/chexp.exp (test_print_accept, test_print_reject):
+ Convert to varargs function.
+ * gdb.t30/chexp.exp (test_arithmetic_expressions): New tests.
+ * gdb.t31/Makefile.in (CHILL, CHILLFLAGS): Provide defaults.
+ * gdb.t31/chillvars.exp (test_UBYTE): Remove FIXME`s, fixed.
+ * gdb.t31/in-gdbme.ch (scalar_arithmetic, write_arrays,
+ booleans): Add procs for testing.
+ * lib/gdb.exp (runto): Don't expect hex format for breakpoint
+ address.
+
+Sun Jan 3 14:24:53 1993 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t30/chexp.exp (test_float_literals_accepted): Use
+ literals in comparisons, rather than printing their values
+ directly. Avoids spurious failures due to conversion or
+ representational differences between machines types.
+
+Sat Jan 2 22:56:53 1993 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t30/chexp.exp (test_float_literals_accepted): New test.
+ * gdb.t31/in-gdbme.ch (testvars): Add floating point assigns.
+
+Thu Dec 31 08:30:08 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t00/help.exp: Track recent gdb changes in description
+ of "set" command for assigning expression values to variables.
+
+Wed Dec 30 13:17:36 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t00/gdbvars.exp: New tests for convenience variables and
+ history value list.
+ * gdb.t30/chexp.exp: Add tests for convenience variables and
+ history value list.
+
+ * config/unix-gdb.exp (gdb_exit): Put escaped quotes around
+ command to send to gdb inside a catch. Otherwise the newline
+ at the end of the quit command gets eaten.
+ * lib/gdb.exp (gdb_test): Replace bogus message about the
+ gdb process no longer existing with a error that reports the
+ real reason for the send command failing. Remove use of
+ "$command" in the expect pattern, since it may contain sequences
+ that look like regular expressions but should not be interpreted
+ as regular expressions.
+
+Tue Dec 29 22:49:56 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: define FLAGS_TO_PASS
+
+Sun Dec 27 11:52:45 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * lib/udi.exp: Fixed so that it downloads stably. Added better
+ error trapping. Works with simulator or demo board.
+ * runtest.exp: Cleaned up handling of signals during the init
+ phase.
+ * lib/old-dejagnu.exp: Fixed bug that made $CFLAGS accumulate
+ repititions of the same flags.
+ * runtest.exp: cleans up temp file better.
+ * config/udi-g++.exp: Minor bug fixes. Doesn't die it it can't
+ connect now.
+
+Sat Dec 26 19:21:14 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * config/vx-gdb.exp: Now it exits if it can't connect to the
+ target.
+ * most everything: Made *all* (whew) error and warning messages
+ use new procedures. These messages are controlled by --all rather
+ than --verbose.
+ * lib/framework.exp: Fixed clone_output so everything gets sent to
+ the correct files. Also added a procedure for standard warning and
+ error messages.
+
+Sat Dec 26 11:16:55 1992 Fred Fish (fnf@cygnus.com)
+
+ * tcl.tests/tcltest.c (Tcl_DumpActiveMemory): Remove extern
+ declaration, which is now incompatible with tcl.h.
+
+
+Tue Dec 22 22:36:42 1992 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in (subdir_do): Remove blank line after target,
+ that gives older makes indigestion.
+ * configure.in: When running "make", use environment definition
+ of MAKE if one exists, default to "make" if not in environ.
+ * gdb.t21/cplusfuncs.exp: Update regular expressions for matching
+ operators to track gdb C++ demangling fixes.
+
+Mon Dec 21 22:32:46 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t31/in-gdbme.ch (bytetable3, bytetable4): Reduce ranges
+ of array dimensions to something more managable for explicit
+ initialization. Add initializers.
+ * gdb.t31/in-gdbme.ch (inttable1, inttable2, longtable1,
+ longtable2): Fix typo, initializers were intended to be
+ sequential values for easy identification.
+ * gdb.t31/chillvars.exp: Update to track changes in in-gdbme.ch.
+
+Mon Dec 21 19:48:42 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp: Has new option to specify the target's
+ configuration string. Only used by runtest.
+ * g++.other/*.exp: Now use procs from mike-g+.exp.
+ * g++.mike/*.exp: Now use procs from mike-g+.exp.
+ * Makefile.in: Now has install & uninstall targets.
+ * lib/prebase, postbase.exp: Merged into lib/mike-g++.exp and made
+ into procs.
+ * runtest.exp: Traps error when trying to test a tool that does't
+ have support.
+ * lib/framework.exp: Contains all the procs from runtest.exp.
+ These are basically the guts of the testing framework.
+ * runtest.exp: Moved all procs to a library file.
+
+Sat Dec 19 16:50:46 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp: Upped version number to 0.8.1
+ * lib/nm-defs.exp: Support procs for nm tests.
+ * nm.all/nm.exp: Now uses a generic nm testing proc.
+ * nm.all/Makefile.in: Changes the path for the linker script so it
+ won't produce srecs.
+ * nm.all/configure.in: Copies linker script for m68k-abug and
+ edits out OUTPUT_FORMAT line.
+ * config/*-nm.exp: They only contain stubs calling the procs in
+ nm-defs.exp.
+
+Fri Dec 18 18:13:15 1992 Rob Savoye (rob@cygnus.com)
+
+ * gcc.*/*.exp: Doesn't change into the subdir.
+ * lib/c-torture.exp: Adds subdir to path for objects and binaries
+ * runtest.exp: Added tests for targetname and connectmode when
+ using a MVME m68k board.
+ * configure.in: Now tests for m68k-abug-[coff|aout].
+ * config/mt-m68k-abug: Now a mt-m68k-abug-coff and
+ mt-m68k-abug-aout version so either tool chain can be used to
+ produce the srecords.
+
+Fri Dec 18 10:26:46 1992 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in (.NOEXPORT): Add for GNU make. Don't pass defines
+ with pathnames relative to this directory to submakes.
+ * gdb.t00/{default.exp, help.exp}: Update to track latest gdb
+ changes.
+ * gdb.t30/chexp.exp: Update to track latest gdb changes.
+ * gdb.t31/{in-gdbme.ch, chillvars.exp}: Add some arrays and
+ tests for arrays, update to track latest gdb changes.
+
+Mon Dec 14 18:42:58 1992 Fred Fish (fnf@cygnus.com)
+
+ * config/unix-gdb.exp (gdb_start): Temporarily set timeout up
+ to 60 seconds to accommodate heavily loaded or otherwise slow
+ systems during gdb startup.
+
+Mon Dec 14 12:16:27 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * gdb.t11/list.exp, gdb.t16/printcmds.exp: added expected failures
+ for i960-*-*.
+ * gdb.t15/funcargs.exp: increase timeout for *-*-vxworks.
+
+Fri Dec 11 21:15:07 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t16/{in-gdbme.c, printcmds.exp}: Add some tests for
+ printing the contents of multidimensional arrays.
+
+Wed Dec 9 13:18:39 1992 Michael Werner (mtw@rtl.cygnus.com)
+
+ * tcl.test/tcl-test.exp:
+ changed the comparison that looks for the end-of-test return
+ string, "%", from the tcl interpreter, tcltest, to check for
+ "^%$" instead of just "%".
+
+Tue Dec 8 13:49:18 1992 Fred Fish (fnf@cygnus.com)
+
+ * chillvars.exp: Only run the tests if the target is an
+ SVR4 target (which presumes DWARF format). They are only
+ expected to work right now for targets that use DWARF.
+
+Tue Dec 8 13:42:45 1992 Michael Werner (mtw@rtl.cygnus.com)
+
+ * removed accidental change to config/unix-tcl.exp that
+ occurred during last check-in.
+
+Tue Dec 8 13:21:45 1992 Michael Werner (mtw@rtl.cygnus.com)
+
+ * tcl.test/configure.in
+ corrected error in "files=" line; changed "defs.h" to "defs".
+
+Sun Dec 6 22:00:06 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * config/*-nm: Fixed nm_version.
+ * configure.in: Doesn't configure tcl tests for a cross test.
+
+Sat Dec 5 14:13:15 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * doc/dejagnu.l, dejagnu.texi: Added documentation for --baud
+ option.
+ * runtest.exp: Added --baud option to spcify the baud rate for a
+ serial connection.
+
+Fri Dec 4 07:00:45 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t31/chillvars.exp: Add new tests, fix expected results
+ for some existing ones.
+
+Thu Dec 3 12:28:52 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t20/{classes.exp, inherit.exp, misc.exp},
+ gdb.t21/cplusfuncs.exp, gdb.t22/virtfunc.exp: Downgrade
+ missing test executables from ERROR to just FAIL.
+ * gdb.t30/chillvars.exp: Downgrade missing test executables
+ from ERROR to just FAIL. Start adding some real tests.
+ * gdb.t30/in-gdbme.ch: Start adding some initializations of
+ fundamental type variables.
+
+Wed Dec 2 11:46:04 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * runtest.exp (setup_xfail): only set xfail_prms if xfail_flag is
+ set.
+ * gdb.t11/list.exp, gdb.t12/scope.exp, gdb.t15/funcargs.exp: more
+ mips-*-* expected failures.
+
+Wed Dec 2 11:39:28 1992 Fred Fish (fnf@cygnus.com)
+
+ * lib/gdb.exp (gdb_reinitialize_dir): New utility proc.
+ * gdb.t03/ptype.exp, gdb.t06/break.exp, gdb.t07/watchpoint.exp,
+ gdb.t08/opaque.exp, gdb.t09/corefile.exp, gdb.t11/list.exp,
+ gdb.t12/scope.exp, gdb.t13/bitfields.exp, gdb.t15/funcargs.exp,
+ gdb.t16/printcmds.exp, gdb.t20/{classes.exp, inherit.exp,
+ misc.exp}, gdb.t21/{cplusfuncs.exp, demangle.exp},
+ gdb.t22/virtfunc.exp: Use new gdb_reinitialize_dir tcl proc.
+ * gdb.t20/{classes.exp, inherit.exp, misc.exp},
+ gdb.t21/{cplusfuncs.exp, demangle.exp}, gdb.t22/virtfunc.exp:
+ Suppress tests if executable not found.
+ * Makefile.in: Add CHILL and CHILLFLAGS as things to pass
+ to recursive makes.
+ * gdb.t31/{configure.in, Makefile.in, in-gdbme.ch, chillvar.exp}:
+ New directory of chill tests.
+ * config/mt-unix (CHILL, CHILLFLAGS): New defs for chill
+ compiler name and flags to pass to compiler.
+ * configure.in (configdirs): Add gdb.t31.
+ * gdb.t30/chexp.exp: Don't need to load a gdb.
+
+Mon Nov 30 20:38:00 1992 Fred Fish (fnf@cygnus.com)
+
+ * runtest.exp (setup_xfail, clear_xfail): Modify to accept
+ multiple arguments and examine each one for a valid config
+ triplet or a prms id.
+ * gdb.t03/ptype.exp: Clear xfail flag for ptype of unnamed
+ enumeration members for SVR4 systems (presumes DWARF).
+ * gdb.t11/list.exp: Set up xfail flag for tests that are
+ expected to fail on SVR4 systems (presumes DWARF).
+
+Mon Nov 30 17:32:36 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * gdb.t00/default.exp (set write, show write): don't leave it at
+ set write on, because that causes debugging problems in later
+ testing on Ultrix.
+
+Mon Nov 30 17:18:32 1992 Rob Savoye (rob@cygnus.com)
+
+ * runtest.exp: Now uses find proc to recursively find all expect
+ file.
+
+Mon Nov 30 11:55:36 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t20/inherit.exp: Recognize a '.' as the g++/gdb
+ CPLUS_MARKER, rather than just '$'. This particular piece of
+ brain damage is spreading like ooze; gcc, gdb, and libiberty are
+ all infected as well.
+
+Mon Nov 30 11:23:42 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in: use mt-i960-nindy, not mt-i960-nind.
+ * gdb.t02/whatis.exp, gdb.t03/ptype.exp, gdb.t08/opaque.exp,
+ gdb.t09/corefile.exp, gdb.t11/list.exp, gdb.t12/scope.exp: add
+ expected failures for mips-*-*.
+
+Sun Nov 29 23:10:43 1992 Mike Stump (mrs@rtl.cygnus.com)
+
+ * prebase.exp (not_compiler_output): Change from looking for
+ Segmentation Violation to Internal compiler error, as the compiler
+ no longer issues the former.
+
+Sun Nov 29 15:16:06 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * config:/vx-g++.exp, udi-g++.exp: Replaced with gcc init code.
+ * runtest.exp: Now executes recursively any *.exp files.
+ * lib/old-dejagnu.exp: proc old-dejagnu executes tests that are
+ supposed to.
+ * g++.old-deja/old-deja.exp: Recursively get all the C code in a
+ subdirectory tree.
+ * lib/utils.exp: New file, contains utility procs grep, find,
+ and which.
+ * runtest.exp: Applied Fred's patch for the output.
+
+Sun Nov 29 08:51:15 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t22/virtfunc.exp: Make "ptype VA" an expected failure.
+ * runtest.exp: Fix a couple of minor formatting glitches.
+ * gdb.t30/chexp.exp(test_print_reject): Add another possible
+ failure expect string.
+
+Sat Nov 28 21:09:33 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * g++.old-deja/tests: New directories for C++ code from the old
+ style DejaGnu tests.
+ * g++.old-deja/old-deja.exp: New file for running the old style
+ DejaGnu tests.
+ * lib/old-dejagnu.exp: New file. Support procs for running the
+ old style DejaGnu tests.
+
+Wed Nov 25 08:05:59 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t16/printcmds.exp: Set up expected failure for
+ "p 123DEADBEEF". Gdb thinks this is a floating point number.
+
+Mon Nov 23 12:14:43 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/mt-i960-vx: set LIBS to -lgcc, not -lg (lost when file
+ was renamed).
+ * gdb.t07/watchpoint.exp: Added expected failures for Sun3.
+
+Fri Nov 20 15:39:07 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * gdb.t00/default.exp (info set): don't get fooled by the prompt
+ in the output.
+ (detach): gdb_test can not include $prompt in the expected result.
+ * gdb.t00/teststrategy.exp (backtrace): don't insist on main being
+ at level 7; any level is acceptable.
+
+Sun Nov 22 14:44:35 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * lib/remote.exp: Added proc for kermit.
+
+Fri Nov 20 11:23:26 1992 Fred Fish (fnf@cygnus.com)
+
+ * config/unix-gdb.exp (gdb_exit): Add explicit close as
+ workaround for expect bug that slowly consumes file descriptors.
+ * gdb.t22/virtfunc.exp: When gdb dumps core, start a new one
+ for the benefit of later tests that expect a gdb to be currently
+ running. This is a kludge.
+ * configure.in (configdirs): Add gdb.t16.
+ * gdb.t16/{Makefile.in, configure.in, in-gdbme.c, printcmds.exp}:
+ New test for exhaustive printing of all ASCII characters and
+ substrings, and a few tests for printing of integral values.
+ * gdb.t30/chexp.exp: Add tests for character literals.
+
+Thu Nov 19 17:45:53 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * lib/udi.exp: New procs for udi shells.
+ * config/udi-gcc.exp: Made gcc_load
+ * config/udi-gdb.exp: Made gdb_start, gdb_load gdb_exit
+ * gdb.t00/default.exp: Lots of ugly hacks cause many default
+ actions kill the UDI connection. Lookfor for new xfails. Sigh...
+ * config/*-gdb.exp: Use which in gdb_version.
+ * lib/gcc.exp: Use which in default_gcc_version.
+ * runtest.exp: New proc which that does a path lookup.
+
+Wed Nov 18 17:08:08 1992 Michael Werner (mtw@rtl.cygnus.com)
+
+ * Updated c torture tests from the package c-torture-1.7
+ The test in: gcc.code_quality
+ gcc.compile
+ gcc.execute
+ gcc.noncompile
+ gcc.unsorted
+ were updated. Existing tests in a given directory that had
+ changed or that were not in 1.7 were moved into a subdirectory
+ called "old-tests". 1.7 had a new directory called "special",
+ the contents of which were placed in deja-gnu/gcc.special .
+ Also, deleted from a prior Changelog entry was the erroneous
+ statement of the removal of support in gcc for the recognition
+ of the ".C" extension.
+
+Wed Nov 18 13:36:43 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t30/chexp.exp: Change print tests to include explicit
+ print command so we can also include formats.
+
+Wed Nov 18 12:32:53 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in: never change target_os; we need to be able to
+ check it in istarget tests.
+ * config/unix-gdb.exp (gdb_exit): the string match test was the
+ wrong way around; also, call close to try to avoid the file
+ descriptor leak in some versions of expect.
+ * teststrategy.exp: added some expected failures for Sun4 and
+ Solaris, and changed the core dump test to accept a timeout (no
+ response from gdb) if a core file was actually created.
+ * gdb.t02/whatis.exp, gdb.t03/ptype.exp, gdb.t05/expr.exp,
+ gdb.t15/funcargs.exp: added PRMS bug numbers for expected i960
+ failures.
+ * gdb.t10/crossload.exp (bfddefault): corrected error message.
+ (whole file): changed fixme handling to use setup_xfail.
+
+Tue Nov 17 09:14:11 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * runtest.exp (setup_xfail): take optional second argument which
+ is the PRMS bug number.
+ (pass, fail): use it.
+ * gdb.t00/default.exp (accept): gdb 4.7 returns a different
+ string.
+ (show): don't get fooled by the prompt in the output.
+ * gdb.t12/scope.exp: RS/6000 expects to fail print 'file'::var.
+ * gdb.t21/cplusfuncs.exp: use setup_xfail rather than FIXME.
+
+Mon Nov 16 12:38:47 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t10/Makefile.in (EXECUTABLES): Add sparc-elf.
+ * gdb.t10/README: Document sparc-elf.
+ * gdb.t10/crossload.exp: Load and test sparc-elf.
+ * gdb.t10/sparc-elf.u: New test executable.
+
+Mon Nov 16 11:31:30 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * config/unix-tcl.exp: Tcl library init module.
+ * tcl.tests: Add the tests directory from the Tcl release.
+ * tcl.tests/Makefile.in, configure.in: Support stuff.
+ * tcl.tests/tcl-test.exp: Test the Tcl library.
+
+Sun Nov 15 09:30:29 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t30/{Makefile.in, chexp.exp, configure.in}: New tests
+ for GNU-Chill.
+ * configure.in (configdirs): Add gdb.t30.
+
+Fri Nov 13 21:14:13 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * runtest.exp (pass): don't print \n\nXPASS\n\n; just XPASS:
+ suffices.
+ (setup_xfail): don't set xfail_flag unconditionally; instead set
+ it if the argument is the target so that it can be called several
+ times.
+ (clear_xfail): new function to conditionally clear xfail_flag.
+ * config/unix-gdb.exp (gdb_load): set the directory to point to
+ whereever the program is loaded from, for the benefit of symbol
+ formats which don't know that.
+ * teststrategy.exp: accept AIX error messages.
+ (print "foo"): AIX shared libraries mean gdb can't find malloc.
+ (stack trace): fails on AIX.
+ * gdb.t02/in-gdbme.c, gdb.t03/in-gdbme.c: assign to nested_su
+ field so that AIX linker doesn't strip it from object file.
+ * gdb.t03/ptype.exp (unnamed enumeration): works on RS/6000.
+ * gdb.t04/setvar.exp: don't set prms_id to garbage value.
+ * gdb.t08/opaque.exp: RS/6000 can't do xrefs.
+ * gdb.t09/corefile.exp: AIX gdb can't get name or signal from a
+ core file.
+ * gdb.t10/crossload.exp: v_signed_char on MIPS generally fails.
+ * gdb.t11/list.exp: some tests fail because gcc generates
+ incorrect debugging information.
+ * gdb.t12/in-gdbme0.c, gdb.t12/in-gdbme1.c: don't let AIX strip
+ unreferenced variables.
+
+Thu Nov 12 08:17:40 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * runtest.exp (sum): catch errors from tool_version and tool_exit,
+ to ensure that we exit as expected even if they fail.
+ * gdb.t00/default.exp, gdb.t00/help.exp: some targets, notably the
+ RS/6000, don't support "set write" and "show write".
+ * gdb.t11/list.exp (list gdbme0.c:unused, list gdbme1.c:unused):
+ mark as expected failures for i960-*-*. These should perhaps be
+ considered successes.
+
+Tue Nov 10 20:40:43 1992 Rob Savoye (rob at rtl.cygnus.com)
+
+ * lib/gcc.exp: Added $LDFLAGS to default_gcc_start so targets can
+ get their linker scripts.
+
+Mon Nov 9 10:57:44 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * lib/gcc.exp: new file; defines default_gcc_version and
+ default_gcc_start.
+ * config/*-gcc.exp: use routines in gcc.exp.
+ * gcc.execute/execute.exp: don't use c-torture, because it gives
+ us undesired PASS and FAIL reports; use gcc_start instead.
+ * gcc.execute/920501-6.c, gcc.execute/920726-1.c: don't include
+ <stdio.h> or <strings.h>, so these can be used on VxWorks.
+ * gdb.t01/run.exp: expect "run" after sending it to avoid waiting
+ for the VxWorks shell too early.
+
+Sun Nov 8 21:38:55 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: added subdir_do target, use it for info and install-info
+
+Fri Nov 6 14:10:58 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * config/vx-gdb.exp (gdb_load, spawn_vxgdb): increase timeouts.
+ * gdb.t00/default.exp: accept AIX error messages, and set the init
+ file name based on the target.
+ * gdb.t01/run.exp, gdb.t12/scope.exp: increase timeouts for
+ VxWorks.
+ * gdb.t06/break.exp: increase timeouts for VxWorks, and rewrite a
+ few tests to use gdb_test function.
+
+Fri Nov 6 11:34:20 1992 Michael Werner (mtw@rtl.cygnus.com)
+
+ * Moved the following ChangeLog entry from devo/ChangeLog to here:
+
+Wed Nov 4 17:57:47 1992 Michael Werner (mtw@rtl.cygnus.com)
+
+ * Makefile.in: Added stuff for building deja-gnu.
+ * ./deja-gnu/gdb.t21/ & ./deja-gnu/gdb.t22/:
+ Moved in-gdbme.C file to in-gdbme.cc to enhance portability.
+ Changed the configure.in file to reflect the filename extension
+ change.
+
+Fri Nov 6 14:00:48 1992 Ian Lance Taylor (ian@tweedledumbest.cygnus.com)
+
+ * gdb.t15/funcargs.exp: continue to call6k is an expected failure
+ for i960-*-vxworks; PRMS 1786.
+
+Thu Nov 5 18:09:23 1992 Mike Stump (mrs@rtl.cygnus.com)
+
+ * lib/prebase.exp: Remove incorrect fix. CPLUSFLAGS needs to be
+ reset on a per test case basis, as it is changed by each test
+ case. The correct way to fix this is to establish a default value
+ for the variable, and set the variable to that value.
+
+Thu Nov 5 18:04:21 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp: proc unknown doesn't print the error codes if
+ they're aren't any.
+ * lib/remote.exp: New procs tip and tip_download for boards that
+ live on the end of a serial cable.
+ * config/abug-gcc.exp: Init module for MVME board.
+ * config/mt-m68k-abug: Makefile frag for m68k MVME board.
+ * configure.in: Only makes links for config files that exist.
+
+Thu Nov 5 17:40:27 1992 Fred Fish (fnf@cygnus.com)
+
+ * {gdb.t20, gdb.t21, gdb.t22}/{Makefile.in, configure.in}:
+ Convert C++ filenames from '.C' to '.cc'. Rename test files.
+
+Wed Nov 4 11:50:34 1992 Ian Lance Taylor (ian@tweedledumbest.cygnus.com)
+
+ * lib/gdb.exp (gdb_test): don't check specially for attach error,
+ since that doesn't belong in a general test.
+ * gdb.t00/default.exp: fix attach and run tests for VxWorks.
+ * gdb.t04/setvar.exp: clean up a few broken tests, eliminating
+ some false failures incorrectly marked FIXME.
+ * gdb.t12/scope.exp: do two ``next'' commands if necessary to skip
+ over the call to init.
+ * gdb.t20/classes.exp, gdb.t20/inherit.exp: make FIXME cases use
+ setup_xfail.
+
+Tue Nov 3 11:53:37 1992 Ian Lance Taylor (ian@tweedledumbest.cygnus.com)
+
+ * runtest.exp (clone_output): send strings to the user even if
+ they say FIXME.
+ * gdb.t01/in-gdbme.c (vxmain): new function for VxWorks which
+ takes an argument and calls main with it.
+ gdb.t01/run.exp: for *-*-vxworks, call vxmain to pass arguments,
+ and look for results from connected task, not gdb.
+ * gdb.t01/term.exp: don't run these tests unless native.
+ * gdb.t02/whatis.exp, gdb.t03/ptype.exp, gdb.t05/expr.exp: expect
+ the i960 to fail to print type char correctly, because gdb treats
+ char as unsigned char.
+ * gdb.t06/in-gdbme.c (vxmain): new function for VxWorks which
+ takes an argument and calls main with it.
+ gdb.t06/break.exp: adjust line numbers for previous change. For
+ target *-*-vxworks, call vxmain to pass arguments.
+ * gdb.t07/watchpoint.exp: don't check the first old value after
+ restarting the program, because on VxWorks it will not have been
+ reset.
+ * gdb.t08/opaque.exp: don't check the breakpoint number, because
+ on VxWorks gdb_load stops and restarts gdb.
+ * gdb.t10/crossload.exp: don't run these tests for i960 targets,
+ because bfd uses SELECT_VECS and these formats are unknown.
+ * gdb.t11/list.exp: changed some FIXME strings to use setup_xfail.
+
+Mon Nov 2 19:00:36 1992 Ian Lance Taylor (ian@tweedledumbest.cygnus.com)
+
+ * config/vx-gdb.exp: use the new generic communication routines in
+ lib/remote.exp.
+ lib/remote.exp (rlogin): if we get "Sorry, this system is
+ engaged", try again; it can come from VxWorks just after
+ rebooting.
+
+Sat Oct 31 20:11:12 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp: procs pass & fail now use a flag set by setup_xfail
+ to determine it a test is an expected failure or an unexpected
+ success.
+ * runtest.exp: New proc setup_xfail. If called with a configure
+ pattern it sets up the next test as an expected failure or an
+ unexpected success.
+
+Sat Oct 31 16:10:14 1992 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * gdb.t10/crossload.exp: Entire file re-written to use the new
+ gdb_test command.
+
+Sat Oct 31 12:12:08 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * lib/gdb.exp: gdb_test now traps cleanly if send fails cause gdb
+ core dumped.
+ * gdb.t00/default.exp: Rewrote the first few tests to use the
+ gdb_test proc.
+ * lib/gdb.exp: Added a gdb_test proc. It takes a command and a
+ pattern and runs the gdb test.
+
+Fri Oct 30 11:46:45 1992 Fred Fish (fnf@cygnus.com)
+
+ * runtest.exp: Guard against nonexistant PWD environment var,
+ which is shell dependent.
+
+Fri Oct 30 20:23:06 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp: Changed format of log messages. $prms_id & $bug_id
+ are only printed if they are not 0. Also they now appear at the
+ end of the line in parens with a label.
+ * runtest.exp: New procs xpass & xfail for expected failures and
+ unexpected successes. Added successes to proc sum.
+ * runtest.exp: istarget & ishost with no arguments returns the
+ target and host triplet strings.
+ * runtest.exp: New proc isnative. Returns a 1 if running native,
+ a 0 if on a target.
+ * config/nind-gcc.exp, coff-gcc.ecp, aout-gcc.exp: Applied patch
+ from vx-gcc.exp so errror messages don't always go to the screen.
+
+Thu Oct 29 19:07:28 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * Changed all refences to $srcdir/lib to ./lib since configure now
+ makes a link for it.
+ * config/vx-gcc.exp: gcc_load doesn't try to load a program if
+ there is no remote shell.
+ * lib/remote.exp: The network procs telnet, rlogin, rsh now do
+ three retries before exiting with an error.
+ * runtest.exp: Fixed so there are multiple ways to get the users
+ login name so it can be printed in the logs.
+ * doc/DejaGnu.l, dejagnu.texi: Removed references to $nfshost.
+ * runtest.exp: Removed the --nfshost option cause it's become
+ unnessary.
+ * configure.in: Deals with the shorter names in config. Creates an
+ abbreviation for the OS and uses that for the filename substring.
+ * config/*: All names shortened to <= 14 characters.
+ All init-$target_os-$tool.exp changed to $target_os-$tool.exp.
+ * config/mt-vxworks68, mt-vxworks960: Changed to use the
+ abbreviated triplet form like all the other stubs. Now mt-m68k-vx
+ and mt-i960-vx.
+
+Tue Oct 27 10:27:33 1992 Mike Stump (mrs@cygnus.com)
+
+ * runtest.exp: When setting base_dir don't use getenv("PWD") until
+ the code works when there is no PWD env variable.
+
+Tue Oct 27 07:37:38 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * gdb.t00/default.exp: accept "can't create process" error for run
+ on VxWorks.
+ gdb.t08/opaque.exp: don't look for $binfile when setting
+ breakpoint.
+ gdb.t15/funcargs.exp: added -re "$prompt $" cases.
+ gdb.t20/classes.exp: accept \t as well as space after line number.
+ gdb.t22/virtfunc.exp: added expected failure for "cannot invoke
+ functions on this machine".
+ lib/gdb.exp (runto): added -re "$prompt $" cases.
+
+ * lib/gdb.exp: renamed from break.exp. Moved gdb_unload and runto
+ in from config/init-unix-gdb.exp.
+ config/init-unix-gdb.exp: removed gdb_unload and runto.
+ config/init-vxworks-gdb.exp: removed runto.
+ (gdb_start): added "set args main" so that "run" with no arguments
+ works as on Unix.
+ config/*-gdb.exp: include gdb.exp, not break.exp.
+
+ * gdb.t01/in-gdbme.c: supply static atoi for vxworks, return
+ rather than calling exit (avoids VxWorks vs. libgcc problem).
+ gdb.t07/in-gdbme.c: return rather than calling exit.
+ gdb.t08/in-gdbme0.c: return rather than calling exit.
+ gdb.t13/in-gdbme.c: return rather than calling exit.
+ * gdb.t00/default.exp: don't set height and width here.
+ config/init-unix-gdb.exp (gdb_start): set it here.
+ config/init-vxworks-gdb.exp (gdb_start): and here.
+ * config/init-vxworks-gdb.exp (runto): new function, similar to
+ init-unix-gdb.exp function.
+
+Mon Oct 26 09:16:24 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * gdb.t12/scope.exp: check for $prompt when failing, not just
+ timeout.
+ * gdb.t11/list.exp: accept tab as well as space after line number.
+ * gdb.t09/corefile.exp: don't run these tests on a target system.
+ gdb.t09/Makefile.in: don't complain if can not dump core.
+ * lib/break.exp: new file, for delete_breakpoints function.
+ config/*-gdb.exp: include it.
+ * config/init-vxworks-gdb.exp (gdb_start): open the telnet
+ connection in gdb_start, not just once.
+ (telnet_init): If shell is locked, retry.
+ (gdb_load): check for $prompt; also stop and restart gdb before
+ loading each file, because vxgdb accumulates symbols and lets the
+ old ones take precendence.
+
+Sun Oct 25 11:35:49 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * config/init-vxworks-gcc.exp: Now works good, traps load errors
+ cleanly.
+ * runtest.exp, doc/dejagnu.texi: Changed all occurences of
+ $defaultmode to $connectmode.
+ * config/init-vxworks-gcc.exp, init-unix-gcc.exp: Fixed so
+ compiler output doesn't go to the screen unless $verbose>1.
+ * runtest.exp: Improved error handling in proc unknown by having
+ it dump state.
+
+Sun Oct 25 11:35:49 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest.exp, doc/dejagnu.texi: Changed all occurences of
+ $defaultmode to $connectmode.
+ * config/init-vxworks-gcc.exp, init-unix-gcc.exp: Fixed so
+ compiler output doesn't go to the screen unless $verbose>1.
+ * runtest.exp: Improved error handling in proc unknown by having
+ it dump state.
+
+Sat Oct 24 22:44:09 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * gcc.execute/execute.exp: Looks at $status after executing the
+ test code.
+ * config/init-unix-gcc.exp: Made gcc_load work and set $status.
+ * runtest.exp: Moved regex variables for decimal and hex from
+ init-unix-gdb.exp.
+
+Fri Oct 23 12:03:47 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * config/mt-m68k-aout, mt-m68k-coff, mt-i960-nindy, mt-a29k-udi:
+ New makefile stubs.
+ * config/init-nindy-gdb.exp, init-nindy-gdb.exp, init-nindy-gdb.exp:
+ New init modules for nindy tests.
+ * configure.in: Added aout, coff, udi targets.
+ * config/init-aout-gdb.exp, init-coff-gdb.exp, init-udi-gdb.exp:
+ New init modules for gdb tests.
+ * config/init-aout-gcc.exp, init-coff-gcc.exp, init-udi-gcc.exp:
+ New init modules for gcc tests.
+ * config/init-aout-nm.exp, init-coff-nm.exp, init-udi-nm.exp: New
+ init modules for nm tests.
+ * lib/c-torture.exp: Fixed so warning messages are still a PASS.
+ * runtest.exp: Fixed bug so --connectmode now works.
+
+Fri Oct 23 11:56:02 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * gdb.t06/in-gdbme.c: added definition of atoi when using VxWorks.
+ gdb.t06/break.exp: adjusted line numbers for above change.
+
+Thu Oct 22 21:39:03 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * Makefile.in: Added to site target so the value of LIBS goes into
+ site.exp.
+
+Thu Oct 22 12:16:03 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * gdb.t00/help.exp: VxWorks support:
+ help i, help info: info sharedlibrary line is optional
+ help source: accept .vxgdbinit as well as .gdbinit
+ * gdb.t00/default.exp: VxWorks support:
+ add-symbol-file, show prompt: use $prompt, not (gdb)
+ i, info: info sharedlibrary line is optional
+ load, r, run, x: accept vxgdb responses as legitimate
+ * config/init-vxworks-gdb: send a single \n at end, because
+ otherwise the multiple prompts confuse the expect scripts.
+
+Wed Oct 21 16:06:33 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in, */Makefile.in: use new variable $(LIBS) when
+ linking.
+ config/mt-vxworks68, config/mt-vxworks960: define LIBS as -lgcc.
+ * configure.in: add irix* to list of unix targets.
+
+Tue Oct 20 12:31:38 1992 Mike Stump (mrs@rtl.cygnus.com)
+
+ * Makefile.in (subdirs): Fixed so that make works, even when whole
+ subdirectories of tests are removed. This way, subsets of the
+ whole set of test can be distributed.
+
+Mon Oct 19 10:59:19 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * gcc.execute/execute.exp: Runs all the test from the c-torture test's
+ execute directory.
+ * gcc.execute: New directory
+ * gcc.code_quality/code_quality.exp: Runs all the test from the c-torture test's
+ code_quality directory.
+ * gcc.code_quality: New directory
+ * gcc.noncompile/noncompile.exp: Runs all the test from the c-torture test's
+ noncompile directory.
+ * gcc.noncompile: New directory
+ * gdb.*/*.exp: Removed all references to $det_file.
+ * nm.all/nm.exp: Removed all references to $det_file.
+ * g++.other/g++-03.exp, g++-04.exp: Source prebase.exp and
+ postbase.exp from lib directory.
+ * g++.mike/misc1.exp, misc2.exp, misc3.exp, misc4.exp, misc5.exp,
+ misc6.exp, p646.exp, p710.exp: Source prebase.exp and postbase.exp
+ from lib directory.
+ * prebase.exp, postbase.exp: Moved into lib directory.
+
+Sun Oct 18 15:46:07 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * lib/c-torture.exp: New support procs for running tests from the
+ C torture test.
+ * gcc.unsorted/unsorted.exp: Runs all the test from the c-torture test's
+ unsorted directory.
+ * gcc.unsorted: New directory
+ * lib: New directory for Tcl procs used by tests.
+
+Sun Oct 18 00:39:59 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t11/list.exp: Revise to install FIXME cases for things
+ that are known to fail when used with DWARF.
+ * gdb.t07/watchpoints.exp: Rewrite to avoid cascading of errors.
+
+Sat Oct 17 10:54:42 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t00/teststrategy.exp: Fix single step tests to succeed
+ if the source for the gdb being tested is no longer available
+ for the gdb doing the testing.
+
+Fri Oct 16 17:25:31 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * g++.mike/misc1.C, misc4.C misc5.C p646.C: Changed all occurences
+ of 'i' as a variable, cause it screws up the vxworks 'i' shell
+ command.
+
+Fri Oct 16 15:51:10 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t00/default.exp: Set height to zero. Fix target cmds
+ to accept either "child" or "procfs" depending upon whether
+ gdb uses /proc.
+ * gdb.t00/help.exp: Accept either "child" or "procfs" for
+ target commands, depending upon gdb configuration for /proc.
+ * gdb.t00/teststrategy.exp: Make disassembly output more
+ portable. Make test for gdb core dump more portable.
+ * gdb.t07/watchpoint.exp: Test only for pattern at line
+ for watchpoint hit, ignore break addr and linenumber.
+ * gdb.t09/corefile.exp: Minor fixes for system dependencies.
+
+Wed Oct 14 13:11:51 1992 Fred Fish (fnf@cygnus.com)
+
+ * configure.in (configdirs): Add gdb.t22
+ * gdb.t22/{Makefile.in, configure.in, in-gdbme.C, virtfunc.exp}:
+ New tests for calling C++ virtual functions.
+
+Wed Oct 14 00:30:07 1992 Fred Fish (fnf@cygnus.com)
+
+ * configure.in (configdirs): Add gdb.t21
+ * config/init-unix-gdb.exp (delete_breakpoints): Minor cleanup.
+ * config/init-unix-gdb.exp (runto): New proc.
+ * gdb.t00/teststrategy.exp (test_with_self): Preserve the
+ original timeout and restore when done. Extend the timeout
+ for loading gdb into itself to 10 minutes (old limit of 5 minutes
+ was hit on a SPARCstation under moderate load).
+ * gdb.t01/term.exp: Fix run command in "info terminal" test.
+ * gdb.t06/break.exp: Fix linenumber in "run 2" output.
+ * gdb.t12/scope.exp: Remove "runto" proc, moved to init file.
+ * gdb.t20/inherit.exp: Remove "runto" proc, moved to init file.
+ * gdb.t20/classes.exp: Remove "runto" proc, moved to init file.
+ Also remove some junk leftover from gdbtest case conversion.
+ * gdb.t21/{Makefile.in, configure.in, in-gdbme.C, cplusfuncs.exp,
+ demangle.exp}: New test case for demangling and C++ function
+ lookups.
+
+Mon Oct 12 09:10:22 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t00/default.exp: Add expect strings for setting height and
+ width commands. Add expect string for add-symbol-file.
+ * gdb.t00/teststrategy.exp: Add proc to convert current gdb
+ pathname to fully qualified pathname for the copy command.
+ Reorganize so that the test can be gracefully skipped if this
+ fails. Increase timeout to load gdb to 5 minutes for systems
+ where loading is done over the network and/or full symtabs are
+ required.
+ * gdb.t20/{Makefile.in, configure.in, in-gdbme.C, classes.exp,
+ inherit.exp, misc.exp}: New tests for C++.
+
+Sat Oct 10 18:23:20 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest: New makefile created bourne shell to load runtest.exp
+ into expect. Needed for machine that don't grok #!/bin/expect kind
+ of things.
+ * config/mt-vxworks960: Uses new p3 naming convention. Also
+ expects to find all the binaries in your path.
+ * gdb.t13/bitfields.exp: Added a line after every test to dump the
+ output to the detail file.
+ * gdb.t15/funcargs.exp: Added a line after every test to dump the output to the detail file.
+ * configure.in: Do a "make runtest" for post target.
+ * Makefile.in: Has new target for making runtest. Runtest is a
+ bourne shell script that start $srcdir/runtest.exp.
+ * runtest.exp: made the printing of the summary counts a proc so a
+ ^C or SIGQUIT will print the summary, then exit.
+ * runtest: Renamed to runtest.exp.
+
+Fri Oct 9 07:15:04 1992 Fred Fish (fnf@cygnus.com)
+
+ * gdb.t11/configure.in (srctrigger): Change to list.exp.
+
+Fri Oct 9 00:16:02 1992 Fred Fish (fnf@cygnus.com)
+
+ * configure.in: Add gdb.t11.
+ * runtest: Add new variable efailcnt for expected failures.
+ Treat expected failures as passes, but count them separately
+ and report summary.
+ * config/init-unix-gdb.exp (delete_breakpoints): Add proc.
+ * gdb.t03/ptype.exp: Add expected failure for enums.
+ * gdb.t04/setvar.exp: Make FIXME's consistent with other tests.
+ * gdb.t06/break.exp: Add new test for next over recursive calls.
+ * gdb.t11/{Makefile.in, configure.in, in-gdbme0.c, in-gdbme0.h,
+ in-gdbme1.c, list.exp}: New test for list command.
+ * gdb.t15/in-gdbme.c (test_struct_args): Remove aggregate initial-
+ ization.
+
+Tue Oct 6 19:25:00 1992 Fred Fish (fnf@cygnus.com)
+
+ * config/init-unix-gdb.exp: Don't spawn gdb with a null argument
+ when GDBFLAGS is empty.
+ * gdb.t00/default.exp: Set width to 0 (unlimited).
+ * gdb.t00/default.exp: Add expect strings for "attach", "run",
+ "source", and "x", that match current gdb.
+ * gdb.t00/help.exp: Fix expect string for "help breakpoints".
+ * gdb.t00/teststrategy.exp: Fix "run" send string and expected
+ output. Fix expected output for control-C.
+ * gdb.t06/break.exp: Restart gdb to avoid leftovers from other
+ tests. Adjust line numbers to account for changes in test source.
+
+Tue Oct 6 11:08:26 1992 Fred Fish (fnf@cygnus.com)
+
+ * configure.in (configdirs): Add gdb.t13 gdb.t15.
+ * gdb.t12/in-gdbme0.c: Add code for checking auto variables and
+ local scopes.
+ * gdb.t12/scope.exp: Add tests for auto variables and local scopes.
+ * gdb.t13/{Makefile.in, configure.in, in-gdbme.c, bitfields.exp}:
+ New test for bitfields.
+ * gdb.t15/{Makefile.in, configure.in, in-gdbme.c, funcargs.exp}:
+ New test for actual args passed to functions.
+
+Fri Oct 2 15:42:10 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * Makefile.in: Added support for srcdir going to site.exp.
+
+Thu Oct 1 21:26:35 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * teststrategy.exp: Changed the test for target vs host to using
+ $target_alias & $host_alias instead of $target_os & $host_os.
+ * corefile.exp: Added line to dump output of tests to detail
+ log.
+ * scope.exp: Added line to dump output of tests to detail
+ log.
+ * opaque.exp: Added line to dump output of tests to detail
+ log.
+ * crossload.exp: Added line to dump output of tests to detail
+ log.
+ * watchpoint.exp: Added line to dump output of tests to detail
+ log.
+
+Thu Oct 1 21:05:28 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest: Changed the test for target vs host to using
+ $target_alias & $host_alias instead of $target_aos & $host_os.
+
+Sep 30 08:45:00 1992 Fred Fish (fnf@fishpond.cygnus.com)
+
+ * configure.in (configdirs): Add gdb.t07, gdb.t08, gdb.t09
+ gdb.t10, gdb.t12.
+ * runtest: Fix some misspellings in trap commands.
+ * runtest (proc unknown): Change arg to args.
+ * runtest (clone_output, pass, fail): Remove leading tabs from result
+ lines that waste space that can be used for more meaningful
+ comments.
+ * runtest: Remove extraneous 12 newlines at end of file.
+ * config/init-unix-gdb.exp: Add convenience abbreviations for
+ hex and decimal number strings.
+ * config/init-unix-gdb.exp: Add gdb_unload proc.
+ * gdb.t06/break.exp: Replace hardcoded directory with $subdir.
+ * gdb.t07/{Makefile.in, configure.in, in-gdbme.c, watchpoint.exp}:
+ New tests for watchpoints.
+ * gdb.t08/{Makefile.in, configure.in, in-gdbme0.c, in-gdbme1.c,
+ opaque.exp}: New tests for opaque structs.
+ * gdb.t09/{Makefile.in, configure.in, in-gdbme.c, corefile.exp}:
+ New tests for core file handling.
+ * gdb.t10/{Makefile.in, configure.in, README, in-gdbme.c,
+ crossload.exp, i486-elf.u, i860-elf.u, m68k-aout.u, m68k-aout2.u,
+ m68k-elf.u, mips-ecoff.u, sparc-aout.u}: New files for non-native
+ executable handling tests.
+ * gdb.t12/{Makefile.in, configure.in, in-gdbme0.c, in-gdbme1.c,
+ scope.exp}: New tests for handling scope specifications.
+
+Sun Sep 20 14:18:19 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * configure.in: Better support for multiple platforms. Configures
+ for most unix variants and targets.
+ * DejaGnu.l, dejagnu.texi: Updated with new command line option.
+ * runtest: Added option to not reboot the target evry time.
+
+Thu Sep 10 17:15:37 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest: Check for config variable targetname and nfshost after
+ cmd options rather than before.
+
+Mon Sep 7 21:06:23 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * config/mt-m68k-coff: Created for m68k based bare board.
+
+Sun Sep 6 16:48:29 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * postbase.exp: add $srcdir for g++_start invocation from
+ different directory tree.
+ * postbase.exp: made output other than pass/fail go only to
+ screen only if $verbose > 1.
+
+Wed Sep 2 23:29:14 1992 Rob Savoye (rob at rtl.cygnus.com)
+
+ * Minor bug fixes. Now works with local config file.
+
+Sun Aug 16 23:00:40 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * dejagnu.texi: updated some more.
+ * configure.in: added nm support.
+ * Makefile.in: added nm.all to subdirs list.
+ * config/init-sunos-nm.exp: new init module for nm tests.
+ * nm.all/in-nmtest.c: new test case code for nm.
+ * nm.all/nm.exp: new test cases for nm.
+ * nm.all/Makefile.in: new makefile fragment
+ for nm tests.
+ * nm.all/configure.in: new config file file for nm tests.
+
+Sat Aug 15 16:30:39 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * All test cases: changed how the tool is invoked. Now use the
+ _start function.
+ * configure.in: added g++ init module.
+ * init-*-g++.exp: Created new global called $exec_output, to hold
+ the output of an executable produce by g++.
+ * init-sunos-g++.exp: Added stubs to target dependant routines.
+ * g++-init.exp: renamed to config/init-sunos-g++.exp.
+ * Features.txt: moved to doc directory.
+
+Sun Aug 9 22:49:21 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * Added self-defined makefile style arguments.
+ * Added most of the makefile variables for tools to site.exp.
+ * Merged *-gdb-exit.exp into the config/init-*-gdb.exp and made it
+ a function call instead.
+
+Sat Aug 8 18:47:40 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * runtest: Now lets all site.exp set all configuration variables.
+ Command line options overrule the config file's.
+ * runtest: Rearranged all command line options. Made most of them
+ use a --fullname syntax.
+ * runtest: Now --verbose prints only the tests that failed. Added
+ option --all that prints tests that passed too.
+
+Fri Aug 7 21:55:48 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * init-vxworks-gdb.exp: Now uses config file.
+ * Makefile.in: Now has a target to make a config file.
+ * site.exp: Created by make/configure. Holds init values for
+ init module.
+ * configure.in: Now configures init modules for tool.
+ * runtest: Now uses init setup by configure.
+
+Wed Aug 5 23:04:47 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * all files: Changed the prompt pattern to a variable $prompt that
+ is set in the init module.
+
+Thu Jul 16 11:12:44 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * Changed the framework executable from DejaGnu to runtest.
+
+Sun Jul 12 16:08:04 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * Changed command line options so cc, gdb, etc... are specified
+ like makefiles. ie: CC=gcc CFLAGS="-v -r"
+ * Changed several command line option names.
+
+Fri Jul 10 11:28:00 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * Added support to gdb_load in gdb-init.exp for loading a program
+ if another one is already loaded. Also now deals with reloading if
+ still debugging previous program.
+ * Added multiple levels of verbose. Verbose gets incremented
+ depending on how many times it appears on the command line.
+ * Added more subdirectories for gdb tests.
+ * Added tests for testing "run" and "terminal" commands.
+ * Added support to gdb_load() so it can load a file to replace the
+ previous one.
+
+Tue Jun 30 22:22:00 1992 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * DejaGnu: Added changes to main loop adding support for init and
+ exit modules. Moved *_version stuff to init modules.
+ * DejaGnu.l: Added new command line option for targets. Added lots
+ on how to write a test.
+ * Added section on init and exit modules. Added keyword use by
+ DejaGnu.
+ * vxworks-gdb-init.exp: Expect script that logs in to vxworks board,
+ starts GDB, and loads a file.
+ * gdb-init.exp: New init module for gdb native. Was gdb-01.exp.
+ * gdb-exit.exp: New exit module for GDB native.
+ * features.txt: List of features and goals. Based on testing meeting
+ notes.
+ * g++-init.exp: New module for G++ initialization.
+ * Gave gdb.all tests intelligent names instead of numbers.
+ * default.exp: Was xdefault.exp. Removed spawn commnd. Added prompt
+ for test failure.
+ * help.exp: Removed process spawning part. Added prompt match for test
+ failure.
+ * echo.exp: Was gdb-02.exp.
+
+Thu May 21 17:20:23 1992 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * Hacking in better detailed reports.
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..50dbe43
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,183 @@
+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/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..f673015
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,50 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus
+
+SUBDIRS = doc testsuite example
+
+# driver script goes in /usr/local/bin
+bin_SCRIPTS = runtest
+
+# auxiliary scripts go in /usr/local/share/dejagnu
+pkgdata_SCRIPTS = config.guess runtest.exp
+
+# Below, host-independent data files that need to get installed.
+# We do it this way so we can use globbing.
+
+lib_dest = $(DESTDIR)$(pkgdatadir)
+lib_files = $(srcdir)/*.c $(srcdir)/lib/*.exp
+
+baseboards_dest = $(DESTDIR)$(pkgdatadir)/baseboards
+baseboards_files = $(srcdir)/baseboards/README $(srcdir)/baseboards/*.exp
+
+config_dest = $(DESTDIR)$(pkgdatadir)/config
+config_files = $(srcdir)/config/README $(srcdir)/config/*.exp
+
+install-data-local:
+ $(mkinstalldirs) $(lib_dest)
+ for f in $(lib_files); do \
+ test ! -f "$$f" || $(INSTALL_DATA) $$f $(lib_dest); \
+ done
+ #
+ $(mkinstalldirs) $(baseboards_dest)
+ for f in $(baseboards_files); do \
+ test ! -f "$$f" || $(INSTALL_DATA) $$f $(baseboards_dest); \
+ done
+ #
+ $(mkinstalldirs) $(config_dest)
+ for f in $(config_files); do \
+ test ! -f "$$f" || $(INSTALL_DATA) $$f $(config_dest); \
+ done
+
+uninstall-local:
+ for f in $(lib_files); do \
+ test ! -f "$$f" || rm -f $(lib_dest)/`basename "$$f"`; \
+ done
+ for f in $(config_files); do \
+ test ! -f "$$f" || rm -f $(config_dest)/`basename "$$f"`; \
+ done
+ for f in $(baseboards_files); do \
+ test ! -f "$$f" || rm -f $(baseboards_dest)/`basename "$$f"`; \
+ done
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..8687693
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,412 @@
+# 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.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+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 = :
+BOARDS = @BOARDS@
+CC = @CC@
+CONFIG = @CONFIG@
+EXEEXT = @EXEEXT@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+AUTOMAKE_OPTIONS = cygnus
+
+SUBDIRS = doc testsuite example
+
+# driver script goes in /usr/local/bin
+bin_SCRIPTS = runtest
+
+# auxiliary scripts go in /usr/local/share/dejagnu
+pkgdata_SCRIPTS = config.guess runtest.exp
+
+# Below, host-independent data files that need to get installed.
+# We do it this way so we can use globbing.
+
+lib_dest = $(DESTDIR)$(pkgdatadir)
+lib_files = $(srcdir)/*.c $(srcdir)/lib/*.exp
+
+baseboards_dest = $(DESTDIR)$(pkgdatadir)/baseboards
+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
+CONFIG_CLEAN_FILES =
+SCRIPTS = $(bin_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
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in
+ cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_SCRIPTS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+ $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ else if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+ $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ else :; fi; fi; \
+ done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ list='$(bin_SCRIPTS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ done
+
+install-pkgdataSCRIPTS: $(pkgdata_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
+ @list='$(pkgdata_SCRIPTS)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(pkgdatadir)/`echo $$p|sed '$(transform)'`"; \
+ $(INSTALL_SCRIPT) $$p $(DESTDIR)$(pkgdatadir)/`echo $$p|sed '$(transform)'`; \
+ else if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/`echo $$p|sed '$(transform)'`"; \
+ $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(pkgdatadir)/`echo $$p|sed '$(transform)'`; \
+ else :; fi; fi; \
+ done
+
+uninstall-pkgdataSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ list='$(pkgdata_SCRIPTS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(pkgdatadir)/`echo $$p|sed '$(transform)'`; \
+ done
+
+# 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 install-info-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
+
+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 = $(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)
+ @for file in $(DISTFILES); do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$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=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
+ done
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
+check-am:
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+install-info-am:
+install-info: install-info-recursive
+install-exec-am: install-binSCRIPTS
+install-exec: install-exec-recursive
+
+install-data-am: install-pkgdataSCRIPTS install-data-local
+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: uninstall-recursive
+all-am: Makefile $(SCRIPTS)
+all-redirect: all-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+ $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(pkgdatadir)
+
+
+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-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-recursive
+
+clean-am: clean-tags clean-generic mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am: distclean-tags distclean-generic clean-am
+
+distclean: distclean-recursive
+ -rm -f config.status
+
+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-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 \
+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
+
+
+install-data-local:
+ $(mkinstalldirs) $(lib_dest)
+ for f in $(lib_files); do \
+ test ! -f "$$f" || $(INSTALL_DATA) $$f $(lib_dest); \
+ done
+ #
+ $(mkinstalldirs) $(baseboards_dest)
+ for f in $(baseboards_files); do \
+ test ! -f "$$f" || $(INSTALL_DATA) $$f $(baseboards_dest); \
+ done
+ #
+ $(mkinstalldirs) $(config_dest)
+ for f in $(config_files); do \
+ test ! -f "$$f" || $(INSTALL_DATA) $$f $(config_dest); \
+ done
+
+uninstall-local:
+ for f in $(lib_files); do \
+ test ! -f "$$f" || rm -f $(lib_dest)/`basename "$$f"`; \
+ done
+ for f in $(config_files); do \
+ test ! -f "$$f" || rm -f $(config_dest)/`basename "$$f"`; \
+ done
+ for f in $(baseboards_files); do \
+ test ! -f "$$f" || rm -f $(baseboards_dest)/`basename "$$f"`; \
+ done
+
+# 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/NEWS b/NEWS
new file mode 100644
index 0000000..b3caa6c
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,3 @@
+DejaGnu is now back under active maintainance. The initial work has been
+rewriting the manual to bring it up to date, and switching to SGML. NT
+support has also been added, and DejaGnu now uses automake.
diff --git a/README b/README
new file mode 100644
index 0000000..0e22eab
--- /dev/null
+++ b/README
@@ -0,0 +1,283 @@
+ DejaGnu is a framework for testing other programs. Its purpose is to
+provide a single front end for all tests. Beyond this, DejaGnu offers
+several advantages for testing:
+
+ - The flexibility and consistency of the DejaGnu framework
+ make it easy to write tests for any program.
+
+ - DejaGnu provides a layer of abstraction which makes all
+ tests (if correctly written) 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 supported by DejaGnu. Currently DejaGnu runs
+ tests on several single board computers, whose operating
+ software ranges from just a boot monitor to a full-fledged,
+ Unix-like realtime OS.
+
+ - DejaGnu is written in expect, which in turn uses Tcl
+ (Tool command language). The framework comprises two parts:
+ 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.
+
+ How To Configure and Build
+
+ To build DejaGnu, run the ``configure'' script here, e.g.:
+
+ ./configure MYHOSTTYPE
+
+followed by running ``make''. (MYHOSTTYPE is a name for your host computer,
+for instance "sun4". You can use the script ``config.sub'' to test whether
+a name is recognized; if it is, config.sub translates it to a triplet
+specifying CPU, vendor, and OS.) This is used when you plan to
+configure and build in the source tree.
+
+ If you use a separate tree for object files, (the recommended way),
+then the --srcdir option must also be specified. This would also
+require that the configure script be run from the top level directory.
+
+ PATH/configure MYHOSTYPE --srcdir PATH/dejagnu
+
+where PATH is is the directory that the contains the sources.
+
+ To configure it so it gets installed somewhere other than the
+default of /usr/local, use the --prefix option.
+
+ configure MYHOSTYPE --prefix [PATH]
+
+where PATH is the prefix used to install the programs.
+
+ The configure testing and building will use the native compiler "cc"
+on your host machine. To change which compiler gets used (like gcc)
+set a the variable "CC" in your environment to point to it.
+
+ For csh users: "setenv CC gcc"
+ For bourne shell users: "CC=gcc;export CC"
+
+ Then when you compile, use "make CC=$CC".
+
+See etc/cfg-paper.texi, etc/configure.texi, and/or the README files in
+various subdirectories, for more details.
+
+ As DejaGnu is a Tcl program, there is nothing to build. However, the
+documentation is not built by default. Use these targets:
+"make info" - Convert the texinfo document to something that can
+ be used the GNU info program or info mode in emacs.
+"make dvi" - Convert the texinfo document to something that can
+ be printed. This produces dvi output.
+"make doc" - This builds both.
+"make ps" - This converts the dvi file into postscript. This
+ requires a copy of dvips.
+"make install" - This installs DejaGnu based on the --prefix option
+ when configuring. Otherwise it defaults to
+ /usr/local. See the DejaGnu manual for more
+ information on installation.
+
+ Changes from 1.1.1
+ 1. Works with (included in release) Tcl 7.3 and Expect 5.6.
+ 2. Much better error trapping and handling, including the
+ execution of sub scripts.
+ 3. Re-worked configuration subsystem.
+ 4. Default handling for testing unknown targets.
+ 5. New testsuite for expect and runtest.
+ 6. More debugging procedures.
+
+ Changes from 1.0
+
+ 1. DejaGnu now conforms to POSIX 1003.3, a standard for
+ testing frameworks.
+ 2. A Tcl debugger written by Don Libes has been added.
+ 3. Lots of bug fixes.
+
+ Changes from 0.9
+
+ 1. DejaGnu now installs itself like other utilities.
+ 2. 700 G++ tests are included.
+ 3. The bugs in the GCC tests have been fixed.
+ 4. Testsuites are released separately.
+ 5. Testsuite sources now reside with the within each tool's
+ source tree.
+
+-------------------------------------------------------------------
+Here's is a posting on the Free OS testing project. (FROST)
+-------------------------------------------------------------------
+If you have built up your own tests for system calls, library
+routines, networking protocols, or common utilities, this posting
+offers you an opportunity to put them to good use. You can do a good
+deed for the Linux community, the Berkeley UNIX community, and the
+wider world of free software users.
+
+Also, if you would like to learn some good test tools and strategies,
+and devote some time on a volunteer basis to writing tests -- perhaps
+a couple of weeks full-time, or a couple hours per week over a period
+of several months -- then here is a project you should get involved
+in.
+
+I am helping to coordinate a test effort for Linux. In the following
+four sections of this message I will describe the goals, the process,
+the people trying to do it, and what you can do to help.
+
+Goals
+
+ Linux and BSD share a number of libraries and utilities, both
+ because BSD software was ported to Linux, and because several free
+ software (GNU) utilities have been ported to both operating
+ systems.
+
+ Linux shows startling differences and failures as you move from one
+ set of hardware to another. People who hope to base their own
+ commercial products on Linux would like to see proof that it is
+ robust, portable, and standard-conforming. The problem is that
+ cross-platform testing is very hard to do, and few decent test
+ suites exist either for free software or for UNIX. (Look at all the
+ differences you find among systems that are SVID-conforming,
+ particularly at higher levels such as the utilities.)
+
+ Therefore, a number of us who are interested n Linux have decided to
+ enter the modern age of formal, automated software testing -- but in
+ a manner that is proper for the free software community.
+
+ Using DejaGnu, a test platform developed by Cygnus Support and
+ placed under the GPL, we want to collect the best tests we can from
+ people everywhere, and integrate them into suites that any user can
+ download, run, and interpret with a few commands. DejaGnu already
+ runs under BSD, and Cygnus is porting it to Linux.
+
+ Our goal is to test as many parts of the system as possible,
+ including system calls (particularly for POSIX 1003.1 compliance),
+ libraries in the official distribution, networking protocols,
+ and utilities. We need help with
+
+ 1) integrating good tests donated by the community (and probably
+ written in a variety of programming languages and command
+ shells) into the DejaGnu framework, and
+
+ 2) writing new tests for major functional areas for which no
+ adequate tests exist.
+
+ The tests we use will be placed under the GPL and distributed by
+ Cygnus Support along with DejaGnu. H. J. Lu, who maintains the C
+ library for Linux, has offered to run the POSIX 1003.1 tests and as
+ many others as he can.
+
+Process
+
+ First let me summarize the advantages of using DejaGnu, a free
+ software product that will be the umbrella for all the tests, and
+ then explain how we plan to conduct this project.
+
+ Cygnus Support released DejaGnu to the public on January 3, along
+ with several test suites for GNU language tools. The product is
+ designed for portability and easy cross-platform development and
+ execution. It works more uniformly than typical tests using the
+ UNIX shell, and also supports interactive testing better than most
+ test platforms -- for instance, Cygnus has written over 1300 unit
+ tests for the gdb debugger using it.
+
+ The implementation of DejaGnu is based on tcl and expect, two simple
+ existing languages for writing commands. You can develop new tests
+ in two major ways: by placing keyword-based comments in C source
+ code, or by writing tests in tcl.
+
+ While Cygnus is still increasing their body of tests for language
+ tools, they are also turning their resources toward the libraries
+ and GNU utilities. While most of the tests are written at Cygnus,
+ they have reached out to communities of testers and are now porting
+ substantial sets of donated tests.
+
+ We are hoping to broaden this successful use of collaboration across
+ user communities. We hope that suites of useful tests are sitting
+ in desk drawers out there. We also hope to gather and mobilize
+ people who appreciate the value of formal tests in legitimizing free
+ software, and would like to help write them.
+
+ I am not an employee of Cygnus, but have volunteered to talk to
+ interested people and do an initial classification of tests, just to
+ offload some of this routine work from them. I will discuss all
+ offers with Cygnus staff to find out what is most needed and decide
+ which tests to incorporate into DejaGnu. There are several criteria
+ for choosing tests, including the degree to which an area is
+ covered, and its importance in the overall stability of the
+ operating system. Some tests may have to be rejected just because
+ they are hard to fit into the DejaGnu model.
+
+People
+
+ Now you can find out why each of us got involved with this project.
+
+ Cygnus writes and distributes free software, selling support as a
+ means to make money. The company is not directly in the business of
+ supporting operating systems or common UNIX utilities, so this kind
+ of testing is tangential to their main goals. But they may want to
+ support those things in the future. In any case, they would like to
+ see Linux do well, and this big test project will be a good
+ promotion for DejaGnu.
+ H. K. Lu, as a volunteer for Linux, has been using his own system to
+ implement, port, maintain, and ensure ANSI and POSIX compliance for
+ the C library (mostly the GNU C library along with the iostream
+ class from the g++ library). He is looking for ways to validate the
+ work that he and many other contributors have put in.
+
+ As an editor at a publisher of computer books, my relationship to
+ Linux and BSD is even more distant than that of Cygnus. But we are
+ thinking about putting out books about Linux, from either the Linux
+ Documentation Project or independent authors, and would like to make
+ sure Linux is stable enough to be documented. The testing of
+ utilities is particularly important to me, because it can provide
+ quality assurance for our books, including the BSD version of UNIX
+ in a Nutshell.
+
+What you can do
+
+ We ask people who have written tests in the areas I have described
+ to donate them to this project and see them benefit the public.
+ Don't just send me stuff -- write or call to discuss what you've got
+ in general. You also have to assign the tests to the Free Software
+ Foundation (a simple matter, so long as you are the owner of the
+ tests) so that they can be distributed under the GPL.
+
+ Also, please don't starting flaming about the GPL. Either join our
+ project and donate your tests, or don't. Personally, I do not take
+ a side in this war.
+
+ People who are interested in testing as a discipline, and have some
+ time to donate, are invited to contact me to help write tests. Tell
+ me:
+
+ Your knowledge of computer languages and tools
+
+ Previous software test efforts you have engaged in, if any
+
+ How much time you can devote
+
+ What functional areas you think are important and have a
+ particular interest in
+
+ Cygnus staff will tell volunteers which areas need testing, and
+ offer guidance while you learn and apply DejaGnu. The most
+ important trait for the project is rigorous thinking along the lines
+ of software quality (so the best preparation is to have done some
+ formal testing before). You do not need to know any particular
+ language or tool; you can learn tcl or other aspects of DejaGnu
+ fairly quickly.
+
+ Contact information for me is in my signature. I am at the phone
+ number during traditional U.S. business hours. So send mail any
+ time, or try calling from Monday through Friday, 9:00 AM to 5:00 PM,
+ Eastern Daylight Saving Time (four hours later than Greenwich Mean
+ Time).
+
+ Feel free to distribute and repost this message elsewhere, in its
+ entirety.
+
+----------------------------------------------------------------------
+Andy Oram O'Reilly & Associates, Inc. andyo@ora.com
+ 90 Sherman Street, Cambridge, MA 02140 (617) 354-5800
+ fax (617) 661-1116
+----------------------------------------------------------------------
+
+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 <your name>". Messages sent to
+frost@cygnus.com go to the mailing list. \ No newline at end of file
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..2f77cd5
--- /dev/null
+++ b/TODO
@@ -0,0 +1,8 @@
+ Thu Mar 16 17:34:33 MST 1995
+
+. Add more support for target boards and realtime OS's.
+. Use the new expect terminal support for an "escape codes" API.
+. Use expectk and write a GUI testing API, complete with
+ record/playback.
+. Add a "testing methodologies" section to the manual.
+
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..f5379a5
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,137 @@
+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.
+
+# 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)])
+
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
+
+# serial 1
+
+AC_DEFUN(AM_MAINTAINER_MODE,
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT($USE_MAINTAINER_MODE)
+ AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST(MAINT)dnl
+]
+)
+
+# Define a conditional.
+
+AC_DEFUN(AM_CONDITIONAL,
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi])
+
diff --git a/baseboards/README b/baseboards/README
new file mode 100644
index 0000000..590bc43
--- /dev/null
+++ b/baseboards/README
@@ -0,0 +1,15 @@
+The files in this directory are used to describe the basic
+configuration of a board. (Note that we use "board" in its loosest
+sense, referring to either a target or host). The structure of these
+files is very similar, and I would suggest that you follow this when
+writing a new one.
+
+Two files need to be created for a given board; the appropriate file
+in this directory, and one in devo/dejagnu/config. The one in here is
+used to set up entries in the data array describing the board, while
+the one in devo/dejagnu/config is used to describe the actions used to
+actually communicate with the board.
+
+A third file (the site-specific machine file) can be used to describe
+any site-specific functionality, such as port numbers, serial devices,
+etc.
diff --git a/baseboards/a29k-udi.exp b/baseboards/a29k-udi.exp
new file mode 100644
index 0000000..3b4c506
--- /dev/null
+++ b/baseboards/a29k-udi.exp
@@ -0,0 +1,23 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {a29k-amd-udi};
+
+# Load the generic configuration for this board.
+load_generic_config "udi";
+
+# 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 target uses libgloss and newlib.
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]";
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
+# We don't need a linker script.
+set_board_info ldscript "";
+
+# mondfe can't return exit statuses, so gcc (ctorture et al) needs to
+# do what it can to get them.
+set_board_info needs_status_wrapper 1;
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can
+# be.
+set_board_info gcc,stack_size 16384
diff --git a/baseboards/arc-sim.exp b/baseboards/arc-sim.exp
new file mode 100644
index 0000000..4bb9d4a
--- /dev/null
+++ b/baseboards/arc-sim.exp
@@ -0,0 +1,37 @@
+# There is currently no ARC simulator. This exists so gcc compile.exp testing
+# works.
+
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {arc-elf}
+
+# 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"
+
+# "arc" is the name of the sim subdir in devo/sim.
+setup_sim arc
+
+# No multilib options needed by default.
+process_multilib_options ""
+
+# 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 needed.
+set_board_info ldscript "";
+
+# 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
+# Doesn't pass arguments or signals, can't return results, and doesn't
+# do inferiorio.
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,noinferiorio 1
diff --git a/baseboards/arm-ice.exp b/baseboards/arm-ice.exp
new file mode 100644
index 0000000..8e03737
--- /dev/null
+++ b/baseboards/arm-ice.exp
@@ -0,0 +1,48 @@
+# Load the generic configuration for this board. This will define a basic
+# set of routines used to communicate with the board.
+load_generic_config "arm-ice"
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+if { [board_info $board obj_format] == "pe" } {
+ set additional_options "-Wl,-oformat,pe-arm-little,--image-base,0"
+} else {
+ set additional_options ""
+}
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+# 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 "";
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can
+# be.
+set_board_info gcc,stack_size 16384
+
+# We use "target rdi" to talk to the board.
+set_board_info gdb_protocol "rdi"
+
+# No support for signals.
+set_board_info gdb,nosignals 1
+
+# Make this variable go away, we don't need it.
+unset additional_options;
+
+# Can't call functions from GDB.
+set_board_info gdb,cannot_call_functions 1
+
+# Or do I/O.
+set_board_info gdb,noinferiorio 1
+
+# Or have signals.
+set_board_info gdb,nosignals 1
+
+# Exit statuses are invalid.
+set_board_info exit_statuses_bad 1
diff --git a/baseboards/arm-sim.exp b/baseboards/arm-sim.exp
new file mode 100644
index 0000000..9e96c1b
--- /dev/null
+++ b/baseboards/arm-sim.exp
@@ -0,0 +1,52 @@
+# Load the generic configuration for this board. This will define a basic
+# set of routines used to communicate with the board.
+load_generic_config "sim"
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+if { [board_info $board obj_format] == "pe" } {
+ set additional_options "-Wl,-oformat,pe-arm-little,--image-base,0"
+# set_board_info uses_underscores 1
+} else {
+
+# if [istarget "*-*-coff"] {
+# set_board_info uses_underscores 1
+# }
+
+ set additional_options ""
+}
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# The name of the directory in the build tree where the simulator lives.
+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
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can
+# be.
+set_board_info gcc,stack_size 16384
+
+# No support for signals.
+set_board_info gdb,nosignals 1
+
+# More time is needed to compile PlumHall tests
+set_board_info gcc,timeout 800
+
+# Make this variable go away, we don't need it.
+unset additional_options;
diff --git a/baseboards/basic-sim.exp b/baseboards/basic-sim.exp
new file mode 100644
index 0000000..3fa7c4d
--- /dev/null
+++ b/baseboards/basic-sim.exp
@@ -0,0 +1,51 @@
+# find_sim -- find a usable simulator
+# This proc is local to this file and is used to locate a simulator to use.
+# First we see if SIM=foo was specified on the command line.
+# Otherwise we search the build tree, then $PATH.
+
+proc find_sim { target_alias sim_dir sim_name } {
+ global tool_root_dir;
+ global SIM
+
+ if [info exists SIM] {
+ return $SIM
+ }
+
+ if [is_remote host] {
+ if ![board_info host exists no_transform_name] {
+ return ${target_alias}-${sim_name};
+ } else {
+ return ${sim_name};
+ }
+ }
+
+ # We have to search because tool_root_dir may actually point to that blasted
+ # "target" subdirectory.
+ set try [lookfor_file ${tool_root_dir} sim/${sim_dir}/${sim_name}];
+ if { $try != "" } {
+ return $try;
+ }
+ return ${target_alias}-${sim_name};
+}
+
+proc setup_sim { subdir_name } {
+ global target_alias;
+ global tool_root_dir;
+ global board;
+
+ if [info exists target_alias] {
+ set tmp $target_alias;
+ } else {
+ if [board_info $board exists target_install] {
+ set tmp [lindex [board_info $board target_install] 0];
+ }
+ }
+
+ if ![board_info $board exists sim] {
+ set_board_info sim [find_sim $tmp $subdir_name run];
+ }
+
+ verbose "Using simulator [board_info $board sim]\n"
+}
+
+set_board_info is_simulator 1;
diff --git a/baseboards/cf.exp b/baseboards/cf.exp
new file mode 100644
index 0000000..f4d73c3
--- /dev/null
+++ b/baseboards/cf.exp
@@ -0,0 +1,73 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {m68k-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 "cfdbug";
+
+# Need -m5200 by default.
+process_multilib_options "-m5200"
+
+# The compiler used to build for this board. Note that this has nothing to do
+# with what compiler is tested when testing gcc.
+set_board_info compiler "[find_gcc]"
+
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]";
+
+# Nasty hack.
+if { [board_info $board obj_format] == "a.out" } {
+ # Need to pass the start address to objcopy.
+ set_board_info use_vma_offset 1;
+ # Wrapping has to be specially done for m68k-aout, for whatever reason.
+ set_board_info wrap_m68k_aout 1;
+
+ set extra_m68k_ld_flags "-N"
+
+ # We need to tell GDB to load at the correct offset.
+ set_board_info gdb_load_offset [board_info $board hex_startaddr];
+} else {
+ set extra_m68k_ld_flags ""
+}
+
+set_board_info ldflags "$extra_m68k_ld_flags [libgloss_link_flags] [newlib_link_flags]"
+unset extra_m68k_ld_flags
+
+
+# If no output format is specified, use objcopy.
+if ![board_info $board exists output_format] {
+ set tempfil [lookfor_file $tool_root_dir binutils/objcopy];
+ if { $tempfil != "" } {
+ set_board_info objcopy $tempfil
+ } else {
+ set_board_info objcopy [transform objcopy]
+ }
+ unset tempfil
+}
+
+# SBC5204 linker script.
+set_board_info ldscript "-Wl,-Tsbc5204.ld";
+# The idt interface can't return exit statuses, so gcc (ctorture et
+# al) needs to do what it can to get them.
+set_board_info needs_status_wrapper 1;
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can be.
+# The board has 192K of RAM. We will set stack size to one third of that.
+set_board_info gcc,stack_size 65536
+
+# GDB needs to use "target dbug" to talk to the board.
+set_board_info gdb_protocol "dbug";
+
+# Can't pass arguments to the program under test.
+set_board_info noargs 1
+
+# Nor can it do I/O in GDB.
+set_board_info gdb,noinferiorio 1
+
+# It has no signals.
+set_board_info gdb,nosignals 1
+
+# It can't return results when debugging with GDB.
+set_board_info gdb,noresults 1
+
+# Pseudo-random guess.
+set_board_info sys_speed_value 200;
diff --git a/baseboards/cygmon.exp b/baseboards/cygmon.exp
new file mode 100644
index 0000000..6ee4458
--- /dev/null
+++ b/baseboards/cygmon.exp
@@ -0,0 +1,31 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {sparc-elf sparc64-elf}
+
+# Load the generic configuration for this board. This will define a
+# set of generic routines used by the tool to communicate with the
+# board.
+load_generic_config "cygmon";
+
+# It needs no multilib flags by default.
+process_multilib_options ""
+
+set_board_info compiler "[find_gcc]";
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]";
+set_board_info ldflags "-nostdlib [libgloss_link_flags] [newlib_link_flags] [board_info $board addl_link_flags]";
+
+# CygMON linker script.
+set_board_info ldscript "-Tcygmon.ld"
+
+# Standard remote protocol.
+set_board_info gdb_protocol "remote";
+# We can't do input in GDB (yet! HA!). It *will* do output, hurrah.
+set_board_info gdb,noinferiorio 1;
+# Or pass arguments.
+set_board_info noargs 1;
+# Or do signals.
+set_board_info gdb,nosignals 1;
+
+set_board_info shell_prompt "cygmon>"
+
+
+set_board_info use_gdb_stub 1;
diff --git a/baseboards/cygwin.exp b/baseboards/cygwin.exp
new file mode 100644
index 0000000..80d4407
--- /dev/null
+++ b/baseboards/cygwin.exp
@@ -0,0 +1,12 @@
+# The canonical unix board description.
+load_generic_config "unix";
+
+process_multilib_options "";
+
+set_board_info compiler "[find_gcc]";
+
+set_board_info bmk,use_alarm 1;
+
+set_board_info gdb,noinferiorio 1;
+
+send_user "configuring for cygwin testing\n";
diff --git a/baseboards/d10v-sim.exp b/baseboards/d10v-sim.exp
new file mode 100644
index 0000000..f744cdc
--- /dev/null
+++ b/baseboards/d10v-sim.exp
@@ -0,0 +1,48 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {d10v-elf}
+
+# Load the generic configuration for this board. This will define any
+# routines needed 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 name of the simulator directory is "d10v".
+setup_sim d10v
+
+# No multilib options needed by default.
+process_multilib_options "";
+
+# 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. We assume that all multilib
+# options have been specified before we get here.
+set_board_info cflags "[newlib_include_flags]"
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
+# No linker script needed.
+set_board_info ldscript "";
+
+# Can't pass arguments to programs on this target..
+set_board_info noargs 1
+# And there's no support for signals.
+set_board_info gdb,nosignals 1
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can
+# be.
+set_board_info gcc,stack_size 5000
+
+# Used by a few gcc.c-torture testcases when trampolines are used.
+set_board_info gcc,no_trampolines 1
+
+# Used by a few gcc.c-torture testcases when labels as values are used.
+set_board_info gcc,no_label_values 1
+
+# Torture test gcc.c-torture/execute/920501-6.c takes > 5 minutes on a
+# 90 Mhz Pentium, so up the time limit.
+set board_info($board,sim_time_limit) 600
+
+# sizeof int != sizeof long.
+set_board_info gdb,short_int 1
diff --git a/baseboards/d10v.exp b/baseboards/d10v.exp
new file mode 100644
index 0000000..254556e
--- /dev/null
+++ b/baseboards/d10v.exp
@@ -0,0 +1,60 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {d10v-elf}
+
+# Load the generic configuration for this board. This will define a base set
+# of routines needed by the tool to communicate with the board.
+load_generic_config "d10v"
+
+# No multilib options are needed by default for this board.
+process_multilib_options "";
+
+# 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 "[newlib_include_flags]";
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]";
+# No linker script needed.
+set_board_info ldscript "";
+
+# The board can't really return exit statuses and we need to indicate this;
+# however, the standard GCC wrapper won't work with this target because
+# it can't do I/O.
+#set_board_info needs_status_wrapper 1
+
+# It uses the remote stub protocol to talk to the board.
+set_board_info gdb_protocol "remote"
+set_board_info use_gdb_stub 1
+
+# Both the EVA and TS3 boards currently deal badly with X packets.
+set_board_info disable_x_packet 1
+
+# Both the EVA and TS3 boards currently deal badly with Z packets.
+set_board_info disable_z_packet 1
+
+# Used by gdb-comm.
+set_board_info gdb_run_command "jump *_start";
+set_board_info gdb,start_symbol "_start";
+
+# Can't pass arguments to programs on this target.
+set_board_info noargs 1
+# And there's no support for signals.
+set_board_info gdb,nosignals 1
+# And it can't do I/O.
+set_board_info gdb,noinferiorio 1
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can
+# be.
+set_board_info gcc,stack_size 5000
+
+# Used by a few gcc.c-torture testcases when trampolines are used.
+set_board_info gcc,no_trampolines 1
+
+# Used by a few gcc.c-torture testcases when labels as values are used.
+set_board_info gcc,no_label_values 1
+
+# sizeof int != sizeof long.
+set_board_info gdb,short_int 1
+
+# Some d10v:ts3 boards are in ts2-board compatibility mode after a reset.
+# Force it into d10v:ts3 internal mode
+set_board_info gdb_init_command "set \$dmap2 = 0x2000"
diff --git a/baseboards/d30v-sim.exp b/baseboards/d30v-sim.exp
new file mode 100644
index 0000000..c795165
--- /dev/null
+++ b/baseboards/d30v-sim.exp
@@ -0,0 +1,33 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {d30v-elf}
+
+# Load the generic configuration for this board. This will define any
+# routines needed 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 name of the simulator directory is "d30v".
+setup_sim d30v
+
+# 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. We assume that all multilib
+# options have been specified before we get here.
+# Pass -C to the assembler to suppress the warning about symbols being the same name as registers
+set_board_info cflags "[libgloss_include_flags] [newlib_include_flags] -Wa,-C"
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags] -mextmem -Wl,--defsym,__stack=0x80800000"
+# No linker script needed.
+set_board_info ldscript "";
+
+# Can't pass arguments to programs on this target..
+set_board_info noargs 1
+# And there's no support for signals.
+set_board_info gdb,nosignals 1
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can
+# be.
+set_board_info gcc,stack_size 5000
diff --git a/baseboards/danlite-elf.exp b/baseboards/danlite-elf.exp
new file mode 100644
index 0000000..e22db2f
--- /dev/null
+++ b/baseboards/danlite-elf.exp
@@ -0,0 +1,42 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {sparc86x-elf}
+
+# Load the generic configuration for this board. This will define a
+# set of generic routines used by the tool to communicate with the
+# board.
+load_generic_config "slite";
+
+# It needs no multilib flags by default.
+process_multilib_options ""
+
+set_board_info compiler "[find_gcc]";
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]";
+
+set_board_info ldflags "-nostartfiles [libgloss_link_flags] [newlib_link_flags]";
+
+# DANlite (sparc86x) linker script.
+set_board_info ldscript "-Tsparc86x.ld";
+
+# The address at which the stub needs to be linked.
+# set_board_info gdb_stub_offset "0x40000000";
+
+# The board doesn't return exit statuses and we need to indicate this.
+# However, the standard GCC wrapper won't work with this target because
+# it doesn't return stuff from printf ().
+set_board_info needs_status_wrapper 1;
+
+# We use a GDB stub to talk to the board.
+set_board_info use_gdb_stub 1;
+# For GDB, we need to use a real stub (not the separate loader scheme
+# we use for Sparclet).
+set_board_info gdb_stub "";
+# And the protocol is "sparclite".
+set_board_info gdb_protocol "sparclite";
+# No mathlib.
+set_board_info mathlib "";
+# We can't do I/O in GDB.
+set_board_info gdb,noinferiorio 1;
+# Or pass arguments.
+set_board_info noargs 1;
+# Or do signals.
+set_board_info gdb,nosignals 1;
diff --git a/baseboards/dos.exp b/baseboards/dos.exp
new file mode 100644
index 0000000..8702a03
--- /dev/null
+++ b/baseboards/dos.exp
@@ -0,0 +1,25 @@
+# This is a list of the installed tools for this board. Of course,
+# we apparently don't create a compiler for this board, but...
+set_board_info target_install {i386-cygwin32}
+
+# Load the generic configuration for the board. This will define any routines
+# needed by the tool to communicate with the board.
+
+load_generic_config "dos";
+
+# 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 target uses libgloss, libio and winsup.
+set_board_info cflags "[newlib_include_flags] [libio_include_flags] [winsup_include_flags]";
+set_board_info ldflags "[newlib_link_flags] [libio_link_flags] [winsup_link_flags]"
+# We don't need a link script.
+set_board_info ldscript "";
+
+# mondfe can't return exit statuses, so gcc (ctorture et al) needs to
+# do what it can to get them.
+set_board_info needs_status_wrapper 1;
+
+set_board_info gdb_opts "--command gdbinit"
+set_board_info gdb,nointerrupts 1
diff --git a/baseboards/fr30-cygmon.exp b/baseboards/fr30-cygmon.exp
new file mode 100644
index 0000000..b18fa59
--- /dev/null
+++ b/baseboards/fr30-cygmon.exp
@@ -0,0 +1,31 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {fr30-elf}
+
+# Load the generic configuration for this board. This will define a
+# set of generic routines used by the tool to communicate with the
+# board.
+load_generic_config "cygmon";
+
+# It needs no multilib flags by default.
+process_multilib_options ""
+
+set_board_info compiler "[find_gcc]";
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]";
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags] [board_info $board addl_link_flags]";
+
+# CygMON linker script.
+set_board_info ldscript "-specs=eval1.specs"
+
+# Standard remote protocol.
+set_board_info gdb_protocol "remote";
+# We can't do input in GDB (yet! HA!). It *will* do output, hurrah.
+set_board_info gdb,noinferiorio 1;
+# Or pass arguments.
+set_board_info gdb,noargs 1;
+set_board_info noargs 1;
+# Or do signals.
+set_board_info gdb,nosignals 1;
+
+set_board_info shell_prompt "cygmon>"
+
+set_board_info use_gdb_stub 1;
diff --git a/baseboards/fr30-elf.exp b/baseboards/fr30-elf.exp
new file mode 100644
index 0000000..3c8f514
--- /dev/null
+++ b/baseboards/fr30-elf.exp
@@ -0,0 +1,40 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {fr30-elf}
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# Load the generic configuration for this board. This will define a basic set
+# of routines needed by the tool to communicate with the board.
+if { $is_gdb_remote } {
+ load_generic_config "fr30-stub"
+} else {
+ load_generic_config "fr30"
+}
+
+# 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]"
+set_board_info ldscript "-Wl,-Teva.ld"
+set_board_info gdb,start_symbol "_start"
+
+set_board_info needs_status_wrapper 1
+
+# The GDB protocol used for this target.
+if { ! $is_gdb_remote } {
+ set_board_info gdb_protocol "fr30"
+} else {
+ set_board_info gdb_protocol "fr30"
+ set_board_info use_gdb_stub 1
+ set_board_info gdb_stub_ldscript "-Wl,-Teva-stub.ld"
+}
+
+# Doesn't pass arguments or signals, can't return results, and doesn't
+# do inferiorio.
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,noinferiorio 1
diff --git a/baseboards/fr30-sim.exp b/baseboards/fr30-sim.exp
new file mode 100644
index 0000000..73fad4c
--- /dev/null
+++ b/baseboards/fr30-sim.exp
@@ -0,0 +1,34 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {fr30-elf}
+
+# 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"
+
+# "fr30" is the name of the sim subdir in devo/sim.
+setup_sim fr30
+
+# No multilib options needed by default.
+process_multilib_options ""
+
+# 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 needed.
+set_board_info ldscript "";
+
+# 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
+# Doesn't pass arguments or signals, can't return results, and doesn't
+# do inferiorio.
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,noinferiorio 1
diff --git a/baseboards/h8300-sim.exp b/baseboards/h8300-sim.exp
new file mode 100644
index 0000000..39415df
--- /dev/null
+++ b/baseboards/h8300-sim.exp
@@ -0,0 +1,44 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {h8300-hms}
+
+# Load the tool-specific configuration for this board, as well as the
+# generic configuration. This will define any 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 name of the simulator is "h8300" (as in h8300-hms-run).
+setup_sim h8300
+
+# No multilib options are used by default.
+process_multilib_options ""
+
+# 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.
+set_board_info cflags "[newlib_include_flags]"
+set_board_info ldflags "[newlib_link_flags]"
+# The simulator doesn't return exit statuses and we need to indicate this.
+set_board_info needs_status_wrapper 1
+
+# There's no support for argument-passing.
+set_board_info noargs 1
+# Nor does it have real signals.
+set_board_info gdb,nosignals 1
+# And it can't do I/O.
+set_board_info gdb,noinferiorio 1
+# Nor can it return results.
+set_board_info gdb,noresults 1
+
+# Limit the stack size to something real tiny.
+set_board_info gcc,stack_size 4096
+
+# There's no long long support on this target
+set_board_info no_long_long 1
+
+# sizeof int != sizeof long.
+set_board_info gdb,short_int 1
diff --git a/baseboards/h8300.exp b/baseboards/h8300.exp
new file mode 100644
index 0000000..f42dbb0
--- /dev/null
+++ b/baseboards/h8300.exp
@@ -0,0 +1,68 @@
+# Load the tool-specific configuration for this board, as well as the
+# generic configuration. This will define any routines needed by the
+# tool to communicate with the board.
+load_generic_config "h8300"
+
+# Don't use anything by default.
+process_multilib_options ""
+
+# The default compiler for this target.
+set_board_info compiler "[find_gcc]"
+
+# We only support newlib on this target. We assume that all multilib
+# options have been specified before we get here.
+set_board_info cflags "[newlib_include_flags]"
+set_board_info ldflags "[newlib_link_flags]"
+
+# The GDB protocol used with this board.
+set_board_info gdb_protocol "remote"
+# It's running a GDB stub in ROM.
+set_board_info use_gdb_stub 1;
+
+# There's no support for argument-passing.
+set_board_info noargs 1
+# Nor does it have real signals.
+set_board_info gdb,nosignals 1
+# And it can't do I/O.
+set_board_info gdb,noinferiorio 1
+# Nor can it return results.
+set_board_info gdb,noresults 1
+
+# Limit the stack size to something real tiny.
+set_board_info gcc,stack_size 4096
+
+# The board can get wedged in amusing and interesting ways.
+set_board_info unreliable 1
+
+# There's no long long support on this target
+set_board_info no_long_long 1
+
+# sizeof int != sizeof long.
+set_board_info gdb,short_int 1
+
+# Pick the right linker script if -mh/-ms is specified.
+
+set linker_script "h8300.ld"
+
+foreach x $board_variant_list {
+ regsub -all "^\[ \t\]*" "$x" "" x;
+ regsub -all "\[ \t\]*$" "$x" "" x;
+
+ case $x in {
+ { h -mh } {
+ set linker_script "h8300h.ld"
+ }
+ { s -ms } {
+ set linker_script "h8300s.ld"
+ }
+ }
+}
+
+# Whee, magic linker scripts hidden away.
+#
+# This one's dependent on the multilib options in use, sadly. And we
+# *need* a linker script. Really. Otherwise the code gets linked at
+# the wrong address and it won't run on the board.
+set_board_info ldscript "-Wl,-T${prefix_dir}/h8300-hms/${linker_script}"
+
+unset linker_script
diff --git a/baseboards/i386-bozo.exp b/baseboards/i386-bozo.exp
new file mode 100644
index 0000000..1dbfae0
--- /dev/null
+++ b/baseboards/i386-bozo.exp
@@ -0,0 +1,51 @@
+# Load the tool-specific configuration for this board, as well as the
+# generic configuration. This will define any routines needed by the
+# tool to communicate with the board.
+load_generic_config "i386-bozo"
+
+# Use no multilib options by default.
+process_multilib_options ""
+
+# Default to COFF.
+set add_flags "";
+if { [board_info $board obj_format] == "a.out" } {
+ set_board_info support_libs "${prefix_dir}/i386-aout/"
+ set_board_info gdb_load_offset "0x41000000";
+ set_board_info gdb_sect_offset "0x41000000";
+ set add_flags "-N ";
+} elseif { [board_info $board obj_format] == "elf" } {
+ set_board_info support_libs "${prefix_dir}/i386-elf/"
+} else {
+ set_board_info support_libs "${prefix_dir}/i386-coff/"
+}
+
+# The default compiler for this target.
+set_board_info compiler "[find_gcc]"
+
+# We only support newlib on this target. We assume that all multilib
+# options have been specified before we get here.
+set_board_info cflags "[newlib_include_flags]"
+set_board_info ldflags "${add_flags}[newlib_link_flags] -B[board_info $board support_libs]"
+# Whee, magic linker scripts hidden away.
+set_board_info ldscript "-Tbozo.ld"
+
+# The GDB protocol used with this board.
+set_board_info gdb_protocol "remote"
+# It's running a GDB stub in ROM.
+set_board_info use_gdb_stub 1;
+
+# There's no support for argument-passing.
+set_board_info noargs 1
+# Can't do input.
+set_board_info gdb,noinferiorio 1
+# Nor does it have real signals.
+set_board_info gdb,nosignals 1
+
+# Limit the stack size.
+set_board_info gcc,stack_size 16384
+
+# Status wrapper will work, although exit statuses are reliable.
+set_board_info needs_status_wrapper 1
+
+# This is the start symbol in crt0.o.
+set_board_info gdb,start_symbol "_start";
diff --git a/baseboards/i960-cyclone.exp b/baseboards/i960-cyclone.exp
new file mode 100644
index 0000000..6ce5ce7
--- /dev/null
+++ b/baseboards/i960-cyclone.exp
@@ -0,0 +1,47 @@
+# Danger, Will Robinson! Settings in this file do not override
+# previous settings for the board being defined.
+
+# 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 "i960"
+
+# No multilib options needed by default.
+process_multilib_options ""
+
+# We want to strip executables before downloading them via xmodem.
+if ![board_info $board exists strip] {
+ set tempfil [lookfor_file $tool_root_dir binutils/strip];
+ if { $tempfil != "" } {
+ set_board_info strip $tempfil
+ } else {
+ set_board_info strip [transform strip]
+ }
+ unset tempfil
+}
+
+# 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 start_addr 0xa0008000
+set_board_info ldflags "-Wl,-Ttext,[board_info $board start_addr] [libgloss_link_flags] [newlib_link_flags] -B${prefix_dir}/i960-coff/"
+# IDT linker script.
+set_board_info ldscript "-Wl,-T${prefix_dir}/i960-coff/i960.ld"
+
+# GDB 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
+
+# The GDB protocol used with this board.
+set_board_info gdb_protocol "mon960"
+
+# Can't pass arguments to the program.
+set_board_info noargs 1
+
+# No support for signals.
+set_board_info gdb,nosignals 1
+
+set_board_info gdb_prompt "\\(gdb960\\)"
+
+# The board tends to be unreliable.
+set_board_info unreliable 1
diff --git a/baseboards/i960-sim.exp b/baseboards/i960-sim.exp
new file mode 100644
index 0000000..98ca8de
--- /dev/null
+++ b/baseboards/i960-sim.exp
@@ -0,0 +1,28 @@
+# 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";
+
+# This tells it which directory to look in for the simulator.
+setup_sim i960;
+
+# No multilib flags are set by default.
+# Set -msoft-float, because the simulator doesn't have FP support yet.
+process_multilib_options "-msoft-float";
+
+# 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]";
+
+set_board_info cflags "-mka [libgloss_include_flags] [newlib_include_flags]";
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]";
+
+# Use mon960.
+set_board_info ldscript "-Wl,-Tmon960.ld";
+
+# And, it can't do arguments, and doesn't have real signals.
+# ??? Unknown if this is right.
+set_board_info noargs 1;
+set_board_info gdb,nosignals 1;
diff --git a/baseboards/jmr3904-sim.exp b/baseboards/jmr3904-sim.exp
new file mode 100644
index 0000000..244e2b5
--- /dev/null
+++ b/baseboards/jmr3904-sim.exp
@@ -0,0 +1,14 @@
+# And we use the jmr3904 linker script.
+set_board_info ldscript "-Tjmr3904app.ld"
+
+# Pass --board=jmr3904 to the standalone simulator
+set_board_info sim,options "--board=jmr3904"
+set_board_info gdb,target_sim_options "--board=jmr3904"
+
+# Pass -G 0 when testing libjava
+set_board_info libjava,options "-G 0"
+
+set_board_info gcc,stack_size "8192"
+
+# Otherwise we're the same as the standard MIPS simulator.
+load_base_board_description "mips-sim";
diff --git a/baseboards/linux-gdbserver.exp b/baseboards/linux-gdbserver.exp
new file mode 100644
index 0000000..abf06d7
--- /dev/null
+++ b/baseboards/linux-gdbserver.exp
@@ -0,0 +1,36 @@
+# gdbserver running native.
+
+load_generic_config "gdbserver";
+
+process_multilib_options "";
+
+# The default compiler for this target.
+set_board_info compiler "[find_gcc]";
+
+# We will be using the standard GDB remote protocol
+set_board_info gdb_protocol "remote"
+
+# Path to the gdbserver executable, if required.
+set_board_info gdb_server_prog \
+ "../gdbserver/gdbserver"
+
+# Name of the computer whose socket will be used, if required.
+set_board_info sockethost "localhost:"
+
+# Port ID to use for socket connection
+# set_board_info gdb,socketport "4004"
+
+# Use techniques appropriate to a stub
+set_board_info use_gdb_stub 1;
+
+# This gdbserver can only run a process once per session.
+set_board_info gdb,do_reload_on_run 1;
+
+# There's no support for argument-passing (yet).
+set_board_info noargs 1
+
+# Can't do input (or output) in the current gdbserver.
+set_board_info gdb,noinferiorio 1
+
+# Can't do hardware watchpoints, in general
+set_board_info gdb,no_hardware_watchpoints 1;
diff --git a/baseboards/linux-libremote.exp b/baseboards/linux-libremote.exp
new file mode 100644
index 0000000..8310969
--- /dev/null
+++ b/baseboards/linux-libremote.exp
@@ -0,0 +1,36 @@
+# Libremote gdbserver running native.
+
+load_generic_config "gdbserver";
+
+process_multilib_options "";
+
+# The default compiler for this target.
+set_board_info compiler "[find_gcc]";
+
+# We will be using the standard GDB remote protocol
+set_board_info gdb_protocol "remote"
+
+# Path to the gdbserver executable, if required.
+set_board_info gdb_server_prog \
+ "../../libremote/native/server"
+
+# Name of the computer whose socket will be used, if required.
+# set_board_info sockethost "localhost"
+
+# Port ID to use for socket connection
+# set_board_info gdb,socketport "4004"
+
+# Use techniques appropriate to a stub
+set_board_info use_gdb_stub 1;
+
+# This gdbserver can only run a process once per session.
+set_board_info gdb,do_reload_on_run 1;
+
+# There's no support for argument-passing (yet).
+set_board_info noargs 1
+
+# Can't do input (or output) in the current gdbserver.
+set_board_info gdb,noinferiorio 1
+
+# Can't do hardware watchpoints, in general
+set_board_info gdb,no_hardware_watchpoints 1;
diff --git a/baseboards/m32r-elf.exp b/baseboards/m32r-elf.exp
new file mode 100644
index 0000000..ab402ae
--- /dev/null
+++ b/baseboards/m32r-elf.exp
@@ -0,0 +1,40 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {m32r-elf}
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# Load the generic configuration for this board. This will define a basic set
+# of routines needed by the tool to communicate with the board.
+if { $is_gdb_remote } {
+ load_generic_config "m32r-stub"
+} else {
+ load_generic_config "m32r"
+}
+
+# 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]"
+set_board_info ldscript "-Wl,-Teva.ld"
+set_board_info gdb,start_symbol "_start"
+
+set_board_info needs_status_wrapper 1
+
+# The GDB protocol used for this target.
+if { ! $is_gdb_remote } {
+ set_board_info gdb_protocol "m32r"
+} else {
+ set_board_info gdb_protocol "m32r"
+ set_board_info use_gdb_stub 1
+ set_board_info gdb_stub_ldscript "-Wl,-Teva-stub.ld"
+}
+
+# Doesn't pass arguments or signals, can't return results, and doesn't
+# do inferiorio.
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,noinferiorio 1
diff --git a/baseboards/m32r-sim.exp b/baseboards/m32r-sim.exp
new file mode 100644
index 0000000..eaa7145
--- /dev/null
+++ b/baseboards/m32r-sim.exp
@@ -0,0 +1,34 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {m32r-elf}
+
+# 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"
+
+# "m32r" is the name of the sim subdir in devo/sim.
+setup_sim m32r
+
+# No multilib options needed by default.
+process_multilib_options ""
+
+# 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 needed.
+set_board_info ldscript "";
+
+# 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
+# Doesn't pass arguments or signals, can't return results, and doesn't
+# do inferiorio.
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,noinferiorio 1
diff --git a/baseboards/m68k-emc.exp b/baseboards/m68k-emc.exp
new file mode 100644
index 0000000..7b57649
--- /dev/null
+++ b/baseboards/m68k-emc.exp
@@ -0,0 +1,35 @@
+# Load the generic configuration for this board. This will define any
+# routines needed by the tool to communicate with the board.
+load_generic_config "m68k-emc";
+
+# No multilib options by default.
+process_multilib_options ""
+
+# The compiler used to build for this board. Note that this has nothing to do
+# with what compiler is tested when testing gcc.
+set_board_info compiler "[find_gcc]"
+
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]";
+
+set_board_info ldflags "-nostdlib [libgloss_link_flags] [newlib_link_flags]"
+
+# No linker script.
+set_board_info ldscript "";
+# The idt interface can't return exit statuses, so gcc (ctorture et
+# al) needs to do what it can to get them.
+set_board_info needs_status_wrapper 1;
+
+# GDB needs to use "target remote" to talk to the board.
+set_board_info gdb_protocol "remote";
+
+# Can't pass arguments to the program under test.
+set_board_info noargs 1
+
+# Nor can it do I/O in GDB.
+set_board_info gdb,noinferiorio 1
+
+# It has no signals.
+set_board_info gdb,nosignals 1
+
+# It can't return results when debugging with GDB.
+set_board_info gdb,noresults 1
diff --git a/baseboards/mcore-elf.exp b/baseboards/mcore-elf.exp
new file mode 100644
index 0000000..a50df98
--- /dev/null
+++ b/baseboards/mcore-elf.exp
@@ -0,0 +1,35 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {mcore-elf}
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# 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 "mcore"
+
+# 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 "-specs=cmb.specs [libgloss_include_flags] [newlib_include_flags]"
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
+set_board_info ldscript ""
+set_board_info gdb,start_symbol "_start"
+
+#set_board_info needs_status_wrapper 1
+
+# The GDB protocol used for this target.
+set_board_info gdb_protocol "picobug"
+set_board_info use_gdb_stub 1
+
+# Doesn't pass arguments or signals, can't return results, and doesn't
+# do inferiorio. It can't handle FP, either.
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,noinferiorio 1
+set_board_info gdb,skip_float_tests 1
+
+# Increase the timeout
+set timeout 60
diff --git a/baseboards/mcore-moto-sim.exp b/baseboards/mcore-moto-sim.exp
new file mode 100644
index 0000000..a362f4f
--- /dev/null
+++ b/baseboards/mcore-moto-sim.exp
@@ -0,0 +1,125 @@
+# This is a HACKED version of mcore-sim.exp that is intended to
+# support running tests on Motorola's proprietry MCore simulator.
+
+# It is quite likely that thia file will need to be modified in
+# order for you to use Motorola's simulator.
+
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {mcore-elf, mcore-pe}
+
+# Do general config stuff but do not load anything. "jim" was
+# chosen because it does not exist.
+load_generic_config "jim"
+
+process_multilib_options ""
+
+# 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 needed.
+set_board_info ldscript "";
+
+# 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
+
+# Doesn't pass arguments or signals, can't return results, and doesn't
+# do inferiorio.
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,noinferiorio 1
+
+# Rather than include the normal simulator support files,
+# their functions are reproduced (and modified) here.
+# --------------------------------------------------------------
+proc sim_spawn { dest cmdline args } {
+
+ # Choose whoch simulator to run
+ ## XXX - fixme - this should be automatic based on the
+ ## multilib option.
+ ## XXX - fixme - this should not be hardcoded.
+ set sim "/home/nickc/bin/linux/sim-be"
+# set sim "/home/nickc/bin/linux/sim-le"
+
+ set simflags "-m abi"
+
+ # Create a script to run the program
+ set handle [open doit w]
+ puts $handle "load $cmdline"
+ puts $handle "reset"
+ puts $handle "g 28"
+ puts $handle "quit"
+ close $handle
+
+ return [eval remote_spawn host \{ $sim $simflags "-sdoit" \} $args];
+}
+
+proc sim_wait { dest timeout } {
+ return [remote_wait host $timeout];
+}
+
+proc sim_load { dest prog args } {
+
+ if ![file exists $prog] then {
+ perror "sim.exp: $prog to be downloaded does not exist."
+ verbose -log "$prog to be downloaded does not exist." 3
+ return [list "untested" ""];
+ }
+
+ set sim_time_limit 240
+
+ set output "";
+
+ set res [remote_spawn target "${prog}"];
+
+ if { $res <= 0 } {
+ return [list "fail" "remote_spawn failed"];
+ }
+
+ set state [remote_wait target $sim_time_limit];
+ set status [lindex $state 0];
+ set output [lindex $state 1];
+ verbose "Output is $output";
+
+ set status2 [check_for_board_status output];
+ if { $status2 >= 0 } {
+ set status $status2
+ }
+
+ # FIXME: Do we need to examine $status?
+ # Yes, we do--what if the simulator itself gets an error and coredumps?
+
+ verbose "Return status was: $status" 2
+ if { $status == 0 } {
+ set result "pass"
+ } else {
+ set result "fail"
+ }
+ return [list $result $output];
+}
+
+set_board_info protocol "sim";
+
+# By default, assume the simulator is slow. This causes some tests
+# to either be simplified or skipped completely.
+set_board_info slow_simulator 1
+
+# -----------------------------------------------------------
+# find_sim -- find a usable simulator
+# This proc is local to this file and is used to locate a simulator to use.
+# First we see if SIM=foo was specified on the command line.
+# Otherwise we search the build tree, then $PATH.
+
+proc find_sim { target_alias sim_dir sim_name } {
+
+ ## XXX - fixme - this should not be hardcoded.
+ ## XXX - fixme - this should vary depending upon endianism selected.
+
+ return "/home/nickc/bin/linux/sim-be";
+}
+
+set_board_info is_simulator 1;
diff --git a/baseboards/mcore-pe.exp b/baseboards/mcore-pe.exp
new file mode 100644
index 0000000..526f674
--- /dev/null
+++ b/baseboards/mcore-pe.exp
@@ -0,0 +1,35 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {mcore-pe}
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# 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 "mcore"
+
+# 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 "-specs=cmb.specs [libgloss_include_flags] [newlib_include_flags]"
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
+set_board_info ldscript ""
+set_board_info gdb,start_symbol "_start"
+
+#set_board_info needs_status_wrapper 1
+
+# The GDB protocol used for this target.
+set_board_info gdb_protocol "picobug"
+set_board_info use_gdb_stub 1
+
+# Doesn't pass arguments or signals, can't return results, and doesn't
+# do inferiorio. It can't handle FP, either.
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,noinferiorio 1
+set_board_info gdb,skip_float_tests 1
+
+# Increase the timeout
+set timeout 60
diff --git a/baseboards/mcore-sim.exp b/baseboards/mcore-sim.exp
new file mode 100644
index 0000000..ae863ca
--- /dev/null
+++ b/baseboards/mcore-sim.exp
@@ -0,0 +1,37 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {mcore-elf, mcore-pe}
+
+# 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"
+
+# "mcore" is the name of the sim subdir in devo/sim.
+setup_sim mcore
+
+# No multilib options needed by default.
+process_multilib_options ""
+
+# 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 needed.
+set_board_info ldscript "";
+
+# 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
+# Doesn't pass arguments or signals, can't return results, and doesn't
+# do inferiorio.
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,noinferiorio 1
+set_board_info gdb,skip_float_tests 1
+
+set timeout 45
diff --git a/baseboards/mips-idt.exp b/baseboards/mips-idt.exp
new file mode 100644
index 0000000..17c6ca8
--- /dev/null
+++ b/baseboards/mips-idt.exp
@@ -0,0 +1,31 @@
+# Load the generic configuration for this board. This will define any
+# routines needed by the tool to communicate with the board.
+load_generic_config "mips-idt";
+
+# 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 don't use any multilib options by default.
+process_multilib_options ""
+
+set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]";
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]";
+
+# Use idt.
+if { [board_info $board obj_format] == "ecoff" } {
+ set_board_info ldscript "-Wl,-Tidtecoff.ld";
+} else {
+ set_board_info ldscript "-Wl,-Tidt.ld";
+}
+
+# The idt interface can't return exit statuses, so gcc (ctorture et
+# al) needs to do what it can to get them.
+set_board_info needs_status_wrapper 1;
+
+# GDB needs to use "target mips" to talk to the board.
+set_board_info gdb_protocol "mips";
+
+# And, it can't do arguments, and doesn't have real signals.
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
diff --git a/baseboards/mips-lnews-sim.exp b/baseboards/mips-lnews-sim.exp
new file mode 100644
index 0000000..b4685df
--- /dev/null
+++ b/baseboards/mips-lnews-sim.exp
@@ -0,0 +1,5 @@
+# lnews linker script.
+set_board_info ldscript "-Wl,-Tlnews.ld"
+
+# Otherwise, it's the same as the standard mips simulator.
+load_base_board_description "mips-sim";
diff --git a/baseboards/mips-lsi-sim.exp b/baseboards/mips-lsi-sim.exp
new file mode 100644
index 0000000..47cae89
--- /dev/null
+++ b/baseboards/mips-lsi-sim.exp
@@ -0,0 +1,8 @@
+# We need mips16.
+add_multilib_option "-mips16"
+
+# And we use the lsi linker script.
+set_board_info ldscript "-Wl,-Tlsi.ld"
+
+# Otherwise we're the same as the standard MIPS simulator.
+load_base_board_description "mips-sim";
diff --git a/baseboards/mips-sim.exp b/baseboards/mips-sim.exp
new file mode 100644
index 0000000..104188a
--- /dev/null
+++ b/baseboards/mips-sim.exp
@@ -0,0 +1,30 @@
+# 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";
+
+# This tells it which directory to look in for the simulator.
+setup_sim mips;
+
+# No multilib flags are set by default.
+process_multilib_options "";
+
+# 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]";
+
+set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]";
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]";
+
+# Use idt.
+if { [board_info $board obj_format] == "ecoff" } {
+ set_board_info ldscript "-Wl,-Tidtecoff.ld";
+} else {
+ set_board_info ldscript "-Wl,-Tidt.ld";
+}
+
+# And, it can't do arguments, and doesn't have real signals.
+set_board_info noargs 1;
+set_board_info gdb,nosignals 1;
diff --git a/baseboards/mips64-sim.exp b/baseboards/mips64-sim.exp
new file mode 100644
index 0000000..3315619
--- /dev/null
+++ b/baseboards/mips64-sim.exp
@@ -0,0 +1,29 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {mips64vr4300-elf
+ mips64-elf}
+
+# 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";
+
+# This tells it which directory to look in for the simulator.
+setup_sim mips;
+
+# No multilib flags are set by default.
+process_multilib_options "";
+
+# 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]";
+
+set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]";
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]";
+# PMON linker script.
+set_board_info ldscript "-Wl,-Tpmon.ld"
+
+# And, it can't do arguments or signals in GDB.
+set_board_info noargs 1;
+set_board_info gdb,nosignals 1;
diff --git a/baseboards/mips64vr4100-sim.exp b/baseboards/mips64vr4100-sim.exp
new file mode 100644
index 0000000..6e1d5eb
--- /dev/null
+++ b/baseboards/mips64vr4100-sim.exp
@@ -0,0 +1,33 @@
+# This is the name of the installed tools for this target.
+set target_install "mips64vr4100-elf"
+
+# 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"
+
+load_lib "libgloss.exp"
+
+# We need this for find_gcc and *_include_flags/*_link_flags.
+load_board_description "basic-sim"
+
+if ![info exists board_info($board,multilib_flags)] {
+ set board_info($board,multilib_flags) "-mips16"
+}
+
+# This tells it which directory to look in for the simulator.
+setup_sim mips
+
+# We only support newlib on this target. We assume that all multilib
+# options have been specified before we get here.
+set board_info($board,compiler) "[find_gcc]"
+set board_info($board,cflags) "[libgloss_include_flags] [newlib_include_flags] [libio_include_flags]"
+set board_info($board,ldflags) "[libgloss_link_flags] [newlib_link_flags] [libio_link_flags]"
+# IDT linker script.
+set board_info($board,ldscript) "-Wl,-Tidt.ld"
+
+# 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($board,needs_status_wrapper) 1
+set board_info($board,gdb,noargs) 1
+set_board_info gdb,nosignals 1;
+set_board_info noargs 1;
diff --git a/baseboards/mn10200-cygmon.exp b/baseboards/mn10200-cygmon.exp
new file mode 100644
index 0000000..1d122e3
--- /dev/null
+++ b/baseboards/mn10200-cygmon.exp
@@ -0,0 +1,32 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {mn10200-elf}
+
+# Load the generic configuration for this board. This will define a
+# set of generic routines used by the tool to communicate with the
+# board.
+load_generic_config "mn10200-eval";
+
+# It needs no multilib flags by default.
+process_multilib_options ""
+
+set_board_info compiler "[find_gcc]";
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]";
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags] [board_info $board addl_link_flags]";
+
+# CygMON linker script.
+set_board_info ldscript "-Teval.ld"
+
+# Standard remote protocol.
+set_board_info gdb_protocol "remote";
+# We can't do input in GDB (yet! HA!). It *will* do output, hurrah.
+set_board_info gdb,noinferiorio 1;
+# Or pass arguments.
+set_board_info gdb,noargs 1;
+set_board_info noargs 1;
+# Or do signals.
+set_board_info gdb,nosignals 1;
+
+set_board_info shell_prompt "cygmon>"
+
+
+set_board_info use_gdb_stub 1;
diff --git a/baseboards/mn10200-sim.exp b/baseboards/mn10200-sim.exp
new file mode 100644
index 0000000..2356e3a
--- /dev/null
+++ b/baseboards/mn10200-sim.exp
@@ -0,0 +1,45 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {mn10200-elf}
+
+# Load the tool-specific configuration for this board, as well as the
+# generic configuration. This will define any 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"
+
+# This is the name of the sim subdir in devo/sim (and in the build tree).
+setup_sim mn10200
+
+# No multilib flags are set by default.
+process_multilib_options ""
+
+# 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.
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]"
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
+
+# Simulator linker script.
+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
+
+# We can't pass args to the simulator or get exit status back from the
+# simulator, nor does the simulator support real signals.
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,noinferiorio 1
+
+# The mn10200 doesn't support long long data types or double data types.
+set_board_info no_long_long 1
+set_board_info no_double 1
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can
+# be.
+set_board_info gcc,stack_size 4096;
diff --git a/baseboards/mn10300-cygmon.exp b/baseboards/mn10300-cygmon.exp
new file mode 100644
index 0000000..86c65e1
--- /dev/null
+++ b/baseboards/mn10300-cygmon.exp
@@ -0,0 +1,32 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {mn10300-elf}
+
+# Load the generic configuration for this board. This will define a
+# set of generic routines used by the tool to communicate with the
+# board.
+load_generic_config "mn10300-eval";
+
+# It needs no multilib flags by default.
+process_multilib_options ""
+
+set_board_info compiler "[find_gcc]";
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]";
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags] [board_info $board addl_link_flags]";
+
+# CygMON linker script.
+set_board_info ldscript "-Teval.ld"
+
+# Standard remote protocol.
+set_board_info gdb_protocol "remote";
+# We can't do input in GDB (yet! HA!). It *will* do output, hurrah.
+set_board_info gdb,noinferiorio 1;
+# Or pass arguments.
+set_board_info gdb,noargs 1;
+set_board_info noargs 1;
+# Or do signals.
+set_board_info gdb,nosignals 1;
+
+set_board_info shell_prompt "cygmon>"
+
+
+set_board_info use_gdb_stub 1;
diff --git a/baseboards/mn10300-sim.exp b/baseboards/mn10300-sim.exp
new file mode 100644
index 0000000..eff6a62
--- /dev/null
+++ b/baseboards/mn10300-sim.exp
@@ -0,0 +1,41 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {mn10300-elf}
+
+# Load the tool-specific configuration for this board, as well as the
+# generic configuration. This will define any 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"
+
+# This is the name of the sim subdir in devo/sim (and in the build tree).
+setup_sim mn10300
+
+# No multilib flags are set by default.
+process_multilib_options ""
+
+# 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.
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]"
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
+
+# Simulator linker script.
+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
+
+# We can't pass args to the simulator or get exit status back from the
+# simulator, nor does the simulator support real signals.
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,noinferiorio 1
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can
+# be.
+set_board_info gcc,stack_size 4096;
diff --git a/baseboards/msparc-cygmon.exp b/baseboards/msparc-cygmon.exp
new file mode 100644
index 0000000..55fc491
--- /dev/null
+++ b/baseboards/msparc-cygmon.exp
@@ -0,0 +1 @@
+load_base_board_description "cygmon";
diff --git a/baseboards/op50n.exp b/baseboards/op50n.exp
new file mode 100644
index 0000000..dee8ca3
--- /dev/null
+++ b/baseboards/op50n.exp
@@ -0,0 +1,36 @@
+# Load the tool-specific configuration for this board, as well as the
+# generic configuration. This will define any routines needed by the
+# tool to communicate with the board.
+load_generic_config "proelf";
+
+# GDB needs to use "target op50n" to talk to the board.
+set_board_info gdb_protocol "op50n";
+
+if ![board_info $board exists output_format] {
+ set tempfil [lookfor_file $tool_root_dir binutils/objcopy];
+ if { $tempfil != "" } {
+ set_board_info objcopy $tempfil
+ } else {
+ set_board_info objcopy [transform objcopy]
+ }
+ unset tempfil
+}
+
+# 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]";
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]";
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]";
+# It's an op50n board.
+set_board_info ldscript "-Wl,-Top50n.ld";
+# The proelf interface has no way to return status information, so we
+# need to indicate this.
+set_board_info needs_status_wrapper 1;
+
+# No support for signals.
+set_board_info gdb,nosignals 1;
+# Nor can we do I/O.
+set_board_info gdb,noinferiorio 1;
+
+# The monitor interface is really slow.
+set_board_info gdb,timeout 540;
diff --git a/baseboards/powerpc-bug.exp b/baseboards/powerpc-bug.exp
new file mode 100644
index 0000000..2428f72
--- /dev/null
+++ b/baseboards/powerpc-bug.exp
@@ -0,0 +1,29 @@
+load_generic_config "powerpc-bug";
+
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {powerpc-eabi};
+
+# We need mvme by default.
+process_multilib_options "mvme";
+
+# 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]"
+
+set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
+
+# No linker script needed for this board.
+set_board_info ldscript "";
+
+# Can't pass arguments to programs on this target..
+set_board_info noargs 1
+# And there's no support for signals.
+set_board_info gdb,nosignals 1
+
+# GDB 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
+
+# The GDB protocol for this board is...
+set_board_info gdb_protocol "ppcbug"
diff --git a/baseboards/powerpc-bug1.exp b/baseboards/powerpc-bug1.exp
new file mode 100644
index 0000000..fe25678
--- /dev/null
+++ b/baseboards/powerpc-bug1.exp
@@ -0,0 +1,5 @@
+# This config uses ppcbug1 protocol in GDB.
+set_board_info gdb_protocol "ppcbug1"
+
+# But otherwise we're the same as powerpc-bug.
+load_base_board_description "powerpc-bug"
diff --git a/baseboards/powerpc-sim.exp b/baseboards/powerpc-sim.exp
new file mode 100644
index 0000000..db579e1
--- /dev/null
+++ b/baseboards/powerpc-sim.exp
@@ -0,0 +1,28 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {powerpc-eabi}
+
+# 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 name of the simulator is "ppc".
+setup_sim ppc
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# 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]"
+
+set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
+set_board_info ldflags "-msim [libgloss_link_flags] [newlib_link_flags]"
+
+# No support for signals on this target.
+set_board_info gdb,nosignals 1;
+
+# Can't call functions from GDB.
+set_board_info gdb,cannot_call_functions 1
diff --git a/baseboards/powerpcle-sim.exp b/baseboards/powerpcle-sim.exp
new file mode 100644
index 0000000..20754fa
--- /dev/null
+++ b/baseboards/powerpcle-sim.exp
@@ -0,0 +1,28 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {powerpcle-eabi}
+
+# 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 name of the simulator is "ppc".
+setup_sim ppc
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# 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]"
+
+set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
+set_board_info ldflags "-msim [libgloss_link_flags] [newlib_link_flags]"
+
+# No support for signals on this target.
+set_board_info gdb,nosignals 1;
+
+# Can't call functions from GDB.
+set_board_info gdb,cannot_call_functions 1
diff --git a/baseboards/rom68k-idp.exp b/baseboards/rom68k-idp.exp
new file mode 100644
index 0000000..4f0d1ad
--- /dev/null
+++ b/baseboards/rom68k-idp.exp
@@ -0,0 +1,69 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {m68k-coff m68k-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 "rom68k";
+
+# Need soft-float by default.
+process_multilib_options "-msoft-float"
+
+# The compiler used to build for this board. Note that this has nothing to do
+# with what compiler is tested when testing gcc.
+set_board_info compiler "[find_gcc]"
+
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]";
+
+# Nasty hack.
+if { [board_info $board obj_format] == "a.out" } {
+ # Need to pass the start address to objcopy.
+ set_board_info use_vma_offset 1;
+ # Wrapping has to be specially done for m68k-aout, for whatever reason.
+ set_board_info wrap_m68k_aout 1;
+
+ set extra_m68k_ld_flags "-N -nostdlib "
+
+ # We need to tell GDB to load at the correct offset.
+ set_board_info gdb_load_offset [board_info $board hex_startaddr];
+} else {
+ set extra_m68k_ld_flags ""
+}
+
+set_board_info ldflags "$extra_m68k_ld_flags [libgloss_link_flags] [newlib_link_flags]"
+unset extra_m68k_ld_flags
+
+
+# If no output format is specified, use objcopy.
+if ![board_info $board exists output_format] {
+ set tempfil [lookfor_file $tool_root_dir binutils/objcopy];
+ if { $tempfil != "" } {
+ set_board_info objcopy $tempfil
+ } else {
+ set_board_info objcopy [transform objcopy]
+ }
+ unset tempfil
+}
+
+# IDP linker script.
+set_board_info ldscript "-Wl,-Tidp.ld";
+# The idt interface can't return exit statuses, so gcc (ctorture et
+# al) needs to do what it can to get them.
+set_board_info needs_status_wrapper 1;
+
+# GDB needs to use "target rom68k" to talk to the board.
+set_board_info gdb_protocol "rom68k";
+
+# Can't pass arguments to the program under test.
+set_board_info noargs 1
+
+# Nor can it do I/O in GDB.
+set_board_info gdb,noinferiorio 1
+
+# It has no signals.
+set_board_info gdb,nosignals 1
+
+# It can't return results when debugging with GDB.
+set_board_info gdb,noresults 1
+
+# Pseudo-random guess.
+set_board_info sys_speed_value 200;
diff --git a/baseboards/sh-hms-sim.exp b/baseboards/sh-hms-sim.exp
new file mode 100644
index 0000000..69da8d6
--- /dev/null
+++ b/baseboards/sh-hms-sim.exp
@@ -0,0 +1,48 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {sh-hms}
+
+# 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 name of the directory in the build tree that the simulator lives in
+# is "sh".
+setup_sim sh
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# 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 "";
+# The simulator doesn't return exit statuses and we need to indicate this.
+# Doesn't work on SH yet.
+# 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
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can
+# be.
+set_board_info gcc,stack_size 16384
+
+# Need to pass -mieee in order to for the compiler to be IEEE-fp compliant.
+set_board_info ieee_multilib_flags "-mieee";
+
+#We want to pass "18" to GDB"s "targt sim" command.
+set_board_info gdb,target_sim_options "18"
+#and the standalone simulator
+set_board_info sim,options "-m 18"
diff --git a/baseboards/sh-hms.exp b/baseboards/sh-hms.exp
new file mode 100644
index 0000000..4653707
--- /dev/null
+++ b/baseboards/sh-hms.exp
@@ -0,0 +1,47 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {sh-hms}
+
+# 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 "sh"
+
+# Default to SH2.
+process_multilib_options "-m2"
+
+# 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]"
+set_board_info ldflags "[newlib_link_flags] [libgloss_link_flags]"
+
+# Linker script for the SH2 board.
+set_board_info ldscript "-Wl,-Tsh2lcevb.ld"
+
+# Can't pass arguments to this target.
+set_board_info noargs 1
+# And it can't call functions.
+set_board_info gdb,cannot_call_functions 1
+
+# We use the remote GDB protocol.
+set_board_info gdb_protocol "remote"
+# Jumping to start is how we get the program started in GDB.
+set_board_info gdb_run_command "jump start"
+# The remote target uses a GDB stub.
+set_board_info use_gdb_stub 1
+# We can't do I/O.
+set_board_info gdb,noinferiorio 1
+# Or signals.
+set_board_info gdb,nosignals 1
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can
+# be.
+set_board_info gcc,stack_size 16384
+
+# Exit statuses returned from GDB are sometimes faulty.
+set_board_info exit_statuses_bad 1
+
+# Need to pass -mieee in order to for the compiler to be IEEE-fp compliant.
+set_board_info ieee_multilib_flags "-mieee";
diff --git a/baseboards/sparc64-sim.exp b/baseboards/sparc64-sim.exp
new file mode 100644
index 0000000..914a571
--- /dev/null
+++ b/baseboards/sparc64-sim.exp
@@ -0,0 +1,31 @@
+# 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
diff --git a/baseboards/sparclet-aout.exp b/baseboards/sparclet-aout.exp
new file mode 100644
index 0000000..153549c
--- /dev/null
+++ b/baseboards/sparclet-aout.exp
@@ -0,0 +1,48 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {sparclet-aout}
+
+# Load the generic configuration for this board. This will define any
+# routines needed by the tool to communicate with the board,.
+load_generic_config "sparclet";
+
+# It needs broken-saverestore by default.
+process_multilib_options "-mbroken-saverestore"
+
+# 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 "[newlib_include_flags] [libgloss_include_flags]"
+set_board_info ldflags "-nostdlib [libgloss_link_flags] [newlib_link_flags] -Wl,-Ttext,0x12020000 -N"
+
+# tsc701 linker script.
+set_board_info ldscript "-Ttsc701.ld"
+
+# The board doesn't return exit statuses and we need to indicate this.
+# However, the standard GCC wrapper won't work with this target because
+# it doesn't return stuff from printf ().
+#set_board_info needs_status_wrapper 1
+
+# The monitor uses a GDB stub.
+set_board_info use_gdb_stub 1
+# The GDB protocol used to communicate with this board.
+set_board_info gdb_protocol "sparclet"
+# The offset in memory that we load programs.
+set_board_info gdb_load_offset "0x12020000"
+# And the place in memory where we load the stub.
+set_board_info gdb_stub_offset "0x12010000"
+# No mathlib.
+set_board_info mathlib "";
+# We can't do I/O in GDB.
+set_board_info gdb,noinferiorio 1;
+# Or pass arguments.
+set_board_info noargs 1;
+
+set_board_info gcc,no_varargs 1
+set_board_info gcc,no_label_values 1
+
+# This is the old GDB prompt for the toolchain.
+# Uncomment for old tests
+set_board_info gdb_prompt "\\(gdb\\)";
+
+# We always have to set a breakpoint at exit(), instead of just _exit().
+set_board_info always_break_exit 1;
diff --git a/baseboards/sparclite-coff.exp b/baseboards/sparclite-coff.exp
new file mode 100644
index 0000000..61eafc4
--- /dev/null
+++ b/baseboards/sparclite-coff.exp
@@ -0,0 +1,41 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {sparclite-coff}
+
+# Load the generic configuration for this board. This will define a
+# set of generic routines used by the tool to communicate with the
+# board.
+load_generic_config "slite";
+
+# It needs no multilib flags by default.
+process_multilib_options ""
+
+set_board_info compiler "[find_gcc]";
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]";
+set_board_info ldflags "-nostdlib [libgloss_link_flags] [newlib_link_flags] -Wl,-Ttext,0x40005000 -N";
+
+# ex930 linker script.
+set_board_info ldscript "-Tex930.ld";
+
+# The address at which the stub needs to be linked.
+set_board_info gdb_stub_offset "0x40000000";
+
+# The board doesn't return exit statuses and we need to indicate this.
+# However, the standard GCC wrapper won't work with this target because
+# it doesn't return stuff from printf ().
+set_board_info needs_status_wrapper 1;
+
+# We use a GDB stub to talk to the board.
+set_board_info use_gdb_stub 1;
+# For GDB, we need to use a real stub (not the separate loader scheme
+# we use for Sparclet).
+set_board_info gdb_stub "";
+# And the protocol is "sparclite serial".
+set_board_info gdb_protocol "sparclite serial";
+# No mathlib.
+set_board_info mathlib "";
+# We can't do I/O in GDB.
+set_board_info gdb,noinferiorio 1;
+# Or pass arguments.
+set_board_info noargs 1;
+# Or do signals.
+set_board_info gdb,nosignals 1;
diff --git a/baseboards/sparclite-cygmon.exp b/baseboards/sparclite-cygmon.exp
new file mode 100644
index 0000000..956881e
--- /dev/null
+++ b/baseboards/sparclite-cygmon.exp
@@ -0,0 +1,6 @@
+if { [board_info $board obj_format] == "a.out" } {
+ set_board_info addl_link_flags "-N"
+ set_board_info gdb_load_offset "0x40050000"
+}
+
+load_base_board_description "cygmon"
diff --git a/baseboards/sparclite-sim-le.exp b/baseboards/sparclite-sim-le.exp
new file mode 100644
index 0000000..5daec2e
--- /dev/null
+++ b/baseboards/sparclite-sim-le.exp
@@ -0,0 +1,47 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {sparclite-elf}
+
+# Load the generic configuration for this board. This will define a
+# set of generic routines used 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";
+
+if ![info exists board_info($board,multilib_flags)] {
+ set board_info($board,multilib_flags) "-mlittle-endian-data"
+}
+
+# This tells it which directory to look in for the simulator.
+setup_sim erc32;
+
+# It needs no multilib flags by default.
+process_multilib_options ""
+
+set_board_info compiler "[find_gcc]";
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]";
+set_board_info ldflags "-nostdlib -nostartfiles [libgloss_link_flags] [newlib_link_flags]";
+
+# ELF simulator linker script.
+set_board_info ldscript "-Telfsim.ld";
+
+# The simulator doesn't return exit statuses and we need to indicate this.
+set_board_info needs_status_wrapper 1;
+
+# We use a GDB stub to talk to the board.
+# set_board_info use_gdb_stub 1;
+# For GDB, we need to use a real stub (not the separate loader scheme
+# we use for Sparclet).
+# set_board_info gdb_stub "";
+# No mathlib.
+# set_board_info mathlib "";
+# We can't do I/O in GDB.
+# set_board_info gdb,noinferiorio 1;
+# Or pass arguments.
+set_board_info noargs 1;
+# Or do signals.
+set_board_info gdb,nosignals 1;
+
+#We want to specify the sparclite emulator in GDB.
+set_board_info gdb,target_sim_options "-sparclite"
diff --git a/baseboards/sparclite-sim.exp b/baseboards/sparclite-sim.exp
new file mode 100644
index 0000000..a977ffa
--- /dev/null
+++ b/baseboards/sparclite-sim.exp
@@ -0,0 +1,37 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {sparclite-elf}
+
+# Load the generic configuration for this board. This will define a
+# set of generic routines used 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";
+
+# This tells it which directory to look in for the simulator.
+setup_sim erc32;
+
+# It needs no multilib flags by default.
+process_multilib_options ""
+
+set_board_info compiler "[find_gcc]";
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]";
+set_board_info ldflags "-nostdlib -nostartfiles [libgloss_link_flags] [newlib_link_flags]";
+
+# ELF simulator linker script.
+set_board_info ldscript "-Telfsim.ld";
+
+# The simulator doesn't return exit statuses and we need to indicate this.
+set_board_info needs_status_wrapper 1;
+
+# We can't pass arguments.
+set_board_info noargs 1;
+# Or do signals.
+set_board_info gdb,nosignals 1;
+
+# We want to specify the sparclite emulator in GDB.
+set_board_info gdb,target_sim_options "-sparclite"
+
+# Pass -a -sparclite to the standalone simulator
+set_board_info sim,options "-a -sparclite"
diff --git a/baseboards/strongarm-cygmon.exp b/baseboards/strongarm-cygmon.exp
new file mode 100644
index 0000000..8e41199
--- /dev/null
+++ b/baseboards/strongarm-cygmon.exp
@@ -0,0 +1,41 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {strongarm-elf}
+
+# Load the generic configuration for this board. This will define a
+# set of generic routines used by the tool to communicate with the
+# board.
+load_generic_config "cygmon";
+
+# It needs no multilib flags by default.
+process_multilib_options ""
+
+set_board_info compiler "[find_gcc]";
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]";
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags] [board_info $board addl_link_flags]";
+
+# CygMON linker script.
+
+if {[string compare [board_info $board boardtype] "sa1100dp"] == 0} {
+ set_board_info ldscript "-specs=sa1100dp.specs"
+} elseif {[string compare [board_info $board boardtype] "sa1100mm"] == 0} {
+ set_board_info ldscript "-specs=sa1100mm.specs"
+} elseif {[string compare [board_info $board boardtype] "sa-iop"] == 0} {
+ set_board_info ldscript "-specs=sa-iop.specs"
+} elseif {[string compare [board_info $board boardtype] "ebsa-285"] == 0} {
+ set_board_info ldscript "-specs=ebsa-285.specs"
+}
+
+# Standard remote protocol.
+set_board_info gdb_protocol "remote";
+# We can't do input in GDB (yet! HA!). It *will* do output, hurrah.
+set_board_info gdb,noinferiorio 1;
+# Or pass arguments.
+set_board_info gdb,noargs 1;
+set_board_info noargs 1;
+# Or do signals.
+set_board_info gdb,nosignals 1;
+
+set_board_info shell_prompt "cygmon>"
+
+set_board_info use_gdb_stub 1;
+set_board_info use_cygmon 1
diff --git a/baseboards/tic80-sim.exp b/baseboards/tic80-sim.exp
new file mode 100644
index 0000000..dc2cecc
--- /dev/null
+++ b/baseboards/tic80-sim.exp
@@ -0,0 +1,28 @@
+# 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";
+
+# This tells it which directory to look in for the simulator.
+setup_sim tic80;
+
+# No multilib flags are set by default.
+process_multilib_options "";
+
+# 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]";
+
+set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]";
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]";
+# No linker script is needed.
+# set_board_info ldscript "";
+
+# And, it can't do arguments, and doesn't have real signals.
+set_board_info noargs 1;
+set_board_info gdb,nosignals 1;
+
+# Used by a few gcc.c-torture testcases when trampolines are used.
+set_board_info gcc,no_varargs 1
diff --git a/baseboards/tx39-dve.exp b/baseboards/tx39-dve.exp
new file mode 100644
index 0000000..8973e43
--- /dev/null
+++ b/baseboards/tx39-dve.exp
@@ -0,0 +1,48 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {mips-tx39-elf mips-elf}
+
+# Load the generic configuration for this board. This will define a basic
+# set of routines needed by the tool to communicate with the board.
+if { [board_info $board cygmon] == "yes" } {
+ load_generic_config "cygmon";
+} else {
+ load_generic_config "dve";
+}
+
+# It's a big-endian board.
+process_multilib_options "big-endian"
+
+# 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]"
+# DDB linker script.
+set_board_info ldscript "-Wl,-Tdve.ld";
+
+# GDB 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;
+
+# The GDB protocol used with this board.
+if { [board_info $board cygmon] == "yes" } {
+ set_board_info gdb_protocol "remote"
+} else {
+ set_board_info gdb_protocol "r3900"
+}
+
+# This is needed for compiling nullstone.
+set_board_info nullstone,lib "mips-clock.c"
+set_board_info nullstone,ticks_per_sec 3782018
+
+# Sometimes the board gets into a state where it always generates SIGFPE.
+#set_board_info unreliable 1
+
+# Can't pass arguments to the program.
+set_board_info noargs 1
+
+# No support for signals.
+set_board_info gdb,nosignals 1
+
+# We need to clear the floating-point status register before running.
+#set_board_info gdb_init_command "print/x \$fsr = 0x0"
diff --git a/baseboards/tx39-sim.exp b/baseboards/tx39-sim.exp
new file mode 100644
index 0000000..20fc722
--- /dev/null
+++ b/baseboards/tx39-sim.exp
@@ -0,0 +1,3 @@
+# This file is unnecessary, but we'll keep it for now.
+# We're the same as the standard MIPS simulator.
+load_base_board_description "mips-sim";
diff --git a/baseboards/unix.exp b/baseboards/unix.exp
new file mode 100644
index 0000000..98d1ec1
--- /dev/null
+++ b/baseboards/unix.exp
@@ -0,0 +1,8 @@
+# The canonical unix board description.
+load_generic_config "unix";
+
+process_multilib_options "";
+
+set_board_info compiler "[find_gcc]";
+
+set_board_info bmk,use_alarm 1;
diff --git a/baseboards/usparc-cygmon.exp b/baseboards/usparc-cygmon.exp
new file mode 100644
index 0000000..f827c60
--- /dev/null
+++ b/baseboards/usparc-cygmon.exp
@@ -0,0 +1,48 @@
+load_base_board_description "cygmon";
+
+set_board_info testcase_timeout 30;
+
+proc ${board}_init { dest } {
+ global usparc_init_count;
+ set shell_prompt [board_info $dest shell_prompt];
+
+ if ![info exists usparc_init_count] {
+ set usparc_init_count 0;
+ } else {
+ incr usparc_init_count;
+ if { $usparc_init_count == 3 } {
+ return -1;
+ }
+
+ }
+ remote_close $dest;
+ set shell_id [remote_open $dest];
+ if { $shell_id == "" || $shell_id < 0 } {
+ return [remote_reboot $dest];
+ } else {
+ remote_binary $dest;
+ remote_send $dest "\n";
+ set got_one 0;
+ remote_expect $dest 5 {
+ -re "$shell_prompt" { set got_one 1; exp_continue; }
+ default {
+ if { ! $got_one } {
+ remote_close $dest;
+ return [remote_reboot $dest];
+ }
+ }
+ }
+ remote_send $dest "m \[15\]1fff1001f00 32\n";
+ remote_expect $dest 5 {
+ -re "$shell_prompt" {
+ unset usparc_init_count;
+ remote_close $dest;
+ return 0;
+ }
+ default {
+ remote_close $dest;
+ return [remote_reboot $dest];
+ }
+ }
+ }
+}
diff --git a/baseboards/v850-sim.exp b/baseboards/v850-sim.exp
new file mode 100644
index 0000000..cb7a70a
--- /dev/null
+++ b/baseboards/v850-sim.exp
@@ -0,0 +1,31 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {v850-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"
+
+# No multilib flags needed for this target.
+process_multilib_options ""
+
+setup_sim v850
+
+# 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]"
+# DDB linker script.
+set_board_info ldscript "";
+
+# 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
+
+# And we don't support signals.
+set_board_info gdb,nosignals 1
diff --git a/baseboards/vr4100-ddb.exp b/baseboards/vr4100-ddb.exp
new file mode 100644
index 0000000..e959a66
--- /dev/null
+++ b/baseboards/vr4100-ddb.exp
@@ -0,0 +1,33 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {mips64vr4100-elf mips64-elf}
+
+# It's a little-endian board.
+process_multilib_options "-EL -msoft-float"
+
+set_board_info startaddr "a0020000"
+set_board_info hex_startaddr "0xa0020000"
+
+# 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 "vr4100"
+
+# 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]"
+# DDB linker script.
+set_board_info ldscript "-Wl,-Tpmon.ld"
+
+# GDB 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
+
+# The GDB protocol used with this board.
+set_board_info gdb_protocol "ddb"
+
+set_board_info reboot_delay 10
+
+# This board is unreliable. If a test times out, the board should be
+# rebooted and the test re-run.
+set_board_info unreliable 1
diff --git a/baseboards/vr4100-sim.exp b/baseboards/vr4100-sim.exp
new file mode 100644
index 0000000..c3b278a
--- /dev/null
+++ b/baseboards/vr4100-sim.exp
@@ -0,0 +1,12 @@
+# DDB linker script.
+if { [board_info $board obj_format] == "ecoff" } {
+ set_board_info ldscript "-Wl,-Tddbecoff.ld"
+} else {
+ set_board_info ldscript "-Wl,-Tddb.ld"
+}
+
+# And the simulator doesn't reliably return exit statuses.
+set_board_info needs_status_wrapper 1
+
+# Otherwise, we're a standard MIPS config.
+load_base_board_description "mips64-sim";
diff --git a/baseboards/vr4111-sim.exp b/baseboards/vr4111-sim.exp
new file mode 100644
index 0000000..c3b278a
--- /dev/null
+++ b/baseboards/vr4111-sim.exp
@@ -0,0 +1,12 @@
+# DDB linker script.
+if { [board_info $board obj_format] == "ecoff" } {
+ set_board_info ldscript "-Wl,-Tddbecoff.ld"
+} else {
+ set_board_info ldscript "-Wl,-Tddb.ld"
+}
+
+# And the simulator doesn't reliably return exit statuses.
+set_board_info needs_status_wrapper 1
+
+# Otherwise, we're a standard MIPS config.
+load_base_board_description "mips64-sim";
diff --git a/baseboards/vr4300-ddb.exp b/baseboards/vr4300-ddb.exp
new file mode 100644
index 0000000..a25afb8
--- /dev/null
+++ b/baseboards/vr4300-ddb.exp
@@ -0,0 +1,19 @@
+# Danger, Will Robinson! Settings in this file do not override
+# previous settings for the board being defined.
+
+# DDB linker script.
+if { [board_info $board obj_format] == "ecoff" } {
+ set_board_info ldscript "-Wl,-Tddbecoff.ld"
+} else {
+ set_board_info ldscript "-Wl,-Tddb.ld"
+}
+
+# This is needed for compiling nullstone.
+set_board_info nullstone,lib "mips-clock.c"
+set_board_info nullstone,ticks_per_sec 3782018
+
+# The GDB protocol used with this board.
+set_board_info gdb_protocol "ddb"
+
+# Otherwise, we're the same as a generic vr4300 board.
+load_base_board_description "vr4300";
diff --git a/baseboards/vr4300-sim.exp b/baseboards/vr4300-sim.exp
new file mode 100644
index 0000000..c3b278a
--- /dev/null
+++ b/baseboards/vr4300-sim.exp
@@ -0,0 +1,12 @@
+# DDB linker script.
+if { [board_info $board obj_format] == "ecoff" } {
+ set_board_info ldscript "-Wl,-Tddbecoff.ld"
+} else {
+ set_board_info ldscript "-Wl,-Tddb.ld"
+}
+
+# And the simulator doesn't reliably return exit statuses.
+set_board_info needs_status_wrapper 1
+
+# Otherwise, we're a standard MIPS config.
+load_base_board_description "mips64-sim";
diff --git a/baseboards/vr4300.exp b/baseboards/vr4300.exp
new file mode 100644
index 0000000..a89f943
--- /dev/null
+++ b/baseboards/vr4300.exp
@@ -0,0 +1,41 @@
+# Danger, Will Robinson! Settings in this file do not override
+# previous settings for the board being defined.
+
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {mips64vr4300-elf mips64-elf}
+
+# 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 "vr4300"
+
+# It's a little-endian board.
+process_multilib_options "little-endian"
+
+# 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]"
+# IDT linker script.
+set_board_info ldscript "-Wl,-Tidt.ld"
+
+# GDB 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
+
+# The GDB protocol used with this board.
+set_board_info gdb_protocol "mips"
+
+# This board is unreliable. If a test times out, the board should be
+# rebooted and the test re-run.
+set_board_info unreliable 1
+
+# Can't pass arguments to the program.
+set_board_info noargs 1
+
+# No support for signals.
+set_board_info gdb,nosignals 1
+
+# We need to clear the floating-point status register before running.
+# This command will be sent after connecting to the board.
+set_board_info gdb_init_command "print/x \$fsr = 0x0"
diff --git a/baseboards/vr5000-ddb.exp b/baseboards/vr5000-ddb.exp
new file mode 100644
index 0000000..8cf4b0f
--- /dev/null
+++ b/baseboards/vr5000-ddb.exp
@@ -0,0 +1,40 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {mips64vr5000-elf mips64-elf}
+
+# 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 "vr5000";
+
+# It's a big-endian board.
+process_multilib_options "big-endian"
+
+# 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]"
+# DDB linker script.
+set_board_info ldscript "-Wl,-Tddb.ld";
+
+# GDB 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;
+
+# The GDB protocol used with this board.
+set_board_info gdb_protocol "ddb";
+
+# This is needed for compiling nullstone.
+set_board_info nullstone,lib "mips-clock.c"
+set_board_info nullstone,ticks_per_sec 3782018
+
+# Sometimes the board gets into a state where it always generates SIGFPE.
+set_board_info unreliable 1
+
+# Can't pass arguments to the program.
+set_board_info noargs 1
+
+# No support for signals.
+set_board_info gdb,nosignals 1
+
+# We need to clear the floating-point status register before running.
+set_board_info gdb_init_command "print/x \$fsr = 0x0"
diff --git a/baseboards/vx4300.exp b/baseboards/vx4300.exp
new file mode 100644
index 0000000..2547b1c
--- /dev/null
+++ b/baseboards/vx4300.exp
@@ -0,0 +1,25 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {mips-vxworks5.3}
+
+# Load the generic configuration for this board. This will define any
+# routines needed by the tool to communicate with the board.
+load_generic_config "vxworks";
+
+# No multilib flags by default.
+process_multilib_options "";
+
+# The compiler used to build for this board. Note that this has nothing to do
+# with what compiler is tested when testing gcc.
+set_board_info compiler "[find_gcc]";
+
+# These are probably wrong.
+set_board_info cflags "-EL";
+# vxworks 5.1 needs the executable to be relinkable.
+set_board_info ldflags "-nostdlib -r";
+set_board_info libs "-lgcc";
+
+# No linker script needed.
+set_board_info ldscript "";
+
+# GDB needs to use "target vxworks" to talk to the board.
+set_board_info gdb_protocol "vxworks";
diff --git a/baseboards/vx68k.exp b/baseboards/vx68k.exp
new file mode 100644
index 0000000..d79f5bd
--- /dev/null
+++ b/baseboards/vx68k.exp
@@ -0,0 +1,25 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {m68k-vxworks5.1 m68k-vxworks5.2}
+
+# Load the generic configuration for this board. This will define any
+# routines needed by the tool to communicate with the board.
+load_generic_config "vxworks";
+
+# No multilib flags by default.
+process_multilib_options "";
+
+# The compiler used to build for this board. Note that this has nothing to do
+# with what compiler is tested when testing gcc.
+set_board_info compiler "[find_gcc]";
+
+# These are probably wrong.
+set_board_info cflags "";
+# vxworks 5.1 needs the executable to be relinkable.
+set_board_info ldflags "-nostdlib -r";
+set_board_info libs "-lgcc";
+
+# No linker script needed.
+set_board_info ldscript "";
+
+# GDB needs to use "target vxworks" to talk to the board.
+set_board_info gdb_protocol "vxworks";
diff --git a/baseboards/vx960.exp b/baseboards/vx960.exp
new file mode 100644
index 0000000..e25c79d
--- /dev/null
+++ b/baseboards/vx960.exp
@@ -0,0 +1,29 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {i960-vxworks5.1 i960-vxworks5.2}
+
+# Load the generic configuration for this board. This will define any
+# routines needed by the tool to communicate with the board.
+load_generic_config "vxworks";
+
+# No multilib flags by default.
+process_multilib_options "";
+
+# The compiler used to build for this board. Note that this has nothing to do
+# with what compiler is tested when testing gcc.
+set_board_info compiler "[find_gcc]";
+
+# These are probably wrong, but at least it is configurable now.
+if { [board_info $board cpu] == "I960CA" } {
+ set_board_info cflags "-mca";
+} else {
+ set_board_info cflags "";
+}
+# vxworks 5.1 needs the executable to be relinkable.
+set_board_info ldflags "-nostdlib -r";
+set_board_info libs "-lgcc";
+
+# No linker script needed.
+set_board_info ldscript "";
+
+# GDB needs to use "target vxworks" to talk to the board.
+set_board_info gdb_protocol "vxworks";
diff --git a/baseboards/vxsparc.exp b/baseboards/vxsparc.exp
new file mode 100644
index 0000000..c943e70
--- /dev/null
+++ b/baseboards/vxsparc.exp
@@ -0,0 +1,25 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {sparc-vxworks5.1 sparc-vxworks5.2}
+
+# Load the generic configuration for this board. This will define any
+# routines needed by the tool to communicate with the board.
+load_generic_config "vxworks";
+
+# No multilib flags by default.
+process_multilib_options "";
+
+# The compiler used to build for this board. Note that this has nothing to do
+# with what compiler is tested when testing gcc.
+set_board_info compiler "[find_gcc]";
+
+# These are probably right.
+set_board_info cflags "";
+# vxworks 5.1 needs the executable to be relinkable.
+set_board_info ldflags "-nostdlib -r";
+set_board_info libs "-lgcc";
+
+# No linker script needed.
+set_board_info ldscript "";
+
+# GDB needs to use "target vxworks" to talk to the board.
+set_board_info gdb_protocol "vxworks";
diff --git a/baseboards/x86-cygmon.exp b/baseboards/x86-cygmon.exp
new file mode 100644
index 0000000..45f2422
--- /dev/null
+++ b/baseboards/x86-cygmon.exp
@@ -0,0 +1,11 @@
+load_base_board_description "cygmon";
+
+# Default to ELF.
+if { [board_info $board obj_format] == "a.out" } {
+ set_board_info gdb,start_symbol "_start"
+} elseif { [board_info $board obj_format] == "coff" } {
+ set_board_info gdb,start_symbol "__start"
+} else {
+ set_board_info gdb,start_symbol "__start"
+}
+
diff --git a/baseboards/xscale-cygmon.exp b/baseboards/xscale-cygmon.exp
new file mode 100644
index 0000000..b7c28de
--- /dev/null
+++ b/baseboards/xscale-cygmon.exp
@@ -0,0 +1,37 @@
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {xscale-elf}
+
+# Load the generic configuration for this board. This will define a
+# set of generic routines used by the tool to communicate with the
+# board.
+load_generic_config "cygmon";
+
+# It needs no multilib flags by default.
+process_multilib_options ""
+
+set_board_info compiler "[find_gcc]";
+set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]";
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags] [board_info $board addl_link_flags]";
+
+# CygMON linker script.
+
+if {[string compare [board_info $board boardtype] "xaret"] == 0} {
+ set_board_info ldscript "-specs=xaret.specs"
+} elseif {[string compare [board_info $board boardtype] "iq80310"] == 0} {
+ set_board_info ldscript "-specs=iq80310.specs"
+}
+
+# Standard remote protocol.
+set_board_info gdb_protocol "remote";
+# We can't do input in GDB (yet! HA!). It *will* do output, hurrah.
+set_board_info gdb,noinferiorio 1;
+# Or pass arguments.
+set_board_info gdb,noargs 1;
+set_board_info noargs 1;
+# Or do signals.
+set_board_info gdb,nosignals 1;
+
+set_board_info shell_prompt "cygmon>"
+
+set_board_info use_gdb_stub 1;
+set_board_info use_cygmon 1
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..0012219
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1090 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
+# Free Software Foundation, Inc.
+#
+# 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.
+
+# Written by Per Bothner <bothner@cygnus.com>.
+# The master version of this file is at the FSF in /home/gd/gnu/lib.
+# Please send patches to the Autoconf mailing list <autoconf@gnu.org>.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit system type (host/target name).
+#
+# Only a few systems have been added to this list; please add others
+# (but try to keep the structure clean).
+#
+
+# Use $HOST_CC if defined. $CC may point to a cross-compiler
+if test x"$CC_FOR_BUILD" = x; then
+ if test x"$HOST_CC" != x; then
+ CC_FOR_BUILD="$HOST_CC"
+ else
+ if test x"$CC" != x; then
+ CC_FOR_BUILD="$CC"
+ else
+ CC_FOR_BUILD=cc
+ fi
+ fi
+fi
+
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 8/24/94.)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ alpha:OSF1:*:*)
+ if test $UNAME_RELEASE = "V4.0"; then
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ fi
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ cat <<EOF >$dummy.s
+ .globl main
+ .ent main
+main:
+ .frame \$30,0,\$26,0
+ .prologue 0
+ .long 0x47e03d80 # implver $0
+ lda \$2,259
+ .long 0x47e20c21 # amask $2,$1
+ srl \$1,8,\$2
+ sll \$2,2,\$2
+ sll \$0,3,\$0
+ addl \$1,\$0,\$0
+ addl \$2,\$0,\$0
+ ret \$31,(\$26),1
+ .end main
+EOF
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy
+ case "$?" in
+ 7)
+ UNAME_MACHINE="alpha"
+ ;;
+ 15)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 14)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 10)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 16)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ esac
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-cbm-sysv4
+ exit 0;;
+ amiga:NetBSD:*:*)
+ echo m68k-cbm-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
+ arc64:OpenBSD:*:*)
+ echo mips64el-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hkmips:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OS/390:*.*)
+ echo i370-ibm-openedition
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ arm32:NetBSD:*:*)
+ echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ SR2?01:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit 0;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit 0 ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit 0 ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit 0 ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:NetBSD:*:*)
+ echo m68k-atari-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:NetBSD:*:*)
+ echo m68k-sun-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:NetBSD:*:*)
+ echo m68k-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:NetBSD:*:*)
+ echo powerpc-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit 0 ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy \
+ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
+ -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit 0 ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i?86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo rs6000-ibm-aix3.2.5
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit 0 ;;
+ *:AIX:*:4)
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=4.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 9000/[34678]??:HP-UX:*:*)
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ sed 's/^ //' << EOF >$dummy.c
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ ($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+ rm -f $dummy.c $dummy
+ esac
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ *9??*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit 0 ;;
+ i?86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
+ hppa*:OpenBSD:*:*)
+ echo hppa-unknown-openbsd
+ exit 0 ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*X-MP:*:*:*)
+ echo xmp-cray-unicos
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+ exit 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo t3e-cray-unicosmk${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY-2:*:*:*)
+ echo cray2-cray-unicos
+ exit 0 ;;
+ F300:UNIX_System_V:*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ F301:UNIX_System_V:*:*)
+ echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
+ exit 0 ;;
+ hp3[0-9][05]:NetBSD:*:*)
+ echo m68k-hp-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*)
+ if test -x /usr/bin/objformat; then
+ if test "elf" = "`/usr/bin/objformat`"; then
+ echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+ exit 0
+ fi
+ fi
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
+ *:NetBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit 0 ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i386-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit 0 ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ *:GNU:*:*)
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
+ *:Linux:*:*)
+ # uname on the ARM produces all sorts of strangeness, and we need to
+ # filter it out.
+ case "$UNAME_MACHINE" in
+ armv*) UNAME_MACHINE=$UNAME_MACHINE ;;
+ arm* | sa110*) UNAME_MACHINE="arm" ;;
+ esac
+
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ ld_help_string=`cd /; ld --help 2>&1`
+ ld_supported_emulations=`echo $ld_help_string \
+ | sed -ne '/supported emulations:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported emulations: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_emulations" in
+ i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
+ i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
+ sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+ armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+ m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+ elf32ppc | elf32ppclinux)
+ # Determine Lib Version
+ cat >$dummy.c <<EOF
+#include <features.h>
+#if defined(__GLIBC__)
+extern char __libc_version[];
+extern char __libc_release[];
+#endif
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+#if defined(__GLIBC__)
+ printf("%s %s\n", __libc_version, __libc_release);
+#else
+ printf("unkown\n");
+#endif
+ return 0;
+}
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy | grep 1\.99 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f $dummy.c $dummy
+ echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;;
+ esac
+
+ if test "${UNAME_MACHINE}" = "alpha" ; then
+ sed 's/^ //' <<EOF >$dummy.s
+ .globl main
+ .ent main
+ main:
+ .frame \$30,0,\$26,0
+ .prologue 0
+ .long 0x47e03d80 # implver $0
+ lda \$2,259
+ .long 0x47e20c21 # amask $2,$1
+ srl \$1,8,\$2
+ sll \$2,2,\$2
+ sll \$0,3,\$0
+ addl \$1,\$0,\$0
+ addl \$2,\$0,\$0
+ ret \$31,(\$26),1
+ .end main
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy
+ case "$?" in
+ 7)
+ UNAME_MACHINE="alpha"
+ ;;
+ 15)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 14)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 10)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 16)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ esac
+
+ objdump --private-headers $dummy | \
+ grep ld.so.1 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
+ elif test "${UNAME_MACHINE}" = "mips" ; then
+ cat >$dummy.c <<EOF
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __MIPSEB__
+ printf ("%s-unknown-linux-gnu\n", argv[1]);
+#endif
+#ifdef __MIPSEL__
+ printf ("%sel-unknown-linux-gnu\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ else
+ # Either a pre-BFD a.out linker (linux-gnuoldld)
+ # or one that does not give us useful --help.
+ # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+ # If ld does not provide *any* "supported emulations:"
+ # that means it is gnuoldld.
+ echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
+ test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+
+ case "${UNAME_MACHINE}" in
+ i?86)
+ VENDOR=pc;
+ ;;
+ *)
+ VENDOR=unknown;
+ ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ cat >$dummy.c <<EOF
+#include <features.h>
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __ELF__
+# ifdef __GLIBC__
+# if __GLIBC__ >= 2
+ printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+#else
+ printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ fi ;;
+# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
+# are messed up and put the nodename in both sysname and nodename.
+ i?86:DYNIX/ptx:4*:*)
+ echo i386-sequent-sysv4
+ exit 0 ;;
+ i?86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit 0 ;;
+ i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ i?86:*:5:7*)
+ UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586
+ (/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686
+ (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ i?86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit 0 ;;
+ pc:*:*:*)
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit 0 ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit 0 ;;
+ PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit 0 ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit 0 ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+ news*:NEWS-OS:*:6*)
+ echo mips-sony-newsos6
+ exit 0 ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+ printf ("vax-dec-bsd\n"); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ esac
+fi
+
+#echo '(Unable to guess system type)' 1>&2
+
+exit 1
diff --git a/config/README b/config/README
new file mode 100644
index 0000000..caedebd
--- /dev/null
+++ b/config/README
@@ -0,0 +1,34 @@
+The files in this directory define a basic set of functionality for each
+board. They are loaded by calling "load_generic_config", normally done
+as part of the baseboard description for a given board.
+
+This functionality is a partial replacement for the tool-specific
+configuration previously found in the testsuite/config directory. Note
+that no tool-specific actions are defined here; they still need to be
+defined by the tool-specific config files. However, for tools that
+simply wish to download and execute programs on a board, the
+functionality here should be sufficient.
+
+The functions that can be defined are:
+
+${board}_open
+${board}_close
+${board}_exec
+${board}_binary
+${board}_reboot
+${board}_download
+${board}_upload
+${board}_transmit
+${board}_send
+${board}_file
+${board}_spawn
+${board}_load
+
+Normally these functions are invoked indirectly by the testcases when
+they invoke the remote_xxx version of the function.
+
+The ${board}_xxx functions will be called in preference to the default
+versions (or the ones specified by the "connect" protocol in the board
+description). However, the version defined by the "connect" protocol
+are still accessible by calling remote_raw_xxx, which will ignore any
+board-specific or generic versions of these functions.
diff --git a/config/arc.exp b/config/arc.exp
new file mode 100644
index 0000000..3fffb06
--- /dev/null
+++ b/config/arc.exp
@@ -0,0 +1,20 @@
+# Copyright (C) 1997 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., 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
+
+load_generic_config "gdb-comm";
diff --git a/config/arm-ice.exp b/config/arm-ice.exp
new file mode 100644
index 0000000..3fffb06
--- /dev/null
+++ b/config/arm-ice.exp
@@ -0,0 +1,20 @@
+# Copyright (C) 1997 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., 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
+
+load_generic_config "gdb-comm";
diff --git a/config/base-config.exp b/config/base-config.exp
new file mode 100644
index 0000000..2cd9581
--- /dev/null
+++ b/config/base-config.exp
@@ -0,0 +1,48 @@
+# Copyright (C) 1997 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., 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
+
+#
+# reboot_hook -- called to reboot a target board. Returns 1 on
+# success, 0 otherwise.
+#
+proc reboot_via_x10 { dest } {
+ if [board_info $dest exists name] {
+ set dest [board_info $dest name];
+ }
+
+ if [board_info $dest exists x10] {
+ set x10 [board_info $dest x10];
+ verbose "rebooting x10 unit $x10" 1
+ rsh_exec rtl "/usr/unsupported/bin/x10-hellcab unit $x10 off"
+ sleep 2
+ rsh_exec rtl "/usr/unsupported/bin/x10-hellcab unit $x10 on"
+ sleep 2
+ return 1;
+ }
+ return 0;
+}
+
+proc ${board}_reboot { args } {
+ if { [llength $args] > 0} {
+ set dest [lindex $args 0];
+ } else {
+ set dest target;
+ }
+ return [reboot_via_x10 $dest];
+}
diff --git a/config/base68k.exp b/config/base68k.exp
new file mode 100644
index 0000000..d105ce8
--- /dev/null
+++ b/config/base68k.exp
@@ -0,0 +1,323 @@
+# Copyright (C) 1994, 1996, 1997 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, 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
+
+# This file was written by Bob Manson (manson@cygnus.com)
+# based on earlier work by JT Conklin (jtc@cygnus.com)
+
+#
+# base68k_load -- load the program and execute it
+#
+
+proc base68k_ld { dest prog } {
+ global tmpdir
+
+ set shell_prompt [board_info $dest shell_prompt]
+
+ if ![file exists $prog] then {
+ verbose -log "$prog does not exist."
+ return "untested"
+ }
+ if [is_remote host] {
+ set prog [remote_download host $prog];
+ if { $prog == "" } {
+ verbose -log "Unable to download $prog to host.";
+ return "untested";
+ }
+ }
+
+ if [board_info $dest exists objcopy] {
+ set OBJCOPY [board_info $dest objcopy];
+ set exec_file "${prog}.srec"
+ set objcopy_args ""
+ if [board_info $dest exists use_vma_offset] {
+ set objcopy_args "--adjust-vma=[board_info $dest hex_startaddr]";
+ }
+ set status [remote_exec host "$OBJCOPY $objcopy_args -O srec $prog ${prog}.srec"]
+ set result [lindex $status 1];
+ regsub -all -- "\[\r\n\]*" $result "" result
+ if { $result != "" || [lindex $status 0] != 0 } {
+ warning "Got \"$result\" from $OBJCOPY"
+ verbose -log "Couldn't convert to srecord for downloading"
+ remote_close $dest;
+ return "untested"
+ } else {
+ verbose "Converted $prog to an srecord." 2
+ }
+ } else {
+ set exec_file $prog
+ }
+
+ set value 0;
+ if ![board_info $dest exists fileid] {
+ while { $value < 2 } {
+ set rom68k_shell_id [remote_open $dest]
+ if { $rom68k_shell_id < 0 } {
+ if { $value > 0 || ![remote_reboot $dest] } {
+ verbose -log "$prog not executed, couldn't connect to target."
+ return "untested"
+ }
+ incr value;
+ } else {
+ break;
+ }
+ }
+ # 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;
+ }
+ }
+
+ # if we built the srecord on a remote host, copy it back here so we
+ # can load it
+ if [is_remote host] {
+ global objdir
+ set exec_file [remote_upload host ${exec_file} "${objdir}/a.out"];
+ }
+
+ set got_p 0;
+ for { set tries 0; } { (! $got_p) && $tries < 5 } { incr tries } {
+ remote_send $dest "\r\n\r\n"
+ remote_expect $dest 5 {
+ -re "${shell_prompt}$" {
+ verbose "Got prompt."
+ set result 0
+ set got_p 1;
+ }
+ timeout {
+ warning "Never got prompt."
+ }
+ }
+ if { ! $got_p } {
+ if $tries<=4 then {
+ if { $tries == 3 } then {
+ remote_reboot $dest;
+ } else {
+ remote_send $dest "\r\n"
+ }
+ }
+ }
+ }
+
+ # We need to do this in case the connection to the remote side is
+ # scrogged -- the remote_expect above will fail in a lot of
+ # non-clean ways.
+ if { ! $got_p } {
+ remote_close $dest;
+ remote_reboot $dest;
+ return "unresolved";
+ } else {
+ # Flush out any remaining cruft.
+ remote_expect $dest 2 {
+ timeout { }
+ -re ".+" { exp_continue }
+ default { }
+ }
+ }
+
+ if [board_info $dest exists download_command] {
+ # Load the program.
+ remote_send $dest "\r\n";
+ # dbug has problems sending download command immediately after a
+ # newline, so we wait for the prompt to come back first.
+ remote_expect $dest 5 {
+ -re "${shell_prompt}$" {
+ verbose -log "Got prompt."
+ }
+ timeout {
+ warning "Never got prompt."
+ }
+ }
+ remote_send $dest [board_info $dest download_command]
+ if [board_info $dest exists download_response] {
+ remote_expect $dest 5 {
+ [board_info $dest download_response] { }
+ timeout {
+ perror "Download command never responded."
+ return "unresolved";
+ }
+ }
+ }
+ }
+
+ verbose "Writing records to target..."
+ set status [remote_transmit $dest $exec_file];
+ if { $exec_file != $prog } {
+ remote_file build delete $exec_file
+ }
+ if { $status != 0 } {
+ remote_close $dest;
+ verbose -log "Transmission of $exec_file to the target failed." 3
+ return "unresolved"
+ }
+ verbose "Wrote records to target...waiting for prompt."
+ remote_send $dest "\n"
+ set got_p 0;
+ remote_expect $dest 50 {
+ -re "$shell_prompt$" {
+ verbose "Got prompt."
+ set got_p 1;
+ }
+ timeout { }
+ }
+ if { $got_p } {
+ # Flush any remaining cruft. 2 seconds may be too long, dunno.
+ remote_expect $dest 2 {
+ timeout { }
+ -re ".+" { exp_continue }
+ default { }
+ }
+ return "pass";
+ } else {
+ remote_close $dest;
+ remote_reboot $dest;
+ return "unresolved";
+ }
+
+}
+
+
+proc base68k_spawn { dest prog args } {
+ set shell_prompt [board_info $dest shell_prompt];
+
+ set result [remote_ld $dest $prog];
+ if { $result != "pass" } {
+ return [list $result ""];
+ }
+
+ if [board_info $dest exists startaddr] {
+ set go_command "[board_info $dest go_command] [board_info $dest startaddr]";
+ } else {
+ set go_command "[board_info $dest go_command]";
+ }
+
+ verbose "Sending $go_command, waiting for results.";
+ remote_send $dest "${go_command}\n";
+ return { "pass" "" };
+}
+
+proc base68k_wait { dest timeout } {
+ set shell_prompt [board_info $dest shell_prompt];
+ set noappend 0;
+ set result -1;
+
+ set output "";
+
+ remote_expect $dest $timeout {
+ -re [board_info $dest go_response] {
+ append output $expect_out(buffer);
+ set noappend 1;
+ set result 0;
+ exp_continue -continue_timer;
+ }
+ -re "$shell_prompt$" {
+ verbose "Got prompt.";
+ set result 0;
+ }
+ -re "\[\r\n\]+" {
+ if { ! $noappend } {
+ append output $expect_out(buffer);
+ if { [string length $output] < 512000 } {
+ exp_continue -continue_timer;
+ } else {
+ set result -1;
+ }
+ }
+ }
+ timeout {
+ warning "Nothing ever came back.";
+ set result -1;
+ }
+ }
+
+ if [board_info $dest exists output_end] {
+ regsub "[board_info $dest output_end]" "$output" "\n" output;
+ }
+
+ # There has got to be a better way. (We need to do this in order to remove
+ # the echoed "go command".
+ if [board_info $dest exists startaddr] {
+ set go_command "[board_info $dest go_command] [board_info $dest startaddr]";
+ } else {
+ set go_command "[board_info $dest go_command]";
+ }
+
+ regsub "^.*$go_command\[\r\n\]*" "$output" "" output;
+ regsub "^.*$go_command\[\r\n\]*" "$output" "" output;
+
+ # We always want to check for a status, even if there was a funky weird
+ # failure above.
+ set status [check_for_board_status output];
+ if { $result == 0 } {
+ set result $status;
+ verbose -log "exit status was $status";
+ }
+ # A negative value indicates that we should reboot. Otherwise, return
+ # the exit status from the program if we got one (and we should have).
+ return [list $result "$output"];
+}
+
+proc base68k_load { dest prog args } {
+ global base68k_retry
+
+ set shell_prompt [board_info $dest shell_prompt];
+
+ if { [llength $args] > 0 } {
+ for { set x 0; } { $x < [llength $args] } { incr x ; } {
+ if { [lindex $args $x] != "" } {
+ verbose -log "Cannot pass parameters or input file to this target";
+ return [list "unsupported" ""];
+ }
+ }
+ }
+
+ set result [remote_spawn $dest $prog];
+ if { [lindex $result 0] != "pass" } {
+ return $result;
+ }
+
+ # FIXME: The value 360 below should be a parameter.
+
+ set result [remote_wait $dest 360];
+ set output [lindex $result 1];
+ set status [lindex $result 0];
+
+ verbose "output from board is $output"
+
+ # Make sure there's a newline before the PASS/FAIL/whatever for the log.
+ send_log "\n"
+
+ if { $status > 0 } {
+ return [list "fail" $output];
+ } elseif { $status == 0 } {
+ return [list "pass" $output];
+ } else {
+ if [info exists base68k_retry] {
+ return [list "fail" $output];
+ }
+ set base68k_retry 1;
+ remote_reboot $dest;
+ set status [eval base68k_load \{$dest\} \{$prog\} $args];
+ unset base68k_retry;
+ return $status;
+ }
+}
+
+set_board_info protocol "base68k";
+set_board_info send_initial_cr 1
diff --git a/config/bug.exp b/config/bug.exp
new file mode 100644
index 0000000..881eccc
--- /dev/null
+++ b/config/bug.exp
@@ -0,0 +1,29 @@
+# Copyright (C) 1997 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, 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
+
+# This file was written by Bob Manson (manson@cygnus.com).
+
+load_generic_config "base68k";
+
+set_board_info shell_prompt "\[0-9\]+Bug>"
+set_board_info download_command "lo 0\r"
+set_board_info download_response "lo 0.*"
+set_board_info go_command "go"
+set_board_info go_response "\*\*\*EXIT code.*"
+set_board_info startaddr "10000"
diff --git a/config/cfdbug.exp b/config/cfdbug.exp
new file mode 100644
index 0000000..2db0ac7
--- /dev/null
+++ b/config/cfdbug.exp
@@ -0,0 +1,31 @@
+# Copyright (C) 1999 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, 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
+
+# This file was written by Bob Manson (manson@cygnus.com).
+
+load_generic_config "base68k";
+
+set_board_info shell_prompt "dBUG> *"
+set_board_info download_command "dl\r\n"
+set_board_info download_response "*Escape to local*"
+set_board_info go_command "go"
+set_board_info go_response "\[*\]\[*\]\[*\] EXIT code \[^\r\n\]*\[\r\n\]"
+set_board_info startaddr "10000"
+set_board_info hex_startaddr "0x10000"
+set_board_info no_binary_mode 1
diff --git a/config/cygmon.exp b/config/cygmon.exp
new file mode 100644
index 0000000..2378a12
--- /dev/null
+++ b/config/cygmon.exp
@@ -0,0 +1,22 @@
+# Copyright (C) 1997, 1998 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., 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
+
+load_generic_config "gdb-comm";
+
+set_board_info send_initial_cr 1;
diff --git a/config/d10v.exp b/config/d10v.exp
new file mode 100644
index 0000000..3fffb06
--- /dev/null
+++ b/config/d10v.exp
@@ -0,0 +1,20 @@
+# Copyright (C) 1997 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., 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
+
+load_generic_config "gdb-comm";
diff --git a/config/ddb-ether.exp b/config/ddb-ether.exp
new file mode 100644
index 0000000..140c0d2
--- /dev/null
+++ b/config/ddb-ether.exp
@@ -0,0 +1,190 @@
+# Copyright (C) 1997, 1998 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, 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
+
+# This file was written by Bob Manson (manson@cygnus.com)
+
+# Reset the prompt to what GDB needs.
+proc ${board}_init { dest } {
+ global doing_ddb_init;
+
+ if ![info exists doing_ddb_init] {
+ set doing_ddb_init 1;
+
+ remote_close $dest;
+ for { set x 0; } { $x < 3 } { incr x; } {
+ set shell_id [remote_open $dest];
+ if { $shell_id == "" || $shell_id < 0 } {
+ remote_reboot $dest;
+ } else {
+ break;
+ }
+ }
+
+ set shell_prompt [board_info $dest shell_prompt];
+
+ remote_send $dest "\n";
+ remote_expect $dest 10 {
+ -re ".*PMON> $" {
+ remote_send $dest "set prompt \"$shell_prompt\"\n";
+ exp_continue;
+ }
+ -re ".*${shell_prompt}$" { }
+ }
+ remote_close $dest;
+ unset doing_ddb_init;
+ } else {
+ return;
+ }
+}
+
+proc ddb_ether_load { dest prog args } {
+ for { set x 0; } { $x < 3 } { incr x } {
+ set result [eval remote_spawn \{$dest\} \{$prog\} $args];
+ if { $result < 0 } {
+ remote_reboot $dest;
+ } else {
+ set result [remote_wait $dest 300];
+ set status [lindex $result 0];
+ set output [lindex $result 1];
+ if { $status >= 0 } {
+ if { $status > 0 } {
+ return [list "fail" $output];
+ } else {
+ return [list "pass" $output];
+ }
+ }
+ }
+ }
+ return [list "fail" ""];
+}
+
+proc ddb_ether_ld { dest prog } {
+ if ![board_info $dest exists tftpdir] {
+ perror "Must set_board_info tftpdir for [board_info $dest name]";
+ return "fail";
+ }
+
+ if ![board_info $dest exists fileid] {
+ set spawn_id [remote_open $dest];
+ if { $spawn_id == "" || $spawn_id < 0 } {
+ return "retry";
+ }
+ remote_binary $dest;
+ }
+
+ set shell_prompt [board_info $dest shell_prompt];
+
+ remote_send $dest "\n";
+ remote_expect $dest 10 {
+ -re ".*${shell_prompt}$" { }
+ default {
+ return "retry";
+ }
+ }
+ set basename "a.out.[pid]";
+ set file "[board_info $dest tftpdir]/$basename";
+ set file [remote_download build $prog $file];
+ if { $file == "" } {
+ perror "download to tftp area failed";
+ return "fail";
+ }
+ set state "pass";
+
+ remote_send $dest "boot /$basename\n";
+ set tries 0;
+ remote_expect $dest 30 {
+ -re "Loading.*Entry address is.*${shell_prompt}$" { }
+ -re "invalid executable.*${shell_prompt}$" {
+ incr tries;
+ if { $tries < 3 } {
+ sleep 2;
+ remote_send $dest "boot /$basename\n";
+ exp_continue;
+ }
+ }
+ -re ".*${shell_prompt}$" {
+ set state "fail";
+ }
+ default {
+ set state "fail";
+ }
+ }
+ remote_file build delete $file;
+ if { $state == "fail" } {
+ return $state;
+ }
+ return "pass";
+}
+
+proc ddb_ether_spawn { dest prog args } {
+ set state [ddb_ether_ld $dest $prog];
+
+ if { $state != "pass" } {
+ return -1;
+ }
+ remote_send $dest "g\n";
+ remote_expect $dest 5 {
+ -re "g\[\r\n\]\[\r\n\]?" { }
+ default { }
+ }
+
+ return [board_info $dest fileid];
+}
+
+proc ddb_ether_wait { dest timeout } {
+ set output "";
+ set shell_prompt [board_info $dest shell_prompt];
+
+ remote_expect $dest $timeout {
+ -re "^g\[\r\n\]\[\r\n\]?" {
+ if { $output != "" } {
+ append output $expect_out(buffer);
+ }
+ exp_continue;
+ }
+ -re "(.*)$shell_prompt" {
+ append output $expect_out(1,string);
+ set status [check_for_board_status output];
+ if { $status > 0 } {
+ return [list $status $output];
+ } else {
+ if [regexp "Exception Cause=" $output] {
+ remote_reboot $dest;
+ return [list -1 $output];
+ }
+ return [list 0 $output];
+ }
+ }
+ -re "\[\r\n\]+" {
+ append output $expect_out(buffer);
+ if { [string length $output] < 512000 } {
+ exp_continue;
+ } else {
+ return [list -1 ""];
+ }
+ }
+ default {
+ return [list -1 ""];
+ }
+ }
+}
+
+set_board_info send_initial_cr 1
+set_board_info protocol "ddb_ether"
+set_board_info shell_prompt "NEC010> "
diff --git a/config/ddb.exp b/config/ddb.exp
new file mode 100644
index 0000000..13a18e0
--- /dev/null
+++ b/config/ddb.exp
@@ -0,0 +1,96 @@
+# Copyright (C) 1997 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., 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
+
+# This file was written by Bob Manson (manson@cygnus.com)
+
+# We use GDB to talk to a vr4300 board.
+load_generic_config "base68k";
+
+set_board_info shell_prompt "NEC010> ";
+set_board_info download_command "load tty0\n";
+set_board_info download_response "Downloading from";
+set_board_info go_command "g -e";
+set_board_info startaddr "a0100000"
+set_board_info hex_startaddr "0xa0100000"
+set_board_info go_response "(^|\[\r\n\])(Exception Cause|\[0-9a-z\]+ \[0-9a-z\]+ break|\\*\\*\\*EXIT code )\[^\r\n\]*\[\r\n\]"
+set_board_info output_end "\[\r\n\](Exception Cause|\[0-9a-z\]+ \[0-9a-z\]+ break).*$"
+
+# Reset the prompt to what GDB needs.
+proc ${board}_init { dest } {
+ global doing_ddb_init;
+ if [is_remote host] {
+ return;
+ }
+
+ if ![info exists doing_ddb_init] {
+ set doing_ddb_init 1;
+
+ for { set i 1; } { $i <= 3 } {incr i } {
+ remote_close $dest;
+ for { set x 0; } { $x < 3 } { incr x; } {
+ set shell_id [remote_open $dest];
+ if { $shell_id == "" || $shell_id < 0 } {
+ remote_reboot $dest;
+ } else {
+ break;
+ }
+ }
+
+ set count 0;
+ remote_send $dest "\n";
+ remote_expect $dest 20 {
+ -re ".*PMON> $" {
+ remote_send $dest "set prompt \"NEC010> \"\n";
+ exp_continue;
+ }
+ -re "NEC010> $" {
+ set i 10;
+ }
+ timeout { }
+ -re "0x0" {
+ count++;
+ if(count<5) {
+ exp_continue;
+ }
+ }
+ }
+ if { $i < 3 } {
+ remote_reboot $dest;
+ }
+ }
+ remote_close $dest;
+ unset doing_ddb_init;
+ } else {
+ return;
+ }
+}
+
+set_board_info send_initial_cr 1
+set_board_info dont_wait_for_prompt 1
+
+# If no output format is specified, use objcopy.
+if ![board_info $board exists output_format] {
+ set tempfil [lookfor_file $tool_root_dir binutils/objcopy];
+ if { $tempfil != "" } {
+ set_board_info objcopy $tempfil
+ } else {
+ set_board_info objcopy [transform objcopy]
+ }
+ unset tempfil
+}
diff --git a/config/dos.exp b/config/dos.exp
new file mode 100644
index 0000000..d1b440d
--- /dev/null
+++ b/config/dos.exp
@@ -0,0 +1,484 @@
+# Copyright (C) 1997, 1998, 1999 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:
+# DejaGnu@cygnus.com
+
+# This file was written by Bob Manson (manson@cygnus.com)
+
+#
+# Open a connection to the remote DOS host.
+#
+proc dos_open { dest args } {
+ global destbat_num
+
+ if ![info exists destbat_num] {
+ set destbat_num [pid];
+ }
+ if { [board_info $dest conninfo] == "" } {
+ global board_info;
+ set name [board_info $dest name];
+
+ set board_info($name,conninfo) "b${destbat_num}.bat";
+ incr destbat_num;
+ }
+
+ if [board_info $dest exists fileid] {
+ return [board_info $dest fileid];
+ }
+
+ verbose "doing a dos_open to $dest"
+
+ set shell_prompt [board_info $dest shell_prompt];
+
+ set shell_id [remote_raw_open $dest];
+
+ if { $shell_id == "" || $shell_id < 0 } {
+ return -1;
+ }
+
+ if [board_info $dest exists init_command] {
+ remote_send $dest "[board_info $dest init_command]\n";
+ remote_expect $dest 10 {
+ -re "$shell_prompt" { }
+ default {
+ perror "failed connection to DOS on $dest."
+ return -1;
+ }
+ }
+ }
+
+ if [board_info $dest exists ftp_directory] {
+ set dir [board_info $dest ftp_directory];
+ regsub -all "/" "$dir" "\\" dir;
+ remote_send $dest "cd $dir\n";
+ remote_expect $dest 10 {
+ -re "$shell_prompt" { }
+ default {
+ perror "failed connection to DOS on $dest."
+ return -1;
+ }
+ }
+ }
+
+ if [board_info $dest exists dos_dir] {
+ set dos_dir [board_info $dest dos_dir];
+ regsub -all "^(\[a-zA-Z]:).*$" "$dos_dir" "\\1" drive;
+ regsub -all "^\[a-zA-Z]:" "$dos_dir" "" dos_dir;
+ remote_send $dest "${drive}\n";
+ remote_expect $dest 10 {
+ -re "$shell_prompt" { }
+ default {
+ perror "failed connection to DOS on $dest."
+ return -1;
+ }
+ }
+ remote_send $dest "cd $dos_dir\n";
+ remote_expect $dest 10 {
+ -re "$shell_prompt" { }
+ default {
+ perror "failed connection to DOS on $dest."
+ return -1;
+ }
+ }
+ }
+
+ global target_alias
+ if [info exists target_alias] {
+ set talias $target_alias;
+ } else {
+ set talias "foo-bar"
+ }
+
+ global board_info;
+ if [board_info $dest exists name] {
+ set n [board_info $dest name];
+ } else {
+ set n $dest;
+ }
+ set board_info($n,fileid) $shell_id;
+
+ if [board_info $dest exists init_script] {
+ remote_exec $dest "[board_info $dest init_script] $talias"
+ }
+
+ verbose "Succeeded in connecting to DOS."
+ return $shell_id;
+}
+
+#
+# Close the connection to the remote host. If we're telnetting there, we
+# need to exit the connection first (ataman telnetd gets confused otherwise).
+#
+proc dos_close { dest args } {
+ if [board_info $dest exists fileid] {
+ if { [board_info $dest connect] == "telnet" } {
+ remote_send $dest "exit\n";
+ sleep 2;
+ }
+ return [remote_raw_close $dest];
+ }
+}
+
+proc dos_prep_command { dest cmdline } {
+ global board_info;
+
+ set name [board_info $dest name];
+ set shell_id [remote_open "$dest"];
+
+ set localbat "/tmp/b[pid].bat";
+ set remotebat [board_info $dest conninfo];
+
+ verbose "opened"
+ if { $shell_id != "" && $shell_id >= 0 } {
+ set fileid [open "$localbat" "w"];
+ puts -nonewline $fileid "@echo off\r\n$cmdline\r\nif errorlevel 1 echo *** DOSEXIT code 1\r\nif not errorlevel 1 echo *** DOSEXIT code 0\r\n";
+ close $fileid;
+ set result [remote_download $dest $localbat $remotebat];
+ } else {
+ set result ""
+ }
+ remote_file build delete $localbat;
+ return $result;
+}
+
+#
+# Run CMDLINE on DESTHOST. We handle two cases; one is where we're at
+# a DOS prompt, and the other is where we're in GDB.
+# We run CMDLINE by creating a batchfile, downloading it, and then
+# executing it; this handles the case where the commandline is too
+# long for command.com to deal with.
+#
+
+proc dos_exec { dest program pargs inp outp } {
+ set cmdline "$program $pargs"
+
+ set shell_prompt [board_info $dest shell_prompt];
+
+ if { $inp != "" } {
+ set inp [remote_download $dest $inp inpfile];
+ if { $inp != "" } {
+ set inp " < $inp";
+ }
+ }
+
+ if { $outp != "" } {
+ set outpf " > tempout";
+ } else {
+ set outpf "";
+ }
+
+ verbose "cmdline is $cmdline$inp." 2
+
+ # Make a DOS batch file; we use @echo off so we don't have to see
+ # the DOS command prompts and such.
+ for { set i 0; } { $i < 2 } { incr i } {
+ set exit_status -1;
+ verbose "calling open"
+ set batfile [dos_prep_command $dest "$cmdline$inp$outpf"];
+ if { $batfile != "" } {
+ if { [dos_start_command $batfile $dest] == "" } {
+ # FIXME: The 300 below should be a parameter.
+ set result [remote_wait $dest 300];
+ set exit_status [lindex $result 0];
+ set output [lindex $result 1];
+ }
+ }
+ if { $exit_status >= 0 } {
+ if { $outp != "" } {
+ remote_upload $dest tempout $outp;
+ remote_file $dest delete tempout;
+ }
+ return [list $exit_status $output];
+ }
+ if { $exit_status != -2 } {
+ remote_close $dest;
+ remote_reboot $dest;
+ }
+ }
+ return [list -1 "program execution failed"];
+}
+
+#
+# Start CMDLINE executing on DEST.
+# There are two cases that we handle, one where we're at a DOS prompt
+# and the other is when the remote machine is running GDB.
+#
+
+proc dos_start_command { cmdline dest } {
+ set shell_prompt [board_info $dest shell_prompt];
+ set prefix ""
+ set ok 0;
+ for {set i 0;} {$i <= 2 && ! $ok} {incr i;} {
+ set shell_id [remote_open $dest];
+ if { $shell_id != "" && $shell_id > 0 } {
+ remote_send $dest "echo k\r";
+ remote_expect $dest 20 {
+ -re "\\(gdb\\)" {
+ set shell_prompt "\\(gdb\\)";
+ # gdb uses 'shell command'.
+ set prefix "shell ";
+ set ok 1;
+ }
+ -re "$shell_prompt" {
+ set ok 1;
+ }
+ default { }
+ }
+ }
+ if { ! $ok } {
+ remote_close $dest;
+ remote_reboot $dest;
+ }
+ }
+ if { ! $ok } {
+ return "unable to start command"
+ } else {
+ remote_send $dest "${prefix}${cmdline}\n";
+ remote_expect $dest 2 {
+ -re "${cmdline}\[\r\n\]\[\r\n\]?" { }
+ timeout { }
+ }
+ return "";
+ }
+}
+
+#
+# Send STRING to DEST, translating all LFs to CRs first, and sending one
+# line at a time because of strangeness with telnet in some circumstances.
+#
+
+proc dos_send { dest string } {
+ verbose "Sending '$string' to $dest" 2
+ # Convert LFs to CRs, 'cause that is what DOS wants to see.
+ set first 1
+ set string [string trimright $string "\r\n"]
+ foreach line [split $string "\r\n"] {
+ if {$first} {
+ set first 0
+ } else {
+ # small delay between lines, to keep from
+ # overwhelming the stupid telnet server.
+ sleep 1.0
+ }
+ remote_raw_send $dest "$line\r"
+ }
+}
+
+#
+# Spawn PROGRAM on DEST, and return the spawn_id associated with the
+# connection; we can only spawn one command at a time.
+#
+
+proc dos_spawn { dest program args } {
+ verbose "running $program on $dest"
+ set remotebat [dos_prep_command $dest $program];
+
+ for { set x 0; } { $x < 3 } { incr x } {
+ if { [dos_start_command $remotebat $dest] == "" } {
+ return [board_info $dest fileid];
+ }
+ remote_close $dest;
+ remote_reboot $dest;
+ }
+ return -1;
+}
+
+proc dos_wait { dest timeout } {
+ set output "";
+ set shell_prompt [board_info $dest shell_prompt];
+ set status 1;
+
+ verbose "waiting in dos_wait";
+ remote_expect $dest $timeout {
+ -re "(.*)\[*\]\[*\]\[*\] DOSEXIT code (\[0-9\]+)\[\r\n\]\[\r\n\]?" {
+ verbose "got exit status";
+ append output $expect_out(1,string);
+ set status $expect_out(2,string);
+ exp_continue;
+ }
+
+ -re "(.*)${shell_prompt}" {
+ append output $expect_out(1,string);
+ verbose "output from dos is:'$output'";
+ return [list $status $output];
+ }
+
+ -re "(.*)\\(gdb\\)" {
+ append output $expect_out(1,string);
+ return [list $status $output];
+ }
+
+ -re "In.*cygwin.*except" {
+ remote_close $dest;
+ remote_reboot $dest;
+ return [list -2 $output];
+ }
+
+ -re "\[\r\n\]+" {
+ # This is a bit obscure. We only want to put whole
+ # lines into the output string, because otherwise we
+ # might miss a prompt because we only got 1/2 of it the
+ # first time 'round. The other tricky bit is that
+ # expect_out(buffer) will contain everything before and including
+ # the matched pattern.
+ append output $expect_out(buffer);
+ exp_continue -continue_timer;
+ }
+
+ timeout {
+ warning "timeout in dos_wait";
+ if { [dos_interrupt_job $dest] == "" } {
+ return [list 1 $output];
+ }
+ }
+
+ eof {
+ warning "got EOF from dos host.";
+ }
+ }
+
+ remote_close $dest;
+
+ return [list -1 $output];
+}
+
+proc dos_load { dest prog args } {
+ global dos_dll_loaded;
+ set progargs "";
+ set inpfile "";
+ if { [llength $args] > 0 } {
+ set progargs [lindex $args 1];
+ }
+ if { [llength $args] > 1 } {
+ set inpfile [lindex $args 1];
+ }
+ if ![info exists dos_dll_loaded] {
+ if ![is_remote host] {
+ global target_alias;
+
+ set comp [get_multilibs];
+ if [file exists "${comp}/winsup/new-cygwin1.dll"] {
+ set dll "${comp}/winsup/new-cygwin1.dll";
+ set dll_name "cygwin1.dll";
+ } elseif [file exists "${comp}/winsup/new-cygwin.dll"] {
+ set dll "${comp}/winsup/new-cygwin.dll";
+ set dll_name "cygwin.dll";
+ } elseif [file exists ${comp}/lib/cygwin1.dll] {
+ set dll "${comp}/lib/cygwin1.dll";
+ set dll_name "cygwin1.dll";
+ } elseif [file exists ${comp}/lib/cygwin.dll] {
+ set dll "${comp}/lib/cygwin.dll";
+ set dll_name "cygwin.dll";
+ } else {
+ error "couldn't find cygwin.dll:$comp"
+ return "fail";
+ }
+ remote_download $dest $dll $dll_name
+ }
+ set dos_dll_loaded 1;
+ }
+ set remote_prog [remote_download $dest $prog "aout.exe"];
+ set result [remote_exec $dest $remote_prog $progargs $inpfile];
+ set status [lindex $result 0];
+ set output [lindex $result 1];
+ set status2 [check_for_board_status output];
+ if { $status2 >= 0 } {
+ set status $status2;
+ }
+ if { $status != 0 } {
+ set status "fail";
+ } else {
+ set status "pass";
+ }
+ return [list $status $output];
+}
+
+proc dos_file { dest op args } {
+ switch $op {
+ delete {
+ foreach x $args {
+ remote_exec $dest "del" "$x";
+ }
+ return;
+
+ }
+ default {
+ return [eval standard_file \{$dest\} \{$op\} $args];
+ }
+ }
+}
+
+#
+# Interrupt the current spawned command being run; the only tricky
+# part is that we have to handle the "Terminate batch job" prompt.
+#
+proc dos_interrupt_job { host } {
+ set shell_prompt [board_info $host shell_prompt];
+
+ remote_send $host "\003";
+ remote_expect $host 10 {
+ -re "Terminate batch job.*Y/N\[)\]\[?\] *$" {
+ remote_send $host "n\n";
+ exp_continue;
+ }
+ -re "$shell_prompt" {
+ return "";
+ }
+ -re ">" {
+ remote_send $host "\n";
+ exp_continue;
+ }
+ }
+ return "fail";
+}
+
+proc dos_copy_download { host localfile remotefile } {
+ remote_file build delete "[board_info $host local_dir]/$remotefile";
+ if [remote_file build exists $localfile] {
+ set result [remote_download build $localfile "[board_info $host local_dir]/$remotefile"];
+ if { $result != "" } {
+ remote_exec build "chmod" "a+rw $result";
+ return $remotefile;
+ }
+ } else {
+ return ""
+ }
+}
+
+proc dos_copy_upload { host remotefile localfile } {
+ remote_file build delete $localfile;
+ if [file exists "[board_info $host local_dir]/$remotefile"] {
+ set result [remote_download build "[board_info $host local_dir]/$remotefile" $localfile];
+ } else {
+ set result "";
+ }
+ if { $result != "" } {
+ remote_exec build "chmod" "a+rw $result";
+ return $result;
+ }
+}
+
+proc dos_copy_file { dest op args } {
+ if { $op == "delete" } {
+ set file "[board_info $dest local_dir]/[lindex $args 0]";
+ remote_file build delete $file;
+ }
+}
+
+set_board_info protocol "dos";
+set_board_info shell_prompt "(^|\[\r\n\])\[a-zA-Z\]:\[^\r\n\]*>\[ \t\]*$";
+set_board_info needs_status_wrapper 1
diff --git a/config/dve.exp b/config/dve.exp
new file mode 100644
index 0000000..3582b5b
--- /dev/null
+++ b/config/dve.exp
@@ -0,0 +1,22 @@
+# Copyright (C) 1998 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-gcc@prep.ai.mit.edu
+
+# For Densan MIPS boards we use gdb to load and execute programs.
+
+load_generic_config "gdb-comm";
diff --git a/config/gdb-comm.exp b/config/gdb-comm.exp
new file mode 100644
index 0000000..3f4fffc
--- /dev/null
+++ b/config/gdb-comm.exp
@@ -0,0 +1,566 @@
+# Copyright (C) 1996, 1997, 1998 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:
+# DejaGnu@cygnus.com
+
+# Note: some of this was cribbed from the gdb testsuite since we need
+# to use some pretty standard gdb features (breakpoints in particular).
+
+# Load up some standard junk.
+load_lib remote.exp
+
+if ![info exists board] {
+ perror "$board must be set before loading gdb-comm"
+}
+
+# The number of times we've tried to download/execute this executable.
+set try_again 0
+
+#
+# Delete all breakpoints and verify that they were deleted. If anything
+# goes wrong, return -1.
+#
+proc gdb_comm_delete_breakpoints {} {
+ global gdb_prompt
+
+ remote_send host "delete breakpoints\n";
+ remote_expect host 10 {
+ -re "Delete all breakpoints.*y or n. $" {
+ remote_send host "y\n"
+ exp_continue
+ }
+ -re ".*$gdb_prompt $" { }
+ timeout { perror "Delete all breakpoints (timeout)" ; return -1}
+ }
+ remote_send host "info breakpoints\n"
+ remote_expect host 10 {
+ -re "No breakpoints or watchpoints..*$gdb_prompt $" {}
+ -re ".*$gdb_prompt $" { perror "breakpoints not deleted" ; return -1}
+ timeout { perror "info breakpoints (timeout)" ; return -1}
+ }
+ return 0;
+}
+
+#
+# Inform the debugger that we have a new exec file.
+# return a -1 if anything goes wrong, 0 on success.
+#
+proc gdb_comm_file_cmd { arg } {
+ global verbose
+ global loadpath
+ global loadfile
+ global GDB
+ global gdb_prompt
+ upvar timeout timeout
+
+ # The "file" command loads up a new symbol file for gdb, deal with
+ # the various messages it might spew out.
+ if [is_remote host] {
+ set arg [remote_download host $arg a.out];
+ }
+ remote_send host "file $arg\n"
+ remote_expect host 60 {
+ -re "Reading symbols from.*done.*$gdb_prompt $" {
+ verbose "\t\tLoaded $arg into the $GDB"
+ return 0
+ }
+ -re "has no symbol-table.*$gdb_prompt $" {
+ perror "$arg wasn't compiled with \"-g\""
+ return -1
+ }
+ -re "A program is being debugged already.*Kill it.*y or n. $" {
+ remote_send host "y\n"
+ verbose "\t\tKilling previous program being debugged"
+ exp_continue
+ }
+ -re "Load new symbol table from \".*\".*y or n.*$" {
+ remote_send host "y\n"
+ remote_expect host 60 {
+ -re "Reading symbols from.*done.*$gdb_prompt $" {
+ verbose "\t\tLoaded $arg with new symbol table into $GDB"
+ return 0
+ }
+ timeout {
+ perror "(timeout) Couldn't load $arg, other program already loaded."
+ return -1
+ }
+ }
+ }
+ -re ".*No such file or directory.*$gdb_prompt $" {
+ perror "($arg) No such file or directory\n"
+ return -1
+ }
+ -re "$gdb_prompt $" {
+ perror "couldn't load $arg into $GDB."
+ return -1
+ }
+ timeout {
+ perror "couldn't load $arg into $GDB (timed out)."
+ return -1
+ }
+ eof {
+ # This is an attempt to detect a core dump, but seems not to
+ # work. Perhaps we need to match .* followed by eof, in which
+ # expect does not seem to have a way to do that.
+ perror "couldn't load $arg into $GDB (end of file)."
+ return -1
+ }
+ }
+ return 0;
+}
+
+# Disconnect from the target and forget that we have an executable. Returns
+# -1 on failure, 0 on success.
+
+proc gdb_comm_go_idle { } {
+ global gdb_prompt;
+
+ if ![board_info host exists fileid] {
+ return -1;
+ }
+
+ remote_send host "target exec\n";
+ remote_expect host 10 {
+ -re "Kill it.*y or n.*$" {
+ remote_send host "y\n"
+ exp_continue;
+ }
+ -re "No exec.* file now.*$gdb_prompt $" {
+ return 0;
+ }
+ default {
+ remote_close host;
+ return -1;
+ }
+ }
+}
+
+# Start GDB running with target DEST.
+proc gdb_comm_start { dest } {
+ global GDB
+ global gdb_prompt
+ global tool_root_dir
+
+ # The variable gdb_prompt is a regexp which matches the gdb prompt. Set it
+ # if it is not already set.
+ if ![board_info $dest exists gdb_prompt] then {
+ set gdb_prompt "\\(gdb\\)"
+ } else {
+ set gdb_prompt [board_info $dest gdb_prompt];
+ }
+ # Similarly for GDB. Look in the object directory for gdb if we aren't
+ # provided with one.
+ if ![info exists GDB] then {
+ set GDB "[lookfor_file ${tool_root_dir} gdb/gdb]"
+ if { $GDB == "" } {
+ set GDB [transform gdb]
+ }
+ }
+ if [board_info host exists gdb_opts] {
+ set gdb_opts [board_info host gdb_opts];
+ } else {
+ set gdb_opts ""
+ }
+ # Start up gdb (no startfiles, no windows) and wait for a prompt.
+ remote_spawn host "$GDB $gdb_opts -nw -nx";
+ remote_expect host 60 {
+ -re ".*$gdb_prompt $" { }
+ }
+ remote_send host "set height 0\n";
+ remote_expect host 10 {
+ -re ".*$gdb_prompt $" {}
+ }
+ remote_send host "set width 0\n";
+ remote_expect host 10 {
+ -re ".*$gdb_prompt $" {}
+ }
+}
+
+# Add a breakpoint at function FUNCTION. We assume that GDB has already been
+# started.
+proc gdb_comm_add_breakpoint { function } {
+ global gdb_prompt
+
+ remote_send host "break $function\n"
+ remote_expect host 60 {
+ -re "Breakpoint.*$gdb_prompt $" { return "" }
+ -re "Function.*not defined.*$gdb_prompt $" { return "undef" }
+ -re "No symbol table.*$gdb_prompt $" { return "undef" }
+ default {
+ return "untested"
+ }
+ }
+}
+
+#
+# quit_gdb -- try to quit GDB gracefully
+#
+
+proc quit_gdb { } {
+ global gdb_prompt;
+
+ set spawn_id [board_info host fileid];
+
+ if { $spawn_id != "" && $spawn_id > -1 } {
+ if { [remote_send host "quit\n"] == "" } {
+ remote_expect host 10 {
+ -re ".*y or n.*$" {
+ remote_send host "y\n";
+ exp_continue;
+ }
+ -re ".*\[*\]\[*\]\[*\].*EXIT code" { }
+ default { }
+ }
+ }
+ }
+ if ![is_remote host] {
+ remote_close host;
+ }
+}
+
+proc gdb_comm_leave { } {
+ if [is_remote host] {
+ quit_gdb;
+ } else {
+ gdb_comm_go_idle;
+ }
+}
+#
+# gdb_comm_load -- load the program and execute it
+#
+# PROG is a full pathname to the file to load, no arguments.
+# Result is "untested", "pass", "fail", etc.
+#
+
+proc gdb_comm_load { dest prog args } {
+ global GDB
+ global GDBFLAGS
+ global gdb_prompt
+ global timeout
+ set argnames { "command-line arguments" "input file" "output file" }
+
+ for { set x 0; } { $x < [llength $args] } { incr x } {
+ if { [lindex $args $x] != "" } {
+ return [list "unsupported" "no support for [lindex $argnames $x] on this target"];
+ }
+ }
+ # Make sure the file we're supposed to load really exists.
+ if ![file exists $prog] then {
+ perror "$prog does not exist."
+ return [list "untested" ""];
+ }
+
+ if { [is_remote host] || ![board_info host exists fileid] } {
+ gdb_comm_start $dest;
+ }
+
+ # Remove all breakpoints, then tell the debugger that we have
+ # new exec file.
+ if { [gdb_comm_delete_breakpoints] != 0 } {
+ gdb_comm_leave;
+ return [gdb_comm_reload $dest $prog $args];
+ }
+ if { [gdb_comm_file_cmd $prog] != 0 } {
+ gdb_comm_leave;
+ return [gdb_comm_reload $dest $prog $args];
+ }
+ if [board_info $dest exists gdb_sect_offset] {
+ set textoff [board_info $dest gdb_sect_offset];
+ remote_send host "sect .text $textoff\n";
+ remote_expect host 10 {
+ -re "(0x\[0-9a-z]+) - 0x\[0-9a-z\]+ is \\.data" {
+ set dataoff $expect_out(1,string);
+ exp_continue;
+ }
+ -re "(0x\[0-9a-z\]+) - 0x\[0-9a-z\]+ is \\.bss" {
+ set bssoff $expect_out(1,string);
+ exp_continue;
+ }
+ -re "$gdb_prompt" { }
+ }
+ set dataoff [format 0x%x [expr $dataoff + $textoff]];
+ set bssoff [format 0x%x [expr $bssoff + $textoff]];
+ remote_send host "sect .data $dataoff\n";
+ remote_expect host 10 {
+ -re "$gdb_prompt" { }
+ }
+ remote_send host "sect .bss $bssoff\n";
+ remote_expect host 10 {
+ -re "$gdb_prompt" { }
+ }
+ }
+
+ # Now set up breakpoints in exit, _exit, and abort. These
+ # are used to determine if a c-torture test passed or failed. More
+ # work would be necessary for things like the g++ testsuite which
+ # use printf to indicate pass/fail status.
+
+ if { [gdb_comm_add_breakpoint _exit] != "" } {
+ gdb_comm_add_breakpoint exit;
+ }
+ gdb_comm_add_breakpoint abort;
+
+ set protocol [board_info $dest gdb_protocol];
+ if [board_info $dest exists gdb_serial] {
+ set targetname [board_info $dest gdb_serial];
+ } elseif [board_info $dest exists netport] {
+ set targetname [board_info $dest netport];
+ } else {
+ if [board_info $dest exists serial] {
+ set targetname [board_info $dest serial];
+ } else {
+ set targetname ""
+ }
+ }
+ if [board_info $dest exists baud] {
+ remote_send host "set remotebaud [board_info $dest baud]\n"
+ remote_expect host 10 {
+ -re ".*$gdb_prompt $" {}
+ default {
+ warning "failed setting baud rate";
+ }
+ }
+ }
+ remote_send host "target $protocol $targetname\n";
+ remote_expect host 60 {
+ -re "Couldn.t establish conn.*$gdb_prompt $" {
+ warning "Unable to connect to $targetname with GDB."
+ quit_gdb;
+ return [gdb_comm_reload $dest $prog $args]
+ }
+ -re "Ending remote.*$gdb_prompt $" {
+ warning "Unable to connect to $targetname with GDB."
+ quit_gdb;
+ return [gdb_comm_reload $dest $prog $args]
+ }
+ -re "Remote target $protocol connected to.*$gdb_prompt $" { }
+ -re "Remote target $targetname connected to.*$gdb_prompt $" { }
+ -re "Connected to ARM RDI target.*$gdb_prompt $" { }
+ -re "Connected to the simulator.*$gdb_prompt $" { }
+ -re "Remote.*using $targetname.*$gdb_prompt $" { }
+ -re "$gdb_prompt $" {
+ warning "Unable to connect to $targetname with GDB."
+ quit_gdb;
+ return [gdb_comm_reload $dest $prog $args]
+ }
+ -re ".*RDI_open.*should reset target.*" {
+ warning "RDI Open Failed"
+ quit_gdb;
+ return [gdb_comm_reload $dest $prog $args]
+ }
+ default {
+ warning "Unable to connect to $targetname with GDB."
+ quit_gdb;
+ return [gdb_comm_reload $dest $prog $args]
+ }
+ }
+
+ if [target_info exists gdb_init_command] {
+ remote_send host "[target_info gdb_init_command]\n";
+ remote_expect host 10 {
+ -re ".*$gdb_prompt $" { }
+ default {
+ gdb_comm_leave;
+ return [list "fail" ""];
+ }
+ }
+ }
+ # Now download the executable to the target board. If communications
+ # with the target are very slow the timeout might need to be increased.
+ if [board_info $dest exists gdb_load_offset] {
+ remote_send host "load $prog [board_info $dest gdb_load_offset]\n";
+ } else {
+ remote_send host "load\n"
+ }
+ remote_expect host 600 {
+ -re "text.*data.*$gdb_prompt $" { }
+ -re "data.*text.*$gdb_prompt $" { }
+ -re "$gdb_prompt $" {
+ warning "Unable to send program to target board."
+ gdb_comm_leave;
+ return [gdb_comm_reload $dest $prog $args];
+ }
+ default {
+ warning "Unable to send program to target board."
+ gdb_comm_leave;
+ return [gdb_comm_reload $dest $prog $args];
+ }
+ }
+
+ set output ""
+
+ # Now start up the program and look for our magic breakpoints.
+ # And a whole lot of other magic stuff too.
+
+ if [board_info $dest exists gdb_run_command] {
+ remote_send host "[board_info $dest gdb_run_command]\n";
+ } else {
+ remote_send host "run\n"
+ }
+ # FIXME: The value 300 below should be a parameter.
+ if [board_info $dest exists testcase_timeout] {
+ set testcase_timeout [board_info $dest testcase_timeout];
+ } else {
+ set testcase_timeout 300;
+ }
+ remote_expect host $testcase_timeout {
+ -re "Line.*Jump anyway.*.y or n.*" {
+ remote_send host "y\n";
+ exp_continue;
+ }
+ -re "Continuing( at |\\.| with no signal\\.)\[^\r\n\]*\[\r\n\]" {
+ exp_continue;
+ }
+ -re ".*Start it from the beginning?.*y or n.*" {
+ remote_send host "n\n";
+ remote_expect host 10 {
+ -re ".*$gdb_prompt $" {
+ remote_send host "signal 0\n";
+ remote_expect host 10 {
+ -re "signal 0\[\r\n\]+" { exp_continue; }
+ -re "Continuing(\\.| with no signal\\.)\[\r\n\]" {}
+ }
+ }
+ }
+ exp_continue
+ }
+ -re "(run\[\r\n\]*|)Starting program: \[^\r\n\]*\[\r\n\]" {
+ exp_continue
+ }
+ -re "$gdb_prompt (signal 0|continue)\[\r\n\]+Continuing(\\.| with no signal\\.)\[\r\n\]" {
+ exp_continue
+ }
+ -re "(.*)Breakpoint.*exit.*=0.*$gdb_prompt $" {
+ append output $expect_out(1,string);
+ set result [check_for_board_status output];
+ gdb_comm_leave;
+ if { $result > 0 } {
+ return [list "fail" $output];
+ }
+ return [list "pass" $output];
+ }
+ -re "(.*)Breakpoint.*exit.*=\[1-9\]\[0-9\]*.*$gdb_prompt $" {
+ append output $expect_out(1,string);
+ set result [check_for_board_status output];
+ gdb_comm_leave;
+ if { $result == 0 } {
+ return [list "pass" $output];
+ }
+ if [board_info $dest exists exit_statuses_bad] {
+ return [list "pass" $output];
+ }
+ return [list "fail" $output];
+ }
+ -re "(.*)Breakpoint.*exit.*$gdb_prompt $" {
+ append output $expect_out(1,string);
+ set status [check_for_board_status output];
+ gdb_comm_leave;
+ if { $status > 0 } {
+ return [list "fail" $output];
+ }
+ return [list "pass" $output];
+ }
+ -re "(.*)Breakpoint.*abort.*$gdb_prompt $" {
+ append output $expect_out(1,string);
+ check_for_board_status output;
+ gdb_comm_leave;
+ return [list "fail" $output];
+ }
+ -re "SIGTRAP.*$gdb_prompt $" {
+ return [gdb_comm_reload $dest $prog $args];
+ }
+ -re "(.*)Program (received |terminated ).*$gdb_prompt $" {
+ set output $expect_out(1,string);
+ check_for_board_status output;
+ gdb_comm_leave;
+ remote_reboot $dest;
+ return [list "fail" $output];
+ }
+ -re "(.*)Program exited with code \[0-9\]+.*$gdb_prompt $" {
+ set output $expect_out(1,string);
+ set status [check_for_board_status output];
+ gdb_comm_leave;
+ if { $status > 0 } {
+ return [list "fail" $output];
+ }
+ return [list "pass" $output];
+ }
+ default {
+ gdb_comm_leave;
+ if [board_info $dest exists unreliable] {
+ if { [board_info $dest unreliable] > 0 } {
+ global board_info;
+ set name [board_info $dest name];
+ incr board_info($name,unreliable) -1;
+ set result [gdb_comm_reload $dest $prog $args];
+ incr board_info($name,unreliable);
+ return $result;
+ }
+ }
+ return [list "fail" ""];
+ }
+ }
+ gdb_comm_leave;
+ return [list "fail" ""];
+}
+
+# If we've tried less than 4 times to load PROG, reboot the target, restart GDB
+# and try again. Otherwise, return "untested".
+proc gdb_comm_reload { dest prog aargs } {
+ global try_again;
+
+ # how many times have we done this?
+ set n_reloads [board_info $dest n_reloads]
+ if {$n_reloads == ""} {
+ set n_reloads 0
+ }
+
+ # increment it
+ global board_info
+ set name [board_info $dest name]
+ set board_info($dest,n_reloads) [expr {$n_reloads + 1}]
+
+ # how many times are we allowed to do this?
+ set max [board_info $dest max_reload_reboots]
+ if {$max == ""} {
+ set max 15
+ }
+
+ # if we've been doing this too much, something's very
+ # wrong. just give up, to reduce stress on boards.
+ if {$max == $n_reloads} {
+ perror "Too many reboots. Giving up."
+ }
+ if {$max <= $n_reloads} {
+ return {untested {}}
+ }
+
+ if { $try_again < 4 } {
+ global GDB;
+ remote_reboot $dest;
+ remote_close host;
+ incr try_again;
+ set result [eval remote_load \"$dest\" \"$prog\" $aargs]
+ set try_again 0;
+ return "$result";
+ } else {
+ set try_again 0;
+ return [list "untested" ""];
+ }
+}
+
+set_board_info protocol "gdb_comm";
diff --git a/config/gdb_stub.exp b/config/gdb_stub.exp
new file mode 100644
index 0000000..127c6eb
--- /dev/null
+++ b/config/gdb_stub.exp
@@ -0,0 +1,638 @@
+# Copyright (C) 1996-98, 1999 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., 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
+
+# This file was written by Michael Snyder <msnyder@cygnus.com>.
+
+#
+# Stub remote run command.
+#
+
+proc gdb_stub_init { dest args } {
+ global gdb_prompt
+ global GDB
+ global tool_root_dir
+
+ if ![info exists GDB] then {
+ set GDB "[lookfor_file ${tool_root_dir} gdb/gdb]"
+ if { $GDB == "" } {
+ set GDB [transform gdb]
+ }
+ }
+
+ if [board_info $dest exists gdb_prompt] {
+ set gdb_prompt [board_info $dest gdb_prompt];
+ } else {
+ set gdb_prompt "\\(gdb\\)"
+ }
+
+ return 1;
+}
+
+proc gdb_stub_restart { dest } {
+ global gdb_prompt
+ global GDB
+
+ gdb_stub_init $dest;
+
+ for {set x 1;} { $x < 4 } {incr x} {
+ remote_close $dest;
+ sleep 2;
+ set command "$GDB -nw -nx";
+ if [host_info exists gdb_opts] {
+ append command " [host_info gdb_opts]";
+ }
+ set spawn_id [remote_spawn host $command];
+ remote_expect host 30 {
+ -re "$gdb_prompt" { }
+ }
+ if { $spawn_id >= 0 } {
+ if [board_info $dest exists baud] {
+ remote_send host "set remotebaud [board_info $dest baud]\n";
+ remote_expect host 5 {
+ -re "$gdb_prompt" { }
+ default {
+ warning "Error setting baud rate."
+ return -1;
+ }
+ }
+ }
+
+
+ set value [gdb_stub_startup $dest];
+ if { $value > 0 } {
+ break;
+ }
+ verbose "got $value from gdb_stub_startup";
+ remote_send host "quit\n";
+ }
+ remote_reboot $dest;
+ }
+ if { ${x} < 4 } {
+ global board_info;
+ set name [board_info $dest name];
+
+ set board_info($name,gdb_is_running) 1;
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+proc gdb_stub_remote_check { dest } {
+ global gdb_prompt
+
+ if [board_info $dest exists gdb_serial] {
+ set serial [board_info $dest gdb_serial];
+ } elseif [board_info $dest exists serial] {
+ set serial [board_info $dest serial];
+ } else {
+ set serial [board_info $dest netport];
+ }
+ remote_send host "target remote $serial\n";
+ remote_expect host 10 {
+ -re "Couldn't establish connection.*$gdb_prompt" {
+ return 0;
+ }
+ -re "Remote debugging.*$gdb_prompt" {
+ verbose "stub is already running"
+ return 1;
+ }
+ -re "$gdb_prompt" {
+ return 0;
+ }
+ timeout {
+ remote_send host "\003";
+ remote_expect host 10 {
+ -re "$gdb_prompt" { }
+ }
+ return 0;
+ }
+ default {
+ return 0;
+ }
+ }
+}
+
+proc gdb_stub_startup { dest } {
+ global gdb_prompt
+ global GDB
+
+ set is_running_stub 0;
+
+ if [gdb_stub_remote_check $dest] {
+ set is_running_stub 1;
+ }
+
+ if [board_info $dest exists serial] {
+ set serial [board_info $dest serial];
+ } else {
+ set serial [board_info $dest netport];
+ }
+
+ if { ! $is_running_stub } {
+ set command "target [board_info $dest gdb_protocol] $serial\n";
+ remote_send host $command;
+ remote_expect host 5 {
+ -re "already.*y or n." {
+ remote_send host "y\n";
+ exp_continue;
+ }
+ -re "appears to be alive.*$gdb_prompt" { }
+ -re "Remote target.*connected to.*$gdb_prompt" { }
+ default {
+ return -1;
+ }
+ }
+ }
+ if { $is_running_stub == 0 } {
+ global libdir
+
+ verbose "building loader";
+ set loader "loader";
+ if ![file exists $loader] {
+ if [board_info $dest exists gdb_stub_offset] {
+ set result [target_compile "${libdir}/stub-loader.c" $loader executable "libs=-Wl,-Ttext,[board_info $dest gdb_stub_offset]"];
+ } else {
+ set result [target_compile "${libdir}/stub-loader.c" $loader executable "ldscript=[board_info $dest gdb_stub_ldscript]"];
+ }
+ verbose "result is $result";
+ if [is_remote host] {
+ set loader [remote_download host $loader];
+ }
+ }
+ remote_send host "file $loader\n";
+ remote_expect host 20 {
+ -re "A program is being debug.*Kill it.*y or n. $" {
+ remote_send host "y\n"
+ exp_continue
+ }
+ -re "Load new symbol table.*y or n. $" {
+ remote_send host "y\n"
+ exp_continue
+ }
+ -re "Reading symbols from.*done..*$gdb_prompt $" {}
+ -re "$gdb_prompt $" { warning "GDB couldn't find loader" }
+ timeout {
+ warning "(timeout) read symbol file" ;
+ return -1
+ }
+ }
+
+ if [board_info $dest exists serial] {
+ set serial [board_info $dest serial];
+ } else {
+ set serial [board_info $dest netport];
+ }
+ remote_send host "target [board_info $dest gdb_protocol] $serial\n";
+ remote_expect host 60 {
+ -re "appears to be alive.*$gdb_prompt" { }
+ -re "Remote target.*connected to.*$gdb_prompt" { }
+ -re "$gdb_prompt" {
+ warning "Error reconnecting to stub.";
+ return -1;
+ }
+ default {
+ warning "Error reconnecting to stub.";
+ return -1;
+ }
+ }
+
+ # We only send the offset if gdb_load_offset is set. Otherwise, we
+ # assume that sending the offset isn't needed.
+ if [board_info $dest exists gdb_load_offset] {
+ remote_send host "load $loader [board_info $dest gdb_stub_offset]\n"
+ } else {
+ remote_send host "load $loader\n";
+ }
+ verbose "Loading $loader into $GDB" 2
+ global verbose
+ set no_run_command 0;
+ # FIXME: The value 1200 below should be a parameter.
+ remote_expect host 1200 {
+ -re "Transfer rate:.*Switching to remote protocol.*Remote debugging" {
+ set no_run_command 1;
+ remote_send host "";
+ sleep 2;
+ remote_send host "";
+ sleep 1;
+ }
+ -re "Loading.*Starting.*at.*$gdb_prompt $" {
+ verbose "Loaded $loader into $GDB" 1
+ set no_run_command 1;
+ }
+ -re "Loading.*$gdb_prompt $" {
+ verbose "Loaded $loader into $GDB" 1
+ }
+ -re "$gdb_prompt $" {
+ if $verbose>1 then {
+ warning "GDB couldn't load."
+ }
+ }
+ timeout {
+ if $verbose>1 then {
+ warning "Timed out trying to load $arg."
+ }
+ }
+ }
+
+ if { ! $no_run_command } {
+ remote_send host "run\n";
+ remote_expect host 60 {
+ -re "A program is being debug.*Kill it.*y or n. $" {
+ remote_send host "y\n"
+ exp_continue
+ }
+ -re "The program being debugged .*y or n. $" {
+ remote_send host "y\n"
+ exp_continue
+ }
+ -re "Starting program:.*loader.*$" {
+ verbose "Starting loader succeeded"
+ }
+ timeout {
+ warning "(timeout) starting the loader" ;
+ return -1
+ }
+ default {
+ warning "error starting the loader";
+ }
+ }
+ sleep 2;
+ remote_send host ""
+ sleep 1;
+ remote_send host ""
+ verbose "Sent ^C^C"
+ remote_expect host 30 {
+ -re "Give up .and stop debugging it.*$" {
+ remote_send host "y\n"
+ exp_continue
+ }
+ -re "$gdb_prompt $" {
+ verbose "Running loader succeeded"
+ }
+ timeout {
+ warning "(timeout) interrupting the loader" ;
+ return -1
+ }
+ default {
+ warning "error interrupting the loader";
+ }
+ }
+ }
+ remote_send host "quit\n";
+ return [gdb_stub_restart $dest];
+ }
+ return 1;
+}
+
+#
+# Delete all breakpoints and verify that they were deleted. If anything
+# goes wrong we just exit.
+#
+proc gdb_stub_delete_breakpoints {} {
+ global gdb_prompt
+
+ remote_send host "delete breakpoints\n"
+ remote_expect host 10 {
+ -re "Delete all breakpoints.*y or n. $" {
+ remote_send host "y\n"
+ exp_continue
+ }
+ -re "$gdb_prompt $" { }
+ timeout { warning "Delete all breakpoints (timeout)" ; return -1}
+ }
+ remote_send host "info breakpoints\n"
+ remote_expect host 10 {
+ -re "No breakpoints or watchpoints..*$gdb_prompt $" {}
+ -re "$gdb_prompt $" { warning "breakpoints not deleted" ; return -1}
+ timeout { warning "info breakpoints (timeout)" ; return -1}
+ }
+ return 0;
+}
+
+proc gdb_stub_go_idle { dest } {
+ gdb_stub_delete_breakpoints
+}
+
+proc gdb_stub_add_breakpoint { function args } {
+ global gdb_prompt
+
+ remote_send host "break $function\n"
+ remote_expect host 60 {
+ -re "Breakpoint (\[0-9\]+).*$gdb_prompt $" { return $expect_out(1,string) }
+ -re "Function.*not defined.*$gdb_prompt $" { return "undef" }
+ -re "No symbol table.*$gdb_prompt $" { return "undef" }
+ default {
+ return "undef"
+ }
+ }
+}
+
+proc gdb_stub_start { dest } {
+ global gdb_prompt;
+
+ set exit_brnum [gdb_stub_add_breakpoint _exit];
+ if { $exit_brnum == "undef" || [board_info $dest exists always_break_exit] } {
+ set exit_brnum [gdb_stub_add_breakpoint exit];
+ }
+ set abort_brnum [gdb_stub_add_breakpoint abort];
+
+ upvar #0 gdb_stub_info I
+ set I($dest,exit_brnum) $exit_brnum
+ set I($dest,abort_brnum) $abort_brnum
+
+ remote_send host "set \$fp=0\n";
+ remote_expect host 10 {
+ -re "$gdb_prompt" { }
+ }
+ # This is needed for the SparcLite. Whee.
+ if [board_info $dest exists gdb,start_symbol] {
+ set start_comm "jump *[board_info $dest gdb,start_symbol]\n";
+ } else {
+ set start_comm "jump *start\n";
+ }
+ remote_send host "break copyloop\n";
+ remote_expect host 10 {
+ -re "Breakpoint.*$gdb_prompt $" {
+ set start_comm "continue\n";
+ }
+ -re "Function.*not defined.*$gdb_prompt $" { }
+ default { }
+ }
+ remote_send host $start_comm;
+ remote_expect host 10 {
+ -re "y or n. $" {
+ remote_send host "y\n"
+ exp_continue;
+ }
+ -re "Breakpoint.*in copyloop.*$gdb_prompt $" {
+ remote_send host "jump relocd\n";
+ exp_continue;
+ }
+ -re "Continuing at.*\[\r\n\]" { }
+ default {
+ return { "fail" "" };
+ }
+ }
+ return { "pass" "" };
+}
+
+proc gdb_stub_spawn { dest prog args } {
+ for { set x 0; } { $x < 3 } { incr x } {
+ if { [remote_ld $dest $prog] != 1 } {
+ return [list "fail" "remote_ld failed"];
+ }
+
+ set result [gdb_stub_start $dest];
+ if { [lindex $result 0] != "pass" } {
+ remote_reboot target;
+ } else {
+ return 666; # does anyone use this value?
+ }
+ }
+ return -1;
+}
+
+proc gdb_stub_wait { dest timeout } {
+ global gdb_prompt
+
+
+ upvar #0 gdb_stub_info I
+ set exit_brnum $I($dest,exit_brnum)
+ set abort_brnum $I($dest,abort_brnum)
+
+ remote_expect host $timeout {
+ -re "Breakpoint.*exit.*=0.*$gdb_prompt $" {
+ gdb_stub_go_idle $dest
+ return [list 0 ""];
+ }
+ -re "Breakpoint.*exit.*=\[1-9\]\[0-9\]*.*$gdb_prompt $" {
+ gdb_stub_go_idle $dest
+ return [list 0 ""];
+ }
+ -re "Breakpoint.*exit.*$gdb_prompt $" {
+ gdb_stub_go_idle $dest
+ return [list 0 ""];
+ }
+ -re "Breakpoint.*abort.*$gdb_prompt $" {
+ gdb_stub_go_idle $dest
+ return [list 1 ""];
+ }
+ -re " EXIT code 0.*$gdb_prompt $" {
+ gdb_stub_go_idle $dest;
+ return [list 0 ""];
+ }
+ -re " EXIT code \[1-9]\[0-9]*.*$gdb_prompt $" {
+ gdb_stub_go_idle $dest;
+ return [list 0 ""];
+ }
+ -re " EXIT code 4242.*$gdb_prompt $" {
+ gdb_stub_go_idle $dest;
+ return [list 1 ""];
+ }
+ -re "Program received.*$gdb_prompt $" {
+ gdb_stub_go_idle $dest
+ return [list 1 ""];
+ }
+ -re "Program exited.*$gdb_prompt $" {
+ gdb_stub_go_idle $dest
+ return [list 1 ""];
+ }
+ -re "Breakpoint $exit_brnum.*$gdb_prompt $" {
+ gdb_stub_go_idle $dest;
+ return [list 0 ""];
+ }
+ -re "Breakpoint $abort_brnum.*$gdb_prompt $" {
+ gdb_stub_go_idle $dest;
+ return [list 1 ""];
+ }
+ default {
+ remote_close $dest;
+ remote_reboot $dest;
+ return [list -1 ""];
+ }
+ }
+ return [list -1 ""];
+}
+
+proc gdb_stub_load { dest prog args } {
+ global gdb_prompt
+ set argnames { "command-line arguments" "input file" "output file" }
+
+ for { set x 0; } { $x < [llength $args] } { incr x } {
+ if { [lindex $args $x] != "" } {
+ return [list "unsupported" "no support for [lindex $argnames $x] on this target"];
+ }
+ }
+
+ set result [remote_spawn $dest $prog];
+
+ if { $result < 0 } {
+ return [list "fail" "remote_spawn failed"];
+ }
+
+ # FIXME: The value 120 should be a parameter.
+ set result [remote_wait $dest 120];
+ set status [lindex $result 0];
+ set output [lindex $result 1];
+
+ if { $status == 0 } {
+ return [list "pass" $output];
+ } elseif { $status > 0 } {
+ return [list "fail" $output];
+ } else {
+ global gdb_stub_retry;
+
+ if ![info exists gdb_stub_retry] {
+ set gdb_stub_retry 1;
+
+ set result [eval gdb_stub_load \{$dest\} \{$prog\} $args];
+ unset gdb_stub_retry;
+ return $result;
+ } else {
+ return [list "fail" $output];
+ }
+ }
+}
+
+
+#
+# gdb_stub_ld -- load PROG into the board;
+# Returns a 0 if there was an error,
+# 1 if it loaded successfully.
+#
+proc gdb_stub_ld { dest prog } {
+ global gdb_prompt
+ global GDB
+
+ if ![board_info $dest exists gdb_is_running] {
+ if ![gdb_stub_restart $dest] {
+ return 0;
+ }
+ }
+
+ set loadfile [file tail $prog]
+ set loadpath [file dirname $prog]
+
+ remote_send host "file $prog\n"
+ remote_expect host 30 {
+ -re "A program is being debug.*Kill it.*y or n. $" {
+ remote_send host "y\n"
+ exp_continue
+ }
+ -re "Load new symbol table.*y or n. $" {
+ remote_send host "y\n"
+ exp_continue
+ }
+ -re "Reading symbols from.*done..*$gdb_prompt $" {}
+ -re "$gdb_prompt $" {
+ # Hmmm...is retrying going to help? I kinda doubt it.
+ warning "GDB couldn't read file"
+ return [gdb_stub_retry_ld "$dest" "$prog"];
+ }
+ timeout {
+ warning "(timeout) read symbol file";
+ return [gdb_stub_retry_ld "$dest" "$prog"];
+ }
+ }
+
+ # just in case there are old breakpoints lying around.
+ gdb_stub_delete_breakpoints
+
+ if [board_info $dest exists gdb_serial] {
+ set serial [board_info $dest gdb_serial];
+ } elseif [board_info $dest exists serial] {
+ set serial [board_info $dest serial];
+ } else {
+ set serial [board_info $dest netport];
+ }
+
+ remote_send host "target remote $serial\n"
+ remote_expect host 60 {
+ -re "Kill it?.*y or n.*" {
+ remote_send host "y\n";
+ exp_continue
+ }
+ -re "$gdb_prompt $" {
+ verbose "Set remote target to $serial" 2
+ }
+ timeout {
+ warning "Couldn't set remote target."
+ return 0
+ }
+ }
+
+ if [board_info $dest exists gdb_load_offset] {
+ set offset "[board_info $dest gdb_load_offset]";
+ } else {
+ set offset "";
+ }
+ remote_send host "load $prog $offset\n"
+ verbose "Loading $prog into $GDB" 2
+ global verbose;
+ remote_expect host 1200 {
+ -re "Loading.*$gdb_prompt $" {
+ verbose "Loaded $prog into $GDB" 1
+ }
+ -re "$gdb_prompt $" {
+ if $verbose>1 then {
+ warning "GDB couldn't load."
+ }
+ }
+ timeout {
+ if $verbose>1 then {
+ perror "Timed out trying to load $prog."
+ }
+ }
+ }
+ return 1
+}
+
+#
+# Retry the ld operation, but only once.
+#
+
+proc gdb_stub_retry_ld { dest prog } {
+ global gdb_stub_retry_ld;
+
+ remote_reboot $dest;
+ if [info exists gdb_stub_retry_ld] {
+ unset gdb_stub_retry_ld;
+ return 0;
+ } else {
+ set gdb_stub_retry_ld 1;
+ }
+ gdb_stub_restart $dest;
+ set status [gdb_stub_ld $dest $prog];
+ if [info exists gdb_stub_retry_ld] {
+ unset gdb_stub_retry_ld;
+ }
+ return $status;
+}
+
+proc gdb_stub_close { dest } {
+ global board_info
+ set name [board_info $dest name];
+ if [info exists board_info($name,gdb_is_running)] {
+ unset board_info($name,gdb_is_running);
+ }
+ return [remote_close host];
+}
+
+set_board_info protocol "gdb_stub"
diff --git a/config/h8300.exp b/config/h8300.exp
new file mode 100644
index 0000000..3fffb06
--- /dev/null
+++ b/config/h8300.exp
@@ -0,0 +1,20 @@
+# Copyright (C) 1997 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., 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
+
+load_generic_config "gdb-comm";
diff --git a/config/i386-bozo.exp b/config/i386-bozo.exp
new file mode 100644
index 0000000..563da32
--- /dev/null
+++ b/config/i386-bozo.exp
@@ -0,0 +1,46 @@
+# Copyright (C) 1997 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., 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
+
+load_generic_config "gdb-comm";
+
+proc ${board}_init { args } {
+ set linux_box [target_info linux_box];
+ set bozo_server [target_info bozo_server];
+ remote_spawn $linux_box "$bozo_server unknown";
+ remote_expect $linux_box 60 {
+ -re "port is (\[0-9\]+)" {
+ set_currtarget_info netport "${linux_box}:$expect_out(1,string)";
+ }
+ }
+}
+
+proc ${board}_close { board } {
+ set linux_box [board_info $board linux_box];
+ if [board_info $linux_box exists fileid] {
+ remote_send $linux_box "\003";
+ remote_close $linux_box;
+ }
+ standard_close $board;
+}
+
+proc ${board}_reboot { board args } {
+ remote_close $board;
+ unset_currtarget_info netport;
+ return 1;
+}
diff --git a/config/i960.exp b/config/i960.exp
new file mode 100644
index 0000000..dcca835
--- /dev/null
+++ b/config/i960.exp
@@ -0,0 +1,221 @@
+# Copyright (C) 1997, 1998, 1999 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., 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
+
+#
+# Initialize the board on initial connection or after rebooting.
+# Since the board autobauds, we have to be a bit aggressive about
+# getting a valid prompt.
+#
+proc ${board}_init { dest } {
+ global i960_try_count;
+
+ set prompt [board_info $dest shell_prompt];
+ set done 0;
+
+ if ![info exists i960_try_count] {
+ set i960_try_count 1;
+ }
+
+ remote_close $dest;
+ if { [remote_open $dest] != "" } {
+ for { set tries 0; } { $tries < 7 && ! $done } { incr tries } {
+ remote_send $dest "\n";
+ remote_expect $dest 1 {
+ -re "${prompt}" {
+ set done 1;
+ }
+ -re ".+" { exp_continue }
+ timeout { }
+ }
+ }
+ }
+
+ remote_close $dest;
+ if { ! $done } {
+ if { $i960_try_count == 3 } {
+ perror "Couldn't connect to board.";
+ } else {
+ incr i960_try_count;
+ remote_close $dest;
+ remote_reboot $dest;
+ }
+ }
+ if [info exists i960_try_count] {
+ unset i960_try_count;
+ }
+}
+
+proc i960_ld { dest prog } {
+ if ![file exists $prog] {
+ perror "$prog does not exist."
+ return "untested"
+ }
+ set shell_prompt [board_info $dest shell_prompt];
+ set strip [board_info $dest strip];
+ set rprog [remote_download host $prog a.out];
+ if { $strip != "" } {
+ remote_exec host $strip $rprog;
+ }
+ remote_upload host $rprog a.out;
+
+ set id [remote_open $dest];
+ if { $id < 0 } {
+ return -1;
+ }
+ remote_binary $dest;
+ remote_send $dest "\n";
+ remote_expect $dest 5 {
+ -re $shell_prompt { }
+ }
+ remote_send $dest "do\n";
+ remote_expect $dest 5 {
+ -re "Downloading" { }
+ }
+ # Nasty.
+ if { [board_info $dest connect] == "telnet" } {
+ global board_info;
+
+ remote_close $dest;
+ set hp [split [board_info $dest netport] ":"];
+ set host [lindex $hp 0];
+ set port [lindex $hp 1];
+ set status -1;
+ while { $status != 0 } {
+ set status [catch "socket $host $port" id2];
+ if { $status != 0 } {
+ sleep 5;
+ }
+ }
+ } else {
+ set id2 [exp_open -leaveopen -i $id];
+ }
+ if [catch "exec sx -bX a.out <@$id2 >@$id2 2>/dev/null" error] {
+ perror "exec sx failed: $error"
+ }
+ if { [board_info $dest connect] == "telnet" } {
+ close $id2;
+ sleep 2;
+ remote_open $dest;
+ remote_binary $dest;
+ }
+ set result 1;
+ remote_send $dest "\n";
+ remote_expect $dest 1 {
+ -re "$shell_prompt" {
+ set result 0;
+ exp_continue;
+ }
+ timeout { }
+ }
+ return $result;
+}
+
+proc i960_spawn { dest prog args } {
+ set shell_prompt [board_info $dest shell_prompt];
+
+ for { set tries 0 ; } { $tries < 3 } { incr tries } {
+ set result [remote_ld $dest $prog];
+ if { $result == 0 } {
+ set comm "go [board_info $dest start_addr]";
+ remote_send $dest "$comm\n";
+ remote_expect $dest 10 {
+ -re "$comm\[\r\n\]\[\r\n\]?" { }
+ default { }
+ }
+ return [board_info $dest fileid];
+ } else {
+ remote_reboot $dest;
+ }
+ }
+ return -1;
+}
+
+proc i960_wait { dest timeout } {
+ set output "";
+ set shell_prompt [board_info $dest shell_prompt];
+
+ remote_expect $dest $timeout {
+ -re " fault at \[0-9a-h\]+, subtype \[0-9a-h\]+" {
+ set status -1;
+ exp_continue;
+ }
+ -re "(.*)(\[\r\n\]|^)Program Exit: (\[0-9\]+)\[\r\n\]" {
+ append output $expect_out(1,string);
+ set status $expect_out(3,string);
+ exp_continue;
+ }
+ -re "(.*)$shell_prompt" {
+ append output $expect_out(1,string);
+ set bstatus [check_for_board_status output];
+ if { $bstatus >= 0 } {
+ set status $bstatus;
+ }
+ }
+ -re "\[\r\n\]+" {
+ # Sometimes the board goes wacky in the head, and we have
+ # to shoot it.
+ append output $expect_out(buffer);
+ if { [string length $output] < 512000 } {
+ exp_continue;
+ } else {
+ set status -1;
+ }
+ }
+ default {
+ set status -1;
+ }
+ }
+ return [list $status $output];
+}
+
+proc i960_load { dest prog args } {
+ for { set x 0; } { $x < 3 } { incr x; } {
+ set id [eval remote_spawn \{$dest\} \{$prog\} $args];
+ if { $id < 0 } {
+ return [list "fail" ""];
+ }
+ set result [remote_wait $dest 120];
+ set status [lindex $result 0];
+ set output [lindex $result 1];
+
+ if { $status == 0 } {
+ return [list "pass" $output];
+ } else {
+ global i960_retry;
+
+ if { [board_info $dest exists unreliable] && ![info exists i960_retry] } {
+ set i960_retry 1;
+ remote_reboot $dest;
+ set result [eval i960_load \{$dest\} \{$prog\} $args];
+ unset i960_retry;
+ return $result;
+ } else {
+ if { $status < 0 } {
+ remote_reboot $dest;
+ }
+ return [list "fail" $output];
+ }
+ }
+ }
+}
+
+set_board_info shell_prompt "=>";
+set_board_info send_initial_cr 1;
+# We take care of getting a prompt in ${board}_init.
+set_board_info dont_wait_for_prompt 1;
diff --git a/config/m32r-stub.exp b/config/m32r-stub.exp
new file mode 100644
index 0000000..7cdfd23
--- /dev/null
+++ b/config/m32r-stub.exp
@@ -0,0 +1,20 @@
+# Copyright (C) 1997 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., 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
+
+load_generic_config "gdb_stub";
diff --git a/config/m32r.exp b/config/m32r.exp
new file mode 100644
index 0000000..3fffb06
--- /dev/null
+++ b/config/m32r.exp
@@ -0,0 +1,20 @@
+# Copyright (C) 1997 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., 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
+
+load_generic_config "gdb-comm";
diff --git a/config/m68k-emc.exp b/config/m68k-emc.exp
new file mode 100644
index 0000000..852453c
--- /dev/null
+++ b/config/m68k-emc.exp
@@ -0,0 +1,52 @@
+proc ${board}_init { dest } {
+ global doing_emc_init;
+
+ if [info exists doing_emc_init] {
+ return;
+ }
+ set doing_emc_init 1;
+ remote_close $dest;
+ set dos_host [board_info $dest dos_host];
+ remote_reboot $dos_host;
+ unset doing_emc_init;
+}
+
+proc m68k_emc_board_connect { dest } {
+ global board_info;
+ set tname [board_info $dest name];
+
+ set board_info($tname,m68k_connected) 1;
+ set dos_host [board_info $dest dos_host];
+
+ for { set x 0; } { $x < 3 } { incr x; } {
+ set shell_id [remote_open $dos_host];
+ if { $shell_id == "" || $shell_id < 0 } {
+ remote_reboot $dos_host;
+ } else {
+ break;
+ }
+ }
+ remote_send $dos_host "c:\\symetrix.bat\n";
+ remote_expect $dos_host 300 {
+ -re "SymmComm.*Installed.*\033.2J.*\033.2J" { }
+ default {
+ warning "Never got clear screen sequence from remote side."
+ }
+ }
+ # Flush the buffer.
+ remote_expect $dos_host 2 {
+ -re ".+" { exp_continue; }
+ }
+ # Get past first menu.
+ remote_send $dos_host "\n";
+ remote_expect $dos_host 10 {
+ -re "\033.07;02H" { }
+ default { }
+ }
+ # We don't want a log file.
+ remote_send $dos_host "\n";
+ remote_expect $dos_host 10 {
+ -re "\033.02;24H" { }
+ default { }
+ }
+}
diff --git a/config/mips-idt.exp b/config/mips-idt.exp
new file mode 100644
index 0000000..eacdb4d
--- /dev/null
+++ b/config/mips-idt.exp
@@ -0,0 +1,24 @@
+# Copyright (C) 1997 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-gcc@prep.ai.mit.edu
+
+# For MIPS/IDT we use gdb to load and execute programs.
+
+load_generic_config "gdb-comm";
+
+set_board_info gdb_init_command "set syn-garbage-limit 0";
diff --git a/config/mn10200-eval.exp b/config/mn10200-eval.exp
new file mode 100644
index 0000000..9af6ae5
--- /dev/null
+++ b/config/mn10200-eval.exp
@@ -0,0 +1,22 @@
+# Copyright (C) 1998 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-gcc@prep.ai.mit.edu
+
+# For MN10200 evaluation boards we use gdb to load and execute programs.
+
+load_generic_config "gdb-comm";
diff --git a/config/mn10300-eval.exp b/config/mn10300-eval.exp
new file mode 100644
index 0000000..1070b42
--- /dev/null
+++ b/config/mn10300-eval.exp
@@ -0,0 +1,22 @@
+# Copyright (C) 1998 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-gcc@prep.ai.mit.edu
+
+# For MN10300 evaluation boards we use gdb to load and execute programs.
+
+load_generic_config "gdb-comm";
diff --git a/config/netware.exp b/config/netware.exp
new file mode 100644
index 0000000..75d8149
--- /dev/null
+++ b/config/netware.exp
@@ -0,0 +1,214 @@
+# Copyright (C) 1994, 1996, 1997 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, 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
+
+# This file was written by J.T. Conklin. (jtc@cygnus.com)
+
+#
+# load support libraries
+#
+load_lib remote.exp
+
+# set target variables only if needed
+
+proc ${board}_init { args } {
+ global NLMCONV
+ if ![info exists NLMCONV] then {
+ set NLMCONV [findfile "$rootme/../binutils/nlmconv"]
+ }
+ global LD
+ if ![info exists LD] then {
+ set LD [findfile "$rootme/../ld/ld-new" "$rootme/../ld/ld-new" [transform "ld"]]
+ }
+
+ set shell_prompt "Password:"
+ set shell_id [remote_open target];
+ if [target_info exists passwd] {
+ set passwd [target_info passwd];
+ } else {
+ set passwd "";
+ }
+ if $shell_id<0 then {
+ warning "Couldn't connect to target"
+ return -1
+ }
+
+ if [string match "" $passwd] then {
+ stty -echo
+ send_user "Password: "
+ expect_user -re "(.*)\n"
+ send_user "\n"
+ set passwd "$expect_out(1,string)"
+ stty echo
+ }
+
+ send -i $shell_id "$passwd\n"
+ expect {
+ -i $shell_id ":" {
+ verbose "Got termtype prompt" 0
+ }
+
+ -i $shell_id timeout {
+ warning "Connection timed out"
+ return -1
+ }
+ }
+
+ # FIXME
+ set shell_prompt "[string toupper [target_info name]]:"
+ send -i $shell_id "1\n"
+
+ expect {
+ -i $shell_id -re "$shell_prompt" {}
+ -i $shell_id timeout {
+ warning "Connection timed out"
+ return -1
+ }
+ }
+}
+
+
+#
+# ${board}_load -- load the program and execute it
+#
+# See default.exp for explanation of arguments and results.
+#
+
+proc ${board}_load { dest prog args } {
+ global LD NLMCONV
+ global tmpdir
+ global errorCode
+
+ if [board_info $dest exists fileid] {
+ set shell_id [board_info $dest fileid];
+ } else {
+ set shell_id -1;
+ }
+
+ set output ""
+
+ if $shell_id<0 then {
+ verbose -log "$prog not executed because there is no target" 3
+ return "untested"
+ }
+
+ #
+ set exe [file tail $prog]
+
+ # We can't blindly append a suffix to the object name, because the
+ # result may not be valid on netware's 8.3 filesystem.
+ set nlm "$tmpdir/x.nlm"
+ set lnk "$tmpdir/x.lnk"
+
+ # build *.lnk file
+ set fd [open $lnk w]
+ puts $fd "description \"$exe\""
+ puts $fd "screenname \"System Console\""
+ puts $fd "module clib.nlm"
+ puts $fd "module mathlib.nlm"
+ puts $fd "stack 65536"
+ puts $fd "debug"
+ # FIXME: don't hardcode location of prelude.o
+ puts $fd "input /s1/cygnus/dejagnu/i386-netware/lib/prelude.o"
+ puts $fd "input $prog"
+ puts $fd "output $nlm"
+ close $fd
+
+ # run nlmconv
+ verbose "Executing: $NLMCONV -l$LD -T$lnk" 1
+ catch "exec $NLMCONV -l$LD -T$lnk" output
+ if ![string match "" $output] then {
+ verbose $output 1
+ }
+ if ![string match "NONE" $errorCode] {
+ verbose -log "Can't link $prog" 3
+ return "fail"
+ }
+
+ # download
+ verbose "Downloading $nlm" 1
+ catch "exec cp $nlm /.NetWare/[board_info $dest name].nws/sys.nwv/tmp/x.nlm" output
+ if ![string match "" $output] then {
+ verbose $output 1
+ verbose -log "cp failed for $nlm" 3
+ return "unresolved"
+ }
+
+ # Wait a second for the file to "settle" on the NetWare server.
+ # I've encountered unexplained failures without this delay.
+# sleep 1
+
+
+ # The NetWare remote console expects to be connected to a vt100
+ # compatible terminal. It isn't very efficent, and it seems to
+ # send screen repaints for no reason. So we have to clear the
+ # screen as we run each test, otherwise a shell prompt or abort
+ # message from a previous test could cause incorrect results.
+ send -i $shell_id "CLS\r\n"
+ set timeout 1
+ expect {
+ -i $shell_id -re "$shell_prompt" {
+ exp_continue
+ }
+ }
+ set timeout 10
+
+
+ # Netware does not support exit status. The best we can do to
+ # detect failures is to look for the "ABNORMAL NLM TERMINATION"
+ # message printed by abort().
+ set ret 0
+ send -i $shell_id "LOAD X.NLM\r\n"
+ expect {
+ -i $shell_id "ABNORMAL NLM TERMINATION" {
+ set ret 1
+ exp_continue
+ }
+ -i $shell_id "Unable to find load file" {
+ perror "Couldn't execute program"
+ verbose -log "Couldn't execute program" 3
+ return "unresolved"
+ }
+ -i $shell_id timeout {
+ perror "Couldn't execute program (timed out)"
+ verbose -log "Couldn't execute program (timed out)" 3
+ return "unresolved"
+ }
+ -i $shell_id -re "[format "%sLOAD" $shell_prompt]" {
+ exp_continue
+ }
+ -i $shell_id -re "$shell_prompt" {}
+ }
+
+ catch [exec rm -f $lnk]
+ catch [exec rm -f $nlm]
+
+ if { $ret == 0 } {
+ return "pass"
+ } else {
+ return "fail"
+ }
+}
+
+#
+# ${tool}_exit -- shutdown the connection
+#
+
+proc ${board}_exit {} {
+ remote_close target;
+}
diff --git a/config/powerpc-bug.exp b/config/powerpc-bug.exp
new file mode 100644
index 0000000..3fffb06
--- /dev/null
+++ b/config/powerpc-bug.exp
@@ -0,0 +1,20 @@
+# Copyright (C) 1997 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., 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
+
+load_generic_config "gdb-comm";
diff --git a/config/proelf.exp b/config/proelf.exp
new file mode 100644
index 0000000..310af21
--- /dev/null
+++ b/config/proelf.exp
@@ -0,0 +1,27 @@
+# Copyright (C) 1997 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., 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
+
+load_generic_config "base68k";
+set_board_info shell_prompt "#"
+set_board_info download_command "r 0\n";
+set_board_info go_command "g"
+set_board_info startaddr "40000"
+
+set_board_info go_response "\[\r\n\]+\[a-z \]+\\(\[0-9\]+\\) pc=\[0-9A-Ha-h\]+\[\r\n\]+\[0-9A-H\]+ \[0-9A-H\]+ \[^\r\n\]+\[\r\n\]+|\\*\\*\\*EXIT code "
+set_board_info output_end "\[\r\n\]+\[a-z \]+\\(\[0-9\]+\\) pc=\[0-9A-Ha-h\]+\[\r\n\]+.*$"
diff --git a/config/rom68k.exp b/config/rom68k.exp
new file mode 100644
index 0000000..63721f8
--- /dev/null
+++ b/config/rom68k.exp
@@ -0,0 +1,32 @@
+# Copyright (C) 1995, 1996, 1997 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, 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
+
+# This file was written by Bob Manson (manson@cygnus.com)
+# based on earlier work by J.T. Conklin (jtc@cygnus.com)
+
+load_generic_config "base68k";
+
+set_board_info shell_prompt "ROM68K :-> "
+set_board_info download_command "DC\n";
+set_board_info download_response "Waiting for S-records from host... ";
+set_board_info go_command "GO"
+set_board_info startaddr "10000"
+set_board_info hex_startaddr "0x10000"
+set_board_info go_response "(Emul|RS Except|TRAP #\[1-9\]|\\*\\*\\*EXIT code ).*"
+set_board_info output_end "\[\r\n\]((\[^\r\n\]*\[\r\n\]-----*)|Emul|RS Except|TRAP #|Bus/Address).*$"
diff --git a/config/sh.exp b/config/sh.exp
new file mode 100644
index 0000000..3fffb06
--- /dev/null
+++ b/config/sh.exp
@@ -0,0 +1,20 @@
+# Copyright (C) 1997 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., 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
+
+load_generic_config "gdb-comm";
diff --git a/config/sim.exp b/config/sim.exp
new file mode 100644
index 0000000..74edc6f
--- /dev/null
+++ b/config/sim.exp
@@ -0,0 +1,124 @@
+# Copyright (C) 1993, 1994, 1996, 1997, 1998 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, 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
+
+#
+# sim_load -- load the program and execute it
+#
+# See default.exp for explanation of arguments and results.
+#
+
+proc sim_spawn { dest cmdline args } {
+ if ![board_info $dest exists sim] {
+ perror "no simulator defined for [board_info $dest name]"
+ exit 1
+ } else {
+ set sim [board_info $dest sim];
+ }
+
+ if [board_info $dest exists sim,options] {
+ set simflags [board_info $dest sim,options]
+ } else {
+ set simflags ""
+ }
+
+ if ![is_remote host] {
+ if { [which $sim] == 0 } {
+ verbose -log "Simulator $sim missing." 3
+ return -1;
+ }
+ }
+
+ if [is_remote host] {
+ # download the program to remote.
+ # we're assuming the program is the first word in the command.
+ # FIXME: "prog < infile" won't work until we download infile.
+ set prog [lindex $cmdline 0]
+ set prog [remote_download host $prog a.out];
+ set cmdline [lreplace $cmdline 0 0 $prog]
+ }
+
+ return [eval remote_spawn host \{ $sim $simflags $cmdline \} $args];
+}
+
+proc sim_wait { dest timeout } {
+ return [remote_wait host $timeout];
+}
+
+proc sim_load { dest prog args } {
+ set inpfile ""
+ if { [llength $args] > 1 } {
+ if { [lindex $args 1] != "" } {
+ set inpfile "[lindex $args 1]"
+ }
+ }
+
+ if ![file exists $prog] then {
+ perror "sim.exp: $prog to be downloaded does not exist."
+ verbose -log "$prog to be downloaded does not exist." 3
+ return [list "untested" ""];
+ }
+
+ if [board_info $dest exists sim_time_limit] {
+ set sim_time_limit [board_info $dest sim_time_limit];
+ } else {
+ set sim_time_limit 240
+ }
+
+ set output "";
+
+ # Run the program with a limited amount of real time. While
+ # this isn't as nice as limiting the amount of CPU time, it
+ # will have to do.
+ if { $inpfile != "" } {
+ set res [remote_spawn target "${prog} < $inpfile" "readonly"];
+ } else {
+ set res [remote_spawn target "${prog}"];
+ }
+
+ if { $res <= 0 } {
+ return [list "fail" "remote_spawn failed"];
+ }
+
+ set state [remote_wait target $sim_time_limit];
+ set status [lindex $state 0];
+ set output [lindex $state 1];
+ verbose "Output is $output";
+
+ set status2 [check_for_board_status output];
+ if { $status2 >= 0 } {
+ set status $status2
+ }
+
+ # FIXME: Do we need to examine $status?
+ # Yes, we do--what if the simulator itself gets an error and coredumps?
+
+ verbose "Return status was: $status" 2
+ if { $status == 0 } {
+ set result "pass"
+ } else {
+ set result "fail"
+ }
+ return [list $result $output];
+}
+
+set_board_info protocol "sim";
+
+# By default, assume the simulator is slow. This causes some tests
+# to either be simplified or skipped completely.
+set_board_info slow_simulator 1
diff --git a/config/slite.exp b/config/slite.exp
new file mode 100644
index 0000000..19bf612
--- /dev/null
+++ b/config/slite.exp
@@ -0,0 +1,20 @@
+# Copyright (C) 1996, 1997 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., 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
+
+load_generic_config "gdb_stub";
diff --git a/config/sparclet.exp b/config/sparclet.exp
new file mode 100644
index 0000000..3f86098
--- /dev/null
+++ b/config/sparclet.exp
@@ -0,0 +1,26 @@
+# Copyright (C) 1996, 1997 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., 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
+
+# This file was written by Michael Snyder <msnyder@cygnus.com>.
+
+load_generic_config "gdb_stub";
+
+# This is the old GDB prompt for the toolchain.
+# Uncomment for old tests
+#set_board_info gdb_prompt "\\(gdbslet\\)";
diff --git a/config/tic80.exp b/config/tic80.exp
new file mode 100644
index 0000000..ef12778
--- /dev/null
+++ b/config/tic80.exp
@@ -0,0 +1,81 @@
+#
+# Nasty ugly stuff.
+#
+# We have to maintain two connections to the DOS box where the board
+# is being held. One of them runs an I/O monitor process, while the other
+# is used to actually start the program under test running on the board.
+#
+
+proc tic80_load { dest prog args } {
+ set dos_box [board_info $dest dos_host];
+
+ remote_spawn $dos_box [board_info $dest io_program];
+
+ set status [remote_ld $dest $prog];
+
+ if { $status != "pass" } {
+ return $status;
+ }
+
+ set result [remote_wait $dos_box 300];
+ set output [lindex $result 1];
+ if { [lindex $result 0] < 0 } {
+ if [board_info $dos_box exists fileid] {
+ dos_interrupt_job $dos_box;
+ } else {
+ remote_close $dos_box;
+ }
+ }
+
+ set status "fail";
+ regsub "(\\*\\*\\* EXIT code \[0-9\]+\[\r\n]+).*$" "$output" "\\1" output;
+ verbose "board out is $output";
+ set bstatus [check_for_board_status output];
+ if { [lindex $result 0] >= 0 } {
+ if { $bstatus == 0 } {
+ set status "pass";
+ }
+ }
+ remote_file build delete "a.fix";
+ return [list $status $output];
+}
+
+proc tic80_ld { dest prog } {
+ set dos_box [board_info $dest dos_host];
+ set dopush 0;
+
+ if { [remote_swap_conn $dos_box] == "fail" } {
+ if { [remote_push_conn $dos_box] == "fail" } {
+ set dopush 1;
+ }
+ remote_open $dos_box;
+ }
+ set prog [remote_download $dos_box $prog "a.fix"];
+
+ remote_spawn $dos_box "[board_info $dest start_program] $prog";
+ remote_expect $dos_box 10 {
+ -re "file\[(\]s\[)\] copied" {}
+ }
+ sleep 3;
+ dos_interrupt_job $dos_box;
+ if { $dopush } {
+ remote_push_conn $dos_box;
+ } else {
+ remote_swap_conn $dos_box;
+ }
+ return "pass";
+}
+#
+# Close the connection to the DOS box.
+#
+proc tic80_close { host } {
+ set dos_box [board_info $host dos_host];
+
+ return [remote_close $dos_box];
+}
+
+set_board_info protocol "tic80";
+set_board_info gdb,use_standard_load 1;
+set_board_info gdb,no_push_conn 1;
+set_board_info gdb,do_reload_on_run 1;
+set_board_info gdb,use_breakpoint_for_stub 1
diff --git a/config/udi.exp b/config/udi.exp
new file mode 100644
index 0000000..4e10c4f
--- /dev/null
+++ b/config/udi.exp
@@ -0,0 +1,158 @@
+# Copyright (C) 1994, 1996, 1997 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, 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
+
+# This file was originally written by Rob Savoye. (rob@cygnus.com)
+# and modified by Bob Manson (manson@cygnus.com)
+
+# When using the simulator (-n iss) and running nice'd, things can naturally
+# take a little longer, so increase the timeout.
+
+#
+# udi_load -- load the program and execute it
+#
+# See default.exp for explanation of arguments and results.
+#
+
+proc udi_load { dest prog args } {
+ set shell_prompt [board_info $dest shell_prompt];
+ set output "";
+
+ if ![file exists $prog] then {
+ perror "$prog does not exist."
+ verbose -log "$prog does not exist." 3
+ return [list "untested" ""];
+ }
+
+ # Load the program.
+ if ![board_info $dest exists fileid] then {
+ remote_open $dest;
+ if ![board_info $dest exists fileid] then {
+ verbose -log "$prog not executed, couldn't connect to $dest." 3
+ return "untested"
+ }
+ }
+
+ if { [remote_ld $dest $prog] == "" } {
+ verbose -log "$prog not executed, load failed." 3
+ return [list "unresolved" ""];
+ }
+
+ # Execute it.
+ set result -1
+ set output "";
+ set noappend 0;
+
+ verbose "Executing $prog." 2
+ remote_send $dest "g\n"
+ # FIXME: The value 300 below should be a parameter.
+ remote_expect $dest 300 {
+ -re "(.*)Process exited with 0x0\[^\r\n\]*\[\r\n\]" {
+ append output $expect_out(1,string);
+ verbose "$prog executed successfully" 2
+ set noappend 1;
+ set result 0;
+ exp_continue;
+ }
+ -re "(.*)Halt instruction encountered" {
+ append output $expect_out(1,string);
+ verbose "$prog got a HALT instruction" 2
+ set result 1;
+ set noappend 1;
+ exp_continue;
+ }
+ -re "(^|\[\r\n\])$shell_prompt" {
+ if { $result == -1 } {
+ exp_continue;
+ }
+ }
+ -re "(^|\[\r\n\]+)g\[\r\n\]+" {
+ exp_continue;
+ }
+ -re "\[\r\n\]+" {
+ if { ! $noappend } {
+ append output $expect_out(buffer);
+ if { [string length $output] < 512000 } {
+ exp_continue;
+ } else {
+ set result 1;
+ }
+ } else {
+ exp_continue;
+ }
+ }
+ timeout {
+ warning "$prog timed out."
+ }
+ }
+
+ # See what happened.
+ switch -- $result {
+ 0 {
+ set status [check_for_board_status output];
+ if { $status < 0 } {
+ blammo
+ }
+ if { $status > 0 } {
+ set result "fail";
+ } else {
+ set result "pass"
+ }
+ }
+ 1 - -1 {
+ warning "Resetting $dest."
+ remote_send $dest "r\n"
+ remote_expect $dest 5 {
+ -re "r.*$shell_prompt.*" {
+ verbose "Target reset." 2
+ }
+ timeout {
+ # Get nastier. We want to leave the system in a state
+ # ready to run the next testcase.
+ remote_send $dest "q\n"
+ remote_close $dest;
+ set udi_shell_id [remote_open $dest]
+ if { $udi_shell_id < 0 } {
+ perror "Couldn't reset $dest."
+ }
+ }
+ }
+ if { $result == 1 } {
+ set result "fail"
+ } else {
+ set result "unresolved"
+ }
+ }
+ default {
+ set result "unresolved"
+ }
+ }
+ return [list $result $output];
+}
+
+#
+# udi_exit -- shutdown the connection (or simulator)
+#
+
+proc udi_exit {} {
+ remote_close target;
+}
+
+set_board_info protocol "udi";
+set_board_info connect "mondfe";
+set_board_info shell_prompt "mondfe>";
diff --git a/config/unix.exp b/config/unix.exp
new file mode 100644
index 0000000..d3e7fab
--- /dev/null
+++ b/config/unix.exp
@@ -0,0 +1,134 @@
+# Copyright (C) 92, 1993, 1994, 1996, 1997, 1998 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, 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
+
+# This file was written by Rob Savoye. (rob@cygnus.com)
+
+if ![info exists board] {
+ error "must set $board before loading unix.exp"
+}
+
+# For rcp_download, rsh_exec.
+load_lib remote.exp
+
+#
+# unix_load -- load the program and execute it
+#
+# See default.exp for explanation of arguments and results.
+#
+
+
+proc unix_load { dest prog args } {
+ global ld_library_path
+ set output "";
+
+ if { [llength $args] > 0 } {
+ set parg [lindex $args 0];
+ } else {
+ set parg ""
+ }
+
+ if { [llength $args] > 1 } {
+ set inp [lindex $args 1];
+ } else {
+ set inp ""
+ }
+
+ if ![file exists $prog] then {
+ # We call both here because this should never happen.
+ perror "$prog does not exist in unix_load."
+ verbose -log "$prog does not exist." 3
+ return "untested"
+ }
+ verbose "loading to $dest" 2
+ if ![is_remote $dest] {
+ if { "$inp" != "" } {
+ set command "$prog $parg < $inp"
+ } else {
+ set command "$prog $parg";
+ }
+
+ if [info exists ld_library_path] {
+ setenv LD_LIBRARY_PATH $ld_library_path
+ setenv SHLIB_PATH $ld_library_path
+ }
+
+ set id [remote_spawn $dest "$command" "readonly"];
+ if { $id < 0 } {
+ set output "remote_spawn failed"
+ set status -1;
+ } else {
+ set status [remote_wait $dest 300];
+ set output [lindex $status 1];
+ set status [lindex $status 0];
+ }
+ # Unset them so we don't potentially get hosed when we try to run a
+ # non-testcase executable. (Setting LD_LIBRARY_PATH is the wrong
+ # fix in the first place; this just tries to minimize the resulting
+ # crap.)
+ if [info exists ld_library_path] {
+ unsetenv LD_LIBRARY_PATH
+ unsetenv SHLIB_PATH
+ }
+ } else {
+ set remotefile "/tmp/[file tail $prog].[pid]"
+ set remotefile [remote_download $dest $prog $remotefile];
+ if { $remotefile == "" } {
+ verbose -log "Download of $prog to [board_info $dest name] failed." 3
+ return [list "unresolved" ""];
+ }
+ if [board_info $dest exists remote_link] {
+ if [[board_info $dest remote_link] $remotefile] {
+ verbose -log "Couldn't do remote link"
+ remote_exec $dest "\\rm -f $remotefile"
+ return [list "unresolved" ""]
+ }
+
+ verbose "$prog linked ok" 3
+ } else {
+ # rcp's to lynx seem not to get marked executable
+ set status [remote_exec $dest "chmod +x $remotefile"]
+ if { [lindex $status 0] != 0 } {
+ remote_file $dest delete ${remotefile}.o $remotefile
+ verbose -log "chmod +x of $prog on $dest failed." 3
+ return [list "unresolved" ""];
+ }
+ }
+ set status [remote_exec $dest "$remotefile" $parg $inp]
+ remote_file $dest delete $remotefile.o $remotefile;
+ if { [lindex $status 0] < 0 } {
+ verbose -log "Couldn't execute $prog, [lindex $status 1]" 3
+ return [list "unresolved" ""]
+ }
+ set output [lindex $status 1]
+ set status [lindex $status 0]
+ }
+
+ verbose "Executed $prog, status $status" 2
+ if ![string match "" $output] {
+ verbose -- "$output" 2
+ }
+ if { $status == 0 } {
+ set result "pass";
+ } else {
+ set result "fail";
+ }
+ return [list $result $output];
+}
+
+set_board_info protocol "unix";
diff --git a/config/vr4100.exp b/config/vr4100.exp
new file mode 100644
index 0000000..16d20b8
--- /dev/null
+++ b/config/vr4100.exp
@@ -0,0 +1,21 @@
+# Copyright (C) 1997 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., 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
+
+# We're using a ddb monitor.
+load_generic_config "ddb";
diff --git a/config/vr4300.exp b/config/vr4300.exp
new file mode 100644
index 0000000..16d20b8
--- /dev/null
+++ b/config/vr4300.exp
@@ -0,0 +1,21 @@
+# Copyright (C) 1997 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., 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
+
+# We're using a ddb monitor.
+load_generic_config "ddb";
diff --git a/config/vr5000.exp b/config/vr5000.exp
new file mode 100644
index 0000000..01945cf
--- /dev/null
+++ b/config/vr5000.exp
@@ -0,0 +1,21 @@
+# Copyright (C) 1997 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., 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
+
+# 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
new file mode 100644
index 0000000..cff962c
--- /dev/null
+++ b/config/vrtx.exp
@@ -0,0 +1,50 @@
+# Copyright (C) 1994, 1996, 1997 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, 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
+
+# This file was written by Rob Savoye. (rob@cygnus.com)
+
+# This file uses the xsh protocol.
+
+#
+# load support libraries
+#
+load_lib remote.exp
+
+#
+# ${tool}_load -- load the program and execute it
+#
+# See default.exp for explanation of arguments and results.
+#
+
+proc vrtx_load { dest prog args } {
+ remote_open $dest;
+
+ switch -- [remote_download $dest $prog] {
+ 0 { return "pass" }
+ 1 { return "fail" }
+ -1 {
+ # FIXME: This needs work (as does xsh_load).
+ verbose -log "Unable to run $prog, internal spectra error." 3
+ return "unresolved"
+ }
+ }
+}
+
+set_board_info protocol "vrtx"
+set_board_info connect "xsh"
diff --git a/config/vxworks.exp b/config/vxworks.exp
new file mode 100644
index 0000000..3ab4a71
--- /dev/null
+++ b/config/vxworks.exp
@@ -0,0 +1,511 @@
+# Copyright (C) 92, 93, 94, 95, 1996, 1997 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:
+# DejaGnu@cygnus.com
+
+# This file was originally written by Rob Savoye. (rob@cygnus.com)
+# and modified by Bob Manson (manson@cygnus.com)
+
+#
+# Try to boot the machine into the requested OS.
+#
+proc ${board}_init { dest } {
+ # This is not the right way to determine the required OS...
+ global target_os;
+ set shell_prompt [board_info $dest shell_prompt];
+ set do_reboot 0;
+
+ set desired_kernel [board_info $dest "kernel,$target_os"];
+
+ if { $desired_kernel == "" } {
+ vxworks_final_init $dest;
+ # Nothing to see here, nothing to do. Move along.
+ return;
+ }
+
+ remote_raw_open $dest raw;
+ remote_send $dest "\n";
+ remote_expect $dest 5 {
+ -re "$shell_prompt" {
+ set do_reboot 1;
+ }
+ -re "Press any key to stop auto-boot" {
+ remote_send $dest "\n";
+ exp_continue;
+ }
+ -re "VxWorks Boot" {
+ set boot_mon 0;
+ set boot_mon_prompt "VxWorks Boot";
+ }
+ -re "\[0-9\]\[\r\n\]+ *\[0-9\]\[\r\n\]" {
+ remote_send $dest "\n";
+ exp_continue;
+ }
+ timeout {
+ set do_reboot 1;
+ }
+ }
+
+ if { $do_reboot } {
+ remote_close $dest;
+ remote_reboot $dest;
+ return;
+ }
+ remote_binary $dest;
+ remote_send $dest "\n\n";
+ remote_expect $dest 3 {
+ timeout {}
+ -re ".+" { exp_continue; }
+ }
+ remote_send $dest "p\n";
+ remote_expect $dest 20 {
+ -re "file name\[ \t\]+: (\[^ \r\n\]+)\[ \r\n\]+" {
+ set curr_file $expect_out(1,string);
+ exp_continue;
+ }
+ -re "$boot_mon_prompt" { }
+ }
+ if ![info exists curr_file] {
+ remote_close $dest;
+ remote_reboot $dest;
+ return;
+ }
+ if { $curr_file != $desired_kernel } {
+ verbose "$curr_file != '$desired_kernel'";
+ # Oh boy.
+ remote_send $dest "c\n";
+ remote_expect $dest 20 {
+ -re "file name\[ \t\]+:.*$" {
+ remote_send $dest "$desired_kernel\n";
+ exp_continue;
+ }
+ -re "\[a-z() \t\]+:.*$" {
+ remote_send $dest "\n";
+ exp_continue;
+ }
+ -re "$boot_mon_prompt" {}
+ }
+ }
+ remote_send $dest "@\n";
+ remote_expect $dest 30 {
+ -re "(^|\[\r\n\])$shell_prompt" {}
+ -re ".+" {
+ exp_continue;
+ }
+ }
+ vxworks_final_init $dest;
+ remote_close $dest;
+}
+
+proc vxworks_final_init { dest } {
+ if [board_info $dest exists preload_obj] {
+ if { [target_compile [board_info $dest preload_obj] foo.out object [board_info $dest preload_obj_flags]] == "" } {
+ vxworks_ld $dest foo.out
+ }
+ remote_file build delete foo.out;
+ }
+}
+#
+# Execute the command PROGRAM on VxWorks.
+#
+
+proc vxworks_exec { dest program pargs inp outp } {
+ global decimal hex;
+
+ set shell_id [vxworks_open $dest];
+ if { $shell_id < 0 } {
+ return [list -1 "open failure"];
+ }
+
+ if { $inp != "" } {
+ set inp [remote_download $dest $inp];
+ set suffix " < $inp";
+ } else {
+ set suffix ""
+ }
+
+ set shell_prompt [board_info $dest shell_prompt];
+ remote_send $dest "${program} ${pargs}$suffix\n";
+ # FIXME: The value 300 below should probably be a parameter passed in.
+ remote_expect $dest 300 {
+ -re "\\\[VxWorks Boot\\\]:" {
+ remote_send $dest "@\n";
+ sleep 20;
+ exp_continue;
+ }
+ -re "(.*)value = (-*$decimal) = $hex\[^\r\n\]*\[\r\n\]+$shell_prompt" {
+ set result [list $expect_out(2,string) $expect_out(1,string)];
+ }
+ -re "undefined symbol: .*$shell_prompt" {
+ set result [list 1 "unknown command"];
+ }
+ -re "syntax error.*$shell_prompt" {
+ set result [list -1 "syntax error in command"];
+ }
+ default {
+ set result [list -1 "unable to execute command"];
+ }
+ }
+ if { $suffix != "" } {
+ remote_file $dest delete $inp;
+ }
+ return $result;
+}
+
+proc vxworks_download { dest localfile remotefile } {
+ if [board_info $dest exists vxworks_homedir] {
+ set rfile "[board_info $dest vxworks_homedir]/$remotefile";
+ remote_download build $localfile $rfile;
+ return $rfile;
+ }
+ return [remote_raw_download $dest $localfile $remotefile];
+}
+
+proc vxworks_file { dest op args } {
+ set file [lindex $args 0];
+ if [board_info $dest exists vxworks_homedir] {
+ set dir "[board_info $dest vxworks_homedir]";
+ switch $op {
+ exists {
+ set file "${dir}/[file tail $file]";
+ return [file exists $file];
+ }
+ delete {
+ foreach x $args {
+ set x "${dir}/[file tail $x]";
+ if { [file exists $x] && [file isfile $x] } {
+ exec rm -f $x;
+ }
+ }
+ return;
+ }
+ }
+ }
+ return [eval remote_raw_file \"$dest\" \"$op\" $args];
+}
+
+proc vxworks_send { dest string } {
+ # Convert LFs to CRs, 'cause that is what VxWorks wants to see.
+ regsub -all "\n" $string "\r" string;
+ verbose "Sending '$string' to $dest" 2
+ return [remote_raw_send $dest "$string"];
+}
+
+proc vxworks_open { dest args } {
+ if [board_info $dest exists fileid] {
+ return [board_info $dest fileid];
+ }
+
+ set shell_prompt [board_info $dest shell_prompt]
+
+ set shell_id [remote_raw_open $dest];
+
+ if { $shell_id == "" || $shell_id < 0 } {
+ return -1;
+ }
+
+ if [board_info $dest exists logname] {
+ set logname [board_info $dest logname];
+ if [board_info $dest exists password] {
+ remote_send $dest "iam \"$logname\",\"[board_info $dest passwd]\"\r"
+ } else {
+ remote_send $dest "iam \"$logname\"\r"
+ }
+
+ remote_expect $dest 30 {
+ "iam*value = 0 = 0x0*$shell_prompt" {
+ verbose "Set default user." 2
+ }
+ timeout {
+ # ??? This is really an error. It's not clear whether `perror'
+ # or `warning' should be used here. There are *lots* of other
+ # cases like this.
+ perror "Couldn't set default user."
+ return -1;
+ }
+ }
+ }
+
+ set dir "";
+ if [board_info $dest exists ftp_directory] {
+ set dir [board_info $dest ftp_directory];
+ }
+ if [board_info $dest exists vxworks_homedir] {
+ set dir [board_info $dest vxworks_homedir];
+ }
+ if { $dir != "" } {
+ set status [remote_exec $dest "cd" "\"$dir\""];
+ if [lindex $status 0] {
+ perror "Error in cd to $dir--[lindex $status 1]";
+ return 1;
+ }
+ }
+ return $shell_id;
+}
+#
+# Load a file into vxworks
+#
+# The result is:
+# 0 - success
+# 1 - failed (eg: link failed so testcase should fail)
+# -1 - unresolved (eg: timeout), may be fixed by rebooting
+#
+proc vxworks_ld { dest prog } {
+ global decimal hex
+ global board_info
+
+ if { $prog == "" } {
+ return 1;
+ }
+
+ set shell_id [remote_open $dest];
+
+ if { $shell_id < 0 } {
+ return -1;
+ }
+
+ set prog [remote_download $dest $prog];
+
+ set shell_prompt [board_info $dest shell_prompt];
+
+ # We always want to exit the program via the code at the end.
+ # If the load fails we want `expect_out' stored in the log and this
+ # saves duplicating that code.
+
+ for { set x 0 ; } { $x < 3 } {incr x; } {
+ remote_send $dest "\n";
+ remote_expect $dest 30 {
+ -re ".*$shell_prompt $" { set x 20; }
+ -re "\\\[VxWorks Boot\\\]:" {
+ remote_send $dest "@\n";
+ sleep 20;
+ exp_continue;
+ }
+ timeout { return -1; }
+ }
+ }
+
+ set tries 0
+ set maxtries 3
+ set result -7 ;# -7 is a local value meaning "not done"
+
+ while { $result == -7 && $tries < $maxtries } {
+ verbose "Loading $prog into vxworks."
+ remote_send $dest "ld < $prog\n";
+ incr tries
+ remote_expect $dest 300 {
+ -re "USER.*command not understood" {
+ perror "Need to set the user and password."
+ set result 1
+ }
+ -re "Stale NFS file handle.*$shell_prompt $" {
+ # Need to retry.
+ }
+ -re "undefined symbol:.*$shell_prompt $" {
+ # This is an error in the testcase, don't call perror.
+ warning "Undefined symbol, $prog not loaded."
+ set result 1
+ }
+ -re "memPartAlloc: block too.*$shell_prompt $" {
+ perror "Not enough memory to load $prog."
+ set result -1
+ }
+ -re "can't open input.*$shell_prompt $" {
+ perror "Can't access $prog."
+ set result 1
+ }
+ -re "value = (-*${decimal}) = ${hex}.*$shell_prompt $" {
+ verbose "Loaded $prog into vxworks."
+ set board_info([board_info $dest name],vx_module) $expect_out(1,string);
+ set result 0
+ }
+ -re "(.*)$shell_prompt $" {
+ warning "Load failed: $expect_out(1,string)"
+ }
+ timeout {
+ warning "Timed out trying load $prog."
+ set result -1
+ }
+ }
+ }
+
+ if { $result && [info exists expect_out(buffer)] } {
+ send_log "$expect_out(buffer)"
+ }
+
+ remote_file $dest delete $prog;
+ return $result
+}
+
+#
+# Start a thread (process) executing
+#
+# The result is:
+# 0 - success
+# 1 - failed (eg: testcase aborted)
+# -1 - unresolved, may be fixed by rebooting
+#
+proc vxworks_run { dest function pargs inp outp } {
+ global hex decimal;
+
+ set shell_prompt [board_info $dest shell_prompt];
+ set output "";
+
+ # There isn't a command to wait for a thread to finish, so we have to keep
+ # polling. Instead, we expect the status wrapper to return an exit
+ # status.
+
+ set status [remote_exec $dest "sp" "$function $pargs" $inp $outp];
+
+ set tid [lindex $status 0];
+
+ # Bad task id, reboot and try again.
+ if { $tid == -1 || $tid == 0 } {
+ return -1;
+ }
+
+ set result 1;
+ # FIXME: The value 300 below should be a parameter.
+ remote_expect $dest 300 {
+ -re "task ${hex} - aborted.*$shell_prompt $" {
+ # FIXME: It's not clear we'll ever get here.
+ verbose "$function aborted"
+ set result 1
+ }
+ -re "\[\r\n\]syntax error\[\r\n\]" {
+ verbose "weirdness after task started"
+ set result -1;
+ }
+ -re "(.*)\\*\\*\\* EXIT code ($decimal)\[\r\n\]" {
+ set output "$expect_out(1,string)";
+ set exit_code "$expect_out(2,string)";
+ if { ($exit_code + 0) != 0 } {
+ set result 1;
+ } else {
+ set result 0;
+ }
+ }
+ -re "Operation Fault.*fault type:" {
+ set result 1;
+ }
+ -re "Bus Error" {
+ # This is here to try to cope with apparently flaky h/w.
+ # This is potentially an error in the testcase, but we don't
+ # really know, do we?
+ warning "Bus Error."
+ set result 1;
+ set output "Bus Error";
+ remote_reboot $dest;
+ }
+ timeout {
+ # Infinite loop? probably.
+ remote_exec $dest "td" "$tid";
+ set result 1;
+ }
+ }
+
+ return [list $result $output];
+}
+
+#
+# Unload the last executable that we loaded, so we can free up its memory.
+#
+proc vxworks_unld { dest } {
+ global board_info;
+
+ if [board_info $dest exists vx_module] {
+ # Vxworks5.0 does not have the unld command.
+ if { [board_info $dest os] != "vxworks5.0" } {
+ remote_exec $dest "unld" "[board_info $dest vx_module]";
+ }
+ unset board_info([board_info $dest name],vx_module);
+ }
+}
+
+#
+# We loop around rebooting the box until either the load and run
+# "work" or we give up.
+#
+proc vxworks_load {dest prog args} {
+ set result "";
+ set output "";
+
+ if { [llength $args] > 0 } {
+ set pargs "[lindex $args 0]";
+ } else {
+ set pargs ""
+ }
+
+ if { [llength $args] > 1 } {
+ set inp "[lindex $args 1]";
+ } else {
+ set inp ""
+ }
+
+ if { [llength $args] > 2 } {
+ set outp "[lindex $args 2]";
+ } else {
+ set outp ""
+ }
+
+ for { set x 0; } { $x < 3 } { incr x } {
+ set status [vxworks_ld $dest $prog];
+ if { $status >= 0 } {
+ if { $status > 0 } {
+ set result "fail";
+ } else {
+ set out [vxworks_run $dest __wrap_main $pargs $inp $outp];
+ set status [lindex $out 0];
+ set output [lindex $out 1];
+ # Get rid of the carriage returns, because they confuse
+ # callers that try to parse the result.
+ regsub -all "\r" $output "" output
+ if { $status != 0 } {
+ if { $status > 0 } {
+ set result "fail";
+ }
+ } else {
+ set result "pass";
+ }
+ }
+ }
+ if { $result != "" } {
+ vxworks_unld $dest;
+ return [list $result $output];
+ }
+ remote_reboot $dest;
+ }
+ return [list "fail" ""];
+}
+
+set_board_info protocol "vxworks"
+# -lm under vxworks isn't needed.
+set_board_info mathlib ""
+set_board_info shell_prompt "->"
+set_board_info needs_status_wrapper 1
+# FTP doesn't work in passive mode to this board.
+set_board_info ftp_no_passive 1
+# Wait 15 seconds after powercycling.
+set_board_info reboot_delay 15
+
+# We don't have sys/unistd.h.
+set_board_info wrap_compile_flags "-DNO_UNISTD_H"
+
+set_board_info gdb_prompt "\[(\]vxgdb\[)\]"
+
+set_board_info is_vxworks 1;
+set_board_info gdb,nosignals 1;
diff --git a/configure b/configure
new file mode 100755
index 0000000..3fc078c
--- /dev/null
+++ b/configure
@@ -0,0 +1,1605 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# 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
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+sitefile=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --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
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -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=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.13"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=runtest.exp
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+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
+ fi
+else
+ CONFIG_SITE="$sitefile"
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+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
+
+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
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+ac_aux_dir=
+for ac_dir in .. $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/.." 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:571: 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:624: 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:681: 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=dejagnu
+
+VERSION=20000518
+
+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 <<EOF
+#define PACKAGE "$PACKAGE"
+EOF
+
+cat >> confdefs.h <<EOF
+#define VERSION "$VERSION"
+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
+# 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:740: 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:753: 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:766: 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:779: 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
+
+
+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
+ # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+ enableval="$enable_maintainer_mode"
+ USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
+
+
+if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:816: 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
+
+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 <<EOF
+#line 848 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
+; return 0; }
+EOF
+if { (eval echo configure:859: \"$ac_compile\") 1>&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 <<EOF
+#line 881 "configure"
+#include "confdefs.h"
+
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:888: \"$ac_compile\") 1>&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
+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:971: 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:1022: 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:1054: 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 1065 "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
+ 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:1096: 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
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ 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
+ 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:1129: 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:1172: 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'
+
+
+BOARDS='$(boards)'
+
+CONFIG='$(config)'
+
+
+subdirs="example/calc"
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# 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 | 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 \).
+ sed -n \
+ -e "s/'/'\\\\''/g" \
+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+ ;;
+ esac >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ 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.13"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+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
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+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
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%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%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
+s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
+s%@MAINT@%$MAINT%g
+s%@EXEEXT@%$EXEEXT%g
+s%@CC@%$CC%g
+s%@BOARDS@%$BOARDS%g
+s%@CONFIG@%$CONFIG%g
+s%@subdirs@%$subdirs%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+ else
+ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+ fi
+ if test ! -s conftest.s$ac_file; then
+ ac_more_lines=false
+ rm -f conftest.s$ac_file
+ else
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f conftest.s$ac_file"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ fi
+ ac_file=`expr $ac_file + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ fi
+done
+if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile example/Makefile testsuite/Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ 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"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+
+ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+ sed -e "$ac_comsub
+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*
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+if test "$no_recursion" != yes; then
+
+ # Remove --cache-file and --srcdir arguments so they do not pile up.
+ ac_sub_configure_args=
+ ac_prev=
+ for ac_arg in $ac_configure_args; do
+ if test -n "$ac_prev"; then
+ ac_prev=
+ continue
+ fi
+ case "$ac_arg" in
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ ;;
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ ;;
+ *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
+ esac
+ done
+
+ for ac_config_dir in example/calc; do
+
+ # Do not complain, so a configure script can configure whichever
+ # parts of a large source tree are present.
+ if test ! -d $srcdir/$ac_config_dir; then
+ continue
+ fi
+
+ echo configuring in $ac_config_dir
+
+ case "$srcdir" in
+ .) ;;
+ *)
+ if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
+ else
+ { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
+ fi
+ ;;
+ esac
+
+ ac_popdir=`pwd`
+ cd $ac_config_dir
+
+ # A "../" for each directory in /$ac_config_dir.
+ ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
+
+ case "$srcdir" in
+ .) # No --srcdir option. We are building in place.
+ ac_sub_srcdir=$srcdir ;;
+ /*) # Absolute path.
+ ac_sub_srcdir=$srcdir/$ac_config_dir ;;
+ *) # Relative path.
+ ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
+ esac
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_sub_srcdir/configure; then
+ ac_sub_configure=$ac_sub_srcdir/configure
+ elif test -f $ac_sub_srcdir/configure.in; then
+ ac_sub_configure=$ac_configure
+ else
+ echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
+ ac_sub_configure=
+ fi
+
+ # The recursion is here.
+ if test -n "$ac_sub_configure"; then
+
+ # Make the cache file name correct relative to the subdirectory.
+ case "$cache_file" in
+ /*) ac_sub_cache_file=$cache_file ;;
+ *) # Relative path.
+ ac_sub_cache_file="$ac_dots$cache_file" ;;
+ esac
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
+ # The eval makes quoting arguments work.
+ if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
+ then :
+ else
+ { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
+ fi
+ fi
+
+ cd $ac_popdir
+ done
+fi
+
+
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..263f043
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,24 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_PREREQ(2.13)
+AC_INIT(runtest.exp)
+AC_CONFIG_AUX_DIR(..)
+
+dnl These are required by automake
+AM_INIT_AUTOMAKE(dejagnu, 20000518)
+AM_MAINTAINER_MODE
+AC_PROG_MAKE_SET
+AC_EXEEXT
+
+AC_PROG_CC
+AC_PROG_INSTALL
+
+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)
+
diff --git a/contrib/README b/contrib/README
new file mode 100644
index 0000000..d776f6e
--- /dev/null
+++ b/contrib/README
@@ -0,0 +1,16 @@
+These are "user" contributed scripts that automate testing. These all
+depend on using "make check", so they are included here as an aid to
+helping others automate their own testing. All of these script do
+report filtering on the output from DejaGnu. test-tool and test-g++
+are basically the same script. test-target is the script I use for our
+quarterly release and it is the most sophisticated. It still uses
+"make check" (a make target that start runtest) to produce the
+results, but tests our entire tool chain for native and crosses. It
+also produces a short summary report that gets emailed, as well as
+summary reports. It does regression analysis using the previous test
+run. testit is a very crude and simple Tk GUI for accessing all the
+testing results. Hope these are helpful to anyone, I'd like to collect
+more from the net as they get developed.
+
+ - rob -
+
diff --git a/contrib/bluegnu2.0.3/Makefile.in b/contrib/bluegnu2.0.3/Makefile.in
new file mode 100644
index 0000000..430648e
--- /dev/null
+++ b/contrib/bluegnu2.0.3/Makefile.in
@@ -0,0 +1,185 @@
+## @configure_input@
+# Makefile for BlueGnu Testing Framework.
+# Copyright (C) 1988, 1990, 1991, 1992, 1994, 1995 Free Software Foundation, # Copyright (C) 1998 jotOmega dsc, Inc.
+
+#This file is part of BlueGnu.
+
+#BlueGnu is open software; you can redistribute it and/or modify
+#it under the terms of the GNU General Public License as published by
+#the Free Software Foundation; either version 2, or (at your option)
+#any later version.
+
+#BlueGnu 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 BlueGnu; see the file COPYING. If not, write to
+#the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = $(exec_prefix)/bin
+libdir = $(exec_prefix)/lib
+
+datadir = $(libdir)/bluegnu
+infodir = $(prefix)/info
+includedir = $(prefix)/include
+gxx_includedir = $(tooldir)/g++-include
+docdir = $(datadir)/doc
+
+SHELL = /bin/sh
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+CC = @CC@
+CFLAGS = -g
+
+SUBDIRS = @subdirs@
+
+# These let the BlueGnu test suite run when BlueGnu isn't
+# installed yet, so run it from the srcdir and objdir.
+EXPECT = ` \
+ if [ -f $${rootme}/../expect/expect ] ; then \
+ echo $${rootme}/../expect/expect ; \
+ else echo expect ; fi`
+
+BLUEGNUFLAGS =
+BLUEGNU = ` \
+ if [ -f ${srcdir}/bluegnu ] ; then \
+ echo ${srcdir}/bluegnu ; \
+ else echo bluegnu ; fi`
+
+TCLIBRARY = `if [ -f $${rootme}/expect/expect ] ; \
+ then echo TCL_LIBRARY=$${srcdir}/../tcl/library ; \
+ else echo "" ; fi`
+
+FLAGS_TO_PASS = \
+ "CC=$(CC)" \
+ "CFLAGS=$(CFLAGS)" \
+ "INSTALL=$(INSTALL)" \
+ "INSTALL_DATA=$(INSTALL_DATA)" \
+ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ "EXPECT=$(EXPECT)" \
+ "TCLIBRARY=$(TCLIBRARY)" \
+ "BLUEGNU=$(BLUEGNU)" \
+ "BLUEGNUFLAGS=$(BLUEGNUFLAGS)" \
+ "exec_prefix=$(exec_prefix)" \
+ "prefix=$(prefix)" \
+ "tooldir=$(tooldir)"
+
+all: force
+ @$(MAKE) subdir_do DO=$@ $(FLAGS_TO_PASS)
+
+contents: force
+ ls -lLAR -I CVS -I Makefile \
+ -I config.status -I config.log -I config.cache \
+ -I READMEdvi -I calc.h > $@
+
+.PHONY: check installcheck
+installcheck:
+
+.NOEXPORT:
+
+MAKEOVERRIDES=
+
+INFODIRS=doc
+dvi info:
+ @rootme=`pwd`/ ; export rootme ; \
+ rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
+ $(MAKE) subdir_do DO=$@ "DODIRS=$(INFODIRS)" $(FLAGS_TO_PASS)
+
+install-info:
+ @rootme=`pwd`/ ; export rootme ; \
+ $(MAKE) subdir_do DO=install-info $(FLAGS_TO_PASS)
+
+install:
+ ${srcdir}/mkinstalldirs $(bindir) $(datadir)
+ $(INSTALL_PROGRAM) $(srcdir)/runtest $(bindir)/runtest
+ $(INSTALL_PROGRAM) $(srcdir)/runtest.exp $(datadir)/runtest.exp
+ $(INSTALL_PROGRAM) $(srcdir)/dejagnu $(bindir)/dejagnu
+ $(INSTALL_PROGRAM) $(srcdir)/bluegnu $(bindir)/bluegnu
+ $(INSTALL_PROGRAM) $(srcdir)/bluegnutk $(bindir)
+ $(INSTALL_PROGRAM) $(srcdir)/bluegnutk.itcl $(bindir)
+ $(INSTALL_PROGRAM) $(srcdir)/bluegnutk.rc $(bindir)
+ $(INSTALL_PROGRAM) $(srcdir)/bluegnutkUtils.itcl $(bindir)
+ $(INSTALL_PROGRAM) $(srcdir)/config.guess $(datadir)/config.guess
+ -for file in $(srcdir)/lib/*.exp; \
+ do \
+ $(INSTALL_DATA) $$file $(datadir) ; \
+ done
+ -for file in $(srcdir)/lib/*.tcl; \
+ do \
+ $(INSTALL_DATA) $$file $(datadir) ; \
+ done
+ -for file in $(srcdir)/lib/*.itcl; \
+ do \
+ $(INSTALL_DATA) $$file $(datadir) ; \
+ done
+ $(INSTALL_DATA) $(srcdir)/lib/tclIndex $(datadir)
+ @$(MAKE) subdir_do DO=install $(FLAGS_TO_PASS)
+
+subdir_do: force
+ @for i in $(SUBDIRS); do \
+ echo "Making $(DO) in $${i}..." ; \
+ if [ -d ./$$i ] ; then \
+ if (rootme=`pwd`/ ; export rootme ; \
+ rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
+ cd ./$$i; \
+ $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
+ else exit 1 ; fi ; \
+ else true ; fi ; \
+ done
+force:
+
+clean mostlyclean:
+ @echo "Doing clean mosttlyclean +++++"
+ -rm -f \#* *~ core *.o a.out xgdb *.x
+ $(MAKE) subdir_do DO=$@ $(FLAGS_TO_PASS)
+ @for l in `find . -name logs`; do rm -fr $$l; done
+ @for f in `find . -name '*~'`; do rm -fr $$f; done
+
+distclean: clean
+ @echo "Doing distclean +++++"
+ $(MAKE) subdir_do DO=$@ $(FLAGS_TO_PASS)
+ -rm -f Makefile *-init.exp site.bak site.exp conftest.c
+ -rm -f config.status config.log config.cache
+ -rm -fr *.log summary detail *.sum blockit
+
+maintainer-clean realclean:
+ @echo "Doing maintainer-clean realclean +++++"
+ $(MAKE) subdir_do DO=$@ $(FLAGS_TO_PASS)
+ -rm -f Makefile *-init.exp site.bak site.exp conftest.c
+ -rm -f config.status config.log config.cache
+ -rm -fr *.log summary detail *.sum blockit
+ -rm -f README.bluegnu contents
+
+check:
+ @if [ -f testsuite/Makefile ]; then \
+ rootme=`pwd`; export rootme; \
+ cd testsuite; \
+ $(MAKE) $(FLAGS_TO_PASS) check; \
+ else true; fi
+
+Makefile: $(srcdir)/Makefile.in config.status
+ @echo "Rebuilding the Makefile..."
+ $(SHELL) ./config.status
+
+configure: $(srcdir)/configure.in $(srcdir)/Makefile.in $(srcdir)/aclocal.m4
+ @echo "Rebuilding configure..."
+ @if [ x"${srcdir}" = x"@srcdir@" ] ; then \
+ srcdir=. ; export srcdir ; \
+ else true ; fi ; \
+ (cd $${srcdir}; autoconf)
+
+config.status:
+ @echo "Rebuilding config.status..."
+ $(SHELL) ./config.status --recheck
diff --git a/contrib/bluegnu2.0.3/README.bluegnu b/contrib/bluegnu2.0.3/README.bluegnu
new file mode 100644
index 0000000..2c1e4d8
--- /dev/null
+++ b/contrib/bluegnu2.0.3/README.bluegnu
@@ -0,0 +1,325 @@
+
+
+
+
+
+
+
+
+ Release Notice
+
+ BlueGnu Testing Framework
+
+ Version 2.0.3
+
+ Jan-Willem Neurdenburg
+
+ jotOmega dsc
+
+
+ 56 Brigham Hill Road
+
+ Grafton MA 01519-1135
+
+ neurdenburgj@acm.org
+
+
+ Tel: (508) 839-0276
+
+ Fax: (508) 839-7267
+
+ September 19, 1999
+
+
+1 Introduction
+
+BlueGnu is a framework for testing other programs. It has been
+created to be compatible with DejaGnu. Its purpose is to provide
+a single front end for all tests. Beyond this, BlueGnu offers
+several advantages for testing:
+
+ * The flexibility and consistency of the BlueGnu framework
+ makes it easy to write tests for any program, with the
+ exception of GUI applications.
+
+ * BlueGnu provides a layer of abstraction, which makes all
+ tests (if correctly written) portable to any host or target
+ where a program must be tested.
+ * BlueGnu is written in [incr Tcl], which in turn is based on
+ Tcl (Tool Command Language). The framework comprises two
+ parts:
+
+
+
+ 1
+
+
+
+
+
+ 1. the testing framework,
+
+ 2. the test-suites or test-sets themselves.
+ * BlueGnu will work with any Tcl based interpreter as long as
+ [incr Tcl] has been included. You can include 'expect',
+ 'Tk', and/or other extensions.
+
+ * Includes DejaGnu release 1.6
+
+
+2 Requirements
+The following modules should have been installed, before you can
+install and/or use BlueGnu:
+
+ * Tcl release 8.0 or higher,
+
+ * incr Tcl release 3.0 or higher.
+
+ Any other extensions that is compatible with Tcl release 8.0
+can be used as well.
+
+
+3 Structure and Contents of the Release
+The root directory of the release contains the README files
+with installation instructions and the files needed to build and
+install this product. It also contains the executable scripts of
+the BlueGnu testing framework.
+ The top-level directories are listed below:
+
+lib: the packages and procedures that make the BlueGnu and
+ DejaGnu testing framework. This also includes the default
+ target definition files.
+
+testsets: the BlueGnu test-suites and test examples. It contains
+ the following subdirectories.
+
+ BlueGnu: test scripts to test the testing framework itself.
+ examples: test suite and test script examples.
+ config, lib, tools: currently empty, but can be used for
+ test-set dependent configuration files, library files,
+ and tools.
+
+config: currently empty.
+
+
+
+
+
+ 2
+
+
+
+
+
+doc: the DejaGnu texinfo source and the documentation in
+ 'info', 'dvi', 'ps', and 'pdf' representation, respectively
+ dejagnu.info*, dejagnu.dvi, dejagnu.ps, and dejagnu.pdf. A
+ DejaGnu man page is also available.
+
+ It also contains the TeX version (README.tex) of this
+ document as well as the 'dvi', 'ps' 'html', and
+ 'pdf' representation, respectively notice.dvi, notice.ps,
+ notice.html, and notice.pdf.
+testsuite: contains a mixture of DejaGnu and BlueGnu test
+ scripts.
+
+contrib: contains examples how DejaGnu is used at Cygnus.
+example: contains a full DejaGnu test framework example for
+ testing the program 'calc' which is also included.
+
+
+4 Installation and use under Unix
+
+Before you can install and use BlueGnu you need to have installed
+the following three packages:
+ * Tcl version 8.0.3
+
+ * Tk version 8.0.3
+ * incr Tcl version 3.0.1
+
+The source for these packages should all be located in one
+directory. The subdirectory in the directory should be:
+ * tcl8.0.3
+ * tk8.0.3
+
+ * itcl3.0.1
+ The following examples use the command `./configure --
+prefix=/tools/...`. This will install all packages in a
+directory ``/tools''. When you omit the ``--prefix''-switch then
+the installation default will be the directory ``/usr/local''.
+
+
+4.1 Installation of needed Packages
+When you have not installed Tcl and the other needed
+extensions, then you need to retrieve the sources from
+``www.tcltk.com/itcl''. You need to `gunzip` the files and do a
+`tar xf` of all these packages in one directory, let's call this
+directory ``TclTk''.
+ From the directory ``TclTk'', you should do the following to
+install the packages:
+
+
+ 3
+
+
+
+
+
+% cd tcl8.0.3/unix
+% ./configure --prefix=/tools/tcl8.0.3 --enable-gcc --enable-
+shared
+% make
+% mkdir /tools/tcl8.0.3
+% make install
+% cd ../../tk8.0.3/unix
+% ./configure --prefix=/tools/tk8.0.3 --enable-gcc --enable-
+shared
+% make
+% mkdir /tools/tk8.0.3
+% make install
+% cd ../../itcl3.0.1
+% ./configure --prefix=/tools/itcl3.0.1 --enable-gcc --enable-
+shared
+% make
+% mkdir /tools/itcl3.0.1
+% make install
+
+
+4.2 Installing BlueGnu
+You can now `gunzip` and `tar xf` the BlueGnu version 2.0.3
+in the directory ``TckTk''. This will create the directory
+``bluegnu2.0.3''. Now do the following:
+
+% cd bluegnu2.0.3
+% ./configure --prefix=/tools/bluegnu2.0.3
+% make
+% mkdir /tools/bluegnu2.0.3
+% make install
+
+ This will install BlueGnu in the directories:
+ * /tools/bluegnu2.0.3/bin
+
+ * /tools/bluegnu2.0.3/lib/bluegnu
+
+ * /tools/bluegnu2.0.3/info
+ * /tools/bluegnu2.0.3/man
+
+
+4.3 Using BlueGnu
+When you have installed [incr Tcl] and BlueGnu and you have the
+respective ``bin'' directories in your PATH variable, then you
+can start running some tests. You can go into the BlueGnu
+source directory ``bluegnu2.0.3/testsets/examples'' and run the
+following:
+
+
+ 4
+
+
+
+
+
+% bluegnu versionTcl.itcl
+% bluegnu ts_001
+% bluegnu ts_002
+% bluegnu ts_003
+
+ The above test result should all be PASS. The following test
+will give a result UNKNOWN, because no pass/fail instruction have
+been given.
+
+% bluegnu tc001
+
+ The last test you can run will fail in its simple form:
+% bluegnu tc002
+
+ But will pass if you execute the test as follows:
+
+% bluegnu tc002[English]
+
+ This is because the test scripts need a test case identifier
+to find the correct benchmark code.
+
+5 Changes
+
+5.1 Version 2.0.3
+
+This being the first public release it is not to useful to
+list all the changes. BlueGnu has been modeled after DejaGnu
+and is a complete new implementation which has been tested
+thoroughly. When documentation is being written more changes
+will be made. An example of some of these changes as a result of
+this documentation effort can be found in the test-suites ts_001,
+ts_002, and ts_003. The first two are not as easy to write as
+the third. The test suite ts_001 is a script implementation of
+the command line:
+
+% cd bluegnu2.0.3/testsets
+% bluegnu examples/tc002[English=B] \
+> "examples/tc002[Dutch=B]={MSG=Hallo Wereld}"
+This may be useful for simple tests but when you want to
+write more complex test-suite scripts you would like some more
+flexibility, so two procedures were introduced, which are shown
+in test-suite ts_002. This makes writing rather complex so
+the procedures have become part of the procedures 'appendQueue',
+'prependQueue', and 'runtest'. The resulting script is shown in
+test-suit ts_003.
+ Changes like this will be made in the future!
+
+
+ 5
+
+
+
+
+
+6 Future Enhancements
+
+The following enhancements are being planned:
+
+ * Target code will be made into a class with methods
+ 'start', 'load', 'exit', and 'version'. Instead of the
+ current '<target>_start', '<target>_load', '<target>_exit',
+ and '<target>_version', which have been taken from DejaGnu.
+ * Procedures will be created that make it easy to test WEB
+ application from the framework.
+
+ * Other enhancements will be made depending on the use of the
+ framework in testing different applications.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 6
+ \ No newline at end of file
diff --git a/contrib/bluegnu2.0.3/README.dejagnu b/contrib/bluegnu2.0.3/README.dejagnu
new file mode 100644
index 0000000..0e22eab
--- /dev/null
+++ b/contrib/bluegnu2.0.3/README.dejagnu
@@ -0,0 +1,283 @@
+ DejaGnu is a framework for testing other programs. Its purpose is to
+provide a single front end for all tests. Beyond this, DejaGnu offers
+several advantages for testing:
+
+ - The flexibility and consistency of the DejaGnu framework
+ make it easy to write tests for any program.
+
+ - DejaGnu provides a layer of abstraction which makes all
+ tests (if correctly written) 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 supported by DejaGnu. Currently DejaGnu runs
+ tests on several single board computers, whose operating
+ software ranges from just a boot monitor to a full-fledged,
+ Unix-like realtime OS.
+
+ - DejaGnu is written in expect, which in turn uses Tcl
+ (Tool command language). The framework comprises two parts:
+ 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.
+
+ How To Configure and Build
+
+ To build DejaGnu, run the ``configure'' script here, e.g.:
+
+ ./configure MYHOSTTYPE
+
+followed by running ``make''. (MYHOSTTYPE is a name for your host computer,
+for instance "sun4". You can use the script ``config.sub'' to test whether
+a name is recognized; if it is, config.sub translates it to a triplet
+specifying CPU, vendor, and OS.) This is used when you plan to
+configure and build in the source tree.
+
+ If you use a separate tree for object files, (the recommended way),
+then the --srcdir option must also be specified. This would also
+require that the configure script be run from the top level directory.
+
+ PATH/configure MYHOSTYPE --srcdir PATH/dejagnu
+
+where PATH is is the directory that the contains the sources.
+
+ To configure it so it gets installed somewhere other than the
+default of /usr/local, use the --prefix option.
+
+ configure MYHOSTYPE --prefix [PATH]
+
+where PATH is the prefix used to install the programs.
+
+ The configure testing and building will use the native compiler "cc"
+on your host machine. To change which compiler gets used (like gcc)
+set a the variable "CC" in your environment to point to it.
+
+ For csh users: "setenv CC gcc"
+ For bourne shell users: "CC=gcc;export CC"
+
+ Then when you compile, use "make CC=$CC".
+
+See etc/cfg-paper.texi, etc/configure.texi, and/or the README files in
+various subdirectories, for more details.
+
+ As DejaGnu is a Tcl program, there is nothing to build. However, the
+documentation is not built by default. Use these targets:
+"make info" - Convert the texinfo document to something that can
+ be used the GNU info program or info mode in emacs.
+"make dvi" - Convert the texinfo document to something that can
+ be printed. This produces dvi output.
+"make doc" - This builds both.
+"make ps" - This converts the dvi file into postscript. This
+ requires a copy of dvips.
+"make install" - This installs DejaGnu based on the --prefix option
+ when configuring. Otherwise it defaults to
+ /usr/local. See the DejaGnu manual for more
+ information on installation.
+
+ Changes from 1.1.1
+ 1. Works with (included in release) Tcl 7.3 and Expect 5.6.
+ 2. Much better error trapping and handling, including the
+ execution of sub scripts.
+ 3. Re-worked configuration subsystem.
+ 4. Default handling for testing unknown targets.
+ 5. New testsuite for expect and runtest.
+ 6. More debugging procedures.
+
+ Changes from 1.0
+
+ 1. DejaGnu now conforms to POSIX 1003.3, a standard for
+ testing frameworks.
+ 2. A Tcl debugger written by Don Libes has been added.
+ 3. Lots of bug fixes.
+
+ Changes from 0.9
+
+ 1. DejaGnu now installs itself like other utilities.
+ 2. 700 G++ tests are included.
+ 3. The bugs in the GCC tests have been fixed.
+ 4. Testsuites are released separately.
+ 5. Testsuite sources now reside with the within each tool's
+ source tree.
+
+-------------------------------------------------------------------
+Here's is a posting on the Free OS testing project. (FROST)
+-------------------------------------------------------------------
+If you have built up your own tests for system calls, library
+routines, networking protocols, or common utilities, this posting
+offers you an opportunity to put them to good use. You can do a good
+deed for the Linux community, the Berkeley UNIX community, and the
+wider world of free software users.
+
+Also, if you would like to learn some good test tools and strategies,
+and devote some time on a volunteer basis to writing tests -- perhaps
+a couple of weeks full-time, or a couple hours per week over a period
+of several months -- then here is a project you should get involved
+in.
+
+I am helping to coordinate a test effort for Linux. In the following
+four sections of this message I will describe the goals, the process,
+the people trying to do it, and what you can do to help.
+
+Goals
+
+ Linux and BSD share a number of libraries and utilities, both
+ because BSD software was ported to Linux, and because several free
+ software (GNU) utilities have been ported to both operating
+ systems.
+
+ Linux shows startling differences and failures as you move from one
+ set of hardware to another. People who hope to base their own
+ commercial products on Linux would like to see proof that it is
+ robust, portable, and standard-conforming. The problem is that
+ cross-platform testing is very hard to do, and few decent test
+ suites exist either for free software or for UNIX. (Look at all the
+ differences you find among systems that are SVID-conforming,
+ particularly at higher levels such as the utilities.)
+
+ Therefore, a number of us who are interested n Linux have decided to
+ enter the modern age of formal, automated software testing -- but in
+ a manner that is proper for the free software community.
+
+ Using DejaGnu, a test platform developed by Cygnus Support and
+ placed under the GPL, we want to collect the best tests we can from
+ people everywhere, and integrate them into suites that any user can
+ download, run, and interpret with a few commands. DejaGnu already
+ runs under BSD, and Cygnus is porting it to Linux.
+
+ Our goal is to test as many parts of the system as possible,
+ including system calls (particularly for POSIX 1003.1 compliance),
+ libraries in the official distribution, networking protocols,
+ and utilities. We need help with
+
+ 1) integrating good tests donated by the community (and probably
+ written in a variety of programming languages and command
+ shells) into the DejaGnu framework, and
+
+ 2) writing new tests for major functional areas for which no
+ adequate tests exist.
+
+ The tests we use will be placed under the GPL and distributed by
+ Cygnus Support along with DejaGnu. H. J. Lu, who maintains the C
+ library for Linux, has offered to run the POSIX 1003.1 tests and as
+ many others as he can.
+
+Process
+
+ First let me summarize the advantages of using DejaGnu, a free
+ software product that will be the umbrella for all the tests, and
+ then explain how we plan to conduct this project.
+
+ Cygnus Support released DejaGnu to the public on January 3, along
+ with several test suites for GNU language tools. The product is
+ designed for portability and easy cross-platform development and
+ execution. It works more uniformly than typical tests using the
+ UNIX shell, and also supports interactive testing better than most
+ test platforms -- for instance, Cygnus has written over 1300 unit
+ tests for the gdb debugger using it.
+
+ The implementation of DejaGnu is based on tcl and expect, two simple
+ existing languages for writing commands. You can develop new tests
+ in two major ways: by placing keyword-based comments in C source
+ code, or by writing tests in tcl.
+
+ While Cygnus is still increasing their body of tests for language
+ tools, they are also turning their resources toward the libraries
+ and GNU utilities. While most of the tests are written at Cygnus,
+ they have reached out to communities of testers and are now porting
+ substantial sets of donated tests.
+
+ We are hoping to broaden this successful use of collaboration across
+ user communities. We hope that suites of useful tests are sitting
+ in desk drawers out there. We also hope to gather and mobilize
+ people who appreciate the value of formal tests in legitimizing free
+ software, and would like to help write them.
+
+ I am not an employee of Cygnus, but have volunteered to talk to
+ interested people and do an initial classification of tests, just to
+ offload some of this routine work from them. I will discuss all
+ offers with Cygnus staff to find out what is most needed and decide
+ which tests to incorporate into DejaGnu. There are several criteria
+ for choosing tests, including the degree to which an area is
+ covered, and its importance in the overall stability of the
+ operating system. Some tests may have to be rejected just because
+ they are hard to fit into the DejaGnu model.
+
+People
+
+ Now you can find out why each of us got involved with this project.
+
+ Cygnus writes and distributes free software, selling support as a
+ means to make money. The company is not directly in the business of
+ supporting operating systems or common UNIX utilities, so this kind
+ of testing is tangential to their main goals. But they may want to
+ support those things in the future. In any case, they would like to
+ see Linux do well, and this big test project will be a good
+ promotion for DejaGnu.
+ H. K. Lu, as a volunteer for Linux, has been using his own system to
+ implement, port, maintain, and ensure ANSI and POSIX compliance for
+ the C library (mostly the GNU C library along with the iostream
+ class from the g++ library). He is looking for ways to validate the
+ work that he and many other contributors have put in.
+
+ As an editor at a publisher of computer books, my relationship to
+ Linux and BSD is even more distant than that of Cygnus. But we are
+ thinking about putting out books about Linux, from either the Linux
+ Documentation Project or independent authors, and would like to make
+ sure Linux is stable enough to be documented. The testing of
+ utilities is particularly important to me, because it can provide
+ quality assurance for our books, including the BSD version of UNIX
+ in a Nutshell.
+
+What you can do
+
+ We ask people who have written tests in the areas I have described
+ to donate them to this project and see them benefit the public.
+ Don't just send me stuff -- write or call to discuss what you've got
+ in general. You also have to assign the tests to the Free Software
+ Foundation (a simple matter, so long as you are the owner of the
+ tests) so that they can be distributed under the GPL.
+
+ Also, please don't starting flaming about the GPL. Either join our
+ project and donate your tests, or don't. Personally, I do not take
+ a side in this war.
+
+ People who are interested in testing as a discipline, and have some
+ time to donate, are invited to contact me to help write tests. Tell
+ me:
+
+ Your knowledge of computer languages and tools
+
+ Previous software test efforts you have engaged in, if any
+
+ How much time you can devote
+
+ What functional areas you think are important and have a
+ particular interest in
+
+ Cygnus staff will tell volunteers which areas need testing, and
+ offer guidance while you learn and apply DejaGnu. The most
+ important trait for the project is rigorous thinking along the lines
+ of software quality (so the best preparation is to have done some
+ formal testing before). You do not need to know any particular
+ language or tool; you can learn tcl or other aspects of DejaGnu
+ fairly quickly.
+
+ Contact information for me is in my signature. I am at the phone
+ number during traditional U.S. business hours. So send mail any
+ time, or try calling from Monday through Friday, 9:00 AM to 5:00 PM,
+ Eastern Daylight Saving Time (four hours later than Greenwich Mean
+ Time).
+
+ Feel free to distribute and repost this message elsewhere, in its
+ entirety.
+
+----------------------------------------------------------------------
+Andy Oram O'Reilly & Associates, Inc. andyo@ora.com
+ 90 Sherman Street, Cambridge, MA 02140 (617) 354-5800
+ fax (617) 661-1116
+----------------------------------------------------------------------
+
+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 <your name>". Messages sent to
+frost@cygnus.com go to the mailing list. \ No newline at end of file
diff --git a/contrib/bluegnu2.0.3/TODO.dejagnu b/contrib/bluegnu2.0.3/TODO.dejagnu
new file mode 100644
index 0000000..b22cecc
--- /dev/null
+++ b/contrib/bluegnu2.0.3/TODO.dejagnu
@@ -0,0 +1,7 @@
+ Thu Mar 16 17:34:33 MST 1995
+
+. Add more support for target boards and realtime OS's.
+. Use the new expect terminal support for an "escape codes" API.
+. Use expectk and write a GUI testing API, complete with
+ record/playback.
+. Add a "testing methodologies" section to the manual.
diff --git a/contrib/bluegnu2.0.3/aclocal.m4 b/contrib/bluegnu2.0.3/aclocal.m4
new file mode 100644
index 0000000..3483fe5
--- /dev/null
+++ b/contrib/bluegnu2.0.3/aclocal.m4
@@ -0,0 +1,605 @@
+dnl This file is duplicated in four places:
+dnl * gdb/aclocal.m4
+dnl * gdb/testsuite/aclocal.m4
+dnl * expect/aclocal.m4
+dnl * dejagnu/aclocal.m4
+dnl Consider modifying all copies in parallel.
+dnl written by Rob Savoye <rob@welcomehome.org> for Cygnus Support
+dnl CYGNUS LOCAL: This gets the right posix flag for gcc
+AC_DEFUN(CY_AC_TCL_LYNX_POSIX,
+[AC_REQUIRE([AC_PROG_CC])AC_REQUIRE([AC_PROG_CPP])
+AC_MSG_CHECKING([to see if this is LynxOS])
+AC_CACHE_VAL(ac_cv_os_lynx,
+[AC_EGREP_CPP(yes,
+[/*
+ * The old Lynx "cc" only defines "Lynx", but the newer one uses "__Lynx__"
+ */
+#if defined(__Lynx__) || defined(Lynx)
+yes
+#endif
+], ac_cv_os_lynx=yes, ac_cv_os_lynx=no)])
+#
+if test "$ac_cv_os_lynx" = "yes" ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(LYNX)
+ AC_MSG_CHECKING([whether -mposix or -X is available])
+ AC_CACHE_VAL(ac_cv_c_posix_flag,
+ [AC_TRY_COMPILE(,[
+ /*
+ * This flag varies depending on how old the compiler is.
+ * -X is for the old "cc" and "gcc" (based on 1.42).
+ * -mposix is for the new gcc (at least 2.5.8).
+ */
+ #if defined(__GNUC__) && __GNUC__ >= 2
+ choke me
+ #endif
+ ], ac_cv_c_posix_flag=" -mposix", ac_cv_c_posix_flag=" -X")])
+ CC="$CC $ac_cv_c_posix_flag"
+ AC_MSG_RESULT($ac_cv_c_posix_flag)
+ else
+ AC_MSG_RESULT(no)
+fi
+])
+#
+# Sometimes the native compiler is a bogus stub for gcc or /usr/ucb/cc. This
+# makes configure think it's cross compiling. If --target wasn't used, then
+# we can't configure, so something is wrong.
+AC_DEFUN(CY_AC_C_CROSS,
+[# If we cannot run a trivial program, we must be cross compiling.
+AC_MSG_CHECKING(whether cross-compiling)
+AC_CACHE_VAL(ac_cv_c_cross,[
+AC_TRY_RUN([
+ main(){return(0);}],
+ ac_cv_c_cross=no, ac_cv_c_cross=yes, ac_cv_c_cross=yes)
+])
+if test x"${target}" = x"${host}" -a x"${ac_cv_c_cross}" = x"yes"; then
+ dnl this hack is cause the message is so long we don't call AC_MSG_ERROR
+ echo "configure: error: You need to specify --target to cross compile," 1>&2;
+ echo " or the native compiler is broken" 1>&2;
+ exit 1;
+else
+ cross_compiling=$ac_cv_c_cross
+ AC_MSG_RESULT($ac_cv_c_cross)
+fi
+])
+AC_DEFUN(CY_AC_PATH_TCLH, [
+#
+# Ok, lets find the tcl source trees so we can use the headers
+# Warning: transition of version 9 to 10 will break this algorithm
+# because 10 sorts before 9. We also look for just tcl. We have to
+# be careful that we don't match stuff like tclX by accident.
+# the alternative search directory is involked by --with-tclinclude
+#
+no_tcl=true
+AC_MSG_CHECKING(for Tcl private headers)
+AC_ARG_WITH(tclinclude, [ --with-tclinclude directory where tcl private headers are], with_tclinclude=${withval})
+AC_CACHE_VAL(ac_cv_c_tclh,[
+# first check to see if --with-tclinclude was specified
+if test x"${with_tclinclude}" != x ; then
+ if test -f ${with_tclinclude}/tclInt.h ; then
+ ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
+ else
+ AC_MSG_ERROR([${with_tclinclude} directory doesn't contain private headers])
+ fi
+fi
+# next check in private source directory
+#
+# since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_tclh}" = x ; then
+ for i in \
+ ${srcdir}/../tcl \
+ `ls -dr ${srcdir}/../tcl[[0-9]]* 2>/dev/null` \
+ ${srcdir}/../../tcl \
+ `ls -dr ${srcdir}/../../tcl[[0-9]]* 2>/dev/null` \
+ ${srcdir}/../../../tcl \
+ `ls -dr ${srcdir}/../../../tcl[[0-9]]* 2>/dev/null ` ; do
+ if test -f $i/tclInt.h ; then
+ ac_cv_c_tclh=`(cd $i; pwd)`
+ break
+ fi
+ # Tcl 7.5 and greater puts headers in subdirectory.
+ if test -f $i/generic/tclInt.h ; then
+ ac_cv_c_tclh=`(cd $i; pwd)`/generic
+ fi
+ done
+fi
+# finally check in a few common install locations
+#
+# since ls returns lowest version numbers first, reverse its output
+if test x"${ac_cv_c_tclh}" = x ; then
+ for i in \
+ `ls -dr /usr/local/src/tcl[[0-9]]* 2>/dev/null` \
+ `ls -dr /usr/local/lib/tcl[[0-9]]* 2>/dev/null` \
+ /usr/local/src/tcl \
+ /usr/local/lib/tcl \
+ ${prefix}/include ; do
+ if test -f $i/tclInt.h ; then
+ ac_cv_c_tclh=`(cd $i; pwd)`
+ break
+ fi
+ done
+fi
+# see if one is installed
+if test x"${ac_cv_c_tclh}" = x ; then
+ AC_HEADER_CHECK(tclInt.h, ac_cv_c_tclh=installed, ac_cv_c_tclh="")
+fi
+])
+if test x"${ac_cv_c_tclh}" = x ; then
+ TCLHDIR="# no Tcl private headers found"
+ AC_MSG_ERROR([Can't find Tcl private headers])
+fi
+if test x"${ac_cv_c_tclh}" != x ; then
+ no_tcl=""
+ if test x"${ac_cv_c_tkh}" = x"installed" ; then
+ AC_MSG_RESULT([is installed])
+ TCLHDIR=""
+ else
+ AC_MSG_RESULT([found in ${ac_cv_c_tclh}])
+ # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
+ TCLHDIR="-I${ac_cv_c_tclh}"
+ fi
+fi
+
+AC_MSG_CHECKING([Tcl version])
+rm -rf tclmajor tclminor
+orig_includes="$CPPFLAGS"
+
+if test x"${TCLHDIR}" != x ; then
+ CPPFLAGS="$CPPFLAGS $TCLHDIR"
+fi
+
+AC_TRY_RUN([
+#include <stdio.h>
+#include "tcl.h"
+main() {
+ FILE *maj = fopen("tclmajor","w");
+ FILE *min = fopen("tclminor","w");
+ fprintf(maj,"%d",TCL_MAJOR_VERSION);
+ fprintf(min,"%d",TCL_MINOR_VERSION);
+ fclose(maj);
+ fclose(min);
+ return 0;
+}],
+ tclmajor=`cat tclmajor`
+ tclminor=`cat tclminor`
+ tclversion=$tclmajor.$tclminor
+ AC_MSG_RESULT($tclversion)
+ rm -f tclmajor tclminor
+,
+ AC_MSG_RESULT([can't happen])
+,
+ AC_MSG_ERROR([can't be cross compiled])
+)
+CPPFLAGS="${orig_includes}"
+
+AC_PROVIDE([$0])
+AC_SUBST(TCLHDIR)
+])
+AC_DEFUN(CY_AC_PATH_TCLLIB, [
+#
+# Ok, lets find the tcl library
+# First, look for one uninstalled.
+# the alternative search directory is invoked by --with-tcllib
+#
+
+if test $tclmajor -ge 7 -a $tclminor -ge 4 ; then
+ installedtcllibroot=tcl$tclversion
+else
+ installedtcllibroot=tcl
+fi
+
+if test x"${no_tcl}" = x ; then
+ # we reset no_tcl incase something fails here
+ no_tcl=true
+ AC_ARG_WITH(tcllib, [ --with-tcllib directory where the tcl library is],
+ with_tcllib=${withval})
+ AC_MSG_CHECKING([for Tcl library])
+ AC_CACHE_VAL(ac_cv_c_tcllib,[
+ # First check to see if --with-tcllib was specified.
+ # This requires checking for both the installed and uninstalled name-styles
+ # since we have no idea if it's installed or not.
+ if test x"${with_tcllib}" != x ; then
+ if test -f "${with_tcllib}/lib$installedtcllibroot.so" ; then
+ ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/lib$installedtcllibroot.so
+ elif test -f "${with_tcllib}/libtcl.so" ; then
+ ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/libtcl.so
+ # then look for a freshly built statically linked library
+ # if Makefile exists we assume its configured and libtcl will be built first.
+ elif test -f "${with_tcllib}/lib$installedtcllibroot.a" ; then
+ ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/lib$installedtcllibroot.a
+ elif test -f "${with_tcllib}/libtcl.a" ; then
+ ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/libtcl.a
+ else
+ AC_MSG_ERROR([${with_tcllib} directory doesn't contain libraries])
+ fi
+ fi
+ # then check for a private Tcl library
+ # Since these are uninstalled, use the simple lib name root.
+ if test x"${ac_cv_c_tcllib}" = x ; then
+ for i in \
+ ../tcl \
+ `ls -dr ../tcl[[0-9]]* 2>/dev/null` \
+ ../../tcl \
+ `ls -dr ../../tcl[[0-9]]* 2>/dev/null` \
+ ../../../tcl \
+ `ls -dr ../../../tcl[[0-9]]* 2>/dev/null` ; do
+ # Tcl 7.5 and greater puts library in subdir. Look there first.
+ if test -f "$i/unix/libtcl.so" ; then
+ ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.so
+ break
+ elif test -f "$i/unix/libtcl.a" -o -f "$i/unix/Makefile"; then
+ ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.a
+ break
+ # look for a freshly built dynamically linked library
+ elif test -f "$i/libtcl.so" ; then
+ ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.so
+ break
+
+ # then look for a freshly built statically linked library
+ # if Makefile exists we assume its configured and libtcl will be
+ # built first.
+ elif test -f "$i/libtcl.a" -o -f "$i/Makefile" ; then
+ ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.a
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_tcllib}" = x ; then
+ for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
+ # first look for a freshly built dynamically linked library
+ if test -f "$i/lib$installedtcllibroot.so" ; then
+ ac_cv_c_tcllib=`(cd $i; pwd)`/lib$installedtcllibroot.so
+ break
+ # then look for a freshly built statically linked library
+ # if Makefile exists we assume its configured and libtcl will be built first.
+ elif test -f "$i/lib$installedtcllibroot.a" -o -f "$i/Makefile" ; then
+ ac_cv_c_tcllib=`(cd $i; pwd)`/lib$installedtcllibroot.a
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_tcllib}" = x ; then
+ for i in \
+ ${srcdir}/../tcl \
+ `ls -dr ${srcdir}/../tcl[[0-9]]* 2>/dev/null` ; do
+ # Tcl 7.5 and greater puts library in subdir. Look there first.
+ if test -f "$i/unix/libtcl.so" ; then
+ ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.so
+ break
+ elif test -f "$i/unix/libtcl.a" -o -f "$i/unix/Makefile"; then
+ ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.a
+ break
+ # look for a freshly built dynamically linked library
+ elif test -f "$i/libtcl.so" ; then
+ ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.so
+ break
+
+ # then look for a freshly built statically linked library
+ # if Makefile exists we assume its configured and libtcl will be
+ # built first.
+ elif test -f "$i/libtcl.a" -o -f "$i/Makefile" ; then
+ ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.a
+ break
+ fi
+ done
+ fi
+
+ # see if one is conveniently installed with the compiler
+ if test x"${ac_cv_c_tcllib}" = x ; then
+ orig_libs="$LIBS"
+ LIBS="$LIBS -l$installedtcllibroot -lm"
+ AC_TRY_RUN([
+ Tcl_AppInit()
+ { exit(0); }], ac_cv_c_tcllib="-l$installedtcllibroot", ac_cv_c_tcllib=""
+ , ac_cv_c_tclib="-l$installedtcllibroot")
+ LIBS="${orig_libs}"
+ fi
+ ])
+ if test x"${ac_cv_c_tcllib}" = x ; then
+ TCLLIB="# no Tcl library found"
+ AC_MSG_WARN(Can't find Tcl library)
+ else
+ TCLLIB=${ac_cv_c_tcllib}
+ AC_MSG_RESULT(found $TCLLIB)
+ no_tcl=
+ fi
+fi
+
+AC_PROVIDE([$0])
+AC_SUBST(TCLLIB)
+])
+AC_DEFUN(CY_AC_PATH_TKH, [
+#
+# Ok, lets find the tk source trees so we can use the headers
+# If the directory (presumably symlink) named "tk" exists, use that one
+# in preference to any others. Same logic is used when choosing library
+# and again with Tcl. The search order is the best place to look first, then in
+# decreasing significance. The loop breaks if the trigger file is found.
+# Note the gross little conversion here of srcdir by cd'ing to the found
+# directory. This converts the path from a relative to an absolute, so
+# recursive cache variables for the path will work right. We check all
+# the possible paths in one loop rather than many seperate loops to speed
+# things up.
+# the alternative search directory is invoked by --with-tkinclude
+#
+AC_MSG_CHECKING(for Tk private headers)
+AC_ARG_WITH(tkinclude, [ --with-tkinclude directory where the tk private headers are],
+ with_tkinclude=${withval})
+no_tk=true
+AC_CACHE_VAL(ac_cv_c_tkh,[
+# first check to see if --with-tkinclude was specified
+if test x"${with_tkinclude}" != x ; then
+ if test -f ${with_tkinclude}/tk.h ; then
+ ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
+ else
+ AC_MSG_ERROR([${with_tkinclude} directory doesn't contain private headers])
+ fi
+fi
+# next check in private source directory
+#
+# since ls returns lowest version numbers first, reverse the entire list
+# and search for the worst fit, overwriting it with better fits as we find them
+if test x"${ac_cv_c_tkh}" = x ; then
+ for i in \
+ ${srcdir}/../tk \
+ `ls -dr ${srcdir}/../tk[[0-9]]* 2>/dev/null` \
+ ${srcdir}/../../tk \
+ `ls -dr ${srcdir}/../../tk[[0-9]]* 2>/dev/null` \
+ ${srcdir}/../../../tk \
+ `ls -dr ${srcdir}/../../../tk[[0-9]]* 2>/dev/null ` ; do
+ if test -f $i/tk.h ; then
+ ac_cv_c_tkh=`(cd $i; pwd)`
+ break
+ fi
+ # Tk 4.1 and greater puts this in a subdir.
+ if test -f $i/generic/tk.h; then
+ ac_cv_c_tkh=`(cd $i; pwd)`/generic
+ fi
+ done
+fi
+# finally check in a few common install locations
+#
+# since ls returns lowest version numbers first, reverse the entire list
+# and search for the worst fit, overwriting it with better fits as we find them
+if test x"${ac_cv_c_tkh}" = x ; then
+ for i in \
+ `ls -dr /usr/local/src/tk[[0-9]]* 2>/dev/null` \
+ `ls -dr /usr/local/lib/tk[[0-9]]* 2>/dev/null` \
+ /usr/local/src/tk \
+ /usr/local/lib/tk \
+ ${prefix}/include ; do
+ if test -f $i/tk.h ; then
+ ac_cv_c_tkh=`(cd $i; pwd)`
+ break
+ fi
+ done
+fi
+# see if one is installed
+if test x"${ac_cv_c_tkh}" = x ; then
+ AC_HEADER_CHECK(tk.h, ac_cv_c_tkh=installed)
+fi
+])
+if test x"${ac_cv_c_tkh}" != x ; then
+ no_tk=""
+ if test x"${ac_cv_c_tkh}" = x"installed" ; then
+ AC_MSG_RESULT([is installed])
+ TKHDIR=""
+ else
+ AC_MSG_RESULT([found in $ac_cv_c_tkh])
+ # this hack is cause the TKHDIR won't print if there is a "-I" in it.
+ TKHDIR="-I${ac_cv_c_tkh}"
+ fi
+else
+ TKHDIR="# no Tk directory found"
+ AC_MSG_WARN([Can't find Tk private headers])
+ no_tk=true
+fi
+
+# if Tk is installed, extract the major/minor version
+if test x"${no_tk}" = x ; then
+AC_MSG_CHECKING([Tk version])
+rm -rf tkmajor tkminor
+orig_includes="$CPPFLAGS"
+
+if test x"${TCLHDIR}" != x ; then
+ CPPFLAGS="$CPPFLAGS $TCLHDIR"
+fi
+if test x"${TKHDIR}" != x ; then
+ CPPFLAGS="$CPPFLAGS $TKHDIR"
+fi
+if test x"${x_includes}" != x -a x"${x_includes}" != xNONE ; then
+ CPPFLAGS="$CPPFLAGS -I$x_includes"
+fi
+
+AC_TRY_RUN([
+#include <stdio.h>
+#include "tk.h"
+ main() {
+ FILE *maj = fopen("tkmajor","w");
+ FILE *min = fopen("tkminor","w");
+ fprintf(maj,"%d",TK_MAJOR_VERSION);
+ fprintf(min,"%d",TK_MINOR_VERSION);
+ fclose(maj);
+ fclose(min);
+ return 0;
+}],
+ tkmajor=`cat tkmajor`
+ tkminor=`cat tkminor`
+ tkversion=$tkmajor.$tkminor
+ AC_MSG_RESULT($tkversion)
+ rm -f tkmajor tkminor
+,
+ AC_MSG_ERROR([
+cannot compile a simple X program - suspect your xmkmf is
+misconfigured and is incorrectly reporting the location of your X
+include or libraries - report this to your system admin]) ,
+ AC_MSG_ERROR([can't be cross compiled])
+)
+CPPFLAGS="${orig_includes}"
+fi
+
+AC_PROVIDE([$0])
+AC_SUBST(TKHDIR)
+])
+AC_DEFUN(CY_AC_PATH_TKLIB, [
+AC_REQUIRE([CY_AC_PATH_TCL])
+#
+# Ok, lets find the tk library
+# First, look for the latest private (uninstalled) copy
+# Notice that the destinations in backwards priority since the tests have
+# no break.
+# Then we look for either .a, .so, or Makefile. A Makefile is acceptable
+# is it indicates the target has been configured and will (probably)
+# soon be built. This allows an entire tree of Tcl software to be
+# configured at once and then built.
+# the alternative search directory is invoked by --with-tklib
+#
+
+if test x"${no_tk}" = x ; then
+ # reset no_tk incase something fails here
+ no_tk="true"
+
+ if test $tkmajor -ge 4 ; then
+ installedtklibroot=tk$tkversion
+ else
+ installedtkllibroot=tk
+ fi
+
+ AC_ARG_WITH(tklib, [ --with-tklib directory where the tk library is],
+ with_tklib=${withval})
+ AC_MSG_CHECKING([for Tk library])
+ AC_CACHE_VAL(ac_cv_c_tklib,[
+ # first check to see if --with-tklib was specified
+ # This requires checking for both the installed and uninstalled name-styles
+ # since we have no idea if it's installed or not.
+ if test x"${with_tklib}" != x ; then
+ if test -f "${with_tklib}/lib$installedtklibroot.so" ; then
+ ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/lib$installedtklibroot.so
+ no_tk=""
+ elif test -f "${with_tklib}/libtk.so" ; then
+ ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/libtk.so
+ no_tk=""
+ # then look for a freshly built statically linked library
+ # if Makefile exists we assume its configured and libtk will be built
+ elif test -f "${with_tklib}/lib$installedtklibroot.a" ; then
+ ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/lib$installedtklibroot.a
+ no_tk=""
+ elif test -f "${with_tklib}/libtk.a" ; then
+ ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/libtk.a
+ no_tk=""
+ else
+ AC_MSG_ERROR([${with_tklib} directory doesn't contain libraries])
+ fi
+ fi
+ # then check for a private Tk library
+ # Since these are uninstalled, use the simple lib name root.
+ if test x"${ac_cv_c_tklib}" = x ; then
+ for i in \
+ ../tk \
+ `ls -dr ../tk[[0-9]]* 2>/dev/null` \
+ ../../tk \
+ `ls -dr ../../tk[[0-9]]* 2>/dev/null` \
+ ../../../tk \
+ `ls -dr ../../../tk[[0-9]]* 2>/dev/null` ; do
+ # Tk 4.1 and greater puts things in subdirs. Check these first.
+ if test -f "$i/unix/libtk.so" ; then
+ ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.so
+ no_tk=
+ break
+ elif test -f "$i/unix/libtk.a" -o -f "$i/unix/Makefile"; then
+ ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.a
+ no_tk=
+ break
+ # look for a freshly built dynamically linked library
+ elif test -f "$i/libtk.so" ; then
+ ac_cv_c_tklib=`(cd $i; pwd)`/libtk.so
+ no_tk=
+ break
+ # then look for a freshly built statically linked library
+ # if Makefile exists we assume its configured and libtk will be built
+ elif test -f "$i/libtk.a" -o -f "$i/Makefile" ; then
+ ac_cv_c_tklib=`(cd $i; pwd)`/libtk.a
+ no_tk=""
+ break
+ fi
+ done
+ fi
+ # finally check in a few common install locations
+ if test x"${ac_cv_c_tklib}" = x ; then
+ for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
+ # first look for a freshly built dynamically linked library
+ if test -f "$i/lib$installedtklibroot.so" ; then
+ ac_cv_c_tklib=`(cd $i; pwd)`/lib$installedtklibroot.so
+ no_tk=""
+ break
+ # then look for a freshly built statically linked library
+ # if Makefile exists, we assume it's configured and libtcl will be built
+ elif test -f "$i/lib$installedtklibroot.a" -o -f "$i/Makefile" ; then
+ ac_cv_c_tklib=`(cd $i; pwd)`/lib$installedtklibroot.a
+ no_tk=""
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_tklib}" = x ; then
+ for i in \
+ ${srcdir}/../tk \
+ `ls -dr ${srcdir}/../tk[[0-9]]* 2>/dev/null` ; do
+ # Tk 4.1 and greater puts things in subdirs. Check these first.
+ if test -f "$i/unix/libtk.so" ; then
+ ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.so
+ no_tk=
+ break
+ elif test -f "$i/unix/libtk.a" -o -f "$i/unix/Makefile"; then
+ ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtk.a
+ no_tk=
+ break
+ # look for a freshly built dynamically linked library
+ elif test -f "$i/libtk.so" ; then
+ ac_cv_c_tklib=`(cd $i; pwd)`/libtk.so
+ no_tk=""
+ break
+ # then look for a freshly built statically linked library
+ # if Makefile exists, we assume it's configured and libtcl will be built
+ elif test -f "$i/libtk.a" -o -f "$i/Makefile" ; then
+ ac_cv_c_tklib=`(cd $i; pwd)`/libtk.a
+ no_tk=""
+ break
+ fi
+ done
+ fi
+ # see if one is conveniently installed with the compiler
+ if test x"${ac_cv_c_tklib}" = x ; then
+ AC_REQUIRE([AC_PATH_X])
+ orig_libs="$LIBS"
+ LIBS="$LIBS -l$installedtklibroot $x_libraries $ac_cv_c_tcllib -lm"
+ AC_TRY_RUN([
+ Tcl_AppInit()
+ { exit(0); }], ac_cv_c_tklib="-l$installedtklibroot", ac_cv_c_tklib=""
+ , ac_cv_c_tklib="-l$installedtklibroot")
+ LIBS="${orig_libs}"
+ fi
+ ])
+ if test x"${ac_cv_c_tklib}" = x ; then
+ TKLIB="# no Tk library found"
+ AC_MSG_WARN(Can't find Tk library)
+ else
+ TKLIB=$ac_cv_c_tklib
+ AC_MSG_RESULT(found $TKLIB)
+ no_tk=
+ fi
+fi
+AC_PROVIDE([$0])
+AC_SUBST(TKLIB)
+])
+AC_DEFUN(CY_AC_PATH_TK, [
+ CY_AC_PATH_TKH
+ CY_AC_PATH_TKLIB
+])
+AC_DEFUN(CY_AC_PATH_TCL, [
+ CY_AC_PATH_TCLH
+ CY_AC_PATH_TCLLIB
+])
diff --git a/contrib/bluegnu2.0.3/bluegnu b/contrib/bluegnu2.0.3/bluegnu
new file mode 100755
index 0000000..cbb43ea
--- /dev/null
+++ b/contrib/bluegnu2.0.3/bluegnu
@@ -0,0 +1,136 @@
+#! /bin/sh
+#
+# This application is using [incr Tcl]
+#
+# Copyright (C) 1998, 1999 jotOmega dsc, Inc.
+
+# This file is part of BlueGnu testing framework.
+# It asumes that the itclsh3.0 program is on your PATH
+#
+
+#
+# Get the execution path to this script
+#
+execpath=`echo ${0-.} | sed -e 's@/[^/]*$@@'`
+
+#
+# get the name by which bluegnu was invoked and extract the config triplet
+#
+bluegnu=`echo ${0-.} | sed -e 's@^.*/@@'`
+target=`echo $bluegnu | sed -e 's/-bluegnu$//'`
+if [ "$target" != bluegnu ] ; then
+ target="--target=${target}"
+else
+ target=""
+fi
+
+#
+# Find the right interpreter binary to use. If a variable EXPECT exists,
+# it takes precedence over all other tests. Otherwise look for a freshly
+# built one, and then use one in the path.
+#
+if [ x"$EXPECT" != x ] ; then
+ expectbin=$EXPECT
+else
+ if [ -x "$execpath/itclsh3.0" ] ; then
+ expectbin=$execpath/itclsh3.0
+ else
+ expectbin=itclsh3.0
+ fi
+fi
+
+# just to be safe...
+if [ -z "$expectbin" ]; then
+ echo "ERROR: No $expectbin shell found"
+ exit 1
+fi
+
+#
+# Extract a few options from the option list.
+#
+verbose=0
+debug=""
+for a in "$@" ; do
+ case $a in
+ -v|--v|-verb*|--verb*) verbose=`expr $verbose + 1`;;
+ -D0|--D0) debug="-D 0" ;;
+ -D1|--D1) debug="-D 1" ;;
+ esac
+done
+
+if expr $verbose \> 0 \& "$DEBUG" > /dev/null ; then
+ echo Using $expectbin as interpreter for the BlueGnu testing framework.
+fi
+
+#
+# find bluegnu.itcl. First we look in it's installed location, otherwise
+# start if from the source tree.
+#
+for i in $execpath/../lib/bluegnu $execpath/../lib $execpath $execpath/lib ; do
+ if expr $verbose \> 2 \& "$DEBUG" > /dev/null ; then
+ echo Looking for $i/bluegnu.itcl.
+ fi
+ if [ -f $i/bluegnu.itcl ] ; then
+ runpath=$i
+ if expr $verbose \> 0 \& "$DEBUG" > /dev/null ; then
+ echo Using $i/bluegnu.itcl as default main test driver
+ fi
+ break
+ fi
+done
+
+# check for an environment variable
+if [ x"$BLUEGNULIB" != x ] ; then
+ runpath=$BLUEGNULIB
+else
+ BLUEGNULIB=$runpath; export BLUEGNULIB
+fi
+if expr $verbose \> 0 \& "$DEBUG" > /dev/null ; then
+ echo Using $BLUEGNULIB as the BlueGnu library
+fi
+
+#
+# Find the right test framework. If a variable FRAMEWORK exists,
+# it takes precedence over all other frameworks. Otherwise look for the
+# default one.
+if [ x"$FRAMEWORK" != x ] ; then
+ framework=$FRAMEWORK
+else
+ if [ -r "$runpath/bluegnu.itcl" ] ; then
+ framework=bluegnu.itcl
+ else
+ echo "ERROR: $runpath/bluegnu.itcl does not exist."
+ exit 1
+ fi
+fi
+
+if [ x"$runpath" = x ] ; then
+ echo "ERROR: bluegnu.itcl does not exist."
+ exit 1
+fi
+
+if [ ! -r "$runpath/$framework" ] ; then
+ echo "ERROR: $runpath/$framework does not exist."
+else
+ if expr $verbose \> 0 \& "$DEBUG" > /dev/null ; then
+ echo "Using $runpath/$framework as main test driver"
+ fi
+fi
+
+# Find Test Suite Root directory
+#
+if [ x"$TESTSUITEROOT" = x ] ; then
+ TESTSUITEROOT=`pwd`; export TESTSUITEROOT
+else
+ cd $TESTSUITEROOT
+fi
+if expr $verbose \> 0 \& "$DEBUG" > /dev/null ; then
+ echo "Using $TESTSUITEROOT as Test Suite Directory."
+fi
+
+# Start the BlueGnu Test Framework
+#
+if expr $verbose \> 2 \& "$DEBUG" > /dev/null ; then
+ echo Command: $expectbin $debug $runpath/$framework $target ${1+"$@"}
+fi
+exec $expectbin $debug $runpath/$framework $target ${1+"$@"}
diff --git a/contrib/bluegnu2.0.3/bluegnutk b/contrib/bluegnu2.0.3/bluegnutk
new file mode 100755
index 0000000..e637870
--- /dev/null
+++ b/contrib/bluegnu2.0.3/bluegnutk
@@ -0,0 +1,5 @@
+#! /bin/ksh
+#
+
+
+exec itkwish2.2 $0.itcl $*
diff --git a/contrib/bluegnu2.0.3/bluegnutk.itcl b/contrib/bluegnu2.0.3/bluegnutk.itcl
new file mode 100644
index 0000000..92c1c87
--- /dev/null
+++ b/contrib/bluegnu2.0.3/bluegnutk.itcl
@@ -0,0 +1,216 @@
+#
+#
+#
+
+set szApplName [file dirname $argv0]/[file root [file tail $argv0]]
+
+# puts "MAIA TK application: $szApplName"
+
+source ${szApplName}Utils.itcl
+
+if [file exists ~/.[file tail ${szApplName}]rc] {
+ puts stderr "Using Resource ~/.[file tail ${szApplName}]rc"
+ if [catch {option readfile ~/.[file tail ${szApplName}]rc} szErrMsg] {
+ puts stderr "error in ~/.[file tail ${szApplName}]rc: $szErrMsg"
+ }
+} elseif [file exists ${szApplName}.rc] {
+ puts stderr "Using Resource ${szApplName}.rc"
+ if [catch {option readfile ${szApplName}.rc} szErrMsg] {
+ puts stderr "error in ${szApplName}.rc: $szErrMsg"
+ }
+}
+
+wm title . "BlueGnu Tk"
+set iLabelWidth 25
+
+frame .options -borderwidth 3
+pack .options -side top -fill both -expand true
+# puts "grid: [grid columnconfigure .options 1 -weight 1]"
+
+set iRow 0
+label .options.lCmd -text "BlueGnu Command Line:" -padx 0 -width $iLabelWidth -anchor e
+entry .options.cmd -relief sunken -textvariable szCommand -width 60
+set wRun [button .options.run -text "Run it" -command run]
+button .options.quit -text Quit -command exit
+grid .options.lCmd -row $iRow -column 0 -sticky w
+grid .options.cmd -row $iRow -column 1 -columnspan 4 -sticky ew
+grid .options.run -row $iRow -column 5 -sticky ew
+grid .options.quit -row $iRow -column 6 -sticky ew
+bind .options.cmd <Return> run
+bind .options.cmd <Control-c> stop
+focus .options.cmd
+
+incr iRow
+set szPWD [exec /bin/sh -c pwd]
+set wPWDentry [entry .options.pwdText -textvariable szPWD]
+set wPWDlabel [label .options.pwdLabel -text "Current Working Dir:" -padx 0 \
+ -width $iLabelWidth -anchor e]
+set wPWD [menubutton .options.pwd -text "Subdirectories" \
+ -menu .options.pwd.menu -relief raised]
+set wPWDmenu [menu .options.pwd.menu -tearoff 0]
+$wPWDmenu add command -label "." -command {setPWD "."}
+$wPWDmenu add command -label ".." -command {setPWD ".."}
+$wPWDmenu add command -label "dummy" -command {setPWD "dummy"}
+setPWD "."
+grid .options.pwdLabel -row $iRow -column 0 -sticky w
+grid .options.pwdText -row $iRow -column 1 -columnspan 4 -sticky ew
+grid .options.pwd -row $iRow -column 5 -columnspan 2 -sticky ew
+set iRowPWD $iRow
+
+incr iRow
+set wEXPECTentry [entry .options.expectEntry \
+ -textvariable szEXPECT -state disabled]
+set wEXPECTlabel [label .options.expectLabel -text env(EXPECT): \
+ -padx 0 -width $iLabelWidth -anchor e]
+set wEXPECT [menubutton .options.expect -text "EXPECT choices" \
+ -menu .options.expect.menu -relief raised]
+set wEXPECTmenu [menu .options.expect.menu -tearoff 0]
+set lTesters [option get $wEXPECTmenu choices {}]
+if [info exists env(EXPECT)] {
+ setEXPECT $env(EXPECT)
+ if {[lsearch -exact $lTesters $szExpect] < 0} {
+ $wEXPECTmenu add command -label "$szExpect" \
+ -command [list setEXPECT "$szExpect"]
+ }
+} else {
+ setEXPECT {}
+}
+foreach szTester $lTesters {
+ #puts "tester choice: >$szTester<"
+ $wEXPECTmenu add command -label "$szTester" \
+ -command [list setEXPECT "$szTester"]
+}
+$wEXPECTmenu add command -label "" \
+ -command [list setEXPECT ""]
+grid .options.expectLabel -row $iRow -column 0 -sticky w
+grid .options.expectEntry -row $iRow -column 1 -columnspan 4 -sticky ew
+grid .options.expect -row $iRow -column 5 -columnspan 2 -sticky ew
+
+incr iRow
+label .options.targetLabel -text Target: -padx 0 -width $iLabelWidth -anchor e
+label .options.targetChoice -textvariable szTarget -relief sunken -anchor w
+menubutton .options.target -text "Target choices" \
+ -menu .options.target.menu -relief raised
+menu .options.target.menu -tearoff 0
+set lChoices [option get .options.target.menu choices {}]
+foreach szChoice $lChoices {
+ .options.target.menu add command -label $szChoice \
+ -command [list set szTarget $szChoice]
+}
+.options.target.menu add command -label "" \
+ -command [list set szTarget ""]
+grid .options.targetLabel -row $iRow -column 0 -sticky w
+grid .options.targetChoice -row $iRow -column 1 -columnspan 4 -sticky ew -padx 2
+grid .options.target -row $iRow -column 5 -columnspan 2 -sticky ew
+
+incr iRow
+label .options.viewLabel -text view: -padx 0 -width $iLabelWidth \
+ -anchor e
+label .options.viewChoice -textvariable szView -relief sunken -anchor w
+menubutton .options.view -text "View choices" \
+ -menu .options.view.menu -relief raised
+menu .options.view.menu -tearoff 0
+set lChoices [option get .options.view.menu choices {}]
+foreach szChoice $lChoices {
+ .options.view.menu add command -label $szChoice \
+ -command [list set szView $szChoice]
+}
+.options.view.menu add command -label "" \
+ -command [list set szView ""]
+grid .options.viewLabel -row $iRow -column 0 -sticky w
+grid .options.viewChoice -row $iRow -column 1 -columnspan 4 -sticky ew -padx 2
+grid .options.view -row $iRow -column 5 -columnspan 2 -sticky ew
+
+incr iRow
+label .options.xipcLabel -text XIPCINSTANCE: \
+ -padx 0 -width $iLabelWidth -anchor e
+label .options.xipcChoice -textvariable szXipc -relief sunken -anchor w
+menubutton .options.xipc -text "XIPCINSTANCE choices" \
+ -menu .options.xipc.menu -relief raised
+menu .options.xipc.menu -tearoff 0
+set lChoices [option get .options.xipc.menu choices {}]
+foreach szChoice $lChoices {
+ .options.xipc.menu add command -label $szChoice \
+ -command [list set szXipc $szChoice]
+}
+.options.xipc.menu add command -label "" \
+ -command [list set szXipc ""]
+grid .options.xipcLabel -row $iRow -column 0 -sticky w
+grid .options.xipcChoice -row $iRow -column 1 -columnspan 4 -sticky ew -padx 2
+grid .options.xipc -row $iRow -column 5 -columnspan 2 -sticky ew
+
+set szTestScript "tools/xterm"
+#set szArguments "\{title=\"\$szTarget -- \$szView\"\}"
+
+incr iRow
+set wTSentry [entry .options.tsText -textvariable szTS -state disabled]
+set wTSlabel [label .options.tsLabel -text "Current Test Scripts Dir:" \
+ -padx 0 \
+ -width $iLabelWidth -anchor e]
+set wTS [menubutton .options.ts -text "Subdirectories" \
+ -menu .options.ts.menu -relief raised]
+set wTSmenu [menu .options.ts.menu -tearoff 0]
+$wTSmenu add command -label "." -command {setTS "."}
+$wTSmenu add command -label ".." -command {setTS ".."}
+setTS "."
+grid .options.tsLabel -row $iRow -column 0 -sticky w
+grid .options.tsText -row $iRow -column 1 -columnspan 4 -sticky ew
+grid .options.ts -row $iRow -column 5 -columnspan 2 -sticky ew
+set iRowTS $iRow
+
+incr iRow
+set wTSLlabel [label .options.tslLabel -text "Selected Test Scripts:" \
+ -padx 0 \
+ -width $iLabelWidth -anchor e]
+frame .options.lists -background blue
+#grid rowconfigure .options.lists 0 -weight 1
+#grid columnconfigure .options.lists 0 -weight 1
+grid .options.lists -row $iRow -column 1 -columnspan 6 -sticky news
+set wLL [scrolledListBox .options.lists.fl]
+set wLR [scrolledListBox .options.lists.fr]
+grid .options.tslLabel -row $iRow -column 0 -sticky wn
+grid rowconfigure .options.lists 0 -weight 1
+grid columnconfigure .options.lists 0 -weight 1
+grid .options.lists.fl -row 0 -column 0 -sticky news
+#grid rowconfigure .options.lists.fr 0 -weight 1
+grid columnconfigure .options.lists 1 -weight 1
+grid .options.lists.fr -row 0 -column 1 -sticky news
+bind $wLR <ButtonRelease-3> [list listTransferSelected %W $wLL]
+bind $wLL <ButtonRelease-1> [list listTransferData %W]
+bind $wLL <ButtonRelease-3> [list listTransferRemoved %W $wLR]
+insertTests $wLR
+
+incr iRow
+set wArguments [entry .options.arguments -textvariable szArguments -width 40]
+label .options.argumentsLabel -text "Arguments:" -padx 0 \
+ -width $iLabelWidth -anchor e
+grid .options.argumentsLabel -row $iRow -column 0 -sticky w
+grid .options.arguments -row $iRow -column 1 -columnspan 6 -sticky ew
+
+incr iRow
+set wTestcase [entry .options.testcase -textvariable szTestcase -width 40]
+label .options.testcaseLabel -text "Testcase ID:" -padx 0 \
+ -width $iLabelWidth -anchor e
+grid .options.testcaseLabel -row $iRow -column 0 -sticky w
+grid .options.testcase -row $iRow -column 1 -columnspan 6 -sticky ew
+
+set szTestcase ""
+lostSelection $wLL
+
+frame .txt
+set wLog [text .txt.log -width 80 -height 10 -borderwidth 2 -relief raised \
+ -setgrid true -yscrollcommand {.txt.scroll set}]
+scrollbar .txt.scroll -command {.txt.log yview}
+pack .txt.scroll -side right -fill y
+pack .txt.log -side left -fill both -expand true
+pack .txt -side top -fill both -expand true
+
+trace variable szPWD w setPWDoverwrite
+trace variable szExpect w setExpect
+trace variable szTarget w cmdUpdate
+trace variable szView w cmdUpdate
+trace variable szXipc w cmdUpdate
+trace variable szTS w setTSoverwrite
+trace variable szArguments w cmdUpdate
+trace variable szTestcase w cmdUpdate
+
diff --git a/contrib/bluegnu2.0.3/bluegnutk.rc b/contrib/bluegnu2.0.3/bluegnutk.rc
new file mode 100644
index 0000000..225ac94
--- /dev/null
+++ b/contrib/bluegnu2.0.3/bluegnutk.rc
@@ -0,0 +1,29 @@
+!
+! This is the resource file for MAIA Tk
+!
+
+*background: #d9d9d9
+*foreground: black
+*activeBackground: #ececec
+*run.activeBackground: red
+*activeForeground: blue
+*run.activeForeground: yellow
+*selectColor: #b03060
+*selectBackground: #c3c3c3
+*troughColor: #c3c3c3
+*disabledForeground: #a3a3a3
+
+*expect.menu.choices: /home/jann/tools/MAIA/bin/botester \
+ /home/jann/tools/MAIA/bin/ibotester \
+ /home/jann/tools/MAIA/bin/pqltester \
+ /home/jann/tools/MAIA/bin/cpqltester \
+ /home/jann/tools/MAIA/bin/tester \
+ /home/jann/tools/bin/iexpect
+
+*target.menu.choices: BusObj BusObj=Atlas BusObj=Corba \
+ BusObj=TTX/Atlas TTX=Atlas \
+ BusObj=ICR/Atlas ICR=Corba ICR=Atlas \
+ BusObj=PQL/Atlas BusObj=PQL/Corba PQL=Corba PQL=Atlas
+
+*view.menu.choices: testB_spr1 testB_spr2
+*xipc.menu.choices: atsqa1 atsqa2 atsqa3 atsqa4 atsqa5 atsqa6
diff --git a/contrib/bluegnu2.0.3/bluegnutkUtils.itcl b/contrib/bluegnu2.0.3/bluegnutkUtils.itcl
new file mode 100644
index 0000000..0ed485e
--- /dev/null
+++ b/contrib/bluegnu2.0.3/bluegnutkUtils.itcl
@@ -0,0 +1,436 @@
+#
+#
+#
+
+# puts "MAIA TK Utilities"
+
+set szView [file tail $env(CLEARCASE_ROOT)]
+set szXipc $env(XIPCINSTANCE)
+
+proc run {} {
+ global env
+ global szCommand wRun input wLog wRun
+ global szView szXipc
+
+ set env(CLEARCASE_ROOT) /view/$szView
+ set env(XIPCINSTANCE) $szXipc
+
+ set szCmd "xterm -sl 50000 -sb"
+ if {[string length $szCommand] == 0} {
+ set szCommand "$szCmd"
+ } else {
+ append szCmd " -e $szCommand"
+ }
+ if [catch {eval exec "$szCmd &"} input] {
+ $wLog insert end $input
+ bell
+ } else {
+ #fileevent $input readable log
+ $wLog insert end "$env(PS1)$szCommand &\n"
+ $wLog see end
+ #$wRun config -text Stop -command stop
+ }
+}
+
+proc log {} {
+ global input wLog
+
+ if [eof $input] {
+ stop
+ } else {
+ gets $input szLine
+ $wLog insert end "$szLine\n"
+ $wLog see end
+ }
+}
+
+
+proc stop {} {
+ global input wRun
+
+ catch {close $input}
+ $wRun config -text "Run it" -command run
+}
+
+proc cmdUpdate {name1 name2 ops} {
+ global szCommand szTarget szView szXipc \
+ szTestScript szTestcase szArguments
+ global iSelect
+ global lTestScripts lTestcaseIDs lArguments
+
+ switch $name1 {
+ szArguments {
+ set lArguments($iSelect) $szArguments
+ }
+ szTestcase {
+ set lTestcaseIDs($iSelect) $szTestcase
+ }
+ }
+
+ set szCommand "bluegnu "
+ if {[string compare $szTarget ""] != 0} {
+ append szCommand "\"--target=$szTarget"
+ if {[string compare $szView ""] != 0} {
+ append szCommand " view=$szView"
+ }
+ if {[string compare $szXipc ""] != 0} {
+ append szCommand " XIPCINSTANCE=$szXipc"
+ }
+ append szCommand "\" "
+ }
+ foreach i [lsort -integer [array names lTestScripts]] {
+ # puts "test script index = $i"
+ append szCommand "\"$lTestScripts($i)"
+ if {[string compare $lTestcaseIDs($i) ""] !=0} {
+ append szCommand "\[$lTestcaseIDs($i)\]"
+ }
+ if {[string compare $lArguments($i) ""] != 0} {
+ #puts "szArguments: >$lArguments($i)<"
+ append szCommand "=$lArguments($i)"
+ }
+ append szCommand "\" "
+ }
+ #puts "szCommand: >$szCommand<"
+}
+
+proc setPWD {dir} {
+ global szPWD wPWDmenu wPWDentry env
+ #puts "setPWD $dir:"
+ set szPWD $dir
+ #puts "szPWD:: $szPWD"
+ cd $szPWD
+ catch {setTS "."}
+ if {[string compare $szPWD "/"] != 0} {
+ set szPWD "[exec /bin/sh -c pwd]/"
+ regsub "/tmp_mnt" $szPWD "" szPWD
+ }
+ #puts "szPWD>: $szPWD"
+ $wPWDentry insert [$wPWDentry index end] \
+ [string range $szPWD [$wPWDentry index end] end]
+ #update idletasks
+ $wPWDentry icursor end
+
+ if {[$wPWDmenu index end] > 1} {
+ $wPWDmenu delete 2 end
+ }
+ foreach F [lsort [glob *]] {
+ if [file isdirectory $F] {
+ set szFile [file tail $F]
+ $wPWDmenu add command -label $szFile -command "setPWD $szFile"
+ }
+ }
+}
+
+proc setPWDoverwrite {name1 name2 ops} {
+ global wPWDmenu env
+ catch {upvar #0 $name1 szPWD} szErrMsg
+
+ if {[file isdirectory $szPWD]} {
+ trace vdelete szPWD w setPWDoverwrite
+ setPWD $szPWD
+ trace variable szPWD w setPWDoverwrite
+ } else {
+ set szDir {}
+ foreach F [glob -nocomplain "${szPWD}*"] {
+ if [file isdirectory $F] {
+ lappend szDir $F
+ }
+ }
+ # puts "szDir: >$szDir< [llength $szDir]"
+ if {[llength $szDir] == 1} {
+ set szPWD $szDir
+ setPWD $szPWD
+ } elseif {[llength $szDir] == 0} {
+ bell
+ }
+ }
+}
+
+proc checkDir {szDir} {
+ regsub "^.*/home" $szDir "/home" szDir
+ return $szDir
+}
+
+proc setTS {dir} {
+ global szTS szTSdir wTSmenu wTSentry env wLR
+
+ trace vdelete szTS w setTSoverwrite
+ $wTSentry configure -state normal
+ #puts "setTS $dir: [checkDir [exec /bin/sh -c pwd]]"
+ if {[string compare $dir ".."] == 0} {
+ # puts "##szTS: >$szTS<1"
+ set szTStmp [file dirname $szTS]
+ # puts "##szTS: >[set szTStmp [file dirname $szTS]]<2"
+ $wTSentry delete 0 end
+ # puts "##szTS: >$szTS<3"
+ $wTSentry insert end "$szTStmp/"
+ } elseif {[string compare $dir "."] == 0} {
+ set szTStmp "."
+ $wTSentry delete 0 end
+ $wTSentry insert end "$szTStmp/"
+ catch {listRemoved} szErrMsg
+ #puts "err: $szErrMsg"
+ } else {
+ $wTSentry insert end "$dir/"
+ }
+ set szTmp [$wTSentry get]
+ # puts "####### TS: >[set szTmp [$wTSentry get]]<"
+ #puts "######szTS: >$szTS<"
+ catch {insertTests $wLR}
+
+# update idletasks
+# $wTSentry icursor end
+
+ # puts "TS menu index: [$wTSmenu index end]"
+ if {[$wTSmenu index end] != "none"} {
+ $wTSmenu delete 0 end
+ }
+ if {[string compare $szTmp "./"] != 0} {
+ $wTSmenu add command -label .. \
+ -command "setTS .."
+ }
+ foreach F [lsort [glob -nocomplain ${szTmp}*]] {
+ if [file isdirectory $F] {
+ set szFile [file tail $F]
+ $wTSmenu add command -label $szFile \
+ -command "setTS $szFile"
+ }
+ }
+ $wTSentry configure -state disabled
+ trace variable szTS w setTSoverwrite
+ # puts "TS menu end"
+}
+
+proc setEXPECT {dir} {
+ global szExpect wEXPECTentry env
+ # puts "Set env(EXPECT) to $dir"
+
+ trace vdelete szExpect w setExpectOverwrite
+ $wEXPECTentry configure -state normal
+ $wEXPECTentry delete 0 end
+ $wEXPECTentry insert end "$dir"
+ set szExpect $dir
+ $wEXPECTentry configure -state disabled
+ trace variable szExpect w setExpectOverwrite
+}
+
+proc setTSoverwrite {name1 name2 ops} {
+ global wTSmenu env
+ catch {upvar #0 $name1 szTS} szErrMsg
+
+ # puts "szTS >$szTS<"
+ #setTS $szTS
+}
+
+proc setExpectOverwrite {name1 name2 ops} {
+ #global wEmenu env
+ catch {upvar #0 $name1 szExpect} szErrMsg
+}
+
+proc setExpect {name1 name2 ops} {
+ global szExpect env
+
+ if {[string length $szExpect] == 0} {
+ catch {unset env(EXPECT)}
+ } else {
+ set env(EXPECT) $szExpect
+ }
+}
+
+proc scrollSet {wScroll geoCmd offset size} {
+ if {$offset != 0.0 || $size != 1.0} {
+ eval $geoCmd; # make sure it is visible
+ $wScroll set $offset $size
+ } else {
+ set manager [lindex $geoCmd 0]
+ $manager forget $wScroll; # hide it
+ }
+}
+
+proc scrolledListBox {w args} {
+ frame $w -width 200
+ grid rowconfigure $w 0 -weight 1
+ grid columnconfigure $w 0 -weight 1
+ listbox $w.list \
+ -xscrollcommand [list scrollSet $w.xscroll \
+ [list grid $w.xscroll -row 1 -column 0 -sticky we]] \
+ -yscrollcommand [list scrollSet $w.yscroll \
+ [list grid $w.yscroll -row 0 -column 1 -sticky ns]]
+ eval {$w.list configure} $args
+ scrollbar $w.xscroll -orient horizontal \
+ -command [list $w.list xview]
+ scrollbar $w.yscroll -orient vertical \
+ -command [list $w.list yview]
+ grid $w.list $w.yscroll -sticky news
+ grid $w.xscroll -sticky news
+ return $w.list
+}
+
+proc listTransferSelected {w wL} {
+ global szTS wLR
+ global lTestScripts lTestcaseIDs lArguments
+
+ set i [lindex [$w curselection] 0]
+ set szTest [$w get $i]
+ set szTestScript [file join $szTS $szTest]
+ # puts "selected: >$szTest<"
+ set i [$wL index end]
+ set lTestScripts($i) $szTestScript
+ set lTestcaseIDs($i) ""
+ set lArguments($i) [getArguments $szTestScript]
+ # puts "set lArguments($i) $lArguments($i)"
+ $wL insert end $szTestScript
+ cmdUpdate lArguments {} u
+}
+
+proc listRemoved {} {
+ global lTestScripts lTestcaseIDs lArguments
+ global wLL szCommand
+
+ if [catch {set jMax [$wLL index end]}] return
+ for {set i $jMax} {$i > 0} {incr i -1} {
+ catch {unset lTestScripts($i)}
+ catch {unset lTestcaseIDs($i)}
+ catch {unset lArguments($i)}
+ $wLL delete $i
+ }
+ set szCommand ""
+}
+
+proc listTransferRemoved {w wL} {
+ global lTestScripts lTestcaseIDs lArguments
+
+ set jMax [$w index end]
+ foreach i [lsort -integer -decreasing [$w curselection]] {
+ # puts "i = $i; jMax = $jMax"
+ if {$i + 1 < $jMax} {
+ for {set j $i} {$j < $jMax - 1} {incr j} {
+ set k [expr $j + 1]
+ # puts "j = $j; k = $k"
+ set lTestScripts($j) $lTestScripts($k)
+ set lTestcaseIDs($j) $lTestcaseIDs($k)
+ set lArguments($j) $lArguments($k)
+ unset lTestScripts($k)
+ unset lTestcaseIDs($k)
+ unset lArguments($k)
+ }
+ } else {
+ unset lTestScripts($i)
+ unset lTestcaseIDs($i)
+ unset lArguments($i)
+ }
+ cmdUpdate lArguments {} u
+ $w delete $i
+ }
+}
+
+proc listTransferData {w} {
+ global iSelect szArguments wArguments szTestcase wTestcase
+ global lTestcaseIDs lArguments
+
+ if {! [catch {set iSelect [lindex [$w curselection] 0]}]} {
+ if {[llength iSelect] == 1} {
+ selection own -command [list lostSelection $w] $w
+ # trace vdelete szArguments w cmdUpdate
+ set szArguments $lArguments($iSelect)
+ $wArguments configure -state normal
+ # trace variable szArguments w cmdUpdate
+ # trace vdelete szTestcase w cmdUpdate
+ set szTestcase $lTestcaseIDs($iSelect)
+ $wTestcase configure -state normal
+ # trace variable szTestcase w cmdUpdate
+ cmdUpdate lArguments {} u
+ }
+ }
+}
+
+proc lostSelection {w} {
+ global wArguments wTestcase
+ global iSelect szArguments szTestcase
+
+ set i [$w index active]
+ # $w selection clear $i
+ # trace vdelete szArguments w cmdUpdate
+ # trace vdelete szTestcase w cmdUpdate
+ # set szArguments ""
+ # set szTestcase ""
+ # trace variable szArguments w cmdUpdate
+ # trace variable szTestcase w cmdUpdate
+ $wArguments configure -state disabled
+ $wTestcase configure -state disabled
+}
+
+proc getArguments {ts} {
+ if [file exists $ts] {
+ set F [open $ts r]
+ set bArg 0
+ set szArgs ""
+ while {[gets $F szLine] >= 0} {
+ switch -regexp $szLine {
+ "Mandatory Arguments:" -
+ "Optional Arguments:" {
+ set bArg 1
+ continue
+ }
+ {^# *$} {
+ set bArg 0
+ continue
+ }
+ {^processTestScriptArgs} {
+ break
+ }
+ default {
+ if {$bArg} {
+ set bRepl [regsub {^# *} $szLine {} szArg]
+ if {! $bRepl} {
+ set bRepl [regsub "^\[ \t ]*set *" \
+ $szLine {} szArg]
+ if {$bRepl} {
+ regsub " " $szArg "=" szArg
+ regsub -all {"} $szArg "" szArg
+ regsub -all "\{" $szArg "" szArg
+ regsub -all "\}" $szArg "" szArg
+ }
+ }
+ if {$bRepl} {
+ regsub { *; *#.*$} $szArg {} szArg
+ if {[string first " " $szArg] >= 0} {
+ append szArgs "\{[string trim $szArg]\} "
+ } else {
+ append szArgs "[string trim $szArg] "
+ }
+ }
+ }
+ }
+ }
+ }
+ close $F
+ return [string trim $szArgs]
+ }
+ return ""
+}
+
+proc insertTests {w} {
+ global szTS
+
+ $w delete 0 end
+ foreach F [lsort [glob -nocomplain ${szTS}/*]] {
+ if {! [file isdirectory $F]} {
+ switch -regexp $F {
+ {~$} -
+ {[.]sql$} -
+ {[.]err$} -
+ {[.]log$} -
+ {[.]out$} -
+ {[.]txt$} -
+ {tclIndex$} {
+ # Nothing to be done, will not be added to list
+ }
+ default {
+ set szFile [file tail $F]
+ $w insert end "$szFile"
+ }
+ }
+ }
+ }
+}
diff --git a/contrib/bluegnu2.0.3/config.guess b/contrib/bluegnu2.0.3/config.guess
new file mode 100755
index 0000000..afd200a
--- /dev/null
+++ b/contrib/bluegnu2.0.3/config.guess
@@ -0,0 +1,592 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc.
+#
+# 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.
+
+# Written by Per Bothner <bothner@cygnus.com>.
+# The master version of this file is at the FSF in /home/gd/gnu/lib.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit system type (host/target name).
+#
+# Only a few systems have been added to this list; please add others
+# (but try to keep the structure clean).
+#
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 8/24/94.)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ alpha:OSF1:[VX]*:*)
+ # After 1.2, OSF1 uses "V1.3" for uname -r.
+ # After 4.x, OSF1 uses "X4.x" for uname -r.
+ echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VX]//'`
+ exit 0 ;;
+ alpha:OSF1:*:*)
+ # 1.2 uses "1.2" for uname -r.
+ echo alpha-dec-osf${UNAME_RELEASE}
+ exit 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-cbm-sysv4
+ exit 0;;
+ amiga:NetBSD:*:*)
+ echo m68k-cbm-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ Pyramid*:OSx*:*:*)
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit 0 ;;
+ sun4*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:NetBSD:*:*)
+ echo m68k-atari-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:NetBSD:*:*)
+ echo m68k-sun-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:NetBSD:*:*)
+ echo m68k-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:4*:UMIPS)
+ echo mips-mips-riscos4sysv
+ exit 0 ;;
+ mips:*:5*:RISCos)
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88100 ] ; then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
+ -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit 0 ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i[34]86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ sed 's/^ //' << EOF >dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
+ rm -f dummy.c dummy
+ echo rs6000-ibm-aix3.2.5
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit 0 ;;
+ *:AIX:*:4)
+ if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=4.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 9000/[3478]??:HP-UX:*:*)
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/7?? | 9000/8?[679] ) HP_ARCH=hppa1.1 ;;
+ 9000/8?? ) HP_ARCH=hppa1.0 ;;
+ esac
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ sed 's/^ //' << EOF >dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
+ rm -f dummy.c dummy
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*X-MP:*:*:*)
+ echo xmp-cray-unicos
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY*C90:*:*:*)
+ echo c90-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY-2:*:*:*)
+ echo cray2-cray-unicos
+ exit 0 ;;
+ hp3[0-9][05]:NetBSD:*:*)
+ echo m68k-hp-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ i[34]86:BSD/386:*:* | *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
+ *:NetBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo i386-unknown-cygwin32
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin32
+ exit 0 ;;
+ *:GNU:*:*)
+ echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
+ *:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us.
+ ld_help_string=`ld --help 2>&1`
+ if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i[345]86"; then
+ echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
+ elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then
+ echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
+ elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86coff"; then
+ echo "${UNAME_MACHINE}-unknown-linuxcoff" ; exit 0
+ elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
+ echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
+ elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
+ echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
+ elif test "${UNAME_MACHINE}" = "alpha" ; then
+ echo alpha-unknown-linux ; exit 0
+ else
+ # Either a pre-BFD a.out linker (linuxoldld) or one that does not give us
+ # useful --help. Gcc wants to distinguish between linuxoldld and linuxaout.
+ test ! -d /usr/lib/ldscripts/. \
+ && echo "${UNAME_MACHINE}-unknown-linuxoldld" && exit 0
+ # Determine whether the default compiler is a.out or elf
+ cat >dummy.c <<EOF
+main(argc, argv)
+int argc;
+char *argv[];
+{
+#ifdef __ELF__
+ printf ("%s-unknown-linux\n", argv[1]);
+#else
+ printf ("%s-unknown-linuxaout\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
+ rm -f dummy.c dummy
+ fi ;;
+# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
+# are messed up and put the nodename in both sysname and nodename.
+ i[34]86:DYNIX/ptx:4*:*)
+ echo i386-sequent-sysv4
+ exit 0 ;;
+ i[34]86:*:4.*:* | i[34]86:SYSTEM_V:4.*:*)
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
+ else
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ i[34]86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-unknown-sysv32
+ fi
+ exit 0 ;;
+ Intel:Mach:3*:*)
+ echo i386-unknown-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ M680[234]0:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0)
+ uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4.3 && exit 0 ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m680[234]0:LynxOS:2.[23]*:*)
+ echo m68k-lynx-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ i[34]86:LynxOS:2.[23]*:*)
+ echo i386-lynx-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.[23]*:*)
+ echo sparc-lynx-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.[23]*:*)
+ echo rs6000-lynx-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+cat >dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ printf ("%s-next-nextstep%s\n", __ARCHITECTURE__, version==2 ? "2" : "3");
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-unknown-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+ printf ("vax-dec-bsd\n"); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
+rm -f dummy.c dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ esac
+fi
+
+#echo '(Unable to guess system type)' 1>&2
+
+exit 1
diff --git a/contrib/bluegnu2.0.3/configure b/contrib/bluegnu2.0.3/configure
new file mode 100755
index 0000000..5296de2
--- /dev/null
+++ b/contrib/bluegnu2.0.3/configure
@@ -0,0 +1,974 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.7
+# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+# Copyright (C) 1998 jotOmega dsc, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.7"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=runtest.exp
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+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
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='echo $CPP $CPPFLAGS 1>&5;
+$CPP $CPPFLAGS'
+ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
+${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
+ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
+${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
+
+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
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+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
+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="${IFS}:"
+ for ac_dir in $PATH; 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"
+ test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
+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
+
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if ${CC-cc} -E conftest.c 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
+ if test "${CFLAGS+set}" != set; then
+ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_prog_gcc_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_gcc_g=yes
+else
+ ac_cv_prog_gcc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
+ if test $ac_cv_prog_gcc_g = yes; then
+ CFLAGS="-g -O"
+ else
+ CFLAGS="-O"
+ fi
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+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
+# 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
+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="${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.
+ for ac_prog in ginstall installbsd 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.
+ # OSF/1 installbsd also uses dspmsg, but is usable.
+ :
+ 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_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+subdirs="doc example testsuite"
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+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 |
+ sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
+ >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ 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.7"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@subdirs@%$subdirs%g
+
+CEOF
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust relative srcdir, etc. for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ 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"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
+fi; done
+rm -f conftest.subs
+
+
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+if test "$no_recursion" != yes; then
+
+ # Remove --cache-file and --srcdir arguments so they do not pile up.
+ ac_sub_configure_args=
+ ac_prev=
+ for ac_arg in $ac_configure_args; do
+ if test -n "$ac_prev"; then
+ ac_prev=
+ continue
+ fi
+ case "$ac_arg" in
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ ;;
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ ;;
+ *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
+ esac
+ done
+
+ for ac_config_dir in doc example testsuite; do
+
+ # Do not complain, so a configure script can configure whichever
+ # parts of a large source tree are present.
+ if test ! -d $srcdir/$ac_config_dir; then
+ continue
+ fi
+
+ echo configuring in $ac_config_dir
+
+ case "$srcdir" in
+ .) ;;
+ *)
+ if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
+ else
+ { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
+ fi
+ ;;
+ esac
+
+ ac_popdir=`pwd`
+ cd $ac_config_dir
+
+ case "$srcdir" in
+ .) # No --srcdir option. We are building in place.
+ ac_sub_srcdir=$srcdir ;;
+ /*) # Absolute path.
+ ac_sub_srcdir=$srcdir/$ac_config_dir ;;
+ *) # Relative path.
+ ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
+ esac
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_sub_srcdir/configure; then
+ ac_sub_configure=$ac_sub_srcdir/configure
+ elif test -f $ac_sub_srcdir/configure.in; then
+ ac_sub_configure=$ac_configure
+ else
+ echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
+ ac_sub_configure=
+ fi
+
+ # The recursion is here.
+ if test -n "$ac_sub_configure"; then
+
+ # Make the cache file name correct relative to the subdirectory.
+ # A "../" for each directory in /$ac_config_dir.
+ ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
+ case "$cache_file" in
+ /*) ac_sub_cache_file=$cache_file ;;
+ *) # Relative path.
+ ac_sub_cache_file="$ac_dots$cache_file" ;;
+ esac
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+
+ echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
+ # The eval makes quoting arguments work.
+ if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
+ then :
+ else
+ { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
+ fi
+ fi
+
+ cd $ac_popdir
+ done
+fi
+
diff --git a/contrib/bluegnu2.0.3/configure.in b/contrib/bluegnu2.0.3/configure.in
new file mode 100644
index 0000000..0ebdb7b
--- /dev/null
+++ b/contrib/bluegnu2.0.3/configure.in
@@ -0,0 +1,9 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(runtest.exp)
+
+AC_PROG_CC
+AC_PROG_INSTALL
+
+AC_CONFIG_SUBDIRS(doc example testsuite)
+
+AC_OUTPUT(Makefile)
diff --git a/contrib/bluegnu2.0.3/contents b/contrib/bluegnu2.0.3/contents
new file mode 100644
index 0000000..8adfee3
--- /dev/null
+++ b/contrib/bluegnu2.0.3/contents
@@ -0,0 +1,232 @@
+total 266
+-rw-r--r-- 1 janw users 5396 Sep 19 21:10 Makefile.in
+-rw-r--r-- 1 janw users 8202 Sep 19 21:18 README.bluegnu
+-rw-r--r-- 1 janw users 12903 Aug 3 1998 README.dejagnu
+-rw-r--r-- 1 janw users 284 Aug 3 1998 TODO.dejagnu
+-rw-r--r-- 1 janw users 19640 Aug 3 1998 aclocal.m4
+-rwxr-xr-x 1 janw users 3323 Sep 19 15:37 bluegnu
+-rwxr-xr-x 1 janw users 43 Feb 11 1999 bluegnutk
+-rw-r--r-- 1 janw users 8456 Sep 17 18:17 bluegnutk.itcl
+-rw-r--r-- 1 janw users 839 Feb 11 1999 bluegnutk.rc
+-rw-r--r-- 1 janw users 10554 Sep 17 18:17 bluegnutkUtils.itcl
+-rwxr-xr-- 1 janw users 17007 Aug 3 1998 config.guess
+-rwxr-xr-x 1 janw users 32591 Aug 3 1998 configure
+-rw-r--r-- 1 janw users 179 Aug 3 1998 configure.in
+-rw-r--r-- 1 janw users 0 Sep 19 21:55 contents
+drwxr-xr-x 2 janw users 1024 Sep 19 21:15 contrib
+-rwxr-xr-x 1 janw users 2204 Aug 3 1998 dejagnu
+drwxr-xr-x 2 janw users 1024 Sep 19 21:55 doc
+drwxr-xr-x 3 janw users 1024 Sep 19 21:55 example
+-rwxr-xr-x 1 janw users 4772 Aug 3 1998 install-sh
+drwxr-xr-x 2 janw users 1024 Sep 19 21:15 lib
+-rwxr-xr-x 1 janw users 650 Aug 3 1998 mkinstalldirs
+-rwxr-xr-- 1 janw users 2102 Aug 3 1998 runtest
+-rwxr-xr-- 1 janw users 33061 Aug 3 1998 runtest.exp
+-rw-r--r-- 1 janw users 7843 Aug 3 1998 site.tmpl
+-rw-r--r-- 1 janw users 77247 Aug 3 1998 tcl-mode.el
+drwxr-xr-x 4 janw users 1024 Sep 19 21:15 testsets
+drwxr-xr-x 7 janw users 1024 Sep 19 21:55 testsuite
+
+contrib:
+total 45
+-rw-r--r-- 1 janw users 868 Aug 3 1998 README
+-rwxr-xr-- 1 janw users 1500 Aug 3 1998 test-g++
+-rwxr-xr-- 1 janw users 8256 Aug 3 1998 test-tool
+-rwxr-xr-x 1 janw users 32055 Aug 3 1998 testit
+
+doc:
+total 1867
+-rw-r--r-- 1 janw users 4796 Sep 19 21:10 Makefile.in
+-rw-r--r-- 1 janw users 7917 Sep 19 21:10 README.tex
+-rw-r--r-- 1 janw users 10840 Sep 19 21:16 READMEdvi.dvi
+-rw-r--r-- 1 janw users 52 Sep 19 15:37 READMEdvi.tex
+-rw-r--r-- 1 janw users 23 Sep 19 21:10 READMEdvi.title
+-rw-r--r-- 1 janw users 9344 Sep 19 21:16 READMEtxt.dvi
+-rw-r--r-- 1 janw users 52 Sep 19 15:37 READMEtxt.tex
+-rwxr-xr-x 1 janw users 22137 Aug 3 1998 configure
+-rw-r--r-- 1 janw users 125 Aug 3 1998 configure.in
+-rw-r--r-- 1 janw users 3289 Sep 18 21:42 dejagnu.1
+-rw-r--r-- 1 janw users 263684 Sep 19 21:52 dejagnu.dvi
+-rw-r--r-- 1 janw users 2041 Sep 19 21:52 dejagnu.info
+-rw-r--r-- 1 janw users 49656 Sep 19 21:52 dejagnu.info-1
+-rw-r--r-- 1 janw users 50053 Sep 19 21:52 dejagnu.info-2
+-rw-r--r-- 1 janw users 47866 Sep 19 21:52 dejagnu.info-3
+-rw-r--r-- 1 janw users 651210 Sep 19 21:52 dejagnu.pdf
+-rw-r--r-- 1 janw users 438510 Sep 19 21:52 dejagnu.ps
+-rw-r--r-- 1 janw users 139117 Aug 3 1998 dejagnu.texi
+-rw-r--r-- 1 janw users 11008 Sep 19 21:52 notice.html
+-rw-r--r-- 1 janw users 78227 Sep 19 21:20 notice.pdf
+-rw-r--r-- 1 janw users 95621 Sep 19 21:20 notice.ps
+
+example:
+total 29
+-rw-r--r-- 1 janw users 2297 Feb 11 1999 Makefile.in
+drwxr-xr-x 3 janw users 1024 Sep 19 21:55 calc
+-rwxr-xr-x 1 janw users 23014 Aug 3 1998 configure
+-rw-r--r-- 1 janw users 159 Aug 3 1998 configure.in
+
+example/calc:
+total 37
+-rw-r--r-- 1 janw users 3336 Feb 11 1999 Makefile.in
+-rw-r--r-- 1 janw users 416 Aug 3 1998 calc.1
+-rw-r--r-- 1 janw users 1380 Aug 3 1998 calc.c
+-rw-r--r-- 1 janw users 225 Aug 3 1998 calc.h.in
+-rwxr-xr-x 1 janw users 25611 Aug 3 1998 configure
+-rw-r--r-- 1 janw users 363 Aug 3 1998 configure.in
+drwxr-xr-x 4 janw users 1024 Sep 19 21:15 testsuite
+
+example/calc/testsuite:
+total 2
+drwxr-xr-x 2 janw users 1024 Sep 19 21:15 calc.test
+drwxr-xr-x 2 janw users 1024 Sep 19 21:15 config
+
+example/calc/testsuite/calc.test:
+total 2
+-rw-r--r-- 1 janw users 1151 Aug 3 1998 calc.exp
+
+example/calc/testsuite/config:
+total 1
+-rw-r--r-- 1 janw users 825 Aug 3 1998 unix.exp
+
+lib:
+total 274
+-rw-r--r-- 1 janw users 2776 Sep 18 19:53 BlueGnu_target.itcl
+-rw-r--r-- 1 janw users 2183 Sep 18 19:53 Default_target.itcl
+-rw-r--r-- 1 janw users 5795 Sep 18 19:53 Types.itcl
+-rw-r--r-- 1 janw users 561 Sep 17 18:18 bluegnu.itcl
+-rw-r--r-- 1 janw users 2959 Aug 3 1998 bug.exp
+-rw-r--r-- 1 janw users 5353 Aug 3 1998 debugger.exp
+-rw-r--r-- 1 janw users 1890 Aug 3 1998 dejagnu.itcl
+-rw-r--r-- 1 janw users 31724 Aug 3 1998 dejagnu.tcl
+-rw-r--r-- 1 janw users 27666 Aug 3 1998 dg.exp
+-rw-r--r-- 1 janw users 340 Aug 3 1998 foo.itcl
+-rw-r--r-- 1 janw users 15692 Aug 3 1998 framework.exp
+-rw-r--r-- 1 janw users 6926 Aug 3 1998 libgloss.exp
+-rw-r--r-- 1 janw users 1499 Sep 17 18:18 nonexpect.itcl
+-rw-r--r-- 1 janw users 22986 Aug 3 1998 remote.exp
+-rw-r--r-- 1 janw users 1069 Aug 3 1998 serverUtils.itcl
+-rw-r--r-- 1 janw users 14175 Aug 3 1998 target.exp
+-rw-r--r-- 1 janw users 537 Sep 17 18:18 tclIndex
+-rw-r--r-- 1 janw users 9084 Sep 17 18:18 testSessionApplication.itcl
+-rw-r--r-- 1 janw users 34819 Sep 17 18:18 testSessionClasses.itcl
+-rw-r--r-- 1 janw users 36461 Sep 17 18:18 testSessionFramework.itcl
+-rw-r--r-- 1 janw users 476 Sep 17 18:18 testSessionUtils.itcl
+-rw-r--r-- 1 janw users 5357 Aug 3 1998 udi.exp
+-rw-r--r-- 1 janw users 2923 Aug 3 1998 util-defs.exp
+-rw-r--r-- 1 janw users 11309 Aug 3 1998 utils.exp
+-rw-r--r-- 1 janw users 7377 Aug 3 1998 vrtx.exp
+-rw-r--r-- 1 janw users 7603 Aug 3 1998 vxworks.exp
+
+testsets:
+total 3
+drwxr-xr-x 4 janw users 1024 Sep 19 21:15 BlueGnu
+drwxr-xr-x 3 janw users 1024 Sep 19 21:15 examples
+-rw-r--r-- 1 janw users 190 Sep 18 19:53 tclIndex
+
+testsets/BlueGnu:
+total 29
+-rw-r--r-- 1 janw users 257 Sep 18 19:53 appendQueue.itcl
+-rw-r--r-- 1 janw users 4325 Sep 18 19:53 clone_output.itcl
+-rw-r--r-- 1 janw users 1364 Sep 18 19:53 locateFile.itcl
+-rw-r--r-- 1 janw users 918 Sep 18 19:53 namespaceVariables.itcl
+-rw-r--r-- 1 janw users 152 Sep 18 19:53 prependQueue.itcl
+-rw-r--r-- 1 janw users 686 Sep 18 19:53 runtest.itcl
+-rw-r--r-- 1 janw users 659 Sep 18 19:53 testNaming.itcl
+drwxr-xr-x 2 janw users 1024 Sep 19 21:15 ts001
+drwxr-xr-x 2 janw users 1024 Sep 19 21:15 ts002
+-rw-r--r-- 1 janw users 968 Sep 18 19:53 types.itcl
+-rw-r--r-- 1 janw users 13282 Sep 18 19:53 verbose.itcl
+
+testsets/BlueGnu/ts001:
+total 1
+-rw-r--r-- 1 janw users 20 Sep 18 19:53 A.itcl
+
+testsets/BlueGnu/ts002:
+total 1
+-rw-r--r-- 1 janw users 20 Sep 18 19:53 A.itcl
+
+testsets/examples:
+total 7
+drwxr-xr-x 2 janw users 1024 Sep 19 21:15 lib
+-rw-r--r-- 1 janw users 54 Sep 18 19:53 tc001
+-rw-r--r-- 1 janw users 73 Sep 18 19:53 tc002
+-rw-r--r-- 1 janw users 97 Sep 18 19:53 ts_001
+-rw-r--r-- 1 janw users 181 Sep 18 19:53 ts_002
+-rw-r--r-- 1 janw users 76 Sep 18 19:53 ts_003
+-rw-r--r-- 1 janw users 228 Sep 18 19:53 versionTcl.itcl
+
+testsets/examples/lib:
+total 2
+-rw-r--r-- 1 janw users 1358 Sep 18 19:53 benchmark.itcl
+
+testsuite:
+total 45
+-rw-r--r-- 1 janw users 3155 Sep 18 20:39 Makefile.in
+drwxr-xr-x 3 janw users 1024 Sep 19 21:15 T
+drwxr-xr-x 3 janw users 1024 Sep 19 21:15 bluegnu.all
+drwxr-xr-x 2 janw users 1024 Sep 19 21:15 config
+-rwxr-xr-x 1 janw users 34637 Aug 3 1998 configure
+-rw-r--r-- 1 janw users 166 Aug 3 1998 configure.in
+drwxr-xr-x 2 janw users 1024 Sep 19 21:15 lib
+drwxr-xr-x 2 janw users 1024 Sep 19 21:15 tools
+
+testsuite/T:
+total 10
+-rw-r--r-- 1 janw users 232 Aug 3 1998 env.exp
+-rw-r--r-- 1 janw users 1355 Aug 3 1998 env.iexp
+-rw-r--r-- 1 janw users 129 Aug 3 1998 foo.exp
+drwxr-xr-x 2 janw users 1024 Sep 19 21:15 subT
+-rw-r--r-- 1 janw users 132 Aug 3 1998 test_000.exp
+-rw-r--r-- 1 janw users 484 Aug 3 1998 test_001.exp
+-rw-r--r-- 1 janw users 453 Aug 3 1998 test_002.exp
+-rw-r--r-- 1 janw users 55 Aug 3 1998 test_003.exp
+-rw-r--r-- 1 janw users 34 Aug 3 1998 test_004.exp
+
+testsuite/T/subT:
+total 1
+-rw-r--r-- 1 janw users 391 Aug 3 1998 test_002.exp
+
+testsuite/bluegnu.all:
+total 32
+-rw-r--r-- 1 janw users 2431 Aug 3 1998 clone_output.test
+-rw-r--r-- 1 janw users 2908 Aug 3 1998 config.test
+-rw-r--r-- 1 janw users 1893 Aug 3 1998 default_procs.tcl
+-rw-r--r-- 1 janw users 1580 Aug 3 1998 libs.exp
+-rw-r--r-- 1 janw users 3486 Aug 3 1998 options.exp
+-rw-r--r-- 1 janw users 4938 Aug 3 1998 remote.test
+-rw-r--r-- 1 janw users 407 Aug 3 1998 stats-sub.exp
+-rw-r--r-- 1 janw users 1626 Aug 3 1998 stats.exp
+-rw-r--r-- 1 janw users 6001 Aug 3 1998 target.test
+drwxr-xr-x 4 janw users 1024 Sep 19 21:15 topdir
+-rw-r--r-- 1 janw users 2750 Aug 3 1998 utils.test
+
+testsuite/bluegnu.all/topdir:
+total 2
+drwxr-xr-x 3 janw users 1024 Sep 19 21:15 subdir1
+drwxr-xr-x 2 janw users 1024 Sep 19 21:15 subdir2
+
+testsuite/bluegnu.all/topdir/subdir1:
+total 3
+-rw-r--r-- 1 janw users 31 Aug 3 1998 subfile1
+-rw-r--r-- 1 janw users 32 Aug 3 1998 subfile2
+drwxr-xr-x 2 janw users 1024 Sep 19 21:15 subsubdir1
+
+testsuite/bluegnu.all/topdir/subdir1/subsubdir1:
+total 1
+-rw-r--r-- 1 janw users 32 Aug 3 1998 subsubfile1
+
+testsuite/bluegnu.all/topdir/subdir2:
+total 1
+-rw-r--r-- 1 janw users 32 Aug 3 1998 subfile2
+
+testsuite/config:
+total 2
+-rw-r--r-- 1 janw users 2008 Aug 3 1998 default.exp
+
+testsuite/lib:
+total 5
+-rw-r--r-- 1 janw users 5114 Aug 3 1998 libsup.exp
+
+testsuite/tools:
+total 1
+-rw-r--r-- 1 janw users 609 Aug 3 1998 env.exp
diff --git a/contrib/bluegnu2.0.3/contrib/README b/contrib/bluegnu2.0.3/contrib/README
new file mode 100644
index 0000000..d776f6e
--- /dev/null
+++ b/contrib/bluegnu2.0.3/contrib/README
@@ -0,0 +1,16 @@
+These are "user" contributed scripts that automate testing. These all
+depend on using "make check", so they are included here as an aid to
+helping others automate their own testing. All of these script do
+report filtering on the output from DejaGnu. test-tool and test-g++
+are basically the same script. test-target is the script I use for our
+quarterly release and it is the most sophisticated. It still uses
+"make check" (a make target that start runtest) to produce the
+results, but tests our entire tool chain for native and crosses. It
+also produces a short summary report that gets emailed, as well as
+summary reports. It does regression analysis using the previous test
+run. testit is a very crude and simple Tk GUI for accessing all the
+testing results. Hope these are helpful to anyone, I'd like to collect
+more from the net as they get developed.
+
+ - rob -
+
diff --git a/contrib/bluegnu2.0.3/contrib/test-g++ b/contrib/bluegnu2.0.3/contrib/test-g++
new file mode 100755
index 0000000..3b90e6a
--- /dev/null
+++ b/contrib/bluegnu2.0.3/contrib/test-g++
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+# Default DEVOSRCDIR
+if [ "$DEVOSRCDIR" = "" ]; then
+ DEVOSRCDIR=$HOME/devo ; export DEVOSRCDIR
+fi
+
+# Check DEVOSRCDIR
+if [ ! -d "$DEVOSRCDIR" ]; then
+ echo "$0: no directory $DEVOSRCDIR" >&2
+ exit 2
+fi
+
+# Default DEVOBINDIR
+if [ "$DEVOBINDIR" = "" ]; then
+ CPU=`$DEVOSRCDIR/config.guess`
+ if [ $? != 0 ]; then
+ echo "$0: cannot run config.guess" >&2
+ exit 2
+ fi
+ DEVOBINDIR=$HOME/$CPU ; export DEVOBINDIR
+fi
+
+# Check DEVOBINDIR
+if [ ! -d "$DEVOBINDIR" ]; then
+ echo "$0: no directory $DEVOBINDIR" >&2
+ exit 2
+fi
+
+# Default LOGDIR
+if [ "$LOGDIR" = "" ]; then
+ LOGDIR=$HOME/logs ; export LOGDIR
+fi
+
+# Check LOGDIR
+if [ ! -d "$LOGDIR" ]; then
+ echo "$0: no directory $LOGDIR" >&2
+ exit 2
+fi
+
+cd $LOGDIR || exit 2
+
+sum=g++-`date '+%y%m%d'`
+
+$DEVOSRCDIR/dejagnu/contrib/test-tool g++ > $sum 2>&1
+status=$?
+
+cd $DEVOBINDIR/libg++
+make check >/tmp/clgpp$$ 2>&1
+if [ $? != 0 ]; then
+ cd $LOGDIR
+ echo "" >> $sum
+ echo "libg++ fails to make check:" >> $sum
+ tail -20 /tmp/clgpp$$ >> $sum
+ if [ $status = 0 ]; then
+ status=1
+ fi
+fi
+
+cd $DEVOBINDIR/libio
+make check >/tmp/clgpp$$ 2>&1
+if [ $? != 0 ]; then
+ cd $LOGDIR
+ echo "" >> $sum
+ echo "libio fails to make check:" >> $sum
+ tail -20 /tmp/clgpp$$ >> $sum
+ if [ $status = 0 ]; then
+ status=1
+ fi
+fi
+
+cd $DEVOBINDIR/libstdc++
+make check >/tmp/clgpp$$ 2>&1
+if [ $? != 0 ]; then
+ cd $LOGDIR
+ echo "" >> $sum
+ echo "libstdc++ fails to make check:" >> $sum
+ tail -20 /tmp/clgpp$$ >> $sum
+ if [ $status = 0 ]; then
+ status=1
+ fi
+fi
+
+exit $status
diff --git a/contrib/bluegnu2.0.3/contrib/test-tool b/contrib/bluegnu2.0.3/contrib/test-tool
new file mode 100755
index 0000000..6b79352
--- /dev/null
+++ b/contrib/bluegnu2.0.3/contrib/test-tool
@@ -0,0 +1,346 @@
+#!/bin/sh
+# This script automatically test the given tool with the tool's test cases,
+# reporting anything of interest.
+
+# exits with 1 if there is nothing of interest
+# exits with 0 if there is something interesting
+# exits with 2 if an error occurred
+
+# Syntax: test-tool [-expectedpass] [-keepoutput] [-noupdate] g++|gcc|gdb|...
+#
+# -expectedpass: Turn XFAIL into "pass", XPASS into "fail".
+# The default is XFAIL->fail, XPASS->pass.
+# -keepoutput: Save "make check" output in test-$tool.log.
+# -noupdate: Don't update log files.
+
+# Limitations, don't run this multiple times in one day, unless the -noupdate
+# flag is given.
+
+# Written by Mike Stump <mrs@cygnus.com>
+
+expectedpass=no
+keepoutput=no
+update=yes
+tool=""
+
+for arg in $*
+do
+ case $arg in
+ -expectedpass) expectedpass=yes ;;
+ -keepoutput) keepoutput=yes ;;
+ -noupdate) update=no ;;
+ -*)
+ echo "Usage: [-expectedpass] [-keepoutput] [-noupdate] tool_name" >&2
+ exit 2
+ ;;
+ *)
+ if [ "$tool" != "" ]; then
+ echo "Usage: [-expectedpass] [-keepoutput] [-noupdate] tool_name" >&2
+ exit 2
+ fi
+ tool=$arg
+ ;;
+ esac
+done
+
+# FIXME: It sure would be nice if `testdir' wasn't necessary. :-(
+
+if [ "$tool" = g++ ]; then
+ devoname=gcc
+ checktarget=check-g++
+ testdir=.
+elif [ "$tool" = gcc ]; then
+ devoname=gcc
+ checktarget=check-gcc
+ testdir=.
+elif [ "$tool" = gdb ]; then
+ devoname=gdb
+ checktarget=check
+ testdir=testsuite
+elif [ "$tool" = gas ]; then
+ devoname=gas
+ checktarget=check
+ testdir=testsuite
+elif [ "$tool" = gld -o "$tool" = ld ]; then
+ devoname=ld
+ checktarget=check
+ testdir=.
+elif [ "$tool" = binutils ]; then
+ devoname=binutils
+ checktarget=check
+ testdir=.
+else
+ echo "Only gcc, g++, gdb, gas, gld, and binutils supported." >&2
+ exit 2
+fi
+
+# Default DEVOSRCDIR
+if [ "$DEVOSRCDIR" = "" ]; then
+ DEVOSRCDIR=$HOME/devo ; export DEVOSRCDIR
+fi
+
+# Check DEVOSRCDIR
+if [ ! -d "$DEVOSRCDIR" ]; then
+ echo "$0: no directory $DEVOSRCDIR" >&2
+ exit 2
+fi
+
+# Default DEVOBINDIR
+if [ "$DEVOBINDIR" = "" ]; then
+ CPU=`$DEVOSRCDIR/config.guess`
+ if [ $? != 0 ]; then
+ echo "$0: cannot run config.guess" >&2
+ exit 2
+ fi
+ DEVOBINDIR=$HOME/$CPU ; export DEVOBINDIR
+fi
+
+# Check DEVOBINDIR
+if [ ! -d "$DEVOBINDIR" ]; then
+ echo "$0: no directory $DEVOBINDIR" >&2
+ exit 2
+fi
+
+# Specialize DEVOSRCDIR
+if [ -d "$DEVOSRCDIR/$devoname" ]; then
+ DEVOSRCDIR=$DEVOSRCDIR/$devoname
+else
+ echo "$0: Cannot find source directory." >&2
+ exit 2
+fi
+
+# Default LOGDIR
+if [ "$LOGDIR" = "" ]; then
+ LOGDIR=$HOME/logs ; export LOGDIR
+fi
+
+# Check LOGDIR
+if [ ! -d "$LOGDIR" ]; then
+ echo "$0: no directory $LOGDIR" >&2
+ exit 2
+fi
+
+# Specialize DEVOBINDIR
+if [ -d "$DEVOBINDIR/$devoname" ]; then
+ DEVOBINDIR=$DEVOBINDIR/$devoname
+else
+ echo "$0: Cannot find binary directory." >&2
+ exit 2
+fi
+
+# Binary directory
+cd $DEVOBINDIR || exit 2
+
+TMPDIR=${TMPDIR-/tmp}
+
+tmp=$TMPDIR/$tool-testing.$$a
+tmp1=$TMPDIR/$tool-testing.$$b
+tmp2=$TMPDIR/$tool-testing.$$c
+now_s=$TMPDIR/$tool-testing.$$d
+before_s=$TMPDIR/$tool-testing.$$e
+
+if [ "$keepoutput" = yes ]; then
+ rm -f test-$tool.log
+ make RUNTESTFLAGS="-v -v" $checktarget >test-$tool.log 2>&1
+else
+ make RUNTESTFLAGS="-v -v" $checktarget >/dev/null 2>&1
+fi
+
+# Check for DEJAGNU errors that prevented any output at all.
+if [ ! -f $testdir/$tool.sum ]; then
+ echo "Tests didn't run, probably because of a framework error."
+ if [ "$keepoutput" = yes ]; then
+ echo
+ tail -20 test-$tool.log
+ else
+ echo "Unable to determine why. Rerun with -keepoutput."
+ fi
+ exit 2
+fi
+
+# Canonicalize XFAIL and XPASS so the rest of the script can ignore them.
+if [ "$expectedpass" = yes ]; then
+ sed 's/^XFAIL/PASS(XFAIL)/; s/^XPASS/FAIL(XPASS)/' <$testdir/$tool.sum >$testdir/$tool.1.sum || exit 2
+else
+ sed 's/^XFAIL/FAIL(XFAIL)/; s/^XPASS/PASS(XPASS)/' <$testdir/$tool.sum >$testdir/$tool.1.sum || exit 2
+fi
+mv $testdir/$tool.1.sum $testdir/$tool.sum
+
+todayname=`date '+%y%m%d'`
+if [ "$update" = no ]; then
+ now=$testdir/$tool.sum
+ before=`ls $LOGDIR/$tool-??????.sum | tail -1`
+else
+ mv -f $testdir/$tool.sum $LOGDIR/$tool-$todayname.sum || exit 2
+ mv -f $testdir/$tool.log $LOGDIR/$tool-$todayname.log || exit 2
+
+ now=`ls $LOGDIR/$tool-??????.sum | tail -1`
+ before=`ls $LOGDIR/$tool-??????.sum | tail -2 | sed 1q`
+fi
+trap "rm -f $tmp $tmp1 $tmp2 $now_s $before_s" 0 1 2 3 5 9 13 15
+
+if [ "$before" = "" ]; then
+ echo "Need previous summary to compare against." >&2
+ exit 2
+fi
+
+# Say where the logs are stored so they appear in email messages.
+echo
+echo "Log files: $LOGDIR/$tool-$todayname.*"
+echo
+
+grep '^[PFU][A-Z()]*:' | sort -t ':' +1 "$now" > "$now_s"
+grep '^[PFU][A-Z()]*:' | sort -t ':' +1 "$before" > "$before_s"
+
+grep '^FAIL:' "$now_s" | sed 's/^[^:]*:[ ]*//' >$tmp1
+grep '^PASS' "$before_s" | sed 's/^[^:]*:[ ]*//' | comm -12 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "Tests that now unexpectedly fail, but worked before:"
+ echo
+ cat $tmp2
+ showchangelog=1
+ echo
+fi
+
+grep '^PASS' "$now_s" | sed 's/^[^:]*:[ ]*//' >$tmp1
+grep '^FAIL' "$before_s" | sed 's/^[^:]*:[ ]*//' | comm -12 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "Tests that now work, but didn't before:"
+ echo
+ cat $tmp2
+ echo
+fi
+
+grep '^FAIL:' "$now_s" | sed 's/^[^:]*:[ ]*//' >$tmp1
+grep '^[PFU][A-Z()]*:' "$before_s" | sed 's/^[^:]*:[ ]*//' | comm -23 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "New tests that unexpectedly FAIL:"
+ echo
+ cat $tmp2
+ echo
+fi
+
+grep '^PASS' "$now_s" | sed 's/^[^:]*:[ ]*//' >$tmp1
+grep '^[PFU][A-Z()]*:' "$before_s" | sed 's/^[^:]*:[ ]*//' | comm -23 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "New tests that PASS:"
+ echo
+ cat $tmp2
+ echo
+fi
+
+grep '^[PFU][A-Z()]*:' "$now_s" | sed 's/^[^:]*:[ ]*//' >$tmp1
+grep '^PASS' "$before_s" | sed 's/^[^:]*:[ ]*//' | comm -13 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "Old tests that passed, that have disappeared: (Eeek!)"
+ echo
+ cat $tmp2
+ echo
+fi
+
+grep '^[PFU][A-Z()]*:' "$now_s" | sed 's/^[^:]*:[ ]*//' >$tmp1
+grep '^FAIL' "$before_s" | sed 's/^[^:]*:[ ]*//' | comm -13 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "Old tests that failed, that have disappeared: (Eeek!)"
+ echo
+ cat $tmp2
+ echo
+fi
+
+grep '^FAIL:' "$now_s" | sed 's/^[^:]*:[ ]*//' >$tmp1
+grep '^FAIL' "$before_s" | sed 's/^[^:]*:[ ]*//' | comm -12 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "Tests that still don't work:"
+ echo
+ cat $tmp2
+ echo
+fi
+
+egrep '^(ERROR|WARNING):' "$now" >$tmp1
+
+if grep -s . $tmp1 > /dev/null; then
+ echo "Errors and warnings:"
+ echo
+ cat $tmp1
+ echo
+fi
+
+if [ "$tool" = g++ ]; then
+ if [ -f $DEVOBINDIR/libio/run-make-check ]; then
+ cd $DEVOBINDIR/libio
+ make check >$TMPDIR/clgpp$$ 2>&1
+ if [ $? != 0 ]; then
+ echo
+ echo "libio fails to make check:"
+ tail -20 $TMPDIR/clgpp$$
+ fi
+ fi
+ if [ -f $DEVOBINDIR/libstdc++/run-make-check ]; then
+ cd $DEVOBINDIR/libstdc++
+ make check >$TMPDIR/clgpp$$ 2>&1
+ if [ $? != 0 ]; then
+ echo
+ echo "libstdc++ fails to make check:"
+ tail -20 $TMPDIR/clgpp$$
+ fi
+ fi
+ if [ -f $DEVOBINDIR/libg++/run-make-check ]; then
+ cd $DEVOBINDIR/libg++
+ make check >$TMPDIR/clgpp$$ 2>&1
+ if [ $? != 0 ]; then
+ echo
+ echo "libg++ fails to make check:"
+ tail -20 $TMPDIR/clgpp$$
+ fi
+ fi
+ rm -f $TMPDIR/clgpp$$
+ cd $DEVOBINDIR
+fi
+
+if [ "$devoname" != "" ]; then
+ if [ "$showchangelog" = 1 ]; then
+ echo "Here is what's new in the ChangeLog:"
+ echo
+ diff -c $LOGDIR/$devoname.ChangeLog $DEVOSRCDIR/ChangeLog
+ echo
+ if [ "$tool" = g++ ]; then
+ echo "Here is what's new in the cp/ChangeLog:"
+ echo
+ diff -c $LOGDIR/g++.ChangeLog $DEVOSRCDIR/cp/ChangeLog
+ fi
+ echo
+ fi
+ if [ "$update" != no ]; then
+ # save the old ChangeLog as a reference for next time
+ rm -f $LOGDIR/$devoname.ChangeLog.BAK
+ mv $LOGDIR/$devoname.ChangeLog $LOGDIR/$devoname.ChangeLog.BAK 2>/dev/null
+ cp -p $DEVOSRCDIR/ChangeLog $LOGDIR/$devoname.ChangeLog
+ if [ "$tool" = g++ ]; then
+ rm -f $LOGDIR/g++.ChangeLog.BAK
+ mv $LOGDIR/g++.ChangeLog $LOGDIR/g++.ChangeLog.BAK 2>/dev/null
+ cp -p $DEVOSRCDIR/cp/ChangeLog $LOGDIR/g++.ChangeLog
+ fi
+ fi
+fi
+
+diff $before $now | grep -s . >/dev/null
+if [ $? = 0 ]; then
+ echo "Details:"
+ echo
+ diff $before $now
+ echo
+fi
diff --git a/contrib/bluegnu2.0.3/contrib/testit b/contrib/bluegnu2.0.3/contrib/testit
new file mode 100755
index 0000000..e866aa6
--- /dev/null
+++ b/contrib/bluegnu2.0.3/contrib/testit
@@ -0,0 +1,1149 @@
+#!/usr/latest/bin/wish -f
+# Program: testit
+# Tcl version: 7.2 (Tcl/Tk/XF)
+# Tk version: 3.5
+# XF version: 2.2
+#
+
+
+# procedure to show window .
+proc ShowWindow. {args} {# xf ignore me 7
+
+ # Window manager configurations
+ global tkVersion
+ wm positionfrom . user
+ wm sizefrom . ""
+ wm maxsize . 1152 900
+ wm title . {xf}
+
+ # bindings
+ bind . <Button-3> {MenuPopupPost .frame0.menubutton3.m.menu4 %X %Y}
+ bind . <ButtonRelease-3> {MenuPopupRelease .frame0.menubutton3.m.menu4 %W}
+
+ # build widget .frame0
+ frame .frame0 \
+ -background {white} \
+ -borderwidth {2} \
+ -relief {raised}
+
+ # build widget .frame0.menubutton0
+ menubutton .frame0.menubutton0 \
+ -background {white} \
+ -foreground {black} \
+ -menu {.frame0.menubutton0.m} \
+ -text {Summaries}
+
+ # build widget .frame0.menubutton0.m
+ menu .frame0.menubutton0.m \
+ -background {white} \
+ -foreground {black}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/gcc.sum
+
+} \
+ -label {Gcc}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/g++.sum
+
+} \
+ -label {G++}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/gdb.sum
+
+} \
+ -label {Gdb}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/gas.sum
+
+} \
+ -label {Gas}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/binutils.sum
+
+} \
+ -label {Binutils}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/runtest.sum
+
+} \
+ -label {Runtest}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/tcl.sum
+
+} \
+ -label {Tcl}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/expect.sum
+
+} \
+ -label {Expect}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/libg++.sum
+
+} \
+ -label {Libg++}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/libio.sum
+
+} \
+ -label {Libio}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/libm.sum
+
+} \
+ -label {Libm}
+
+ # build widget .frame0.menubutton1
+ menubutton .frame0.menubutton1 \
+ -background {white} \
+ -foreground {black} \
+ -menu {.frame0.menubutton1.m} \
+ -text {Misc}
+
+ # build widget .frame0.menubutton1.m
+ menu .frame0.menubutton1.m \
+ -background {white} \
+ -foreground {black}
+ .frame0.menubutton1.m add command \
+ -command {EndSrc
+destroy .} \
+ -label {Exit}
+ .frame0.menubutton1.m add command \
+ -command {.frame6.frame.text2 delete 0.0 end} \
+ -label {Clear window}
+ .frame0.menubutton1.m add command \
+ -command {dialogbox} \
+ -label {Editor}
+ .frame0.menubutton1.m add command \
+ -command {.frame6.frame.text2 insert 0.0 "Top of tree is $testbase\n"} \
+ -label {Show filename}
+
+ # build widget .frame0.menubutton3
+ menubutton .frame0.menubutton3 \
+ -background {white} \
+ -foreground {black} \
+ -menu {.frame0.menubutton3.m} \
+ -text {Host}
+
+ # build widget .frame0.menubutton3.m
+ menu .frame0.menubutton3.m \
+ -background {white} \
+ -foreground {black}
+ .frame0.menubutton3.m add command \
+ -command {set host "alpha-dec-osf1.3"} \
+ -label {alpha-dec-osf1.3}
+ .frame0.menubutton3.m add command \
+ -command {set host "hppa1.1-hp-hpux"} \
+ -label {hppa1.1-hp-hpux}
+ .frame0.menubutton3.m add command \
+ -command {set host "i386-unknown-sysv4.2"} \
+ -label {i386-unknown-sysv4.2}
+ .frame0.menubutton3.m add command \
+ -command {set host "m68k-hp-hpux"} \
+ -label {m68k-hp-hpux}
+ .frame0.menubutton3.m add command \
+ -command {set host "m68k-sun-sunos4.1.1"} \
+ -label {m68k-sun-sunos4.1.1}
+ .frame0.menubutton3.m add command \
+ -command {set host "mips-dec-ultrix4.2"} \
+ -label {mips-dec-ultrix4.2}
+ .frame0.menubutton3.m add command \
+ -command {set host "mips-sgi-irix4.0.5H"} \
+ -label {mips-sgi-irix4.0.5H}
+ .frame0.menubutton3.m add command \
+ -command {set host "rs6000-ibm-aix3.2"} \
+ -label {rs6000-ibm-aix3.2}
+ .frame0.menubutton3.m add command \
+ -command {set host "sparc-sun-solaris2.3"} \
+ -label {sparc-sun-solaris2.3}
+ .frame0.menubutton3.m add command \
+ -command {set host "sparc-sun-sunos4.1.3"} \
+ -label {sparc-sun-sunos4.1.3}
+
+ # build widget .frame0.menubutton2
+ menubutton .frame0.menubutton2 \
+ -background {white} \
+ -foreground {black} \
+ -menu {.frame0.menubutton2.m} \
+ -text {Target}
+
+ # build widget .frame0.menubutton2.m
+ menu .frame0.menubutton2.m \
+ -background {white} \
+ -foreground {black}
+ .frame0.menubutton2.m add command \
+ -command {set target "a29k-amd-udi"} \
+ -label {a29k-amd-udi}
+ .frame0.menubutton2.m add command \
+ -command {set target "h8300-hms"} \
+ -label {h8300-hms}
+ .frame0.menubutton2.m add command \
+ -command {set target "i386-aout"} \
+ -label {i386-aout}
+ .frame0.menubutton2.m add command \
+ -command {set target "i386-lynx"} \
+ -label {i386-lynx}
+ .frame0.menubutton2.m add command \
+ -command {set target "i960-intel-nindy"} \
+ -label {i960-intel-nindy}
+ .frame0.menubutton2.m add command \
+ -command {set target "i960-vxwork"} \
+ -label {i960-vxworks}
+ .frame0.menubutton2.m add command \
+ -command {set target "m68k-aout"} \
+ -label {m68k-aout}
+ .frame0.menubutton2.m add command \
+ -command {set target "m68k-coff"} \
+ -label {m68k-coff}
+ .frame0.menubutton2.m add command \
+ -command {set target "m68k-lynx"} \
+ -label {m68k-lynx}
+ .frame0.menubutton2.m add command \
+ -command {set target "m68k-vxworks"} \
+ -label {m68k-vxworks}
+ .frame0.menubutton2.m add command \
+ -command {set target "mips-idt-ecoff"} \
+ -label {mips-idt-ecoff}
+ .frame0.menubutton2.m add command \
+ -command {set target "sh-hms"} \
+ -label {sh-hms}
+ .frame0.menubutton2.m add command \
+ -command {set target "sparc-aout"} \
+ -label {sparc-aout}
+ .frame0.menubutton2.m add command \
+ -command {set target "sparc-sun-sunos4.1.3"} \
+ -label {sparc-sun-sunos4.1.3}
+ .frame0.menubutton2.m add command \
+ -command {set target "sparc-vxworks"} \
+ -label {sparc-vxworks}
+ .frame0.menubutton2.m add command \
+ -command {set target "sparclite-aout"} \
+ -label {sparclite-aout}
+ .frame0.menubutton2.m add command \
+ -command {set target "sparclite-coff"} \
+ -label {sparclite-coff}
+ .frame0.menubutton2.m add command \
+ -command {set target "hppa1.1-hp-hpux"} \
+ -label {hppa1.1-hp-hpux}
+ .frame0.menubutton2.m add command \
+ -command {set target "i386-unknown-sysv4.2"} \
+ -label {i386-unknown-sysv4.2}
+ .frame0.menubutton2.m add command \
+ -command {set target "m68k-hp-hpux"} \
+ -label {m68k-hp-hpux}
+ .frame0.menubutton2.m add command \
+ -command {set target "m68k-sun-sunos4.1.1"} \
+ -label {m68k-sun-sunos4.1.1}
+ .frame0.menubutton2.m add command \
+ -command {set target "mips-dec-ultrix4.2"} \
+ -label {mips-dec-ultrix4.2}
+ .frame0.menubutton2.m add command \
+ -command {set target "mips-sgi-irix4.0.5H"} \
+ -label {mips-sgi-irix4.0.5H}
+ .frame0.menubutton2.m add command \
+ -command {set target "rs6000-ibm-aix3.2"} \
+ -label {rs6000-ibm-aix3.2}
+ .frame0.menubutton2.m add command \
+ -command {set target "sparc-sun-solaris2.3"} \
+ -label {sparc-sun-solaris2.3}
+
+ # build widget .frame0.menubutton9
+ menubutton .frame0.menubutton9 \
+ -background {white} \
+ -foreground {black} \
+ -menu {.frame0.menubutton9.m} \
+ -text {Results}
+
+ # build widget .frame0.menubutton9.m
+ menu .frame0.menubutton9.m \
+ -background {white} \
+ -foreground {black}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/gcc
+
+} \
+ -label {Gcc}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/g++
+
+} \
+ -label {G++}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/gdb
+
+} \
+ -label {Gdb}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/gas
+
+} \
+ -label {Gas}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/binutils
+
+} \
+ -label {Binutils}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/runtest
+} \
+ -label {Runtest}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/tcl
+
+} \
+ -label {Tcl}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/expect
+
+} \
+ -label {Expect}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/libg++
+
+} \
+ -label {Libg++}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/libio
+} \
+ -label {Libio}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/libm
+
+} \
+ -label {Libm}
+
+ # build widget .frame0.menubutton10
+ menubutton .frame0.menubutton10 \
+ -background {white} \
+ -foreground {black} \
+ -menu {.frame0.menubutton10.m} \
+ -text {Logs}
+
+ # build widget .frame0.menubutton10.m
+ menu .frame0.menubutton10.m \
+ -background {white} \
+ -foreground {black}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/gcc.log
+
+} \
+ -label {Gcc}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/g++.log
+
+} \
+ -label {G++}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/gdb.log
+
+} \
+ -label {Gdb}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/gas.log
+
+} \
+ -label {Gas}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/binutils.log
+
+} \
+ -label {Binutils}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/runtest.log
+
+} \
+ -label {Runtest}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/tcl.log
+
+} \
+ -label {Tcl}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/expect.log
+
+} \
+ -label {Expect}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/libg++.log
+
+} \
+ -label {Libg++}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/libio.log
+
+} \
+ -label {Libio}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/libm.log
+
+} \
+ -label {Libm}
+
+ # pack widget .frame0
+ pack append .frame0 \
+ .frame0.menubutton0 {left frame center} \
+ .frame0.menubutton1 {right frame center} \
+ .frame0.menubutton3 {left frame center} \
+ .frame0.menubutton2 {left frame center} \
+ .frame0.menubutton9 {left frame center} \
+ .frame0.menubutton10 {left frame center}
+
+ # build widget .frame1
+ frame .frame1 \
+ -background {white} \
+ -borderwidth {2} \
+ -relief {raised}
+
+ # build widget .frame1.message3
+ message .frame1.message3 \
+ -aspect {1500} \
+ -background {white} \
+ -borderwidth {0} \
+ -foreground {black} \
+ -padx {5} \
+ -pady {2} \
+ -relief {raised} \
+ -text {sparc-sun-sunos4.1.3} \
+ -textvariable {host}
+
+ # build widget .frame1.message4
+ message .frame1.message4 \
+ -aspect {1500} \
+ -background {white} \
+ -borderwidth {0} \
+ -foreground {black} \
+ -padx {5} \
+ -pady {2} \
+ -relief {raised} \
+ -text {sparc-sun-sunos4.1.3} \
+ -textvariable {target}
+
+ # pack widget .frame1
+ pack append .frame1 \
+ .frame1.message3 {left frame center} \
+ .frame1.message4 {right frame center}
+
+ # build widget .frame6
+ frame .frame6 \
+ -background {white} \
+ -borderwidth {2} \
+ -relief {raised}
+
+ # build widget .frame6.frame
+ frame .frame6.frame \
+ -background {white} \
+ -relief {raised}
+
+ # build widget .frame6.frame.scrollbar1
+ scrollbar .frame6.frame.scrollbar1 \
+ -background {white} \
+ -command {.frame6.frame.text2 yview} \
+ -foreground {black} \
+ -relief {raised}
+
+ # build widget .frame6.frame.text2
+ text .frame6.frame.text2 \
+ -background {white} \
+ -borderwidth {2} \
+ -foreground {black} \
+ -relief {raised} \
+ -wrap {word} \
+ -yscrollcommand {.frame6.frame.scrollbar1 set}
+
+ # pack widget .frame6.frame
+ pack append .frame6.frame \
+ .frame6.frame.scrollbar1 {left frame center filly} \
+ .frame6.frame.text2 {top frame center expand fill}
+
+ # pack widget .frame6
+ pack append .frame6 \
+ .frame6.frame {top frame center fill}
+
+ # pack widget .
+ pack append . \
+ .frame0 {top frame center fillx} \
+ .frame1 {bottom frame center fillx} \
+ .frame6 {top frame center expand fill}
+
+ .frame6.frame.text2 insert end {}
+
+
+
+ if {"[info procs XFEdit]" != ""} {
+ catch "XFMiscBindWidgetTree ."
+ after 2 "catch {XFEditSetShowWindows}"
+ }
+}
+
+
+# Procedure: Alias
+if {"[info procs Alias]" == ""} {
+proc Alias { args} {
+# xf ignore me 7
+##########
+# Procedure: Alias
+# Description: establish an alias for a procedure
+# Arguments: args - no argument means that a list of all aliases
+# is returned. Otherwise the first parameter is
+# the alias name, and the second parameter is
+# the procedure that is aliased.
+# Returns: nothing, the command that is bound to the alias or a
+# list of all aliases - command pairs.
+# Sideeffects: internalAliasList is updated, and the alias
+# proc is inserted
+##########
+ global internalAliasList
+
+ if {[llength $args] == 0} {
+ return $internalAliasList
+ } {
+ if {[llength $args] == 1} {
+ set xfTmpIndex [lsearch $internalAliasList "[lindex $args 0] *"]
+ if {$xfTmpIndex != -1} {
+ return [lindex [lindex $internalAliasList $xfTmpIndex] 1]
+ }
+ } {
+ if {[llength $args] == 2} {
+ eval "proc [lindex $args 0] {args} {#xf ignore me 4
+return \[eval \"[lindex $args 1] \$args\"\]}"
+ set xfTmpIndex [lsearch $internalAliasList "[lindex $args 0] *"]
+ if {$xfTmpIndex != -1} {
+ set internalAliasList [lreplace $internalAliasList $xfTmpIndex $xfTmpIndex "[lindex $args 0] [lindex $args 1]"]
+ } {
+ lappend internalAliasList "[lindex $args 0] [lindex $args 1]"
+ }
+ } {
+ error "Alias: wrong number or args: $args"
+ }
+ }
+ }
+}
+}
+
+
+# Procedure: GetSelection
+if {"[info procs GetSelection]" == ""} {
+proc GetSelection {} {
+# xf ignore me 7
+##########
+# Procedure: GetSelection
+# Description: get current selection
+# Arguments: none
+# Returns: none
+# Sideeffects: none
+##########
+
+ # the save way
+ set xfSelection ""
+ catch "selection get" xfSelection
+ if {"$xfSelection" == "selection doesn't exist or form \"STRING\" not defined"} {
+ return ""
+ } {
+ return $xfSelection
+ }
+}
+}
+
+
+# Procedure: MenuPopupAdd
+if {"[info procs MenuPopupAdd]" == ""} {
+proc MenuPopupAdd { xfW xfButton xfMenu {xfModifier ""} {xfCanvasTag ""}} {
+# xf ignore me 7
+# the popup menu handling is from (I already gave up with popup handling :-):
+#
+# Copyright 1991,1992 by James Noble.
+# Everyone is granted permission to copy, modify and redistribute.
+# This notice must be preserved on all copies or derivates.
+#
+##########
+# Procedure: MenuPopupAdd
+# Description: attach a popup menu to widget
+# Arguments: xfW - the widget
+# xfButton - the button we use
+# xfMenu - the menu to attach
+# {xfModifier} - a optional modifier
+# {xfCanvasTag} - a canvas tagOrId
+# Returns: none
+# Sideeffects: none
+##########
+ global tk_popupPriv
+
+ set tk_popupPriv($xfMenu,focus) ""
+ set tk_popupPriv($xfMenu,grab) ""
+ if {"$xfModifier" != ""} {
+ set press "$xfModifier-"
+ set motion "$xfModifier-"
+ set release "Any-"
+ } {
+ set press ""
+ set motion ""
+ set release ""
+ }
+
+ bind $xfMenu "<${motion}B${xfButton}-Motion>" "MenuPopupMotion $xfMenu %W %X %Y"
+ bind $xfMenu "<${release}ButtonRelease-${xfButton}>" "MenuPopupRelease $xfMenu %W"
+ if {"$xfCanvasTag" == ""} {
+ bind $xfW "<${press}ButtonPress-${xfButton}>" "MenuPopupPost $xfMenu %X %Y"
+ bind $xfW "<${release}ButtonRelease-${xfButton}>" "MenuPopupRelease $xfMenu %W"
+ } {
+ $xfW bind $xfCanvasTag "<${press}ButtonPress-${xfButton}>" "MenuPopupPost $xfMenu %X %Y"
+ $xfW bind $xfCanvasTag "<${release}ButtonRelease-${xfButton}>" "MenuPopupRelease $xfMenu %W"
+ }
+}
+}
+
+
+# Procedure: MenuPopupMotion
+if {"[info procs MenuPopupMotion]" == ""} {
+proc MenuPopupMotion { xfMenu xfW xfX xfY} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupMotion
+# Description: handle the popup menu motion
+# Arguments: xfMenu - the topmost menu
+# xfW - the menu
+# xfX - the root x coordinate
+# xfY - the root x coordinate
+# Returns: none
+# Sideeffects: none
+##########
+ global tk_popupPriv
+
+ if {"[info commands $xfW]" != "" && [winfo ismapped $xfW] &&
+ "[winfo class $xfW]" == "Menu" &&
+ [info exists tk_popupPriv($xfMenu,focus)] &&
+ "$tk_popupPriv($xfMenu,focus)" != "" &&
+ [info exists tk_popupPriv($xfMenu,grab)] &&
+ "$tk_popupPriv($xfMenu,grab)" != ""} {
+ set xfPopMinX [winfo rootx $xfW]
+ set xfPopMaxX [expr $xfPopMinX+[winfo width $xfW]]
+ if {$xfX >= $xfPopMinX && $xfX <= $xfPopMaxX} {
+ $xfW activate @[expr $xfY-[winfo rooty $xfW]]
+ if {![catch "$xfW entryconfig @[expr $xfY-[winfo rooty $xfW]] -menu" result]} {
+ if {"[lindex $result 4]" != ""} {
+ foreach binding [bind $xfMenu] {
+ bind [lindex $result 4] $binding [bind $xfMenu $binding]
+ }
+ }
+ }
+ } {
+ $xfW activate none
+ }
+ }
+}
+}
+
+
+# Procedure: MenuPopupPost
+if {"[info procs MenuPopupPost]" == ""} {
+proc MenuPopupPost { xfMenu xfX xfY} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupPost
+# Description: post the popup menu
+# Arguments: xfMenu - the menu
+# xfX - the root x coordinate
+# xfY - the root x coordinate
+# Returns: none
+# Sideeffects: none
+##########
+ global tk_popupPriv
+
+ if {"[info commands $xfMenu]" != ""} {
+ if {![info exists tk_popupPriv($xfMenu,focus)]} {
+ set tk_popupPriv($xfMenu,focus) [focus]
+ } {
+ if {"$tk_popupPriv($xfMenu,focus)" == ""} {
+ set tk_popupPriv($xfMenu,focus) [focus]
+ }
+ }
+ set tk_popupPriv($xfMenu,grab) $xfMenu
+
+ catch "$xfMenu activate none"
+ catch "$xfMenu post $xfX $xfY"
+ catch "focus $xfMenu"
+ catch "grab -global $xfMenu"
+ }
+}
+}
+
+
+# Procedure: MenuPopupRelease
+if {"[info procs MenuPopupRelease]" == ""} {
+proc MenuPopupRelease { xfMenu xfW} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupRelease
+# Description: remove the popup menu
+# Arguments: xfMenu - the topmost menu widget
+# xfW - the menu widget
+# Returns: none
+# Sideeffects: none
+##########
+ global tk_popupPriv
+ global tkVersion
+
+ if {"[info commands $xfW]" != "" && [winfo ismapped $xfW] &&
+ "[winfo class $xfW]" == "Menu" &&
+ [info exists tk_popupPriv($xfMenu,focus)] &&
+ "$tk_popupPriv($xfMenu,focus)" != "" &&
+ [info exists tk_popupPriv($xfMenu,grab)] &&
+ "$tk_popupPriv($xfMenu,grab)" != ""} {
+ if {$tkVersion >= 3.0} {
+ catch "grab release $tk_popupPriv($xfMenu,grab)"
+ } {
+ catch "grab none"
+ }
+ catch "focus $tk_popupPriv($xfMenu,focus)"
+ set tk_popupPriv($xfMenu,focus) ""
+ set tk_popupPriv($xfMenu,grab) ""
+ if {"[$xfW index active]" != "none"} {
+ $xfW invoke active; catch "$xfMenu unpost"
+ }
+ }
+ catch "$xfMenu unpost"
+}
+}
+
+
+# Procedure: NoFunction
+if {"[info procs NoFunction]" == ""} {
+proc NoFunction { args} {
+# xf ignore me 7
+##########
+# Procedure: NoFunction
+# Description: do nothing (especially with scales and scrollbars)
+# Arguments: args - a number of ignored parameters
+# Returns: none
+# Sideeffects: none
+##########
+}
+}
+
+
+# Procedure: SN
+if {"[info procs SN]" == ""} {
+proc SN { {xfName ""}} {
+# xf ignore me 7
+##########
+# Procedure: SN
+# Description: map a symbolic name to the widget path
+# Arguments: xfName
+# Returns: the symbolic name
+# Sideeffects: none
+##########
+
+ SymbolicName $xfName
+}
+}
+
+
+# Procedure: SymbolicName
+if {"[info procs SymbolicName]" == ""} {
+proc SymbolicName { {xfName ""}} {
+# xf ignore me 7
+##########
+# Procedure: SymbolicName
+# Description: map a symbolic name to the widget path
+# Arguments: xfName
+# Returns: the symbolic name
+# Sideeffects: none
+##########
+
+ global symbolicName
+
+ if {"$xfName" != ""} {
+ set xfArrayName ""
+ append xfArrayName symbolicName ( $xfName )
+ if {![catch "set \"$xfArrayName\"" xfValue]} {
+ return $xfValue
+ } {
+ if {"[info commands XFProcError]" != ""} {
+ XFProcError "Unknown symbolic name:\n$xfName"
+ } {
+ puts stderr "XF error: unknown symbolic name:\n$xfName"
+ }
+ }
+ }
+ return ""
+}
+}
+
+
+# Procedure: Unalias
+if {"[info procs Unalias]" == ""} {
+proc Unalias { aliasName} {
+# xf ignore me 7
+##########
+# Procedure: Unalias
+# Description: remove an alias for a procedure
+# Arguments: aliasName - the alias name to remove
+# Returns: none
+# Sideeffects: internalAliasList is updated, and the alias
+# proc is removed
+##########
+ global internalAliasList
+
+ set xfIndex [lsearch $internalAliasList "$aliasName *"]
+ if {$xfIndex != -1} {
+ rename $aliasName ""
+ set internalAliasList [lreplace $internalAliasList $xfIndex $xfIndex]
+ }
+}
+}
+
+
+# Procedure: getbase
+proc getbase {} {
+ global env
+ global testbase
+ if [info exists env(TESTBASE)] then {
+ set testbase $env(TESTBASE)
+ } else {
+ set testbase /lisa/test/rob
+ }
+ return $testbase
+}
+
+
+# Procedure: getresult
+proc getresult { name} {
+set tmp "[lsort [glob -nocomplain $name-results-??????-????]]"
+set tmp [lindex $tmp [expr [llength $tmp] - 1]]
+if [string match "" $tmp] then {
+ .frame6.frame.text2 delete 0.0 end
+ .frame6.frame.text2 insert 0.0 "Couldn't find results for: $name\n"
+ return
+} else {
+ return [loadfile $tmp]
+}
+}
+
+# Procedure: dialogbox
+proc dialogbox {} {
+ set w .frame6.top2
+ catch {destroy $w}
+ catch {destroy $w.e1}
+ toplevel $w
+# dpos $w
+ wm title $w "Change Editor"
+ wm iconname $w "Entries"
+ message $w.msg -font -Adobe-times-medium-r-normal--*-180* -aspect 200 \
+ -text "Hey Now. Click the \"OK\" button when you've seen enough."
+ frame $w.frame -borderwidth 10
+ button $w.ok -text OK -command "destroy $w"
+ pack $w.msg $w.frame $w.ok -side top -fill both
+
+ entry $w.frame.e1 -relief sunken -textvariable editor
+ pack $w.frame.e1 -side top -pady 5 -fill x
+ bind $w.frame.e1 <Return> "destroy $w"
+}
+
+# Procedure: loadfile
+proc loadfile { name} {
+if ![file exists $name] then {
+ .frame6.frame.text2 delete 0.0 end
+ .frame6.frame.text2 insert 0.0 "Couldn't find:\t$name\n"
+ return
+}
+
+global editor
+if [info exists editor] then {
+ if ![string match "" $editor] then {
+ catch "exec $editor $name&" tmp
+ if [info exists tmp] then {
+ .frame6.frame.text2 delete 0.0 end
+ .frame6.frame.text2 insert 0.0 "Editor returned $tmp\n"
+ }
+ }
+}
+.frame6.frame.text2 delete 0.0 end
+set fd [open $name r]
+while { [gets $fd line]>=0 } {
+.frame6.frame.text2 insert end "$line\n"
+.frame6.frame.text2 mark set insert 0.0
+}
+close $fd
+unset fd
+}
+
+
+
+# application parsing procedure
+proc XFLocalParseAppDefs {xfAppDefFile} {
+ global xfAppDefaults
+
+ # basically from: Michael Moore
+ if {[file exists $xfAppDefFile] &&
+ [file readable $xfAppDefFile] &&
+ "[file type $xfAppDefFile]" == "link"} {
+ catch "file type $xfAppDefFile" xfType
+ while {"$xfType" == "link"} {
+ if {[catch "file readlink $xfAppDefFile" xfAppDefFile]} {
+ return
+ }
+ catch "file type $xfAppDefFile" xfType
+ }
+ }
+ if {!("$xfAppDefFile" != "" &&
+ [file exists $xfAppDefFile] &&
+ [file readable $xfAppDefFile] &&
+ "[file type $xfAppDefFile]" == "file")} {
+ return
+ }
+ if {![catch "open $xfAppDefFile r" xfResult]} {
+ set xfAppFileContents [read $xfResult]
+ close $xfResult
+ foreach line [split $xfAppFileContents "\n"] {
+ # backup indicates how far to backup. It applies to the
+ # situation where a resource name ends in . and when it
+ # ends in *. In the second case you want to keep the *
+ # in the widget name for pattern matching, but you want
+ # to get rid of the . if it is the end of the name.
+ set backup -2
+ set line [string trim $line]
+ if {[string index $line 0] == "#" || "$line" == ""} {
+ # skip comments and empty lines
+ continue
+ }
+ set list [split $line ":"]
+ set resource [string trim [lindex $list 0]]
+ set i [string last "." $resource]
+ set j [string last "*" $resource]
+ if {$j > $i} {
+ set i $j
+ set backup -1
+ }
+ incr i
+ set name [string range $resource $i end]
+ incr i $backup
+ set widname [string range $resource 0 $i]
+ set value [string trim [lindex $list 1]]
+ if {"$widname" != "" && "$widname" != "*"} {
+ # insert the widget and resourcename to the application
+ # defaults list.
+ if {![info exists xfAppDefaults]} {
+ set xfAppDefaults ""
+ }
+ lappend xfAppDefaults [list $widname [string tolower $name] $value]
+ }
+ }
+ }
+}
+
+# application loading procedure
+proc XFLocalLoadAppDefs {{xfClasses ""} {xfPriority "startupFile"} {xfAppDefFile ""}} {
+ global env
+
+ if {"$xfAppDefFile" == ""} {
+ set xfFileList ""
+ if {[info exists env(XUSERFILESEARCHPATH)]} {
+ append xfFileList [split $env(XUSERFILESEARCHPATH) :]
+ }
+ if {[info exists env(XAPPLRESDIR)]} {
+ append xfFileList [split $env(XAPPLRESDIR) :]
+ }
+ if {[info exists env(XFILESEARCHPATH)]} {
+ append xfFileList [split $env(XFILESEARCHPATH) :]
+ }
+ append xfFileList " /usr/lib/X11/app-defaults"
+ append xfFileList " /usr/X11/lib/X11/app-defaults"
+
+ foreach xfCounter1 $xfClasses {
+ foreach xfCounter2 $xfFileList {
+ set xfPathName $xfCounter2
+ if {[regsub -all "%N" "$xfPathName" "$xfCounter1" xfResult]} {
+ set xfPathName $xfResult
+ }
+ if {[regsub -all "%T" "$xfPathName" "app-defaults" xfResult]} {
+ set xfPathName $xfResult
+ }
+ if {[regsub -all "%S" "$xfPathName" "" xfResult]} {
+ set xfPathName $xfResult
+ }
+ if {[regsub -all "%C" "$xfPathName" "" xfResult]} {
+ set xfPathName $xfResult
+ }
+ if {[file exists $xfPathName] &&
+ [file readable $xfPathName] &&
+ ("[file type $xfPathName]" == "file" ||
+ "[file type $xfPathName]" == "link")} {
+ catch "option readfile $xfPathName $xfPriority"
+ if {"[info commands XFParseAppDefs]" != ""} {
+ XFParseAppDefs $xfPathName
+ } {
+ if {"[info commands XFLocalParseAppDefs]" != ""} {
+ XFLocalParseAppDefs $xfPathName
+ }
+ }
+ } {
+ if {[file exists $xfCounter2/$xfCounter1] &&
+ [file readable $xfCounter2/$xfCounter1] &&
+ ("[file type $xfCounter2/$xfCounter1]" == "file" ||
+ "[file type $xfCounter2/$xfCounter1]" == "link")} {
+ catch "option readfile $xfCounter2/$xfCounter1 $xfPriority"
+ if {"[info commands XFParseAppDefs]" != ""} {
+ XFParseAppDefs $xfCounter2/$xfCounter1
+ } {
+ if {"[info commands XFLocalParseAppDefs]" != ""} {
+ XFLocalParseAppDefs $xfCounter2/$xfCounter1
+ }
+ }
+ }
+ }
+ }
+ }
+ } {
+ # load a specific application defaults file
+ if {[file exists $xfAppDefFile] &&
+ [file readable $xfAppDefFile] &&
+ ("[file type $xfAppDefFile]" == "file" ||
+ "[file type $xfAppDefFile]" == "link")} {
+ catch "option readfile $xfAppDefFile $xfPriority"
+ if {"[info commands XFParseAppDefs]" != ""} {
+ XFParseAppDefs $xfAppDefFile
+ } {
+ if {"[info commands XFLocalParseAppDefs]" != ""} {
+ XFLocalParseAppDefs $xfAppDefFile
+ }
+ }
+ }
+ }
+}
+
+# application setting procedure
+proc XFLocalSetAppDefs {{xfWidgetPath "."}} {
+ global xfAppDefaults
+
+ if {![info exists xfAppDefaults]} {
+ return
+ }
+ foreach xfCounter $xfAppDefaults {
+ if {"$xfCounter" == ""} {
+ break
+ }
+ set widname [lindex $xfCounter 0]
+ if {[string match $widname ${xfWidgetPath}] ||
+ [string match "${xfWidgetPath}*" $widname]} {
+ set name [string tolower [lindex $xfCounter 1]]
+ set value [lindex $xfCounter 2]
+ # Now lets see how many tcl commands match the name
+ # pattern specified.
+ set widlist [info command $widname]
+ if {"$widlist" != ""} {
+ foreach widget $widlist {
+ # make sure this command is a widget.
+ if {![catch "winfo id $widget"] &&
+ [string match "${xfWidgetPath}*" $widget]} {
+ catch "$widget configure -$name $value"
+ }
+ }
+ }
+ }
+ }
+}
+
+
+
+# startup source
+proc StartupSrc {args} {
+global testbase
+global hostlist
+global targlist
+global host
+
+set host [exec config.guess]
+set target $host
+}
+
+
+# end source
+proc EndSrc {} {
+.frame6.frame.text2 delete 0.0 end
+}
+
+# startup source
+StartupSrc
+
+# initialize global variables
+global {editor}
+set {editor} {}
+global {fsBox}
+set {fsBox(activeBackground)} {}
+set {fsBox(activeForeground)} {}
+set {fsBox(all)} {0}
+set {fsBox(background)} {}
+set {fsBox(button)} {0}
+set {fsBox(extensions)} {0}
+set {fsBox(font)} {}
+set {fsBox(foreground)} {}
+set {fsBox(internalPath)} {/offsite/rob/DejaGnu/devo/dejagnu}
+set {fsBox(name)} {}
+set {fsBox(path)} {/offsite/rob/DejaGnu/devo/dejagnu}
+set {fsBox(pattern)} {*}
+set {fsBox(scrollActiveForeground)} {}
+set {fsBox(scrollBackground)} {}
+set {fsBox(scrollForeground)} {}
+set {fsBox(scrollSide)} {left}
+set {fsBox(showPixmap)} {0}
+global {host}
+set {host} {sparc-sun-sunos4.1.3}
+global {result}
+set {result} {can't read "editor": no such variable}
+global {target}
+set {target} {sparc-sun-sunos4.1.3}
+global {testbase}
+set {testbase} {/lisa/test/rob}
+
+# please don't modify the following
+# variables. They are needed by xf.
+global {autoLoadList}
+set {autoLoadList(testit)} {0}
+global {internalAliasList}
+set {internalAliasList} {}
+global {moduleList}
+set {moduleList(testit)} {}
+global {preloadList}
+set {preloadList(xfInternal)} {}
+global {symbolicName}
+set {symbolicName(binutils)} {.frame0.menubutton7}
+set {symbolicName(dialogbox)} {.top2}
+set {symbolicName(editor)} {.top2.entry4}
+set {symbolicName(g++)} {.frame0.menubutton4}
+set {symbolicName(gas)} {.frame0.menubutton6}
+set {symbolicName(gdb)} {.frame0.menubutton5}
+set {symbolicName(host)} {.frame0.menubutton3.m}
+set {symbolicName(hostlist)} {.frame0.menubutton3}
+set {symbolicName(logs)} {.frame0.menubutton10}
+set {symbolicName(misc)} {.frame0.menubutton1}
+set {symbolicName(ok)} {.top2.button7}
+set {symbolicName(results)} {.frame0.menubutton9}
+set {symbolicName(root)} {.}
+set {symbolicName(sum)} {.frame0.menubutton0}
+set {symbolicName(targlist)} {.frame0.menubutton2}
+global {xfWmSetPosition}
+set {xfWmSetPosition} {}
+global {xfWmSetSize}
+set {xfWmSetSize} {}
+global {xfAppDefToplevels}
+set {xfAppDefToplevels} {}
+
+# display/remove toplevel windows.
+ShowWindow.
+
+# load default bindings.
+if {[info exists env(XF_BIND_FILE)] &&
+ "[info procs XFShowHelp]" == ""} {
+ source $env(XF_BIND_FILE)
+}
+
+# parse and apply application defaults.
+XFLocalLoadAppDefs Testit
+XFLocalSetAppDefs
+
+# end source
+EndSrc
+
+# eof
+#
+
diff --git a/contrib/bluegnu2.0.3/dejagnu b/contrib/bluegnu2.0.3/dejagnu
new file mode 100755
index 0000000..db944c2
--- /dev/null
+++ b/contrib/bluegnu2.0.3/dejagnu
@@ -0,0 +1,93 @@
+#! /bin/sh
+#
+# This scripts should start a fully compatible DejaGnu runtest
+# application using [incr Expect] and Classes compatible with [incr Tcl]
+#
+# Copyright (C) 1998 jotOmega dsc, Inc.
+
+# This file is part of BlueGnu.
+# It asumes that the iexpect program is on your PATH
+#
+
+#
+# Get the execution path to this script
+#
+execpath=`echo ${0-.} | sed -e 's@/[^/]*$@@'`
+
+#
+# get the name by which dejagnu was invoked and extract the config triplet
+#
+dejagnu=`echo ${0-.} | sed -e 's@^.*/@@'`
+target=`echo $dejagnu | sed -e 's/-dejagnu$//'`
+if [ "$target" != dejagnu ] ; then
+ target="--target ${target}"
+else
+ target=""
+fi
+
+#
+# Find the right expect binary to use. If a variable EXPECT exists,
+# it takes precedence over all other tests. Otherwise look for a freshly
+# built one, and then use one in the path.
+#
+if [ x"$EXPECT" != x ] ; then
+ expectbin=$EXPECT
+else
+ if [ -x "$execpath/expect" ] ; then
+ expectbin=$execpath/iexpect
+ else
+ expectbin=iexpect
+ fi
+fi
+
+# just to be safe...
+if [ -z "$expectbin" ]; then
+ echo "ERROR: No $expectbin shell found"
+ exit 1
+fi
+
+#
+# Extract a few options from the option list.
+#
+verbose=0
+debug=""
+for a in "$@" ; do
+ case $a in
+ -v|--v|-verb*|--verb*) verbose=`expr $verbose + 1`;;
+ -D0|--D0) debug="-D 0" ;;
+ -D1|--D1) debug="-D 1" ;;
+ esac
+done
+
+if expr $verbose \> 0 > /dev/null ; then
+ echo Expect binary is $expectbin
+fi
+
+#
+# find dejagnu.itcl. First we look in it's installed location, otherwise
+# start if from the source tree.
+#
+for i in $execpath/../lib/bluegnu $execpath ; do
+ if expr $verbose \> 1 > /dev/null ; then
+ echo Looking for $i/dejagnu.itcl.
+ fi
+ if [ -f $i/dejagnu.itcl ] ; then
+ runpath=$i
+ if expr $verbose \> 0 > /dev/null ; then
+ echo Using $i/dejagnu.itcl as main test driver
+ fi
+ fi
+done
+# check for an environment variable
+if [ x"$BLUEGNULIBS" != x ] ; then
+ runpath=$BLUEGNULIBS
+ if expr $verbose \> 0 > /dev/null ; then
+ echo Using $BLUEGNULIBS/dejagnu.itcl as main test driver
+ fi
+fi
+if [ x"$runpath" = x ] ; then
+ echo "ERROR: dejagnu.itcl does not exist."
+ exit 1
+fi
+
+exec $expectbin $debug -- $runpath/dejagnu.itcl $target ${1+"$@"}
diff --git a/contrib/bluegnu2.0.3/doc/Makefile.in b/contrib/bluegnu2.0.3/doc/Makefile.in
new file mode 100644
index 0000000..67d5f40
--- /dev/null
+++ b/contrib/bluegnu2.0.3/doc/Makefile.in
@@ -0,0 +1,170 @@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+srcdir = @srcdir@
+
+mandir = $(prefix)/man
+man1dir = $(mandir)/man1
+infodir = $(prefix)/info
+
+MAKEINFO = makeinfo
+TEXI2DVI = TEXINPUTS=$(TEXIDIR):$(srcdir):$$TEXINPUTS texi2dvi
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = $(INSTALL)
+INSTALL_DATA = $(INSTALL)
+
+# Where to find texinfo.tex to format docn with TeX
+TEXIDIR = $(srcdir)/../../texinfo
+
+MANPAGES= $(srcdir)/dejagnu.1
+DEJAGNU = dejagnu.dvi dejagnu.info dejagnu.ps dejagnu.pdf
+README = ../README.bluegnu notice.ps notice.pdf notice.html
+
+%.dvi: %.tex
+ latex $<
+%.pdf: %.dvi
+ dvipdfm -o $@ $<
+%.html: %.dvi
+ rm -fr $(basename $@)
+ rm -f $@
+ latex2html -t "`cat $(basename $<).title`" -split 0 $(basename $<).tex
+ ln -s $(basename $@)/$@
+
+all:
+
+doc: ${README} ${DEJAGNU}
+
+dejagnu.pdf: dejagnu.dvi
+
+READMEtxt.dvi: READMEtxt.tex README.tex
+READMEdvi.dvi: READMEdvi.tex README.tex
+
+../README.bluegnu: READMEtxt.dvi
+ dvidoc $< >$@
+
+notice.ps: READMEdvi.dvi
+ dvips $< -o $@
+
+notice.pdf: READMEdvi.dvi
+ dvipdfm -o $@ $<
+
+notice.html: READMEdvi.dvi
+ rm -fr $(basename $<)
+ rm -f $@
+ latex2html -t "`cat $(basename $<).title`" -split 0 $(basename $<).tex
+ cp $(basename $<)/$(basename $<).html notice.html
+
+######################################################################
+# DOCUMENTATION TARGETS
+# TeX output
+dejagnu.dvi: $(srcdir)/dejagnu.texi
+ $(TEXI2DVI) $(srcdir)/dejagnu.texi
+
+# info file for online browsing
+dejagnu.info: $(srcdir)/dejagnu.texi
+ $(MAKEINFO) -I $(srcdir) -o dejagnu.info $(srcdir)/dejagnu.texi
+
+dejagnu.ps: dejagnu.dvi
+ dvips -f dejagnu.dvi > dejagnu.ps
+
+# different targets for -ms, -mm, -me
+# Try to use a recent texi2roff. v2 was put on prep in jan91.
+# If you want an index, see texi2roff doc for postprocessing
+# and add -i to texi2roff invocations below.
+# Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
+# correspondint -e lines when later texi2roff's are current)
+# + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
+# + @c's deleted explicitly because texi2roff sees texinfo commands in them
+# + @ (that's at-BLANK) not recognized by texi2roff, turned into blank
+# + @alphaenumerate is ridiculously new, turned into @enumerate
+
+# roff output (-ms)
+dejagnu.ms: $(srcdir)/dejagnu.texi
+ sed -e '/\\input texinfo/d' \
+ -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
+ -e '/^@ifinfo/,/^@end ifinfo/d' \
+ -e '/^@c/d' \
+ -e 's/{.*,,/{/' \
+ -e 's/@ / /g' \
+ -e 's/^@alphaenumerate/@enumerate/g' \
+ -e 's/^@end alphaenumerate/@end enumerate/g' \
+ $(srcdir)/dejagnu.texi | \
+ $(TEXI2ROFF) -ms | \
+ sed -e 's/---/\\(em/g' >dejagnu.ms
+
+# roff output (-mm)
+# '@noindent's removed due to texi2roff-2 mm bug; if yours is newer,
+# try leaving them in
+dejagnu.mm: $(srcdir)/dejagnu.texi
+ sed -e '/\\input texinfo/d' \
+ -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
+ -e '/^@ifinfo/,/^@end ifinfo/d' \
+ -e '/^@c/d' \
+ -e 's/{.*,,/{/' \
+ -e '/@noindent/d' \
+ -e 's/@ / /g' \
+ -e 's/^@alphaenumerate/@enumerate/g' \
+ -e 's/^@end alphaenumerate/@end enumerate/g' \
+ $(srcdir)/dejagnu.texi | \
+ $(TEXI2ROFF) -mm | \
+ sed -e 's/---/\\(em/g' >dejagnu.mm
+
+# roff output (-me)
+dejagnu.me: $(srcdir)/dejagnu.texi
+ sed -e '/\\input texinfo/d' \
+ -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
+ -e '/^@ifinfo/,/^@end ifinfo/d' \
+ -e '/^@c/d' \
+ -e 's/{.*,,/{/' \
+ -e 's/@ / /g' \
+ -e 's/^@alphaenumerate/@enumerate/g' \
+ -e 's/^@end alphaenumerate/@end enumerate/g' \
+ $(srcdir)/dejagnu.texi | \
+ $(TEXI2ROFF) -me | \
+ sed -e 's/---/\\(em/g' >dejagnu.me
+
+######################################################################
+
+clean mostlyclean:
+ -rm -f \#* *~ core *.o a.out xgdb *.x
+ -rm -f core *.aux *.log
+ -rm -f dejagnu.cp \
+ dejagnu.fn dejagnu.ky dejagnu.log dejagnu.pg dejagnu.toc \
+ dejagnu.tp dejagnu.vr dejagnu.cps dejagnu.fns dejagnu.kys \
+ dejagnu.pgs dejagnu.tps dejagnu.vrs
+
+clean-info:
+ -rm -rf *.info*
+
+distclean: clean
+ -rm -f Makefile config.status config.log config.cache gdbme.c
+ -rm -fr READMEdvi
+
+maintainer-clean realclean: clean clean-info
+ -rm -f Makefile config.status config.log config.cache gdbme.c
+ -rm -fr READMEdvi
+ -rm -f *.pdf *.ps *.html
+
+install:
+ $(srcdir)/../mkinstalldirs $(man1dir)
+ for i in $(MANPAGES) ; do \
+ $(INSTALL_DATA) $$i \
+ $(man1dir)/$(program_prefix)`echo $$i |sed -e \
+ 's@^.*doc/@@'` ; \
+ done
+ $(srcdir)/../mkinstalldirs $(bindir) $(infodir)
+ for i in *.info* ; do \
+ $(INSTALL_DATA) $$i $(infodir)/$$i ; \
+ done
+
+Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) config.status
+ @echo "Rebuilding the Makefile..."
+ $(SHELL) ./config.status
+
+configure:
+ @echo "Rebuilding configure..."
+ @cd ${srcdir}; autoconf
+
+config.status: $(srcdir)/configure
+ @echo "Rebuilding config.status..."
+ $(SHELL) ./config.status --recheck
diff --git a/contrib/bluegnu2.0.3/doc/README.tex b/contrib/bluegnu2.0.3/doc/README.tex
new file mode 100644
index 0000000..30e974a
--- /dev/null
+++ b/contrib/bluegnu2.0.3/doc/README.tex
@@ -0,0 +1,253 @@
+%%
+%%
+
+\begin{document}
+
+\title{Release Notice\\BlueGnu Testing Framework\\
+Version 2.0.3}
+\author{Jan-Willem Neurdenburg\\jotOmega dsc\\
+56 Brigham Hill Road\\Grafton~MA~~01519-1135\\
+neurdenburgj@acm.org\\Tel: (508) 839-0276\\Fax: (508) 839-7267}
+
+\maketitle
+
+\section{Introduction}
+BlueGnu is a framework for testing other programs. It has been created
+to be compatible with DejaGnu. Its purpose is to provide a single
+front end for all tests. Beyond this, BlueGnu offers several
+advantages for testing:
+
+\begin{itemize}
+
+\item The flexibility and consistency of the BlueGnu framework makes it
+easy to write tests for any program, with the exception of GUI
+applications.
+
+\item BlueGnu provides a layer of abstraction, which makes all tests
+(if correctly written) portable to any host or target where a program
+must be tested.
+
+\item BlueGnu is written in [incr Tcl], which in turn is based on Tcl
+(Tool Command Language). The framework comprises two parts:
+\begin{enumerate}
+\item the testing framework,
+\item the test-suites or test-sets themselves.
+\end{enumerate}
+
+\item BlueGnu will work with any Tcl based interpreter as long as
+[incr Tcl] has been included. You can include 'expect', 'Tk', and/or
+other extensions.
+
+\item Includes DejaGnu release 1.6
+
+\end{itemize}
+
+\section{Requirements}
+The following modules should have been installed, before you can
+install and/or use BlueGnu:
+
+\begin{itemize}
+\item Tcl release 8.0 or higher,
+\item incr Tcl release 3.0 or higher.
+\end{itemize}
+
+Any other extensions that is compatible with Tcl release 8.0 can be used
+as well.
+
+\section{Structure and Contents of the Release}
+
+The root directory of the release contains the README files with
+installation instructions and the files needed to build and install
+this product. It also contains the executable scripts of the
+BlueGnu testing framework.
+
+The top-level directories are listed below:
+
+\begin{description}
+\item[lib:] the packages and procedures that make the BlueGnu and
+DejaGnu testing framework. This also includes the default target
+definition files.
+
+\item[testsets:] the BlueGnu test-suites and test examples. It contains
+the following subdirectories.
+
+\begin{description}
+\item[BlueGnu:]
+test scripts to test the testing framework itself.
+
+\item[examples:]
+test suite and test script examples.
+
+\item[config, lib, tools:]
+currently empty, but can be used for
+test-set dependent configuration files, library files, and tools.
+\end{description}
+
+\item[config:]
+currently empty.
+
+\item[doc:] the DejaGnu texinfo source and the documentation in
+'info', 'dvi', 'ps', and 'pdf' representation, respectively
+dejagnu.info*, dejagnu.dvi, dejagnu.ps, and dejagnu.pdf. A DejaGnu man
+page is also available.
+
+It also contains
+the \TeX{} version (README.tex) of this document as well as the 'dvi', 'ps'
+'html', and 'pdf' representation, respectively notice.dvi, notice.ps,
+notice.html, and notice.pdf.
+
+\item[testsuite:] contains a mixture of DejaGnu and BlueGnu test
+scripts.
+
+\item[contrib:] contains examples how DejaGnu is used at Cygnus.
+
+\item[example:] contains a full DejaGnu test framework example for testing the program 'calc' which is also included.
+
+\end{description}
+
+\section{Installation and use under Unix}
+
+Before you can install and use BlueGnu you need to have installed the
+following three packages:
+\begin{itemize}
+\item Tcl version 8.0.3
+\item Tk version 8.0.3
+\item incr Tcl version 3.0.1
+\end{itemize}
+The source for these packages should all be located in one directory.
+The subdirectory in the directory should be:
+\begin{itemize}
+\item tcl8.0.3
+\item tk8.0.3
+\item itcl3.0.1
+\end{itemize}
+
+The following examples use the command `./configure
+--prefix=/tools/...`. This will install all packages in a directory
+``/tools''. When you omit the ``--prefix''-switch then the
+installation default will be the directory ``/usr/local''.
+
+\subsection{Installation of needed Packages}
+
+When you have not installed Tcl and the other needed extensions, then
+you need to retrieve the sources from ``www.tcltk.com/itcl''. You need
+to `gunzip` the files and do a `tar xf` of all these packages in one
+directory, let's call this directory ``TclTk''.
+
+From the directory ``TclTk'', you should do the following to install
+the packages:
+
+\begin{verbatim}
+% cd tcl8.0.3/unix
+% ./configure --prefix=/tools/tcl8.0.3 --enable-gcc --enable-shared
+% make
+% mkdir /tools/tcl8.0.3
+% make install
+% cd ../../tk8.0.3/unix
+% ./configure --prefix=/tools/tk8.0.3 --enable-gcc --enable-shared
+% make
+% mkdir /tools/tk8.0.3
+% make install
+% cd ../../itcl3.0.1
+% ./configure --prefix=/tools/itcl3.0.1 --enable-gcc --enable-shared
+% make
+% mkdir /tools/itcl3.0.1
+% make install
+\end{verbatim}
+
+\subsection{Installing BlueGnu}
+You can now `gunzip` and `tar xf` the BlueGnu version 2.0.3 in the
+directory ``TckTk''. This will create the directory
+``bluegnu2.0.3''. Now do the following:
+
+\begin{verbatim}
+% cd bluegnu2.0.3
+% ./configure --prefix=/tools/bluegnu2.0.3
+% make
+% mkdir /tools/bluegnu2.0.3
+% make install
+\end{verbatim}
+
+This will install BlueGnu in the directories:
+\begin{itemize}
+\item /tools/bluegnu2.0.3/bin
+\item /tools/bluegnu2.0.3/lib/bluegnu
+\item /tools/bluegnu2.0.3/info
+\item /tools/bluegnu2.0.3/man
+\end{itemize}
+
+\subsection{Using BlueGnu}
+When you have installed [incr Tcl] and BlueGnu and you have the
+respective ``bin'' directories in your PATH variable, then you can
+start running some tests. You can go into the BlueGnu source directory
+``bluegnu2.0.3/testsets/examples'' and run the following:
+
+\begin{verbatim}
+% bluegnu versionTcl.itcl
+% bluegnu ts_001
+% bluegnu ts_002
+% bluegnu ts_003
+\end{verbatim}
+
+The above test result should all be PASS. The following test will give
+a result UNKNOWN, because no pass/fail instruction have been given.
+
+\begin{verbatim}
+% bluegnu tc001
+\end{verbatim}
+
+The last test you can run will fail in its simple form:
+
+\begin{verbatim}
+% bluegnu tc002
+\end{verbatim}
+
+But will pass if you execute the test as follows:
+
+\begin{verbatim}
+% bluegnu tc002[English]
+\end{verbatim}
+
+This is because the test scripts need a test case identifier to find
+the correct benchmark code.
+
+\section{Changes}
+\subsection{Version 2.0.3}
+This being the first public release it is not to useful to list all
+the changes. BlueGnu has been modeled after DejaGnu and is a complete
+new implementation which has been tested thoroughly. When
+documentation is being written more changes will be made. An example
+of some of these changes as a result of this documentation effort can
+be found in the test-suites ts\verb+_+001, ts\verb+_+002, and
+ts\verb+_+003. The first two are not as easy to write as the
+third. The test suite ts\verb+_+001 is a script implementation of the
+command line:
+\begin{verbatim}
+% cd bluegnu2.0.3/testsets
+% bluegnu examples/tc002[English=B] \
+> "examples/tc002[Dutch=B]={MSG=Hallo Wereld}"
+\end{verbatim}
+This may be useful for simple tests but when you want to write more
+complex test-suite scripts you would like some more flexibility, so two
+procedures were introduced, which are shown in test-suite ts\verb+_+002. This
+makes writing rather complex so the procedures have become part of
+the procedures 'appendQueue', 'prependQueue', and 'runtest'. The
+resulting script is shown in test-suit ts\verb+_+003.
+
+Changes like this will be made in the future!
+
+\section{Future Enhancements}
+The following enhancements are being planned:
+\begin{itemize}
+\item Target code will be made into a class with methods 'start',
+'load', 'exit', and 'version'. Instead of the current
+'$<$target$>$\verb+_+start', '$<$target$>$\verb+_+load', '$<$target$>$\verb+_+exit', and
+'$<$target$>$\verb+_+version', which have been taken from DejaGnu.
+
+\item Procedures will be created that make it easy to test WEB
+application from the framework.
+
+\item Other enhancements will be made depending on the use of the
+framework in testing different applications.
+\end{itemize}
+\end{document} \ No newline at end of file
diff --git a/contrib/bluegnu2.0.3/doc/READMEdvi.dvi b/contrib/bluegnu2.0.3/doc/READMEdvi.dvi
new file mode 100644
index 0000000..b324ab8
--- /dev/null
+++ b/contrib/bluegnu2.0.3/doc/READMEdvi.dvi
Binary files differ
diff --git a/contrib/bluegnu2.0.3/doc/READMEdvi.tex b/contrib/bluegnu2.0.3/doc/READMEdvi.tex
new file mode 100644
index 0000000..ee2e991
--- /dev/null
+++ b/contrib/bluegnu2.0.3/doc/READMEdvi.tex
@@ -0,0 +1,5 @@
+%%
+%%
+
+\documentclass[12pt]{article}
+\input{README}
diff --git a/contrib/bluegnu2.0.3/doc/READMEdvi.title b/contrib/bluegnu2.0.3/doc/READMEdvi.title
new file mode 100644
index 0000000..9f7f47d
--- /dev/null
+++ b/contrib/bluegnu2.0.3/doc/READMEdvi.title
@@ -0,0 +1 @@
+BlueGnu Release Notice
diff --git a/contrib/bluegnu2.0.3/doc/READMEtxt.dvi b/contrib/bluegnu2.0.3/doc/READMEtxt.dvi
new file mode 100644
index 0000000..182a260
--- /dev/null
+++ b/contrib/bluegnu2.0.3/doc/READMEtxt.dvi
Binary files differ
diff --git a/contrib/bluegnu2.0.3/doc/READMEtxt.tex b/contrib/bluegnu2.0.3/doc/READMEtxt.tex
new file mode 100644
index 0000000..0c9afdb
--- /dev/null
+++ b/contrib/bluegnu2.0.3/doc/READMEtxt.tex
@@ -0,0 +1,6 @@
+%%
+%%
+
+\documentclass[10pt]{dvidoc}
+\input{README}
+
diff --git a/contrib/bluegnu2.0.3/doc/configure b/contrib/bluegnu2.0.3/doc/configure
new file mode 100755
index 0000000..7248143
--- /dev/null
+++ b/contrib/bluegnu2.0.3/doc/configure
@@ -0,0 +1,657 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.4
+# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Initialize some other variables.
+subdirs=
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -build | --build | --buil | --bui | --bu | --b)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=PREFIX install architecture-dependent files in PREFIX
+ [same as prefix]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+--enable and --with options recognized:$ac_help
+EOF
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.4"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=dejagnu.texi
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+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
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+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 2>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
+
+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
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+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
+# 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
+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="${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.
+ for ac_prog in ginstall installbsd 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.
+ # OSF/1 installbsd also uses dspmsg, but is usable.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_ifs"
+ # As a last resort, use the slow shell script.
+ test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
+fi
+ INSTALL="$ac_cv_path_install"
+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_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+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 |
+ sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
+ >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ 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.4"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
+$ac_vpsub
+$extrasub
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+
+CEOF
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust relative srcdir, etc. for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ 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"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
+fi; done
+rm -f conftest.subs
+
+
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/contrib/bluegnu2.0.3/doc/configure.in b/contrib/bluegnu2.0.3/doc/configure.in
new file mode 100644
index 0000000..9ff15e8
--- /dev/null
+++ b/contrib/bluegnu2.0.3/doc/configure.in
@@ -0,0 +1,4 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(dejagnu.texi)
+AC_PROG_INSTALL
+AC_OUTPUT(Makefile)
diff --git a/contrib/bluegnu2.0.3/doc/dejagnu.1 b/contrib/bluegnu2.0.3/doc/dejagnu.1
new file mode 100644
index 0000000..c6e29c5
--- /dev/null
+++ b/contrib/bluegnu2.0.3/doc/dejagnu.1
@@ -0,0 +1,120 @@
+.TH runtest 1 "31 Dec 1992"
+.SH NAME
+runtest \- the DejaGnu test driver program
+.SH SYNOPSIS
+.B runtest
+[ options ]
+.SH DESCRIPTION
+.I DejaGnu
+is a framework for running test suites on GNU tools. It is written in
+expect, which uses TCL (Tool command language).
+.B runtest
+is the test driver program; use it to control what tests to run,
+and variations on how to run them.
+
+You can find a comprehensive description of DejaGnu and \fBruntest\fR in
+.I
+The DejaGnu Testing Framework
+or its Info version,
+.BR dejagnu.info .
+.SH OPTIONS
+.TP
+.B --all
+Print all test output to screen. By default, only unexpected results are
+displayed.
+.TP
+.BI --baud \ rate
+Set the baud rate for a serial line connection. Some serial interface
+programs (like \fBtip\fR) don't use this value but instead use a separate
+initialization file.
+.TP
+.BI --connect \ type
+The type of connection to use. The choices are
+.BR rlogin ,
+.BR telnet ,
+.BR rsh ,
+.BR kermit ,
+.BR tip
+and
+.BR mondfe .
+.TP
+.B --debug
+Turn on
+.B expect
+internal debugging output. All output is logged to
+a file called \fBdbg.out\fR.
+The output of the \fB--strace\fR also goes into this file.
+.TP
+.B --help
+Prints out a help screen and then exits.
+.TP
+.BI --host \ type
+The configuration string for the host.
+.TP
+.BI --ignore \ test1.exp\ test2.exp\ ...
+Do not run the specified tests.
+.TP
+.BI --mail \ \'name1\ name2\ ...\'
+Electronic mail addresses to receive test results.
+.TP
+.BI --name \ hostname
+The network hostname of the target board.
+.TP
+.BI --objdir \ path
+\fIpath\fR is a directory containing compiled test code.
+.TP
+.BI --outdir \ directory
+The name of a directory for test log output.
+.TP
+.B --reboot
+Reboot the target board when \fBruntest\fR initializes
+(if supported).
+.TP
+.BI --srcdir \ path
+\fIpath\fR is a directory containing test directories.
+.TP
+.BI --strace \ N
+Turns on
+.B expect
+internal tracing to \fIN\fR levels deep.
+.TP
+.BI --target \ type
+The configuration string for the target.
+.TP
+.BI --tool \ toolname
+Specify the tool to be tested. \fItoolname\fR controls the test suite
+applied, and the associated initialization module.
+.TP
+.B --verbose,\ -v
+Turns on more debugging output from test cases and DejaGnu utility code.
+Use more than once to increase output further.
+.TP
+.B --version,\ -V
+Prints out the versions of DejaGnu, expect and Tcl.
+.TP
+.B -D[number]
+Activate the Tcl debugger.\fBnumber\fR can be either 1 or 0. If it is
+1, then the expect shell will break when it starts to run. All ^C's
+drop DejaGnu back to the debugger prompt. A 0 starts DejaGnu like
+normal, but a ^C drops to the debugger prompt.
+.TP 0
+Any file name on the command line is assumed to be a subset
+of the test names to run. Usually these are the names of the
+expect test driver, ie... special.exp.
+
+Makefile style variables are used to specify tool names and their
+flags; these and other configuration dependent values are saved in the
+file \fBsite.exp\fR, created during configuration.
+.SH EXIT CODES
+.B runtest
+sets the exit code to 1 if any of the tests failed, or
+sets it to 0 if all the tests passed.
+.SH SEE ALSO
+.I The DejaGnu Testing Framework
+.RB ( dejagnu.info ).
+This is the DejaGnu manual; its source is the Texinfo file
+.B
+doc/dejagnu.texi
+in the DejaGnu distribution.
+.SH AUTHOR
+Rob Savoye (rob@welcomehome.org)
diff --git a/contrib/bluegnu2.0.3/doc/dejagnu.dvi b/contrib/bluegnu2.0.3/doc/dejagnu.dvi
new file mode 100644
index 0000000..f8e50e5
--- /dev/null
+++ b/contrib/bluegnu2.0.3/doc/dejagnu.dvi
Binary files differ
diff --git a/contrib/bluegnu2.0.3/doc/dejagnu.info b/contrib/bluegnu2.0.3/doc/dejagnu.info
new file mode 100644
index 0000000..c890e65
--- /dev/null
+++ b/contrib/bluegnu2.0.3/doc/dejagnu.info
@@ -0,0 +1,77 @@
+This is Info file dejagnu.info, produced by Makeinfo version 1.68 from
+the input file ./dejagnu.texi.
+
+START-INFO-DIR-ENTRY
+* DejaGnu: (dejagnu). The GNU testing framework.
+END-INFO-DIR-ENTRY
+
+ Copyright (C) 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided also
+that the entire resulting derived work is distributed under the terms
+of a permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions.
+
+
+Indirect:
+dejagnu.info-1: 845
+dejagnu.info-2: 49656
+dejagnu.info-3: 98864
+
+Tag Table:
+(Indirect)
+Node: Top845
+Node: Overview1569
+Node: What is New3526
+Node: Running Tests4893
+Node: Sample Test8001
+Node: Design Goals9824
+Node: Posix11617
+Node: Future Directions17145
+Node: Tcl and Expect17988
+Node: Invoking runtest18731
+Node: Customizing31866
+Node: Config Values34287
+Node: Master Config File40542
+Node: Local Config File44541
+Node: Personal Config File46789
+Node: Internals47575
+Node: Names49656
+Node: Init Module51171
+Node: DejaGnu Builtins55274
+Node: framework.exp56083
+Node: remote.exp65293
+Node: utils.exp69799
+Node: target.exp73522
+Node: debugger.exp76091
+Node: Target Dependent77622
+Node: Cross Targets80980
+Node: Input Files86280
+Node: Output Files87772
+Node: Summary88390
+Node: Detail90141
+Node: Debug91993
+Node: Tests95959
+Node: Writing96405
+Node: Debugging98864
+Node: Adding101241
+Node: Hints103253
+Node: Variables106051
+Node: Extending107396
+Node: Adding Tools107928
+Node: Adding Targets116563
+Node: Porting118758
+Node: Installation119227
+Node: Configuring DejaGnu119607
+Node: Installing DejaGnu121510
+Node: Index122634
+
+End Tag Table
diff --git a/contrib/bluegnu2.0.3/doc/dejagnu.info-1 b/contrib/bluegnu2.0.3/doc/dejagnu.info-1
new file mode 100644
index 0000000..c11c3b4
--- /dev/null
+++ b/contrib/bluegnu2.0.3/doc/dejagnu.info-1
@@ -0,0 +1,1163 @@
+This is Info file dejagnu.info, produced by Makeinfo version 1.68 from
+the input file ./dejagnu.texi.
+
+START-INFO-DIR-ENTRY
+* DejaGnu: (dejagnu). The GNU testing framework.
+END-INFO-DIR-ENTRY
+
+ Copyright (C) 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided also
+that the entire resulting derived work is distributed under the terms
+of a permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions.
+
+
+File: dejagnu.info, Node: Top, Next: Overview, Up: (dir)
+
+DejaGnu
+*******
+
+ DejaGnu is a framework for running test suites on software tools.
+
+ This file describes version 1.3 of DejaGnu.
+
+* Menu:
+
+* Overview:: What is DejaGnu?
+* What is New:: What is new in this release.
+* Invoking runtest:: Using `runtest', the main test driver
+* Customizing:: Setting `runtest' defaults
+* Internals:: The DejaGnu implementation
+* Tests:: How to write a test case
+* Extending:: New tools, new targets, and new hosts
+* Installation:: Configuring and Installing DejaGnu
+* Index:: Index
+
+
+File: dejagnu.info, Node: Overview, Next: What is New, Prev: Top, Up: Top
+
+What is DejaGnu?
+****************
+
+ DejaGnu is a framework for testing other programs. Its purpose is to
+provide a single front end for all tests. Beyond this, DejaGnu offers
+several advantages for testing:
+
+ 1. The flexibility and consistency of the DejaGnu framework make it
+ easy to write tests for any program.
+
+ 2. 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 several single board computers,
+ whose operating software ranges from just a boot monitor to a
+ full-fledged, Unix-like realtime OS.
+
+ 3. 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.
+
+ DejaGnu is written in `expect', which in turn uses "Tcl"--Tool
+command language.
+
+ 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'.)
+
+* Menu:
+
+* Running Tests:: A first look at running DejaGnu tests
+* Sample Test:: What does a DejaGnu test case look like?
+* Design Goals:: Goals behind DejaGnu
+* Posix:: DejaGnu conforms to POSIX 1003.3
+* Future Directions:: Where is DejaGnu going?
+* Tcl and Expect:: Reading more about Tcl and Expect
+
+
+File: dejagnu.info, Node: What is New, Next: Invoking runtest, Prev: Overview, Up: Top
+
+What is new in this release ?
+*****************************
+
+ This release has a number of substantial changes over version 1.2.
+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.
+Other changes are:
+
+ 1. The config sub-system in DejaGnu has been completely redesigned.
+ It now supports testing on remote hosts as well as remote targets.
+
+ 2. More builtin support for building target binaries with the correct
+ linker flags. Currently this only works with GCC, preferably with a
+ target support by `libgloss'.
+
+ 3. Lots of little bug fixes from a year of heavy use here at Cygnus
+ Support.
+
+ 4. DejaGnu now uses `autoconf' for configuration.
+
+ 5. New test cases for DejaGnu have been added for the new features,
+ plus the "-tool" option bug in the 1.2 testsuite has been fixed.
+
+ 6. The `--tool' option is now optional.
+
+ 7. `runtest' when searching for test drivers ignores all directories
+ named SCCS, RCS, and CVS.
+
+ 8. There is now a generic keyword based test harness that uses
+ comments in source code to control how each test case gets built
+ and run.
+
+ 9. There is now some support for running a testsuite with multiple
+ passes.
+
+
+
+File: dejagnu.info, Node: Running Tests, Next: Sample Test, Up: Overview
+
+Running existing tests
+======================
+
+ To run tests from an existing collection, first use `configure' as
+usual to set up the source directory containing the tests. Then try
+running
+
+ 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.
+
+ Once you have run `make check' to build any auxiliary files, you
+might want to call the test driver `runtest' directly to repeat the
+tests. You may also have to call `runtest' directly for test
+collections with no `check' target in the `Makefile'.
+
+ Typically, you must use two command-line options: `--tool', to
+specify which set of tests to run(1), and `--srcdir', to specify where
+to find test directories.
+
+ 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 --tool gdb --srcdir /devo/gdb/testsuite
+
+ These examples assume a "native" configuration, where the same
+computer runs both `runtest' and the tests themselves. When you have a
+"cross" configuration, the tests run on a different computer,
+controlled by the host running `runtest'. In this situation, you need
+the option `--name' to specify the network address for the other
+computer:
+
+ eg$ runtest --tool gdb --name vx9.munist.com
+
+ If you always use the same option values, you can record them in a
+file called `site.exp', rather than typing them each time. *Note
+Setting defaults for `runtest' options: Config Values.
+
+ 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. *Note Using `runtest': Invoking runtest,
+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'.) *Note The files
+DejaGnu writes: Output Files.
+
+ ---------- Footnotes ----------
+
+ (1) `--tool' selects a particular suite of tests, *not* the name of
+the executable program to run. *Note Configuration dependent values:
+Config Values, for information on the variables that you can use to
+specify the names of programs to run.
+
+
+File: dejagnu.info, Node: Sample Test, Next: Design Goals, Prev: Running Tests, Up: Overview
+
+What does a DejaGnu test look like?
+===================================
+
+ Each DejaGnu test is an `expect' script; the tests vary widely in
+complexity, depending on the nature of the tool and the feature tested.
+
+ Here is a very simple GDB test--one of the simplest tests shipped
+with DejaGnu (extracted from `gdb.t00/echo.exp'):(1)
+
+ # send a string to the GDB stdin:
+ send "echo Hello world!\n"
+
+ # inspect the GDB stdout for the correct reply,
+ # and determine whether the test passes or fails:
+ expect {
+ -re "Hello world.*$prompt $" { pass "Echo test" }
+ -re "$prompt $" { fail "Echo test" }
+ timeout { fail "(timeout) Echo test" }
+ }
+
+ Though brief, this example is a complete test. It illustrates some
+of the main features of DejaGnu test scripts:
+
+ * The test case does not start the tested program (GDB in this case);
+ all test scripts for interactive tools can assume the
+ corresponding tool is running.
+
+ * Comments start with `#'.
+
+ * The main commands you use to control a tested program are `send'
+ (to give it commands) and `expect' (to analyze its responses).
+
+ * The `expect' command uses a list of pairs; a pattern (regular
+ expression if `-re' specified), followed by an action to run if the
+ pattern matches output from the program. Only the action for the
+ *first* matching pattern will execute.
+
+ * Test cases use the commands `pass' and `fail' to record the test
+ outcome.
+
+ ---------- Footnotes ----------
+
+ (1) More recent GDB tests use the `gdb_test' procedure. An
+equivalent test using that procedure is ` gdb_test "echo Hello world!"
+"Hello world!" '
+
+
+File: dejagnu.info, Node: Design Goals, Next: Posix, Prev: Sample Test, Up: Overview
+
+Design goals
+============
+
+ DejaGnu grew out of the internal needs of 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.
+
+ Julia Menapace first coined the term "Deja Gnu" to describe an
+earlier testing framework at Cygnus Support. When we replaced it with
+the Expect-based framework, it was like DejaGnu all over again...
+
+
+File: dejagnu.info, Node: Posix, Next: Future Directions, Prev: Design Goals, Up: Overview
+
+A POSIX conforming test framework
+=================================
+
+ DejaGnu conforms to the POSIX standard for test frameworks.
+
+ 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.(1)
+
+ 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. For information on `XPASS' and `XFAIL', see *Note Using
+ `runtest': Invoking runtest.
+
+`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 `setup_xfail' 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.
+
+ ---------- Footnotes ----------
+
+ (1) TET was created by Unisoft for a consortium comprised of X/Open,
+Unix International, and the Open Software Foundation.
+
+
+File: dejagnu.info, Node: Future Directions, Next: Tcl and Expect, Prev: Posix, Up: Overview
+
+Future directions
+=================
+
+ In the near future, there are two parallel directions for DejaGnu
+development. The first is to add support for more hosts and targets.
+
+ The second would permit testing programs with a more complex
+interface, whether text based or GUI based. Two components already
+exist: a Tcl based X window toolkit, and a terminal package for
+`expect'. Both of these could be merged into DejaGnu in a way that
+permits testing programs that run in each environment.
+
+ Meanwhile, we hope DejaGnu enables the creation of test suites for
+conformance to ANSI C and C++, to POSIX, and to other standards. We
+encourage you to make any test suites you create freely available,
+under the same terms as DejaGnu itself.
+
+
+File: dejagnu.info, Node: Tcl and Expect, Prev: Future Directions, Up: Overview
+
+Tcl and Expect
+==============
+
+ Tcl was introduced in a paper by John K. Ousterhout at the 1990
+Winter Usenix conference, `Tcl: An Embeddable Command Language'. That
+paper is included in PostScript form in the `doc' subdirectory of the
+Tcl distribution. The version of Tcl included in DejaGnu at this time is
+Tcl 7.4p3.
+
+ Don Libes introduced `expect' in his paper `expect: Curing Those
+Uncontrollable Fits of Interaction' at the 1990 Summer Usenix
+conference. The paper is included in PostScript form in the `expect'
+distribution (as are several other papers about `expect'). The version
+of expect included in DejaGnu at this time is expect 5.18.0.
+
+
+File: dejagnu.info, Node: Invoking runtest, Next: Customizing, Prev: What is New, Up: Top
+
+Using `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.
+
+ `runtest' flags the outcome of each test as one of these cases.
+(*Note A POSIX conforming test framework: Posix, 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 locate 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.
+
+ This is the full set of command line options that `runtest'
+recognizes. Arguments may be abbreviated to the shortest unique string.
+
+ runtest --tool TOOL [ TESTSUITE.exp ... ]
+ [ TESTSUITE.exp="testfile1 ..." ]
+ [ TCLVAR=VALUE... ]
+ [ --all ] [ --baud BAUD-RATE ] [ --connect TYPE ]
+ [ --debug ] [ --help ] [ --host STRING ]
+ [ --mail "NAME ..." ] [ --name STRING ]
+ [ --name NAME ] [ --outdir PATH ]
+ [ --objdir PATH ] [ --reboot ]
+ [ --srcdir PATH ] [ --strace N ]
+ [ --target STRING --build STRING ]
+ [ -v | --verbose ] [ -V | --version ] [ --DN ]
+
+`--tool TOOL'
+ TOOL specifies what set of tests 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' (*note
+ Configuration dependent values: Config Values.), 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.
+
+`TESTSUITE.exp ...'
+ 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. *Note Configuration dependent values: Config
+ Values.
+
+`--all'
+ 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).
+
+`--baud BAUD-RATE'
+`-b BAUD-RATE'
+ 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.)
+
+`--connect TYPE'
+ 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.0
+ distribution are `rlogin', `telnet', `rsh', `tip', `kermit', and
+ `mondfe'.
+
+ The default for this option depends on the configuration (*note
+ Remote targets supported: Cross Targets.). The default is chosen
+ to be the 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.
+
+`--debug'
+ 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).
+
+`--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 `setup_xfail' 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.
+
+`--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.
+
+`--name NAME'
+ NAME is a name for the particular testing target machine (for
+ cross testing). If the testing target has IP network support (for
+ example, `RPC' or `NFS'), this is the network name for the target
+ itself. (NAME is *not the configuration string* you specify as a
+ target with `configure'; the `--name' option names a particular
+ target, rather than describing a class of targets.) For targets
+ that connect in other ways, the meaning of the NAME string depends
+ on the connection method. *Note Remote targets supported: Cross
+ Targets.
+
+`--name STRING'
+ Specify a network name of testing target or its host. The
+ particular names that are meaningful with `--name' will depend on
+ your site configuration, and on the connection protocol: for
+ example, `tip' connections require names from a serial line
+ configuration file (usually called `/etc/remote'), while `telnet'
+ connections use IP hostnames.
+
+`--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'
+ 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
+ `--tool gdb', `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 N'
+ 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'.
+
+`--target STRING'
+ Use this option to override the default setting (running native
+ tests). STRING is a full configuration "triple" name(1) as used
+ by `configure'. This option changes the configuration `runtest'
+ uses for the default tool names, and other setup information.
+ *Note Using `configure': (configure.info)Using configure, for
+ details about `configure' names.
+
+`--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.
+
+`-D0'
+`-D1'
+ Start the internal Tcl debugger. The Tcl debugger supports
+ breakpoints, single stepping, and other common debugging
+ activities. (See `A Debugger for Tcl Applications' by Don Libes.
+ (2))
+
+ 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>).
+
+ ---------- Footnotes ----------
+
+ (1) Configuration triples have the form `CPU-VENDOR-OS'.
+
+ (2) Distributed in PostScript form with `expect' as the file
+`expect/tcl-debug.ps'.
+
+
+File: dejagnu.info, Node: Customizing, Next: Internals, Prev: Invoking runtest, Up: Top
+
+Setting `runtest' defaults
+**************************
+
+ 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.
+
+ DejaGnu supports more than one `site.exp' file. The multiple
+instances of `site.exp' are loaded in a fixed order built into DejaGnu
+(the more local last). The first file loaded is the optional
+`~/.dejagnurc', then the local files, and finally the global file.
+
+ 1. There is am 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. *Note Configuring
+ and Installing DejaGnu: Installation. 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.
+
+ 2. Any directory containing a configured test suite also has a
+ `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 "master" `site.exp'.
+
+ You can usually generate or update the testsuite `site.exp' by
+ typing `make site.exp' in the test suite directory, after the test
+ suite is configured.
+
+ 3. 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
+ `all_flag' so all the output gets printed, or verbosity levels.
+
+ 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.
+
+* Menu:
+
+* Config Values:: Variables used in the configuration file.
+* Master Config File:: The master configuration file.
+* Local Config File:: The local configuration file.
+* Personal Config File:: The personal configuration file.
+
+
+File: dejagnu.info, Node: Config Values, Next: Master Config File, Up: Customizing
+
+Config Variables
+----------------
+
+ 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.
+
+`name'
+ The name of the target. (mostly for error messages) This should
+ also be the string used for this target's array. It should also
+ be the same as the linker script so we can find them dynamically.
+ This should be the same as the argument used for `push_target{}'.
+
+`ldflags'
+ This is the linker flags required to produce a fully linked
+ executable. For `libgloss' supported targets this is usually just
+ the name of the linker script.
+
+`config'
+ The target canonical for this target. This is used by some init
+ files to make sure the target is supported.
+
+`cflags'
+ The flags required to produce an object file from a source file.
+
+`connect'
+ This is the connectmode for this target. This is for both IP and
+ serial connections. Typically this is either `telnet', `rlogin',
+ or `rsh'.
+
+`target'
+ This is the hostname of the target. This is for TCP/IP based
+ connections, and is also used for version of tip that use
+ /etc/remote.
+
+`serial'
+ This is the serial port. This is typically /dev/tty? or com?:.
+
+`netport'
+ This is the IP port. This is commonly used for telneting to target
+ boards that are connected to a terminal server. In that case the
+ IP port specifies the which serial port to use.
+
+`baud'
+ This is the baud rate for a serial port connection.
+
+`x10'
+ This is the parameters for an x10 controller. These are simple
+ devices that let us power cycle or reset a target board remotely.
+
+`fileid'
+ This is the fileid or spawn id of of the connection.
+
+`prompt'
+ a glob style pattern to recognize the prompt.
+
+`abbrev'
+ abbreviation for tool init files.
+
+`ioport'
+ This is the port for I/O on dual port systems. In this
+ configuration, the main serial port `0' is usually used for stdin
+ and stdout, which the second serial port can be used for debugging.
+
+ The first index into the array is the same value as used in the
+`name' field. This is usually a short version of the name of the target
+board. For an example, here's the settings I use for my `Motorola's'
+`IDP' board and my `Motorola' 6U VME `MVME135-1' board. (both m68k
+targets)
+
+ # IDP board
+ set target_info(idp,name) "idp"
+ set target_info(idp,ldflags) "-Tidp.ld"
+ set target_info(idp,config) m68k-unknown-aout
+ set target_info(idp,cflags) ""
+ set target_info(idp,connect) telnet
+ set target_info(idp,target) "s7"
+ set target_info(idp,serial) "tstty7"
+ set target_info(idp,netport) "wharfrat:1007"
+ set target_info(idp,baud) "9600"
+ # MVME 135 board
+ set target_info(idp,name) "mvme"
+ set target_info(idp,ldflags) "-Tmvme.ld"
+ set target_info(idp,config) m68k-unknown-aout
+ set target_info(idp,cflags) ""
+ set target_info(idp,connect) telnet
+ set target_info(idp,target) "s8"
+ set target_info(idp,serial) "tstty8"
+ set target_info(idp,netport) "wharfrat:1008"
+ set target_info(idp,baud) "9600"
+
+ DejaGnu can use this information to switch between multiple targets
+in one test run. This is done through the use of the `push_target'
+procedure, which is discussed elsewhere.
+
+ This array can also hold information for a remote host, which is used
+when testing a candain cross. In this case, the only thing different is
+the index is just `host'. Here's the settings I use to run tests on my
+NT machine while running DejaGnu on a Unix machine. (in this case a
+Linux box)
+
+ set target_info(host,name) "nt-host"
+ set target_info(host,config) "386-unknown-winnt"
+ set target_info(host,connect) "telnet"
+ set target_info(host,target) "ripple"
+
+ There is more info on how to use these variables in the sections on
+the config files. *Note Configuration Files: Master Config File.
+
+ In the user editable second section of `site.exp', you can not only
+override the configuration variables captured in the first section, but
+also specify default values for all 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'. *Note Running the
+Tests: Invoking runtest, for explanations of the command-line options.
+
+ runtest Tcl
+ option variable description
+ __________ ________ ___________________________________________
+
+ --all all_flag display all test results if set
+
+ --baud baud set the default baud rate to something other
+ than 9600.
+ --connect connectmode `rlogin', `telnet', `rsh',
+ `kermit', `tip', or `mondfe'
+
+ --outdir outdir directory for `TOOL.sum' and `TOOL.log'
+
+ --objdir objdir directory for pre-compiled binaries
+
+ --reboot reboot reboot the target if set to `"1"';
+ do not reboot if set to `"0"' (the default)
+
+ --srcdir srcdir directory of test subdirectories
+
+ --strace tracelevel a number: Tcl trace depth
+
+ --tool tool name of tool to test; identifies init, test subdir
+
+ --verbose verbose verbosity level. As option, use multiple times;
+ as variable, set a number, 0 or greater
+ --target target_triplet The canonical configuration string for the target.
+ --host host_triplet The canonical configuration string for the host.
+ --build build_triplet The canonical configuration string for the
+ build host.
+
+
+File: dejagnu.info, Node: Master Config File, Next: Local Config File, Prev: Config Values, Up: Customizing
+
+Master 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.
+
+ global CFLAGS
+ global CXXFLAGS
+
+ case "$target_triplet" in {
+ { "native" } {
+ set target_abbrev unix
+ }
+ { "m68*-unknown-aout" } {
+ set target_abbrev "rom68k"
+ # IDP target # IDP board with rom68k monitor
+ set target_info(idp,name) "idp"
+ set target_info(idp,ldflags) "-Tidp.ld"
+ set target_info(idp,config) m68k-unknown-aout
+ set target_info(idp,cflags) ""
+ set target_info(idp,connect) telnet
+ set target_info(idp,target) "s7"
+ set target_info(idp,serial) "tstty12"
+ set target_info(idp,netport) "truckin:1007"
+ set target_info(idp,baud) "9600"
+ # MVME target # Motorola MVME 135 with BUG monitor
+ set target_info(mvme,name) "mvme"
+ set target_info(mvme,ldflags) "-Tmvme.ld"
+ set target_info(mvme,config) m68k-unknown-aout
+ set target_info(mvme,cflags) ""
+ set target_info(mvme,connect) telnet
+ set target_info(mvme,target) "s4"
+ set target_info(mvme,serial) "tstty8"
+ set target_info(mvme,netport) "truckin:1004"
+ set target_info(mvme,baud) "9600"
+ }
+ }
+
+ In this case, we have support for several remote hosts for our
+m68k-aout cross compiler. Typically the remote Unix hosts run DejaGnu
+locally, but we also use them for debugging the testsuites when we find
+problems in running on remote hosts. Expect won't run on NT, so DejaGnu
+is run on the local build machine, and it'll connect to the NT host and
+run all the tests for this cross compiler on that host.
+
+ case "$host_triplet" in {
+ "native" {
+ }
+ "i?86-*-linux*" { # Linux host
+ set target_info(host,name) "linux-host"
+ set target_info(host,config) $host_triplet
+ set target_info(host,connect) rlogin
+ set target_info(host,target) chinadoll
+ }
+ "i?86-*-winnt # NT host
+ set target_info(host,name) "nt-host"
+ set target_info(host,config) i386-unknown-winnt
+ set target_info(host,connect) telnet
+ set target_info(host,target) ripple
+ }
+ "hppa*-hp-hpux*" { # HP-UX host
+ set target_info(host,name) "hpux-host"
+ set target_info(host,config) $host_triplet
+ set target_info(host,connect) rlogin
+ set target_info(host,target) slipknot
+ }
+ "sparc-sun-sunos*" { # SunOS (sun4)
+ set target_info(host,name) "sunos-host"
+ set target_info(host,config) $host_triplet
+ set target_info(host,connect) rlogin
+ set target_info(host,target) darkstar
+ }
+ }
+
+
+File: dejagnu.info, Node: Local Config File, Next: Personal Config File, Prev: Master Config File, Up: Customizing
+
+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 "master"
+`site.exp' in the DejaGnu library.
+
+ All local `site.exp' usually 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'.
+
+ 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.)
+
+ 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.
+
+
+File: dejagnu.info, Node: Personal Config File, Prev: Local Config File, Up: Customizing
+
+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:
+
+ set all_flag 1
+ set RLOGIN /usr/ucb/rlogin
+ set RSH /usr/ucb/rsh
+
+ Here I set `all_flag' so I see all the test cases that PASS along
+with the ones that FAIL. I also set RLOGIN and `RSH' 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 versions of
+these programs rather than the default that's in my path.
+
+
+File: dejagnu.info, Node: Internals, Next: Tests, Prev: Customizing, Up: Top
+
+The DejaGnu Implementation
+**************************
+
+ 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 `expect' 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 the set of test suites
+distributed separately for each GNU tool. Future releases of GNU tools
+will include even more tests, developed throughout the free software
+community.
+
+ `runtest' is the glue to tie together and manage the test scripts.
+The `runtest' program is actually a simple Bourne shell script that
+locates a copy of the `expect' shell and then starts the main Tcl code,
+`runtest.exp'. `runtest.exp' itself has these essential functions:
+
+ 1. Parse the command line options, load the library files, and load
+ the default configuration files.
+
+ 2. Locating the individual test scripts. `runtest.exp' locates the
+ tests by exploiting a straightforward naming convention based on
+ the string you specify with the `--tool' option.
+
+ 3. Providing an extended test environment, by defining additional Tcl
+ procedures beyond those already in `expect'.
+
+ 4. Locating target-dependent functions, to standardize the test
+ environment across a wide variety of test platforms.
+
+* Menu:
+
+* Names:: Conventions for using tool names
+* Init Module:: Initialization module
+* DejaGnu Builtins:: DejaGnu provides these Tcl procedures
+* Target Dependent:: Procedures supplied by the init module
+* Cross Targets:: Remote targets supported
+* Input Files:: The files DejaGnu depends on
+* Output Files:: The files DejaGnu produces
+
diff --git a/contrib/bluegnu2.0.3/doc/dejagnu.info-2 b/contrib/bluegnu2.0.3/doc/dejagnu.info-2
new file mode 100644
index 0000000..9339d94
--- /dev/null
+++ b/contrib/bluegnu2.0.3/doc/dejagnu.info-2
@@ -0,0 +1,1137 @@
+This is Info file dejagnu.info, produced by Makeinfo version 1.68 from
+the input file ./dejagnu.texi.
+
+START-INFO-DIR-ENTRY
+* DejaGnu: (dejagnu). The GNU testing framework.
+END-INFO-DIR-ENTRY
+
+ Copyright (C) 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided also
+that the entire resulting derived work is distributed under the terms
+of a permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions.
+
+
+File: dejagnu.info, Node: Names, Next: Init Module, Up: Internals
+
+Conventions for using tool names
+================================
+
+ DejaGnu uses `$tool', the name of the tool under test, to tie
+together the testing configuration in a straightforward but flexible
+way. If there is only one testsuite for a particular application, then
+`$tool' is optional.
+
+ `$tool' is *not* used to invoke the tool, since sites that run
+multiple configurations of a particular tool often call each
+configuration by a different name. `runtest' uses the
+configuration-dependent variables captured in `site.exp' to determine
+how to call each tool.
+
+ `runtest' uses tool names to find directories containing tests.
+`runtest' scans the source directory (specified with `--srcdir') for
+all directories whose names start with the tool name. It is a common
+practice to put a period after the tool part of the name. For instance,
+directories that start with `g++.' contain G++ tests. To add a new
+test, just put it in any directory (create an entirely new directory,
+if you wish) whose name follows this convention.
+
+ A test is any file in an appropriately named subdirectory whose name
+ends in `.exp' (the conventional way of naming `expect' scripts).
+These simple naming conventions make it as simple as possible to
+install new tests: all you must do is put the test in the right
+directory.
+
+ `runtest' sorts the tests in each subdirectory by name (using the
+Tcl `lsort' command) and runs them in the resulting order.
+
+
+File: dejagnu.info, Node: Init Module, Next: DejaGnu Builtins, Prev: Names, Up: Internals
+
+Initialization module
+=====================
+
+ The initialization module (or "init file") has two purposes: to
+provide tool and target dependent procedures, and to start up an
+interactive tool to the point where it is ready to operate. The latter
+includes establishing communications with the target. All the tests for
+interactive programs assume that the tool is already running and
+communicating. Initialization modules for non-interactive programs may
+only need to supply the support functions.
+
+ Each test suite directory must contain (in its `config'
+subdirectory) a separate initialization module for each target. The
+appropriate init file is can be named several ways. The prefered name is
+the *os* part of the canonical configuration name with `.exp' as the
+suffix. An example would be that for an `m68k-coff' system, the
+`target_os' part would be `coff'. The next way is for system where
+there are short filenames, or a shortcut is desired to refer to the OS
+name for that target. This is uses the value of `$target_abbrev' rather
+than the `target_os'.
+
+ The final file looked for is simply `default.exp'. If there is only
+one operating system to support, then this file can be used. It's main
+purpose is to offer some support for new operating systems, or for
+unsupported cross targets. The last file looked for is `unknown.exp'.
+This is usually limited to error handling for unsupported targets. It's
+whole contents is typically.
+
+ perror "Sorry, there is no support for this target"
+ exit 1
+
+ At the beginning of the init file, you must first determine the
+proper executable name of the tool to execute, since the actual name of
+the tool to be tested my vary from system to system. Here's an example
+for the GNU C compiler.
+
+ global AR
+ # look for the archiver ar
+ if ![info exists AR] {
+ set AR [findfile $base_dir/../../binutils/ar $base_dir/../../binutils/ar [tr
+ ansform ar]]
+ verbose "AR defaulting to $AR" 2
+ }
+ }
+
+ global CFLAGS
+ if ![info exists CFLAGS] then {
+ set CFLAGS ""
+ }
+
+ It is always a good idea to first check the variable, and only set
+it if it has not yet been defined. Often the proper value of `AR' is
+set on the command line that invokes `runtest'.
+
+ The `findfile' procedure takes as it's first argument a file name to
+look for. The second argument is returned if the file is found, and the
+third argument is returned if the file is not found. `base_dir' is set
+internally by DejaGnu to the top level directory of the object tree.
+
+ The `transform' procedure takes as its argument the native name of a
+tool (such as `gcc' for the compiler), and returns the name as
+configured for that tool in the current installation. (For example, a
+cross-compiling version of GNU CC that generates MIPS code may be
+installed with a name like `mips-idt-ecoff-gcc'.)
+
+ In a test running native, writing the Tcl code for initialization is
+usually quite simple. For cross configurations, however, more elaborate
+instructions are usually needed to describe how to talk to a remote
+target.
+
+ Each initialization module defines up to four procedures with
+standard names and purposes. The names of these procedures begin with
+`$tool', the string that identifies tests for a particular tool:
+`$tool_start', `$tool_load', `$tool_exit', and `$tool_version'. For
+example, the start procedure for GDB is called `gdb_start'. (Since
+start procedures are used differently for batch and interactive tools,
+however, `runtest' itself never calls the start procedure. Init files
+for interactive tools are expected to end by running the start
+procedure.)
+
+ The initialization module is also a good place to call `load_lib' to
+get any collections of utility procedures meant for a family of test
+cases, and to set up default values for any additional Tcl variables
+needed for a specific set of tests.
+
+ *Note Target dependent procedures: Target Dependent, for full
+descriptions of these procedures.
+
+
+File: dejagnu.info, Node: DejaGnu Builtins, Next: Target Dependent, Prev: Init Module, Up: Internals
+
+DejaGnu procedures
+==================
+
+ DejaGnu provides these Tcl procedures for use in test scripts. You
+can also use any standard `expect' or Tcl function. These procedures
+are stored in libraries, which DejaGnu loads at runtime. Here's
+explanation of the library procedures that get loaded at runtime. All
+other librarys are optional, and need to be loaded by the testsuite.
+
+* Menu:
+
+* framework.exp:: Core Internal Procedures.
+* remote.exp:: Procedures for remote communication.
+* utils.exp:: Utility procedures.
+* target.exp:: Cross target procedures.
+* debugger.exp:: Procedures for debugging your Tcl code.
+
+
+File: dejagnu.info, Node: framework.exp, Next: remote.exp, Up: DejaGnu Builtins
+
+Core Internal Procedures
+------------------------
+
+ *Note A POSIX conforming test framework: Posix, for more detailed
+explanations of the test outcomes (`FAIL', `PASS', `UNTESTED',
+`UNRESOLVED', `UNSUPPORTED').
+
+`perror "STRING NUMBER"'
+ Declares a severe error in the testing framework itself. `perror'
+ writes in the log files a message beginning with `ERROR',
+ appending the argument STRING. If the optional NUMBER is supplied,
+ then this is used to set the internal count of errors to that
+ value.
+
+ 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.
+
+`warning "STRING NUMBER"'
+ 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 `error' 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.
+
+`note "STRING"'
+ 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. `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'.
+
+`pass "STRING"'
+ 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.
+
+`fail "STRING"'
+ 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.
+
+`unresolved "STRING"'
+ 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).
+
+`untested "STRING"'
+ 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.
+
+`unsupported "STRING"'
+ 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.
+
+`get_warning_threshold'
+ Returns the current value of `warning_threshold'. The default
+ value is 3.
+
+`set_warning_threshold THRESHOLD'
+ 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'.
+
+`transform "TOOLNAME"'
+ 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: it extrapolates from the invocation name for
+ `runtest'. For example, if you call `runtest' as
+ `m68k-vxworks-runtest', the result of ` transform "gcc" ' is
+ `m68k-vxworks-gcc'.
+
+`ishost "HOST"'
+ 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).
+
+`istarget "TARGET"'
+ 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.
+
+`isbuild "HOST"'
+ 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.
+
+ item is3way "HOST" 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'.
+
+`isnative'
+ 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'.
+
+`load_lib "LIBRARY-FILE"'
+ Loads the file LIBRARY-FILE by searching a fixed path built into
+ `runtest'. 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.
+
+`setup_xfail "CONFIG [BUGID]"'
+ 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
+ (*note Overview: (gnats.info)Overview.).
+
+ 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:* you must clear the expected failure after using
+ `setup_xfail' in a test case. Any call to `pass' or `fail' 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.
+
+`clear_xfail CONFIG'
+ 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'.
+
+`verbose [-log] [-n] [--] "STRING" NUMBER'
+ 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 "-".
+
+
+File: dejagnu.info, Node: remote.exp, Next: utils.exp, Prev: framework.exp, Up: DejaGnu Builtins
+
+Remote Communication Procedures
+-------------------------------
+
+`lib/remote.exp' defines these functions, for establishing and managing
+communications:
+
+ *Procedures to establish a connection:* 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.
+
+`remote_open TYPE'
+ *Remote Connection Procedure.* 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_close SHELLID'
+ *shellid* is 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.
+
+`telnet HOSTNAME PORT'
+`rlogin HOSTNAME'
+`rsh HOSTNAME'
+ *IP network procedures.* HOSTNAME 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 PORT'
+ *Serial line procedure.* Connect using the Unix utility `tip'.
+ PORT must 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.
+
+`kermit PORT BPS'
+ *Serial line procedure.* Connect using the program `kermit'.
+ PORT is the device name, e.g. `/dev/ttyb'. BPS is the line speed
+ to use (in bits 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.
+
+*Procedures to manage a connection:*
+
+`tip_download SPAWNID FILE'
+ 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.
+
+`exit_remote_shell SPAWNID'
+ Exits a remote process started by any of the connection procedures.
+ SPAWNID is the result of the connection procedure that started the
+ remote process.
+
+`download FILE [ SPAWNID ]'
+ After you establish a connection to a target, you can download
+ programs using this command. `download' reads in FILE (object
+ code in S-record format) and writes it to the device controlling
+ this SPAWNID. (From the point of view of the target, the S-record
+ file comes in via standard input.)
+
+ If you have more than one target active, you can use the optional
+ argument SPAWNID to specify an alternative target (the default is
+ the most recently established SPAWNID.)
+
+
+File: dejagnu.info, Node: utils.exp, Next: target.exp, Prev: remote.exp, Up: DejaGnu Builtins
+
+Utility Procedures
+------------------
+
+`lib/utils.exp' defines these utility procedures:
+
+`getdirs DIR'
+`getdirs DIR PATTERN'
+ Returns a list of all the directories in the single directory DIR
+ that match PATTERN. If you do not specify PATTERN, `getdirs'
+ assumes `*'. You may use the common shell wildcard characters in
+ PATTERN. If no directories match the pattern, then a `NULL' string
+ is returned.
+
+`find DIR PATTERN'
+ Search for files whose names match PATTERN (using shell wildcard
+ characters for filename expansion). Search subdirectories
+ recursively, starting at DIR. 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.
+
+`which BINARY'
+ 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.
+
+`grep FILENAME REGEXP'
+
+`grep FILENAME REGEXP line'
+ 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'.)
+
+`diff FILENAME FILENAME'
+ 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.
+
+`slay NAME'
+ This look in the process tabel for NAME and send it a unix
+ `SIGINT', killing the process.
+
+`absolute PATH'
+ This procedure takes the relative PATH, and converts it to an
+ absolute path.
+
+`psource FILENAME'
+ 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.
+
+`prune LIST PATTERN'
+ 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 PATTERN.
+
+`setenv VAR VAL'
+ Sets the variable VAR to the value VAL.
+
+`unsetenv VAR'
+ Unsets the environment variable VAR
+
+`getenv VAR'
+ returns the value of VAR in the environment if it exists,
+ otherwise it returns `NULL'.
+
+`runtest_file_p RUNTESTS TESTCASE'
+ 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.
+
+`prune_system_crud SYSTEM TEXT'
+ 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.
+
+
+File: dejagnu.info, Node: target.exp, Next: debugger.exp, Prev: utils.exp, Up: DejaGnu Builtins
+
+Cross target procedure
+----------------------
+
+`lib/target.exp' defines these utility procedures:
+
+`push_target *name*'
+ 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.
+
+`pop_target'
+ This unsets the current target connection.
+
+`list_targets'
+ This lists all the supported targets for this architecture.
+
+`push_host *name*'
+ 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.
+
+`pop_host'
+ This unsets the current host connection.
+
+ 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'.
+
+ 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'.
+
+ 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.
+
+`execute_anywhere *cmdline*'
+ 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.
+
+
+File: dejagnu.info, Node: debugger.exp, Prev: target.exp, Up: DejaGnu Builtins
+
+Debugging Procedures
+--------------------
+
+ `lib/debugger.exp' defines these utility procedures:
+
+`dumpvars *expr*'
+ 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'
+
+`dumplocals *expr*'
+ 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'.
+
+`dumprocs *expr*'
+ This takes a csh style regular expression (glob rules) and prints
+ the body of all procs that match. It is abbreviated as `dp'
+
+`dumpwatch *expr*'
+ This takes a csh style regular expression (glob rules) and prints
+ all the watchpoints. It is abbreviated as `dw'.
+
+`watchunset *var*'
+ This breaks program execution when the variable *var* is unset. It
+ is abbreviated as `wu'.
+
+`watchwrite *var*'
+ This breaks program execution when the variable *var* is written.
+ It is abbreviated as `ww'.
+
+`watchread *var*'
+ This breaks program execution when the variable *var* is read. It
+ is abbreviated as `wr'.
+
+`watchdel *watch*'
+ This deletes a the watchpoint for *watch*. It is abbreviated as
+ `wd'.
+
+`print *var*'
+ This prints the value of the variable *var*. It is abbreviated as
+ `p'.
+
+`quit'
+ This makes runtest exit. It is abbreviated as `q'.
+
+`bt'
+ This prints a backtrace of the executed Tcl commands.
+
+
+File: dejagnu.info, Node: Target Dependent, Next: Cross Targets, Prev: DejaGnu Builtins, Up: Internals
+
+Target dependent 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'. *Note Initialization Module: Init
+Module, for a discussion of how DejaGnu arranges to find the right
+procedures for each target.
+
+ `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.
+
+`TOOL_start'
+ 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.
+
+ `runtest' 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_load'
+ 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_exit'
+ Cleans up (if necessary) before `runtest' 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_version'
+ 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.
+
+ `runtest' calls `TOOL_version'.
+
+ 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.
+
+
+File: dejagnu.info, Node: Cross Targets, Next: Input Files, Prev: Target Dependent, Up: Internals
+
+Remote targets supported
+========================
+
+ The DejaGnu distribution includes support for the following remote
+targets. You can set the target name and the connect mode in the
+`site.exp' file (using the Tcl variables `targetname' and
+`connectmode', respectively), or on the `runtest' command line (using
+`--name' and `--connect').
+
+*AMD 29000, with UDI protocol*
+ Configure DejaGnu for target `a29k-amd-udi'. (Cygnus `configure'
+ also recognizes the abbreviation `udi29k'.) Then, to run tests,
+ use the `runtest' target name to specify whether you want to use a
+ simulator, or a particular hardware board. The particular string
+ to use with `--name' will depend on your UDI setup file, `udi_soc'
+ (if `udi_soc' is not in your working directory, the environment
+ variable `UDICONF' should contain a path to this file). For
+ example, if your UDI setup file includes these lines:
+
+ iss AF_UNIX * isstip -r /home/gnu/29k/src/osboot/sim/osboot
+ mon AF_UNIX * montip -t serial -baud 9600 -com /dev/ttyb
+
+* *
+ You can use `--name iss' to run tests on the simulator, and
+ `--name mon' to run tests on the 29K hardware. See the
+ manufacturer's manuals for more information on UDI and `udi_soc'.
+
+ The default connect protocol is `mondfe' with either back end.
+ `mondfe' is the only shell DejaGnu supports for UDI targets.
+ `mondfe' is an AMD specific monitor program freely available from
+ AMD.
+
+ *Warning:* This target requires GDB version 4.7.2 (or greater).
+ Earlier versions of GDB do not fully support the `load' command on
+ this target, so DejaGnu has no way to load executable files from
+ the debugger.
+
+*Motorola 680x0 boards, a.out or COFF object format*
+ Configure DejaGnu for any remote target matching `m68k-*'.
+
+ *Warning:* Most `m68k-*' configurations run all tests only for
+ native testing (when the target is the same as the host). When you
+ specify most of these targets for a cross configuration, you will
+ only be able to use tests that run completely within the host (for
+ example, tests of the binary utilities such as the archiver; or
+ compiler tests that only generate code rather than running it).
+
+ To run a.out or COFF binaries on a remote M68K, you must configure
+ DejaGnu for a particular target board. `m68k-abug' is an example.
+ (In general for an embedded environment, because it does not have
+ absolute addresses, a.out is not a good choice for output format
+ in any case; most often S-records or Hex-32 are used instead.)
+
+*Motorola 68K MVME 135 board running ABug boot monitor*
+ Configure for `m68k-abug-aout' or `m68k-abug-coff' (as a target).
+ This boot monitor can only download S-records; therefore, the
+ DejaGnu tests for this environment require a linker command script
+ to convert either output format to S-records, setting the default
+ addresses for `.text', `.bss', and `.data'.
+
+ With this configuration, the default for `--connect' is `tip'.
+ `tip' is the only communications protocol supported for connecting
+ to `m68k-abug-*' targets. `tip' uses an ASCII downloader (the
+ `~put' command) to load S-records into the target board. The
+ `--name' string must be a machine name that `tip' understands (for
+ example, on some `tip' implementations it must be an entry from
+ the initialization file for `tip'; this file is sometimes called
+ `/etc/remote').
+
+ See your system documentation for information on how to create new
+ entries in `/etc/remote'. (Some UNIX systems are distributed with
+ at least one default entry with a name resembling `hardwire'; if
+ your system has one, you can edit it, or make a modified copy with
+ a new name.) When you have a working `/etc/remote' entry
+ ABUGTARGET, you should be able to type `tip ABUGTARGET', and get
+ the prompt `135ABUG>' from the board. Use the same ABUGTARGET
+ string with `runtest --name'.
+
+*Motorola IDP board running the rom68k boot monitor*
+ This is the same in functionality as the MVME board running the
+ `BUG' boot monitor. Only the monitor commands and the addresses are
+ different.
+
+*VxWorks (Motorola 68K or Intel 960)*
+ Configure DejaGnu for either `m68k-wrs-vxworks' (abbreviated
+ `vxworks68') or `i960-wrs-vxworks' (abbreviated `vxworks960').
+ Since both targets support IP addressing, specify the network
+ address (for example, a host name from `/etc/hosts') with `--name'.
+
+ The default connect protocol is `rlogin', but you can use any of
+ `--connect rlogin', `--connect telnet', or `--connect rsh'.
+
+ Test scripts need no special code to load programs into these
+ targets; since VxWorks supports NFS, all you must do is ensure
+ test programs are on an exported filesystem.
+
+ When you compile for VxWorks, use the linker `-r' option to make
+ the linker output relocatable--at least if you want to use library
+ routines. Many standard C routines are included in VxWorks; often
+ no additional libraries are needed. See your VxWorks system
+ documentation for additional details.
+
+
+File: dejagnu.info, Node: Input Files, Next: Output Files, Prev: Cross Targets, Up: Internals
+
+The files DejaGnu reads
+=======================
+
+ The `runtest' program used to invoke DejaGnu is a short shell script
+generated by `make' during the configuration process. Its main task is
+to read the main test framework driver, `runtest.exp'.
+
+ `runtest.exp', in turn, reads `expect' code from certain other
+files, in this order:
+
+ 1. Each of the `site.exp' local definition files available. *Note
+ Setting `runtest' defaults: Customizing, for details.
+
+ 2. `lib/utils.exp', a collection of utility procedures. *Note
+ DejaGnu Builtins: DejaGnu Builtins, for descriptions of these
+ procedures.
+
+ 3. `lib/framework.exp', a file of subroutines meant for `runtest'
+ itself rather than for general-purpose use in both `runtest' and
+ test suites.
+
+ 4. `debugger.exp', Don Libes' Tcl Debugger. (See `A Debugger for Tcl
+ Applications' by Don Libes. This paper is distributed with
+ `expect' in PostScript form as the file `expect/tcl-debug.ps'.)
+
+ 5. `lib/remote.exp', a collection of subroutines meant for connecting
+ to remote machines.
+
+ 6. `lib/target.exp', a collection of subroutines used for the
+ configuration systems in DejaGnu. These procedures typically
+ manipulate or utilize the configuration system.
+
+ 7. An initialization file `TOOL_init.exp'. *Note Initialization
+ module: Init Module, for more discussion of init files.
+
+
+File: dejagnu.info, Node: Output Files, Prev: Input Files, Up: Internals
+
+The files DejaGnu writes
+========================
+
+ `runtest' 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.
+
+* Menu:
+
+* Summary:: Files that summarize tests
+* Detail:: Files that contain complete test results
+* Debug:: Logging expect internal actions
+
+
+File: dejagnu.info, Node: Summary, Next: Detail, Up: Output Files
+
+Summary log
+-----------
+
+ `runtest' 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 `untested', the summary output also tabulates the corresponding
+outcomes.
+
+ For example, after `runtest --tool binutils', look for a summary log
+in `binutils.sum'. Normally, `runtest' writes this file in your
+current working directory; use the `--outdir' option to select a
+different directory.
+
+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
+
+
+File: dejagnu.info, Node: Detail, Next: Debug, Prev: Summary, Up: Output Files
+
+Detailed log
+------------
+
+ `runtest' 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, `runtest' writes this file in your current
+working directory; use the `--outdir' option to select a different
+directory.
+
+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/ps/bin/g++ version cygnus-2.0.1
+
+
+File: dejagnu.info, Node: Debug, Prev: Detail, Up: Output Files
+
+Logging `expect' internal actions
+---------------------------------
+
+ 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.
+
+ The log messages for `expect' 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. 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) }
+ expect: 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 the `runtest' standard output,
+ and in the detailed log file.
+
+
+File: dejagnu.info, Node: Tests, Next: Extending, Prev: Internals, Up: Top
+
+How To Write a Test Case
+************************
+
+* Menu:
+
+* Writing:: Writing a test case
+* Debugging:: Debugging a test case
+* Adding:: Adding a test case to a test suite
+* Hints:: Hints on writing a test case
+* Variables:: Special variables used by test cases
+
+
+File: dejagnu.info, Node: Writing, Next: Debugging, Up: Tests
+
+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 `expect', 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:
+
+ 1. 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.
+
+ 2. Writing (and debugging) the generic `expect' procedures for
+ compilation.
+
+ 3. 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 `expect' procedures specialized for GDB testing.
+
+ `gdb.t10/crossload.exp' is a good example of an interactive test.
+
diff --git a/contrib/bluegnu2.0.3/doc/dejagnu.info-3 b/contrib/bluegnu2.0.3/doc/dejagnu.info-3
new file mode 100644
index 0000000..3e91476
--- /dev/null
+++ b/contrib/bluegnu2.0.3/doc/dejagnu.info-3
@@ -0,0 +1,1016 @@
+This is Info file dejagnu.info, produced by Makeinfo version 1.68 from
+the input file ./dejagnu.texi.
+
+START-INFO-DIR-ENTRY
+* DejaGnu: (dejagnu). The GNU testing framework.
+END-INFO-DIR-ENTRY
+
+ Copyright (C) 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided also
+that the entire resulting derived work is distributed under the terms
+of a permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions.
+
+
+File: dejagnu.info, Node: Debugging, Next: Adding, Prev: Writing, Up: Tests
+
+Debugging a test case
+=====================
+
+These are the kinds of debugging information available from DejaGnu:
+
+ 1. 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 `TOOL.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.
+
+ 2. 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 (*note Debug Log: Debug.). 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; see the
+ discussion of `--strace' in *Note Running the Tests: Invoking
+ runtest.
+
+ 3. Finally, if the value of `verbose' is 3 or greater, `runtest'
+ 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'.
+
+
+File: dejagnu.info, Node: Adding, Next: Hints, Prev: Debugging, Up: Tests
+
+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:
+
+ 1. 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++').
+
+ 2. 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.
+
+ 3. Add the new test case to the directory, as above.
+
+ 4. To add support in the new directory for configure and make, you
+ must also create a `Makefile.in' and a `configure.in'. *Note What
+ Configure Does: (configure.info)What Configure Does.
+
+
+File: dejagnu.info, Node: Hints, Next: Variables, Prev: Adding, Up: Tests
+
+Hints on writing a test case
+============================
+
+ There may be useful existing procedures already written for your
+test in the `lib' directory of the DejaGnu distribution. *Note DejaGnu
+Builtins: DejaGnu Builtins.
+
+ 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. *Note Debug Log: Debug.
+
+ 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'.
+
+
+File: dejagnu.info, Node: Variables, Prev: Hints, Up: Tests
+
+Special variables used by test cases
+====================================
+
+ Your test cases can use these variables, with conventional meanings
+(as well as the variables saved in `site.exp' *note Setting `runtest'
+defaults: Customizing.):
+
+ *These variables are available to all test cases.*
+
+`prms_id'
+ The tracking system (e.g. GNATS) number identifying a corresponding
+ bugreport. (`0' if you do not specify it in the test script.)
+
+`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.
+
+ *These variables should never be changed. They appear in most
+ tests.*
+
+`expect_out(buffer)'
+ The output from the last command. This is an internal variable set
+ by `expect'.
+
+`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.
+
+
+File: dejagnu.info, Node: Extending, Next: Installation, Prev: Tests, Up: Top
+
+New Tools, Targets, or Hosts
+****************************
+
+ The most common ways to extend the DejaGnu framework are: adding a
+suite of tests for a new tool to be tested; adding support for testing
+on a new target; and porting `runtest' to a new host.
+
+* Menu:
+
+* Adding Tools:: How to add tests for a new tool
+* Adding Targets:: How to add a new target
+* Porting:: Porting DejaGnu to a new host
+
+
+File: dejagnu.info, Node: Adding Tools, Next: Adding Targets, Up: Extending
+
+Writing tests for 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.
+
+ 1. Create or select a directory to contain your new collection of
+ tests. Change to that directory (shown here as `testsuite'):
+
+ eg$ cd testsuite/
+
+ 2. 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 Cygnus Configure. (For an alternative
+ based on the FSF `autoconf' system, see the `calc' example
+ distributed with DejaGnu.) Replace EXAMPLE with the name of your
+ program:
+
+ # This file is a shell script fragment
+ # for use with Cygnus configure.
+
+ srctrigger="EXAMPLE.0"
+ srcname="The DejaGnu EXAMPLE tests"
+
+ # per-host:
+
+ # per-target:
+
+ # everything defaults to unix for a target
+ target_abbrev=unix
+
+ # post-target:
+
+ 3. Create `Makefile.in', the source file used by `configure' to build
+ your `Makefile'. Its leading section should as usual contain the
+ values that `configure' may override:
+
+ srcdir = .
+ prefix = /usr/local
+
+ exec_prefix = $(prefix)
+ bindir = $(exec_prefix)/bin
+ libdir = $(exec_prefix)/lib
+ tooldir = $(libdir)/$(target_alias)
+
+ datadir = $(exec_prefix)/lib/dejagnu
+
+ RUNTEST = runtest
+ RUNTESTFLAGS =
+ FLAGS_TO_PASS =
+
+ #### host, target, site specific Makefile frags come in here.
+
+ This should be followed by the standard targets at your site. To
+ begin with, they need not do anything--for example, these
+ definitions will do:
+
+
+ all:
+
+ info:
+
+ install-info:
+
+ install:
+ uninstall:
+
+ clean:
+ -rm -f *~ core *.info*
+
+ It is also a good idea to make sure your `Makefile' can rebuild
+ itself if `Makefile.in' changes, with a target like this (which
+ works for either Cygnus or FSF Configure):
+
+ Makefile : $(srcdir)/Makefile.in $(host_makefile_frag) \
+ $(target_makefile_frag)
+ $(SHELL) ./config.status
+
+ 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. The `check' target must run
+ `runtest --tool EXAMPLE':
+
+ check: site.exp all
+ $(RUNTEST) $(RUNTESTFLAGS) $(FLAGS_TO_PASS) \
+ --tool EXAMPLE --srcdir $(srcdir)
+
+ The `site.exp' target should usually set up (among other things!) a
+ Tcl variable for the name of your program:
+
+ 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?
+
+ 4. Create a directory (in `testsuite/') called `config/':
+
+ eg$ mkdir config
+
+ 5. Make an init file in this directory; its name must start with the
+ `target_abbrev' value, so call it `config/unix.exp'. This is the
+ file that contains the target-dependent procedures; fortunately,
+ most of them do not have to do very much in order for `runtest' to
+ run.
+
+ If EXAMPLE is not interactive, you can get away with this minimal
+ `unix.exp' to begin with:
+
+ proc foo_exit {} {}
+ proc foo_version {} {}
+
+ If EXAMPLE is interactive, however, you might as well define a
+ start routine *and invoke it* by using an init file like this:
+
+ proc foo_exit {} {}
+ proc foo_version {} {}
+
+ proc foo_start {} {
+ global EXAMPLENAME
+ spawn $EXAMPLENAME
+ expect {
+ -re "" {}
+ }
+ }
+ foo_start
+
+ 6. Create a directory whose name begins with your tool's name, to
+ contain tests:
+
+ eg$ mkdir EXAMPLE.0
+
+ 7. Create a sample test file in `EXAMPLE.0'. 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:
+
+ send_user "Testing: one, two...\n"
+
+ 8. Back in the `testsuite/' (top level) directory, run
+
+ eg$ configure
+
+ (You may have to specify more of a path, if a suitable `configure'
+ is not available in your execution path.)
+
+ 9. You are now ready to triumphantly type `make check' or `runtest
+ --tool EXAMPLE'. You should see something like this:
+
+ 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.
+
+ 10. Begin writing 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.
+
+
+File: dejagnu.info, Node: Adding Targets, Next: Porting, Prev: Adding Tools, Up: Extending
+
+Adding a target
+===============
+
+ DejaGnu has some additional requirements for target support, beyond
+the general-purpose provisions of Cygnus `configure'. `runtest' 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. *Note
+Initialization module: Init Module, for a discussion of the naming
+conventions that enable DejaGnu to locate and use init files.
+
+ 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 `--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 (*note DejaGnu
+procedures: DejaGnu Builtins.).
+
+ 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, `lib/remote.exp'.
+*Note DejaGnu Builtins: DejaGnu Builtins.
+
+ 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.
+
+
+File: dejagnu.info, Node: Porting, Prev: Adding Targets, Up: Extending
+
+Porting to a new host
+=====================
+
+ The task of porting DejaGnu is basically that of porting Tcl and
+`expect'. Tcl and `expect', as distributed with DejaGnu, both use
+`autoconf'; they should port automatically to most Unix systems.
+
+ Once Tcl and `expect' are ported, DejaGnu should run. Most system
+dependencies are taken care of by using `expect' as the main command
+shell.
+
+
+File: dejagnu.info, Node: Installation, Next: Index, Prev: Extending, Up: Top
+
+Installing DejaGnu
+******************
+
+ 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.
+
+* Menu:
+
+* Configuring DejaGnu::
+* Installing DejaGnu::
+
+
+File: dejagnu.info, Node: Configuring DejaGnu, Next: Installing DejaGnu, Up: Installation
+
+Configuring the DejaGnu test driver
+===================================
+
+ 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.3/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 `exec_prefix'.)
+
+ 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 compiler (testing both GCC and G++) and for the
+GNU binary utilities are distributed in parallel with the DejaGnu
+distribution (but packaged as separate files). The test suite for the
+GNU debugger is distributed in parallel with each release of GDB
+itself, starting with GDB 4.9. 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' to build
+auxiliary programs required by some of the tests.
+
+
+File: dejagnu.info, Node: Installing DejaGnu, Prev: Configuring DejaGnu, Up: Installation
+
+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 install' does these things for DejaGnu:
+
+ 1. 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.
+
+ 2. Create another directory in the `lib' directory, called `dejagnu'.
+
+ 3. Copy the `runtest' shell script into `$exec_prefix/bin'.
+
+ 4. Copy all the library files (used to support the framework) into
+ `$exec_prefix/lib/dejagnu'.
+
+ 5. Copy `runtest.exp' into `$exec_prefix/lib/dejagnu'. This is the
+ main Tcl code implementing DejaGnu.
+
+
+ Each test suite collection comes with simple installation
+instructions in a `README' file; in general, the test suites are
+designed to be unpacked in the source directory for the corresponding
+tool, and extract into a directory called `testsuite'.
+
+
+File: dejagnu.info, Node: Index, Prev: Installation, Up: Top
+
+Index
+*****
+
+* Menu:
+
+* --all (runtest option): Invoking runtest.
+* --baud (runtest option): Invoking runtest.
+* --build (runtest option): Invoking runtest.
+* --connect (runtest option): Invoking runtest.
+* --debug (runtest option): Invoking runtest.
+* --help (runtest option): Invoking runtest.
+* --host (runtest option): Invoking runtest.
+* --name (runtest option): Invoking runtest.
+* --objdir (runtest option): Invoking runtest.
+* --outdir (runtest option): Invoking runtest.
+* --reboot (runtest option): Invoking runtest.
+* --srcdir (runtest option): Invoking runtest.
+* --strace (runtest option): Invoking runtest.
+* --target (runtest option): Invoking runtest.
+* --tool (runtest option): Invoking runtest.
+* --tool and naming conventions: Names.
+* --verbose (runtest option): Invoking runtest.
+* --version (runtest option): Invoking runtest.
+* -b (runtest option): Invoking runtest.
+* -V (runtest option): Invoking runtest.
+* -v (runtest option): Invoking runtest.
+* .exp: Overview.
+* absolute PATH: utils.exp.
+* adding a target: Adding Targets.
+* adding a test case: Adding.
+* all_flag: Config Values.
+* ambiguity, required for POSIX: Posix.
+* archive object files: target.exp.
+* auxiliary files, building: Running Tests.
+* auxiliary programs: Configuring DejaGnu.
+* auxiliary test programs: Invoking runtest.
+* baud: Config Values.
+* baud rate, specifying: Invoking runtest.
+* bps, specifying: Invoking runtest.
+* bt: debugger.exp.
+* bug number: Variables.
+* bug number, extra: Variables.
+* bug_id: Variables.
+* build config name, changing: Invoking runtest.
+* build host configuration test: framework.exp.
+* build_triplet: Config Values.
+* built in procedures, DejaGnu: DejaGnu Builtins.
+* C torture test: Writing.
+* canadian cross configuration test: framework.exp.
+* cancelling expected failure: framework.exp.
+* check makefile target: Running Tests.
+* clear_xfail CONFIG: framework.exp.
+* Closing a remote connection: remote.exp.
+* command line option variables: Config Values.
+* command line options: Invoking runtest.
+* command line Tcl variable definition: Invoking runtest.
+* communications procedures: remote.exp.
+* comp_output: Variables.
+* comparing files: utils.exp.
+* compile a file: target.exp.
+* configuration dependent defaults: Config Values.
+* configuring DejaGnu: Installation.
+* connecting to target: Invoking runtest.
+* connectmode: Config Values.
+* converting relative paths to absolute: utils.exp.
+* Core Internal Procedures: framework.exp.
+* cross configuration: Running Tests.
+* current test subdirectory: Variables.
+* dbg.log file: Invoking runtest.
+* debug log: Debug.
+* debug log for test cases: Invoking runtest.
+* debugger.exp: debugger.exp.
+* debugging a test case: Debugging.
+* default options, controlling: Config Values.
+* defaults, option: Config Values.
+* defaults, setting in init file: Init Module.
+* DejaGnu configuration: Installation.
+* DejaGnu test driver: Invoking runtest.
+* DejaGnu, the name: Design Goals.
+* Delete a watchpoint.: debugger.exp.
+* design goals: Design Goals.
+* detailed log: Detail.
+* diff FILENAME FILENAME: utils.exp.
+* directories matching a pattern: utils.exp.
+* directory names and --tool: Names.
+* download a file: remote.exp.
+* download FILE [ SPAWNID ]: remote.exp.
+* download, tip: remote.exp.
+* dumplocals *expr*: debugger.exp.
+* dumprocs *expr*: debugger.exp.
+* dumpvars *expr*: debugger.exp.
+* dumpwatch *expr*: debugger.exp.
+* echo.exp: Sample Test.
+* ERROR <1>: framework.exp.
+* ERROR: Invoking runtest.
+* example: Sample Test.
+* exec_output: Variables.
+* exec_prefix, configure options.: Configuring DejaGnu.
+* execute_anywhere *cmdline*: target.exp.
+* executing commands remotely: target.exp.
+* existing tests, running: Running Tests.
+* exit code from runtest: Invoking runtest.
+* exit procedure, tested tools: Target Dependent.
+* exit_remote_shell SPAWNID: remote.exp.
+* exp filename suffix: Names.
+* expect internal tracing: Invoking runtest.
+* expect script names: Overview.
+* expect scripting language: Tcl and Expect.
+* expect_out(buffer): Variables.
+* expected failure <1>: framework.exp.
+* expected failure: Invoking runtest.
+* expected failure, cancelling: framework.exp.
+* FAIL <1>: Invoking runtest.
+* FAIL: Posix.
+* fail "STRING": framework.exp.
+* failing test, expected: Invoking runtest.
+* failing test, unexpected: Invoking runtest.
+* failure, expected: framework.exp.
+* failure, POSIX definition: Posix.
+* filename for test files: Names.
+* files matching a pattern: utils.exp.
+* find DIR PATTERN: utils.exp.
+* findfile: Init Module.
+* finding file differences: utils.exp.
+* future directions: Future Directions.
+* gdb.t00/echo.exp: Sample Test.
+* get_warning_threshold: framework.exp.
+* getdirs DIR: utils.exp.
+* getdirs DIR PATTERN: utils.exp.
+* getenv VAR: utils.exp.
+* getting environment variables: utils.exp.
+* GNATS bug number: Variables.
+* Granlund, Torbjorn: Writing.
+* grep FILENAME REGEXP: utils.exp.
+* grep FILENAME REGEXP line: utils.exp.
+* help with runtest: Invoking runtest.
+* hints on test case writing: Hints.
+* host config name, changing: Invoking runtest.
+* host configuration test: framework.exp.
+* host, explained: Installation.
+* host_triplet: Config Values.
+* ignoretests: Config Values.
+* init file name: Init Module.
+* init file, purpose: Init Module.
+* initialization: Init Module.
+* input files: Input Files.
+* installed tool name: framework.exp.
+* installing DejaGnu: Installing DejaGnu.
+* internal details: Internals.
+* invoking: Invoking runtest.
+* IP network procedures: remote.exp.
+* isbuild "HOST": framework.exp.
+* ishost "HOST": framework.exp.
+* isnative: framework.exp.
+* istarget "TARGET": framework.exp.
+* kermit PORT BPS: remote.exp.
+* kermit, remote testing via: Invoking runtest.
+* last command output: Variables.
+* lib/debugger.exp: debugger.exp.
+* lib/remote.exp: remote.exp.
+* lib/target.exp: target.exp.
+* lib/utils.exp: utils.exp.
+* Libes, Don: Tcl and Expect.
+* list, pruning: utils.exp.
+* list_targets: target.exp.
+* lists supported targets: target.exp.
+* load library file: framework.exp.
+* load procedure, tested tools: Target Dependent.
+* load_lib "LIBRARY-FILE": framework.exp.
+* local site.exp: Local Config File.
+* log files, where to write: Invoking runtest.
+* Lupton, Robert: Adding Tools.
+* make builds part of tests: Configuring DejaGnu.
+* make check: Running Tests.
+* master site.exp: Master Config File.
+* Menapace, Julia: Design Goals.
+* mondfe: Cross Targets.
+* mondfe, remote testing via: Invoking runtest.
+* name "DejaGnu": Design Goals.
+* name for remote test machine: Invoking runtest.
+* name transformations: framework.exp.
+* name, initialization module: Init Module.
+* naming conventions: Names.
+* naming tests to run: Invoking runtest.
+* native configuration: Running Tests.
+* native configuration test: framework.exp.
+* network (IP) procedures: remote.exp.
+* NOTE <1>: framework.exp.
+* NOTE: Invoking runtest.
+* note "STRING": framework.exp.
+* objdir: Config Values.
+* object directory: Invoking runtest.
+* Opening a remote connection: remote.exp.
+* operating principles: Internals.
+* option defaults: Config Values.
+* option list, runtest: Invoking runtest.
+* options: Invoking runtest.
+* options for runtest, common: Running Tests.
+* options, Tcl variables for defaults: Config Values.
+* order of tests: Names.
+* Ousterhout, John K.: Tcl and Expect.
+* outdir: Config Values.
+* output directory: Invoking runtest.
+* output files: Output Files.
+* output, additional: Invoking runtest.
+* overriding site.exp: Customizing.
+* overview: Overview.
+* PASS <1>: Invoking runtest.
+* PASS: Posix.
+* pass "STRING": framework.exp.
+* path lookup: utils.exp.
+* pattern match, directory: utils.exp.
+* pattern match, filenames: utils.exp.
+* perror "STRING NUMBER": framework.exp.
+* personal config site.exp: Personal Config File.
+* pop_host: target.exp.
+* pop_target: target.exp.
+* porting to a new host: Porting.
+* POSIX conformance: Posix.
+* prefix, configure options: Configuring DejaGnu.
+* print *var*: debugger.exp.
+* Print a backtrace: debugger.exp.
+* Print global variable values: debugger.exp.
+* Print local variable value: debugger.exp.
+* Print procedure bodies: debugger.exp.
+* Print watchpoints: debugger.exp.
+* Printing variable values: debugger.exp.
+* PRMS bug number: Variables.
+* prms_id: Variables.
+* problem, detected by test case: Invoking runtest.
+* prune LIST PATTERN: utils.exp.
+* prune_system_crud SYSTEM TEXT: utils.exp.
+* pruning system output, examining program output: utils.exp.
+* psource FILENAME: utils.exp.
+* push_host *name*: target.exp.
+* push_target *name*: target.exp.
+* quit: debugger.exp.
+* Quiting DejaGnu: debugger.exp.
+* ranlib a file: target.exp.
+* reboot: Config Values.
+* rebooting remote targets: Invoking runtest.
+* regular expression, file contents: utils.exp.
+* remote connection procedures: remote.exp.
+* remote connection, ending: remote.exp.
+* remote test machine name: Invoking runtest.
+* remote testbed, connecting to: Invoking runtest.
+* remote testing: Cross Targets.
+* remote testing via kermit: Invoking runtest.
+* remote testing via mondfe: Invoking runtest.
+* remote testing via rlogin: Invoking runtest.
+* remote testing via rsh: Invoking runtest.
+* remote testing via telnet: Invoking runtest.
+* remote testing via tip: Invoking runtest.
+* remote.exp: remote.exp.
+* remote_close SHELLID: remote.exp.
+* remote_open TYPE: remote.exp.
+* rlogin HOSTNAME: remote.exp.
+* rlogin, remote testing via: Invoking runtest.
+* rsh HOSTNAME: remote.exp.
+* rsh, remote testing via: Invoking runtest.
+* running: Invoking runtest.
+* running tests: Running Tests.
+* runtest description: Invoking runtest.
+* runtest exit code: Invoking runtest.
+* runtest option defaults: Config Values.
+* runtest option list: Invoking runtest.
+* runtest, listing options: Invoking runtest.
+* runtest, most common options: Running Tests.
+* runtest, variable defns on cmdline: Invoking runtest.
+* runtest.exp: Internals.
+* runtest_file_p RUNTESTS TESTCASE: utils.exp.
+* runtests: Config Values.
+* searching file contents: utils.exp.
+* selecting a range of tests <1>: utils.exp.
+* selecting a range of tests: Invoking runtest.
+* selecting tests for a tool: Invoking runtest.
+* serial download, tip: remote.exp.
+* serial line connection, kermit: remote.exp.
+* serial line connection, tip: remote.exp.
+* set current host: target.exp.
+* set current target: target.exp.
+* set_warning_threshold THRESHOLD: framework.exp.
+* setenv VAR VAL: utils.exp.
+* setting defaults for DejaGnu variables: Config Values.
+* setting environment variables: utils.exp.
+* setting up targets: Init Module.
+* setup_xfail "CONFIG [BUGID]": framework.exp.
+* site.exp: Customizing.
+* site.exp for all of DejaGnu: Master Config File.
+* site.exp for each person: Personal Config File.
+* site.exp for each tool: Local Config File.
+* site.exp, multiple: Customizing.
+* slay NAME: utils.exp.
+* slaying processes: utils.exp.
+* source directory: Invoking runtest.
+* sourcing Tcl files: utils.exp.
+* special variables: Variables.
+* specifying target name: Invoking runtest.
+* specifying the build config name: Invoking runtest.
+* specifying the host config name: Invoking runtest.
+* specifying the target configuration: Invoking runtest.
+* srcdir: Config Values.
+* standard conformance: POSIX 1003.3: Posix.
+* start procedure, tested tools: Target Dependent.
+* starting interactive tools: Init Module.
+* starting the tcl debugger: Invoking runtest.
+* subdir: Variables.
+* success, POSIX definition: Posix.
+* successful test: Invoking runtest.
+* successful test, unexpected: Invoking runtest.
+* suffix, expect scripts: Overview.
+* summary log: Summary.
+* target configuration test: framework.exp.
+* target configuration, specifying: Invoking runtest.
+* target dependent procedures: Target Dependent.
+* target machine name: Invoking runtest.
+* target, explained: Installation.
+* target.exp: target.exp.
+* target_triplet: Config Values.
+* targetname: Config Values.
+* targets: Cross Targets.
+* tcl: Tcl and Expect.
+* tcl debugger: Invoking runtest.
+* Tcl variables for option defaults: Config Values.
+* Tcl variables, defining for runtest: Invoking runtest.
+* TCLVAR=VALUE: Invoking runtest.
+* telnet HOSTNAME PORT: remote.exp.
+* telnet, remote testing via: Invoking runtest.
+* terminating remote connection: remote.exp.
+* test case cannot run: Invoking runtest.
+* test case messages: Invoking runtest.
+* test case warnings: Invoking runtest.
+* test case, debugging: Debugging.
+* test case, declaring ambiguity: framework.exp.
+* test case, declaring failure: framework.exp.
+* test case, declaring no support: framework.exp.
+* test case, declaring no test: framework.exp.
+* test case, declaring success: framework.exp.
+* test case, ERROR in: framework.exp.
+* test case, expecting failure: framework.exp.
+* test case, informational messages: framework.exp.
+* test case, WARNING in: framework.exp.
+* test case, WARNING threshold: framework.exp.
+* test case, writing: Tests.
+* test cases, debug log: Invoking runtest.
+* test directories, naming: Names.
+* test filename: Names.
+* test output, displaying all: Invoking runtest.
+* test programs, auxiliary: Invoking runtest.
+* test suite distributions: Configuring DejaGnu.
+* test, failing: Invoking runtest.
+* test, successful: Invoking runtest.
+* test, unresolved outcome: Invoking runtest.
+* test, unsupported: Invoking runtest.
+* tests, running: Running Tests.
+* tests, running order: Names.
+* tests, running specifically <1>: utils.exp.
+* tests, running specifically: Invoking runtest.
+* TET: Posix.
+* tip PORT: remote.exp.
+* tip, remote testing via: Invoking runtest.
+* tip_download SPAWNID FILE: remote.exp.
+* tool: Config Values.
+* tool command language: Tcl and Expect.
+* tool initialization: Init Module.
+* tool name, as installed: framework.exp.
+* tool names and naming conventions: Names.
+* TOOL_exit: Target Dependent.
+* TOOL_load: Target Dependent.
+* TOOL_start: Target Dependent.
+* TOOL_version: Target Dependent.
+* tracelevel: Config Values.
+* tracing Tcl commands: Invoking runtest.
+* transform: Init Module.
+* transform "TOOLNAME": framework.exp.
+* transform tool name: framework.exp.
+* turning on output: Invoking runtest.
+* unexpected success: Invoking runtest.
+* UNRESOLVED <1>: Invoking runtest.
+* UNRESOLVED: Posix.
+* unresolved "STRING": framework.exp.
+* unset current host: target.exp.
+* unset current target: target.exp.
+* unsetenv VAR: utils.exp.
+* unsetting environment variables: utils.exp.
+* UNSUPPORTED <1>: Invoking runtest.
+* UNSUPPORTED: Posix.
+* unsupported "STRING": framework.exp.
+* unsupported test: Invoking runtest.
+* UNTESTED <1>: Invoking runtest.
+* UNTESTED: Posix.
+* untested "STRING": framework.exp.
+* untested properties: Invoking runtest.
+* utilities, loading from init file: Init Module.
+* utils.exp: utils.exp.
+* variables for all tests: Variables.
+* variables for option defaults: Config Values.
+* variables of DejaGnu, defaults: Customizing.
+* verbose: Config Values.
+* verbose [-log] [-n] [-] "STRING" NUMBER: framework.exp.
+* verbose builtin function: framework.exp.
+* version numbers: Invoking runtest.
+* version procedure, tested tools: Target Dependent.
+* VxWorks, link with -r: Cross Targets.
+* WARNING <1>: framework.exp.
+* WARNING: Invoking runtest.
+* warning "STRING NUMBER": framework.exp.
+* Watch when a variable is read: debugger.exp.
+* Watch when a variable is unset: debugger.exp.
+* Watch when a variable is written: debugger.exp.
+* watchdel *watch*: debugger.exp.
+* watchread *var*: debugger.exp.
+* watchunset *var*: debugger.exp.
+* watchwrite *var*: debugger.exp.
+* What is New: What is New.
+* which BINARY: utils.exp.
+* writing a test case: Tests.
+* XFAIL <1>: Invoking runtest.
+* XFAIL: Posix.
+* XFAIL, avoiding for POSIX: Posix.
+* XFAIL, producing: framework.exp.
+* XPASS: Invoking runtest.
+* XPASS, producing: framework.exp.
+
+
diff --git a/contrib/bluegnu2.0.3/install-sh b/contrib/bluegnu2.0.3/install-sh
new file mode 100755
index 0000000..89fc9b0
--- /dev/null
+++ b/contrib/bluegnu2.0.3/install-sh
@@ -0,0 +1,238 @@
+#! /bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+#
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+tranformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+else
+ true
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d $dst ]; then
+ instcmd=:
+ else
+ instcmd=mkdir
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f $src -o -d $src ]
+ then
+ true
+ else
+ echo "install: $src does not exist"
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "install: no destination specified"
+ exit 1
+ else
+ true
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d $dst ]
+ then
+ dst="$dst"/`basename $src`
+ else
+ true
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp="${pathcomp}${1}"
+ shift
+
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $mkdirprog "${pathcomp}"
+ else
+ true
+ fi
+
+ pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd $dst &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ dstfile=`basename $dst $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ true
+ fi
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd $src $dsttmp &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+
+fi &&
+
+
+exit 0
diff --git a/contrib/bluegnu2.0.3/mkinstalldirs b/contrib/bluegnu2.0.3/mkinstalldirs
new file mode 100755
index 0000000..0801ec2
--- /dev/null
+++ b/contrib/bluegnu2.0.3/mkinstalldirs
@@ -0,0 +1,32 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Last modified: 1994-03-25
+# Public domain
+
+errstatus=0
+
+for file in ${1+"$@"} ; do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d in ${1+"$@"} ; do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp" 1>&2
+ mkdir "$pathcomp" || errstatus=$?
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/contrib/bluegnu2.0.3/runtest b/contrib/bluegnu2.0.3/runtest
new file mode 100755
index 0000000..a80d1ea
--- /dev/null
+++ b/contrib/bluegnu2.0.3/runtest
@@ -0,0 +1,90 @@
+#!/bin/sh
+#
+# runtest -- basically all this script does is find the proper expect shell
+# and then
+# run BlueGnu. <neurdenburgj@acm.org>
+#
+
+#
+# Get the execution path to this script and the current directory.
+#
+execpath=`echo ${0-.} | sed -e 's@/[^/]*$@@'`
+# rootme=`pwd`
+
+#
+# get the name by which bluegnu was invoked and extract the config triplet
+#
+bluegnu=`echo ${0-.} | sed -e 's@^.*/@@'`
+target=`echo $bluegnu | sed -e 's/-runtest$//'`
+if [ "$target" != runtest ] ; then
+ target="--target ${target}"
+else
+ target=""
+fi
+
+#
+# Find the right expect binary to use. If a variable EXPECT exists,
+# it takes precedence over all other tests. Otherwise look for a freshly
+# built one, and then use one in the path.
+#
+if [ x"$EXPECT" != x ] ; then
+ expectbin=$EXPECT
+else
+ if [ -x "$execpath/expect" ] ; then
+ expectbin=$execpath/expect
+ else
+ expectbin=expect
+ fi
+fi
+
+# just to be safe...
+if [ -z "$expectbin" ]; then
+ echo "ERROR: No expect shell found"
+ exit 1
+fi
+
+#
+# Extract a few options from the option list.
+#
+verbose=0
+debug=""
+for a in "$@" ; do
+ case $a in
+ -v|--v|-verb*|--verb*) verbose=`expr $verbose + 1`;;
+ -D0|--D0) debug="-D 0" ;;
+ -D1|--D1) debug="-D 1" ;;
+ esac
+done
+
+if expr $verbose \> 0 > /dev/null ; then
+ echo Expect binary is $expectbin
+fi
+
+#
+# find runtest.exp. First we look in it's installed location, otherwise
+# start if from the source tree.
+#
+for i in $execpath/../lib/bluegnu $execpath ; do
+ if expr $verbose \> 1 > /dev/null ; then
+ echo Looking for $i/runtest.exp.
+ fi
+ if [ -f $i/runtest.exp ] ; then
+ runpath=$i
+ if expr $verbose \> 0 > /dev/null ; then
+ echo Using $i/runtest.exp as main test driver
+ fi
+ fi
+done
+# check for an environment variable
+if [ x"$BLUEGNULIBS" != x ] ; then
+ runpath=$BLUEGNULIBS
+ if expr $verbose \> 0 > /dev/null ; then
+ echo Using $BLUEGNULIBS/runtest.exp as main test driver
+ fi
+fi
+if [ x"$runpath" = x ] ; then
+ echo "ERROR: runtest.exp does not exist."
+ exit 1
+fi
+
+exec $expectbin $debug -- $runpath/runtest.exp $target ${1+"$@"}
diff --git a/contrib/bluegnu2.0.3/runtest.exp b/contrib/bluegnu2.0.3/runtest.exp
new file mode 100755
index 0000000..b436e2d
--- /dev/null
+++ b/contrib/bluegnu2.0.3/runtest.exp
@@ -0,0 +1,1146 @@
+# Test Framework Driver
+# Copyright (C) 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+# Copyright (C) 1998 jotOmega dsc, 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:
+#
+
+# This file was written by Rob Savoye. (rob@welcomehome.org)
+# and modified by Jan-Willem Neurdenburg. (neurdenburgj@acm.org)
+
+set frame_version 1.3
+if ![info exists argv0] {
+ send_error "Must use a version of Expect greater than 5.0\n"
+ exit 1
+}
+
+#
+# trap some signals so we know whats happening. These definitions are only
+# temporary until we read in the library stuff
+#
+trap { send_user "\nterminated\n"; exit 1 } SIGTERM
+trap { send_user "\ninterrupted by user\n"; exit 1 } SIGINT
+trap { send_user "\nsegmentation violation\n"; exit 1 } SIGSEGV
+trap { send_user "\nsigquit\n"; exit 1 } SIGQUIT
+
+#
+# Initialize a few global variables used by all tests.
+# `reset_vars' resets several of these, we define them here to document their
+# existence. In fact, it would be nice if all globals used by some interface
+# of bluegnu proper were documented here.
+#
+# Keep these all lowercase. Interface variables used by the various
+# testsuites (eg: the gcc testsuite) should be in all capitals
+# (eg: TORTURE_OPTIONS).
+#
+set mail_logs 0 ;# flag for mailing of summary and diff logs
+set psum_file "latest" ;# file name of previous summary to diff against
+set testcnt 0 ;# number of testcases that ran
+set passcnt 0 ;# number of testcases that passed
+set failcnt 0 ;# number of testcases that failed
+set xfailcnt 0 ;# number of testcases expected to fail which did
+set xpasscnt 0 ;# number of testcases that passed unexpectedly
+set warncnt 0 ;# number of warnings
+set errcnt 0 ;# number of errors
+set unsupportedcnt 0 ;# number of testcases that can't run
+set unresolvedcnt 0 ;# number of testcases whose result is unknown
+set untestedcnt 0 ;# number of untested testcases
+set exit_status 0 ;# exit code returned by this program
+set xfail_flag 0
+set xfail_prms 0
+set sum_file "" ;# name of the file that contains the summary log
+set base_dir "" ;# the current working directory
+set logname "" ;# the users login name
+set passwd ""
+set prms_id 0 ;# GNATS prms id number
+set bug_id 0 ;# optional bug id number
+set dir "" ;# temp variable for directory names
+set srcdir "." ;# source directory containing the test suite
+set ignoretests "" ;# list of tests to not execute
+set objdir "." ;# directory where test case binaries live
+set makevars "" ;# FIXME: Is this used anywhere?
+set reboot 0
+set configfile site.exp ;# (local to this file)
+set multipass "" ;# list of passes and var settings
+set target_abbrev "unix" ;# environment (unix, sim, vx, etc.).
+set errno ""; ;#
+#
+# set communication parameters here
+#
+set netport ""
+set targetname ""
+set connectmode ""
+set serialport ""
+set baud ""
+#
+# These describe the host and target environments.
+#
+set build_triplet "" ;# type of architecture to run tests on
+set build_os "" ;# type of os the tests are running on
+set build_vendor "" ;# vendor name of the OS or workstation the test are running on
+set build_cpu "" ;# type of the cpu tests are running on
+set host_triplet "" ;# type of architecture to run tests on, sometimes remotely
+set host_os "" ;# type of os the tests are running on
+set host_vendor "" ;# vendor name of the OS or workstation the test are running on
+set host_cpu "" ;# type of the cpu tests are running on
+set target_triplet "" ;# type of architecture to run tests on, final remote
+set target_os "" ;# type of os the tests are running on
+set target_vendor "" ;# vendor name of the OS or workstation the test are running on
+set target_cpu "" ;# type of the cpu tests are running on
+set target_alias "" ;# standard abbreviation of target
+
+#
+# some convenience abbreviations
+#
+if ![info exists hex] {
+ set hex "0x\[0-9A-Fa-f\]+"
+}
+if ![info exists decimal] {
+ set decimal "\[0-9\]+"
+}
+
+#
+# set the base dir (current working directory)
+#
+set base_dir [pwd]
+
+#
+# These are tested in case they are not initialized in $configfile. They are
+# tested here instead of the init module so they can be overridden by command
+# line options.
+#
+if ![info exists all_flag] {
+ set all_flag 0
+}
+if ![info exists binpath] {
+ set binpath ""
+}
+if ![info exists debug] {
+ set debug 0
+}
+if ![info exists options] {
+ set options ""
+}
+if ![info exists outdir] {
+ set outdir "."
+}
+if ![info exists reboot] {
+ set reboot 1
+}
+if ![info exists all_runtests] {
+ # FIXME: Can we create an empty array?
+ # we don't have to (JWN 20 March 1998)
+ #set all_runtests(empty) ""
+}
+if ![info exists tracelevel] {
+ set tracelevel 0
+}
+if ![info exists verbose] {
+ set verbose 0
+}
+
+#
+# verbose [-n] [-log] [--] message [level]
+#
+# Print MESSAGE if the verbose level is >= LEVEL.
+# The default value of LEVEL is 1.
+# "-n" says to not print a trailing newline.
+# "-log" says to add the text to the log file even if it won't be printed.
+# Note that the apparent behaviour of `send_user' dictates that if the message
+# is printed it is also added to the log file.
+# Use "--" if MESSAGE begins with "-".
+#
+# This is defined here rather than in framework.exp so we can use it
+# while still loading in the support files.
+#
+proc verbose { args } {
+ global verbose
+ set newline 1
+ set logfile 0
+
+ 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 { [lindex $args $i] == "-log" } {
+ set logfile 1
+ } elseif { [string index [lindex $args $i] 0] == "-" } {
+ clone_output "ERROR: verbose: illegal argument: [lindex $args $i]"
+ return
+ } else {
+ break
+ }
+ }
+ if { [llength $args] == $i } {
+ clone_output "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 } {
+ send_user -- "$message\n"
+ } else {
+ send_user -- "$message"
+ }
+ } elseif { $logfile } {
+ if { $newline } {
+ send_log "$message\n"
+ } else {
+ send_log "$message"
+ }
+ }
+}
+
+#
+# Transform a tool name to get the installed name.
+# target_triplet is the canonical target name. target_alias is the
+# target name used when configure was run.
+#
+proc transform { name } {
+ global target_triplet
+ global target_alias
+ global host_triplet
+
+ if [string match $target_triplet $host_triplet] {
+ return $name
+ }
+ if [string match "native" $target_triplet] {
+ return $name
+ }
+ if [string match "" $target_triplet] {
+ return $name
+ } else {
+ set tmp ${target_alias}-${name}
+ verbose "Transforming $name to $tmp"
+ return $tmp
+ }
+}
+
+#
+# findfile arg0 [arg1] [arg2]
+#
+# Find a file and see if it exists. If you only care about the false
+# condition, then you'll need to pass a null "" for arg1.
+# arg0 is the filename to look for. If the only arg,
+# then that's what gets returned. If this is the
+# only arg, then if it exists, arg0 gets returned.
+# if it doesn't exist, return only the prog name.
+# arg1 is optional, and it's what gets returned if
+# the file exists.
+# arg2 is optional, and it's what gets returned if
+# the file doesn't exist.
+#
+proc findfile { args } {
+ # look for the file
+ verbose "Seeing if [lindex $args 0] exists." 2
+ if [file exists [lindex $args 0]] {
+ if { [llength $args] > 1 } {
+ verbose "Found file, returning [lindex $args 1]"
+ return [lindex $args 1]
+ } else {
+ verbose "Found file, returning [lindex $args 0]"
+ return [lindex $args 0]
+ }
+ } else {
+ if { [llength $args] > 2 } {
+ verbose "Didn't find file, returning [lindex $args 2]"
+ return [lindex $args 2]
+ } else {
+ verbose "Didn't find file, returning [file tail [lindex $args 0]]"
+ return [transform [file tail [lindex $args 0]]]
+ }
+ }
+}
+
+#
+# load_file [-1] [--] file1 [ file2 ... ]
+#
+# Utility to source a file. All are sourced in order unless the flag "-1"
+# is given in which case we stop after finding the first one.
+# The result is 1 if a file was found, 0 if not.
+# If a tcl error occurs while sourcing a file, we print an error message
+# and exit.
+#
+# ??? Perhaps add an optional argument of some descriptive text to add to
+# verbose and error messages (eg: -t "library file" ?).
+#
+proc load_file { args } {
+ set i 0
+ set only_one 0
+ if { [lindex $args $i] == "-1" } {
+ set only_one 1
+ incr i
+ }
+ if { [lindex $args $i] == "--" } {
+ incr i
+ }
+
+ set found 0
+ foreach file [lrange $args $i end] {
+ verbose "Looking for $file" 2
+ if [file exists $file] {
+ set found 1
+ verbose "Found $file"
+ if { [catch "uplevel #0 source $file"] == 1 } {
+ send_error "ERROR: tcl error sourcing $file.\n"
+ global errorInfo
+ if [info exists errorInfo] {
+ send_error "$errorInfo\n"
+ }
+ exit 1
+ }
+ if $only_one {
+ break
+ }
+ }
+ }
+ return $found
+}
+
+#
+# Parse the arguments the first time looking for these. We will ultimately
+# parse them twice. Things are complicated because:
+# - we want to parse --verbose early on
+# - we don't want config files to override command line arguments
+# (eg: $base_dir/$configfile vs --host/--target; $BLUEGNU vs --baud,
+# --connectmode, and --name)
+# - we need some command line arguments before we can process some config files
+# (eg: --objdir before $objdir/$configfile, --host/--target before $BLUEGNU)
+# The use of `arg_host_triplet' and `arg_target_triplet' lets us avoid parsing
+# the arguments three times.
+#
+
+set arg_host_triplet ""
+set arg_target_triplet ""
+set arg_build_triplet ""
+set argc [ llength $argv ]
+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"
+ }
+ }
+
+ # split out the argument for options that take them
+ switch -glob -- $option {
+ "--*=*" {
+ set optarg [lindex [split $option =] 1]
+ }
+ "--ba*" -
+ "--bu*" -
+ "--co*" -
+ "--ho*" -
+ "--i*" -
+ "--m*" -
+ "--n*" -
+ "--ob*" -
+ "--ou*" -
+ "--sr*" -
+ "--st*" -
+ "--ta*" -
+ "--to*" {
+ incr i
+ set optarg [lindex $argv $i]
+ }
+ }
+
+ switch -glob -- $option {
+ "--bu*" { # (--build) the build host configuration
+ set arg_build_triplet $optarg
+ continue
+ }
+
+ "--ho*" { # (--host) the host configuration
+ set arg_host_triplet $optarg
+ continue
+ }
+
+ "--ob*" { # (--objdir) where the test case object code lives
+ set objdir $optarg
+ continue
+ }
+
+ "--sr*" { # (--srcdir) where the testsuite source code lives
+ set srcdir $optarg
+ continue
+ }
+
+ "--ta*" { # (--target) the target configuration
+ set arg_target_triplet $optarg
+ continue
+ }
+
+ "--to*" { # (--tool) specify tool name
+ set tool $optarg
+ continue
+ }
+
+ "--v" -
+ "--verb*" { # (--verbose) verbose output
+ incr verbose
+ continue
+ }
+ }
+}
+verbose "Verbose level is $verbose"
+
+#
+# get the users login name
+#
+if [string match "" $logname] {
+ if [info exists env(USER)] {
+ set logname $env(USER)
+ } else {
+ if [info exists env(LOGNAME)] {
+ set logname $env(LOGNAME)
+ } else {
+ # try getting it with whoami
+ catch "set logname [exec whoami]" tmp
+ if [string match "*couldn't find*to execute*" $tmp] {
+ # try getting it with who am i
+ unset tmp
+ catch "set logname [exec who am i]" tmp
+ if [string match "*Command not found*" $tmp] {
+ send_user "ERROR: couldn't get the users login name\n"
+ set logname "Unknown"
+ } else {
+ set logname [lindex [split $logname " !"] 1]
+ }
+ }
+ }
+ }
+}
+verbose "Login name is $logname"
+
+#
+# Begin sourcing the config files.
+# All are sourced in order.
+#
+# Search order:
+# $HOME/.bluegnurc -> $base_dir/$configfile -> $objdir/$configfile
+# -> installed -> $BLUEGNU
+#
+# ??? It might be nice to do $HOME last as it would allow it to be the
+# ultimate override. Though at present there is still $BLUEGNU.
+#
+# For the normal case, we rely on $base_dir/$configfile to set
+# host_triplet and target_triplet.
+#
+
+load_file ~/.bluegnurc $base_dir/$configfile
+
+#
+# If objdir didn't get set in $base_dir/$configfile, set it to $base_dir.
+# Make sure we source $objdir/$configfile in case $base_dir/$configfile doesn't
+# exist and objdir was given on the command line.
+#
+
+if [expr [string match "." $objdir] || [string match $srcdir $objdir]] {
+ set objdir $base_dir
+} else {
+ load_file $objdir/$configfile
+}
+verbose "Using test sources in $srcdir"
+verbose "Using test binaries in $objdir"
+
+set execpath [file dirname $argv0]
+set libdir [file dirname $execpath]/bluegnu
+if [info exists env(BLUEGNULIBS)] {
+ set libdir $env(BLUEGNULIBS)
+}
+verbose "Using $libdir to find libraries"
+
+#
+# If the host or target was given on the command line, override the above
+# config files. We allow $BLUEGNU to massage them though in case it would
+# ever want to do such a thing.
+#
+if { $arg_host_triplet != "" } {
+ set host_triplet $arg_host_triplet
+}
+if { $arg_build_triplet != "" } {
+ set build_triplet $arg_build_triplet
+}
+
+# if we only specify --host, then that must be the build machne too, and we're
+# stuck using the old functionality of a simple cross test
+if [expr { $build_triplet == "" && $host_triplet != "" } ] {
+ set build_triplet $host_triplet
+}
+# if we only specify --build, then we'll use that as the host too
+if [expr { $build_triplet != "" && $host_triplet == "" } ] {
+ set host_triplet $build_triplet
+}
+unset arg_host_triplet arg_build_triplet
+
+#
+# If the build machine type hasn't been specified by now, use config.guess.
+#
+
+if [expr { $build_triplet == "" && $host_triplet == ""} ] {
+ # find config.guess
+ foreach dir "$libdir $libdir/.. $srcdir/.. $srcdir/../.." {
+ verbose "Looking for $dir" 2
+ if [file exists $dir/config.guess] {
+ set config_guess $dir/config.guess
+ verbose "Found $dir/config.guess"
+ break
+ }
+ }
+
+ # get the canonical config name
+ if ![info exists config_guess] {
+ send_error "ERROR: Couldn't guess configuration.\n"
+ exit 1
+ }
+ catch "exec $config_guess" build_triplet
+ case $build_triplet in {
+ { "No uname command or uname output not recognized" "Unable to guess system type" } {
+ verbose "WARNING: Uname output not recognized"
+ set build_triplet unknown
+ }
+ }
+ verbose "Assuming build host is $build_triplet"
+ if { $host_triplet == "" } {
+ set host_triplet $build_triplet
+ }
+
+}
+
+#
+# Figure out the target. If the target hasn't been specified, then we have to assume
+# we are native.
+#
+if { $arg_target_triplet != "" } {
+ set target_triplet $arg_target_triplet
+} elseif { $target_triplet == "" } {
+ set target_triplet $build_triplet
+ verbose "Assuming native target is $target_triplet" 2
+}
+unset arg_target_triplet
+#
+# Default target_alias to target_triplet.
+#
+if ![info exists target_alias] {
+ set target_alias $target_triplet
+}
+
+#
+# Find and load the global config file if it exists.
+# The global config file is used to set the connect mode and other
+# parameters specific to each particular target.
+# These files assume the host and target have been set.
+#
+
+if { [load_file -- $libdir/$configfile] == 0 } {
+ # If $BLUEGNU isn't set either then there isn't any global config file.
+ # Warn the user as there really should be one.
+ if { ! [info exists env(BLUEGNU)] } {
+ send_error "WARNING: Couldn't find the global config file.\n"
+ }
+}
+
+if [info exists env(BLUEGNU)] {
+ if { [load_file -- $env(BLUEGNU)] == 0 } {
+ # It may seem odd to only issue a warning if there isn't a global
+ # config file, but issue an error if $BLUEGNU is erroneously defined.
+ # Since $BLUEGNU is set there is *supposed* to be a global config file,
+ # so the current behaviour seems reasonable.
+ send_error "ERROR: global config file $env(BLUEGNU) not found.\n"
+ exit 1
+ }
+}
+
+#
+# parse out the config parts of the triplet name
+#
+
+# build values
+if { $build_cpu == "" } {
+ regsub -- "-.*-.*" ${build_triplet} "" build_cpu
+}
+if { $build_vendor == "" } {
+ regsub -- "^\[a-z0-9\]*-" ${build_triplet} "" build_vendor
+ regsub -- "-.*" ${build_vendor} "" build_vendor
+}
+if { $build_os == "" } {
+ regsub -- ".*-.*-" ${build_triplet} "" build_os
+}
+
+# host values
+if { $host_cpu == "" } {
+ regsub -- "-.*-.*" ${host_triplet} "" host_cpu
+}
+if { $host_vendor == "" } {
+ regsub -- "^\[a-z0-9\]*-" ${host_triplet} "" host_vendor
+ regsub -- "-.*" ${host_vendor} "" host_vendor
+}
+if { $host_os == "" } {
+ regsub -- ".*-.*-" ${host_triplet} "" host_os
+}
+
+# target values
+if { $target_cpu == "" } {
+ regsub -- "-.*-.*" ${target_triplet} "" target_cpu
+}
+if { $target_vendor == "" } {
+ regsub -- "^\[a-z0-9\]*-" ${target_triplet} "" target_vendor
+ regsub -- "-.*" ${target_vendor} "" target_vendor
+}
+if { $target_os == "" } {
+ regsub -- ".*-.*-" ${target_triplet} "" target_os
+}
+
+#
+# Parse the command line arguments.
+#
+
+set argc [ llength $argv ]
+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"
+ }
+ }
+
+ # split out the argument for options that take them
+ switch -glob -- $option {
+ "--*=*" {
+ set optarg [lindex [split $option =] 1]
+ }
+ "--ba*" -
+ "--bu*" -
+ "--co*" -
+ "--ho*" -
+ "--i*" -
+ "--m*" -
+ "--n*" -
+ "--ob*" -
+ "--ou*" -
+ "--sr*" -
+ "--st*" -
+
+ "--ta*" -
+ "--to*" {
+ incr i
+ set optarg [lindex $argv $i]
+ }
+ }
+
+ switch -glob -- $option {
+ "--V*" -
+ "--vers*" { # (--version) version numbers
+ send_user "Expect version is\t[exp_version]\n"
+ send_user "Tcl version is\t\t[ info tclversion ]\n"
+ send_user "Framework version is\t$frame_version\n"
+ exit
+ }
+
+ "--v*" { # (--verbose) verbose output
+ # Already parsed.
+ continue
+ }
+
+ "--bu*" { # (--build) the build host configuration
+ # Already parsed (and don't set again). Let $BLUEGNU rename it.
+ continue
+ }
+
+ "--ho*" { # (--host) the host configuration
+ # Already parsed (and don't set again). Let $BLUEGNU rename it.
+ continue
+ }
+
+ "--ta*" { # (--target) the target configuration
+ # Already parsed (and don't set again). Let $BLUEGNU rename it.
+ continue
+ }
+
+ "--a*" { # (--all) print all test output to screen
+ set all_flag 1
+ verbose "Print all test output to screen"
+ continue
+ }
+
+ "--ba*" { # (--baud) the baud to use for a serial line
+ set baud $optarg
+ verbose "The baud rate is now $baud"
+ continue
+ }
+
+ "--co*" { # (--connect) the connection mode to use
+ set connectmode $optarg
+ verbose "Comm method is $connectmode"
+ continue
+ }
+
+ "--d*" { # (--debug) expect internal debugging
+ if [file exists ./dbg.log] {
+ catch "exec rm -f ./dbg.log"
+ }
+ if { $verbose > 2 } {
+ exp_internal -f dbg.log 1
+ } else {
+ exp_internal -f dbg.log 0
+ }
+ verbose "Expect Debugging is ON"
+ continue
+ }
+
+ "--D[01]" { # (-Debug) turn on Tcl debugger
+ verbose "Tcl debugger is ON"
+ continue
+ }
+
+ "--m*" { # (--mail) mail the output
+ set mailing_list $optarg
+ set mail_logs 1
+ verbose "Mail results to $mailing_list"
+ continue
+ }
+
+ "--r*" { # (--reboot) reboot the target
+ set reboot 1
+ verbose "Will reboot the target (if supported)"
+ continue
+ }
+
+ "--ob*" { # (--objdir) where the test case object code lives
+ # Already parsed, but parse again to make sure command line
+ # options override any config file.
+ set objdir $optarg
+ verbose "Using test binaries in $objdir"
+ continue
+ }
+
+ "--ou*" { # (--outdir) where to put the output files
+ set outdir $optarg
+ verbose "Test output put in $outdir"
+ continue
+ }
+
+ "*.exp" { # specify test names to run
+ set all_runtests($option) ""
+ verbose "Running only tests $option"
+ continue
+ }
+
+ "*.exp=*" { # specify test names to run
+ set j [string first "=" $option]
+ set tmp [list [string range $option 0 [expr $j - 1]] \
+ [string range $option [expr $j + 1] end]]
+ set all_runtests([lindex $tmp 0]) [lindex $tmp 1]
+ verbose "Running only tests $option"
+ unset tmp j
+ continue
+ }
+
+ "--i*" { # (--ignore) specify test names to exclude
+ set ignoretests $optarg
+ verbose "Ignoring test $ignoretests"
+ continue
+ }
+
+ "--sr*" { # (--srcdir) where the testsuite source code lives
+ # Already parsed, but parse again to make sure command line
+ # options override any config file.
+
+ set srcdir $optarg
+ continue
+ }
+
+ "--st*" { # (--strace) expect trace level
+ set tracelevel $optarg
+ strace $tracelevel
+ verbose "Source Trace level is now $tracelevel"
+ continue
+ }
+
+ "--n*" { # (--name) the target's name
+ # ??? `targetname' is a confusing word to use here.
+ set targetname $optarg
+ verbose "Target name is now $targetname"
+ continue
+ }
+
+ "--to*" { # (--tool) specify tool name
+ set tool $optarg
+ verbose "Testing $tool"
+ continue
+ }
+
+ "[A-Z]*=*" { # process makefile style args like CC=gcc, etc...
+ if [regexp "^(\[A-Z_\]+)=(.*)$" $option junk var val] {
+ if {0 > [lsearch -exact $makevars $var]} {
+ lappend makevars "$var"
+ set $var $val
+ } else {
+ set $var [concat [set $var] $val]
+ }
+ verbose "$var is now [set $var]"
+ #append makevars "set $var $val;" ;# FIXME: Used anywhere?
+ unset junk var val
+ } else {
+ send_error "Illegal variable specification:\n"
+ send_error "$option\n"
+ }
+ continue
+ }
+
+ "--he*" { # (--help) help text
+ send_user "USAGE: bluegnu \[options...\]\n"
+ send_user "\t--all (-a)\t\tPrint all test output to screen\n"
+ send_user "\t--baud (-ba)\t\tThe baud rate\n"
+ send_user "\t--build \[string\]\t\tThe canonical config name of the build machine\n"
+ send_user "\t--host \[string\]\t\tThe canonical config name of the host machine\n"
+ send_user "\t--target \[string\]\tThe canonical config name of the target board\n"
+ send_user "\t--connect (-co)\t\[type\]\tThe type of connection to use\n"
+ send_user "\t--debug (-de)\t\tSet expect debugging ON\n"
+ send_user "\t--help (-he)\t\tPrint help text\n"
+ send_user "\t--ignore \[name(s)\]\tThe names of specific tests to ignore\n"
+ send_user "\t--mail \[name(s)\]\tWho to mail the results to\n"
+ send_user "\t--name \[name\]\t\tThe hostname of the target board\n"
+ send_user "\t--objdir \[name\]\t\tThe test suite binary directory\n"
+ send_user "\t--outdir \[name\]\t\tThe directory to put logs in\n"
+ send_user "\t--reboot \[name\]\t\tReboot the target (if supported)\n"
+ send_user "\t--srcdir \[name\]\t\tThe test suite source code directory\n"
+ send_user "\t--strace \[number\]\tSet expect tracing ON\n"
+ send_user "\t--tool\[name(s)\]\t\tRun tests on these tools\n"
+ send_user "\t--verbose (-v)\t\tEmit verbose output\n"
+ send_user "\t--version (-V)\t\tEmit all version numbers\n"
+ send_user "\t--D\[0-1\]\t\tTcl debugger\n"
+ send_user "\tscript.exp\[=arg(s)\]\tRun these tests only\n"
+ send_user "\tMakefile style arguments can also be used, ex. CC=gcc\n\n"
+ exit 0
+ }
+
+ default {
+ send_error "\nIllegal Argument \"$option\"\n"
+ send_error "try \"bluegnu --help\" for option list\n"
+ exit 1
+ }
+
+ }
+}
+
+#
+# check for a few crucial variables
+#
+if ![info exists tool] {
+ send_error "WARNING: No tool specified\n"
+ set tool ""
+}
+
+#
+# initialize a few Tcl variables to something other than their default
+#
+if { $verbose > 2 } {
+ log_user 1
+} else {
+ log_user 0
+}
+
+set timeout 10
+
+#
+# load_lib -- load a library by sourcing it
+#
+# If there a multiple files with the same name, stop after the first one found.
+# The order is first look in the install dir, then in a parallel dir in the
+# source tree, (up one or two levels), then in the current dir.
+#
+proc load_lib { file } {
+ global verbose libdir srcdir base_dir execpath tool
+
+ # ??? We could use `load_file' here but then we'd lose the "library file"
+ # specific text in verbose and error messages. Worth it?
+ set found 0
+ foreach dir "$libdir $libdir/lib [file dirname [file dirname $srcdir]]/bluegnu/lib $srcdir/lib . [file dirname [file dirname [file dirname $srcdir]]]/bluegnu/lib" {
+ verbose "Looking for library file $dir/$file" 2
+ if [file exists $dir/$file] {
+ set found 1
+ verbose "Loading library file $dir/$file"
+ if { [catch "uplevel #0 source $dir/$file"] == 1 } {
+ send_error "ERROR: tcl error sourcing library file $dir/$file.\n"
+ global errorInfo
+ if [info exists errorInfo] {
+ send_error "$errorInfo\n"
+ }
+ exit 1
+ }
+ break
+ }
+ }
+ if { $found == 0 } {
+ send_error "ERROR: Couldn't find library file $file.\n"
+ exit 1
+ }
+}
+
+#
+# load the testing framework libraries
+#
+load_lib utils.exp
+load_lib framework.exp
+load_lib debugger.exp
+load_lib remote.exp
+load_lib target.exp
+
+#
+# open log files
+#
+open_logs
+
+# print the config info
+clone_output "Test Run By $logname on [timestamp -format %c]"
+if [is3way] {
+ clone_output "Target is $target_triplet"
+ clone_output "Host is $host_triplet"
+ clone_output "Build is $build_triplet"
+} else {
+ if [isnative] {
+ clone_output "Native configuration is $target_triplet"
+ } else {
+ clone_output "Target is $target_triplet"
+ clone_output "Host is $host_triplet"
+ }
+}
+
+clone_output "\n\t\t=== $tool tests ===\n"
+
+#
+# Find the tool init file. This is in the config directory of the tool's
+# testsuite directory. These used to all be named $target_abbrev-$tool.exp,
+# but as the $tool variable goes away, it's now just $target_abbrev.exp.
+# First we look for a file named with both the abbrev and the tool names.
+# Then we look for one named with just the abbrev name. Finally, we look for
+# a file called default, which is the default actions, as some tools could
+# be purely host based. Unknown is mostly for error trapping.
+#
+
+set found 0
+if ![info exists target_abbrev] {
+ set target_abbrev "unix"
+}
+foreach dir "${srcdir}/config ${srcdir}/../config ${srcdir}/../../config ${srcdir}/../../../config" {
+ foreach initfile "${target_abbrev}-${tool}.exp ${target_abbrev}.exp ${target_os}.exp default.exp unknown.exp" {
+ verbose "Looking for tool init file ${dir}/${initfile}" 2
+ if [file exists ${dir}/${initfile}] {
+ set found 1
+ verbose "Using ${dir}/${initfile} as tool init file."
+ if [catch "uplevel #0 source ${dir}/${initfile}"]==1 {
+ send_error "ERROR: tcl error sourcing tool init file ${dir}/${initfile}.\n"
+ if [info exists errorInfo] {
+ send_error "$errorInfo\n"
+ }
+ exit 1
+ }
+ break
+ }
+ }
+ if $found {
+ break
+ }
+}
+
+if { $found == 0 } {
+ send_error "ERROR: Couldn't find tool init file.\n"
+ exit 1
+}
+unset found
+
+#
+# Trap some signals so we know what's happening. These replace the previous
+# ones because we've now loaded the library stuff.
+#
+if ![exp_debug] {
+ foreach sig "{SIGTERM {terminated}} \
+ {SIGINT {interrupted by user}} \
+ {SIGQUIT {interrupted by user}} \
+ {SIGSEGV {segmentation violation}}" {
+ trap { send_error "Got a [trap -name] signal, [lindex $sig 1]\n"; \
+ log_summary } [lindex $sig 0]
+ verbose "setting trap for [lindex $sig 0] to \"[lindex $sig 1]\"" 1
+ }
+}
+
+#
+# main test execution loop
+#
+
+if [info exists errorInfo] {
+ unset errorInfo
+}
+reset_vars
+# FIXME: The trailing '/' is deprecated and will go away at some point.
+# Do not assume $srcdir has a trailing '/'.
+append srcdir "/"
+# make sure we have only single path delimiters
+regsub -all "//*" $srcdir "/" srcdir
+
+# If multiple passes requested, set them up. Otherwise prepare just one.
+# The format of `MULTIPASS' is a list of elements containing
+# "{ name var1=value1 ... }" where `name' is a generic name for the pass and
+# currently has no other meaning.
+
+if { [info exists MULTIPASS] } {
+ set multipass $MULTIPASS
+}
+if { $multipass == "" } {
+ set multipass { "" }
+}
+
+foreach pass $multipass {
+ # multipass_name is set for `record_test' to use (see framework.exp).
+ if { [lindex $pass 0] != "" } {
+ set multipass_name [lindex $pass 0]
+ clone_output "Running pass `$multipass_name' ..."
+ } else {
+ set multipass_name ""
+ }
+ set restore ""
+ foreach varval [lrange $pass 1 end] {
+ # FIXME: doesn't handle a=b=c.
+ set tmp [split $varval "="]
+ set var [lindex $tmp 0]
+ # Save previous value.
+ if [info exists $var] {
+ lappend restore "$var [list [eval concat \$$var]]"
+ } else {
+ lappend restore "$var"
+ }
+ # Handle "CFLAGS=$CFLAGS foo".
+ # FIXME: Do we need to `catch' this?
+ eval set $var \[concat [lindex $tmp 1]\]
+ verbose "$var is now [eval concat \$$var]"
+ unset tmp var
+ }
+
+ # look for the top level testsuites. if $tool doesn't
+ # exist and there are no subdirectories in $srcdir, then
+ # we default to srcdir.
+ set test_top_dirs [lsort [getdirs ${srcdir} "$tool*"]]
+ if { ${test_top_dirs} == "" } {
+ set test_top_dirs ${srcdir}
+ }
+ verbose "Top level testsuite dirs are ${test_top_dirs}" 2
+ foreach dir "${test_top_dirs}" {
+ foreach test_name [lsort [find ${dir} *.exp]] {
+ if { ${test_name} == "" } {
+ continue
+ }
+ # Ignore this one if asked to.
+ if ![string match "" ${ignoretests}] {
+ if { 0 <= [lsearch ${ignoretests} [file tail ${test_name}]]} {
+ continue
+ }
+ }
+ # Get the path after the $srcdir so we know the subdir we're in.
+ set subdir ""
+ regsub $srcdir [file dirname $test_name] "" subdir
+ if { "$srcdir" == "$subdir/" } {
+ set subdir ""
+ }
+ # Check to see if the range of tests is limited,
+ # set `runtests' to a list of two elements: the script name
+ # and any arguments ("" if none).
+ if { [array size all_runtests] > 0 } {
+ if { 0 > [lsearch [array names all_runtests] [file tail $test_name]]} {
+ continue
+ }
+ set runtests [list [file tail $test_name] $all_runtests([file tail $test_name])]
+ } else {
+ set runtests [list [file tail $test_name] ""]
+ }
+ clone_output "Running $test_name ..."
+ set prms_id 0
+ set bug_id 0
+ set test_result ""
+ if [file exists $test_name] {
+ if { [catch "uplevel #0 source $test_name"] == 1 } {
+ # We can't call `perror' here, it resets `errorInfo'
+ # before we want to look at it. Also remember that perror
+ # increments `errcnt'. If we do call perror we'd have to
+ # reset errcnt afterwards.
+ clone_output "ERROR: tcl error sourcing $test_name."
+ if [info exists errorInfo] {
+ clone_output "ERROR: $errorInfo"
+ unset errorInfo
+ }
+ }
+ } else {
+ # This should never happen, but maybe if the file got removed
+ # between the `find' above and here.
+ perror "$test_name does not exist."
+ # ??? This is a hack. We want to send a message to stderr and
+ # to the summary file (just like perror does), but we don't
+ # want the next testcase to get a spurious "unresolved" because
+ # errcnt != 0. Calling `clone_output' is also supposed to be a
+ # no-no (see the comments for clone_output).
+ set errcnt 0
+ }
+ }
+ }
+
+ # Restore the variables set by this pass.
+ foreach varval $restore {
+ if { [llength $varval] > 1 } {
+ verbose "Restoring [lindex $varval 0] to [lindex $varval 1]" 4
+ set [lindex $varval 0] [lindex $varval 1]
+ } else {
+ verbose "Restoring [lindex $varval 0] to `unset'" 4
+ unset [lindex $varval 0]
+ }
+ }
+}
+
+#
+# all done, cleanup
+#
+if { [info procs ${tool}_exit] != "" } {
+ if {[catch "${tool}_exit" tmp]} {
+ # ??? We can get away with calling `warning' here without ensuring
+ # `warncnt' isn't changed because we're about to exit.
+ warning "${tool}_exit failed:\n$tmp"
+ }
+}
+
+log_summary
diff --git a/contrib/bluegnu2.0.3/site.tmpl b/contrib/bluegnu2.0.3/site.tmpl
new file mode 100644
index 0000000..9508c35
--- /dev/null
+++ b/contrib/bluegnu2.0.3/site.tmpl
@@ -0,0 +1,307 @@
+#
+# site.tmpl -- Sample template for a global config file.
+# NOTE: This file contains mostly site specific
+# configuration data that is custom to Cygnus
+# Support. You'll have to change most of the
+# values to work at your site.
+# Written by rob@welcomehome.org
+#
+
+#
+# transform -- transform a tool name to get the installed name. We only define
+# this if there wasn't one. This was the global config file can
+# override how the tool names are calculated.
+#
+
+#
+# uncomment this if you wish to redefine the transform procedure
+#
+
+#if ![string match "transform" [info procs transform]] then {
+# proc transform { name } {
+# global target_triplet
+#
+# if [string match "" $target_triplet] then {
+# return $name
+# } else {
+# return ${target_triplet}-$name
+# }
+# }
+#}
+
+set noargs 0
+set noresults 0
+set nosignals 0
+
+#
+# Set default setting for all know targets
+#
+case "$target_triplet" in {
+ { "hppa*-*-proelf*" } {
+
+ # By default we'll use the Winbond for testing, use the OKI
+ # only if explicitly asked for.
+ case "$target_triplet" in {
+ { "hppa*-oki-proelf*" } {
+ set target_abbrev hppro
+ set targetname op50n
+ set serialport hellcab:1024
+ set netport {}
+ set baud 9600
+ }
+ default {
+ set target_abbrev hppro
+ set targetname w89k
+ set serialport hellcab:1023
+ set netport {}
+ set baud 9600
+ }
+ }
+
+ # Now stuff that's common to all proelf targets.
+ # We can't pass arguments or do IO with the PA boards, nor do we
+ # get status results or signals back from the board.
+ set noargs 1
+ set noresults 1
+ set nosignals 1
+ set noinferiorio 1
+
+ # Disgusting hack because directories in libgloss don't
+ # necessarily match the value in target_cpu.
+ set target_cpu "pa"
+
+ # The proelf targets are absurdly slow downloading, so we limit
+ # the number of tests we run on them
+ set TORTURE_OPTIONS [list \
+ { -O0 -g } { -O2 } \
+ { -O2 -fomit-frame-pointer -finline-functions -funroll-all-loops }]
+
+ set target_info(target,name) $targetname
+ set target_info(target,ldflags) "-T$targetname.ld"
+ set target_info(target,config) "hppa1.1-hp-proelf"
+ set target_info(target,cflags) "-T$targetname.ld"
+ set target_info(target,connect) ""
+ set target_info(target,target) ""
+ set target_info(target,serial) $serialport
+ set target_info(target,netport) $netport
+ set target_info(target,baud) $baud
+ }
+ { "i386-*-aout" } {
+ set target_abbrev aout
+ set connectmode ""
+ set targetname ""
+ set netport ""
+ set serialport ""
+ set baud ""
+ }
+ { "m68k-mvme135-*" } { # Motorola MVME135 board running Bug monitor
+ set target_abbrev bug
+ set connectmode "telnet"
+ append targetname "s8"
+ append serialport "/dev/ttyr8"
+ append netport "termserv:90008"
+ append baud "9600"
+ append CFLAGS "-Tmvme135.ld"
+ append CXXFLAGS "-Tmvme135.ld"
+ }
+ { "m68k-idp-*" "m68k-rom68k-*" } { # Motorola IDP board running rom68k monitor
+ append target_abbrev idp
+ append connectmode "telnet"
+ append targetname "s12"
+ append serialport "/dev/tstty12"
+ append netport "termserv:900012"
+ append baud "9600"
+ append CFLAGS "-Tidp.ld"
+ append CXXFLAGS "-Tidp.ld"
+ }
+ { "m68k-*-aout" } {
+ append target_abbrev aout
+ append connectmode ""
+ append targetname ""
+ append netport ""
+ append serialport ""
+ append baud ""
+ }
+ { "m68k-est-coff" } {
+ append target_abbrev est
+ append connectmode telnet
+ append targetname est
+ append serialport /dev/ttyb
+ append netport ""
+ append baud 9600
+ set noargs 1
+ set noresults 1
+ set nosignals 1
+ append CFLAGS -Tidp.ld
+ append CXXFLAGS -Tidp.ld
+ }
+ { "m68k-cpu32bug-coff" } {
+ append target_abbrev cpu32bug
+ append connectmode telnet
+ append targetname cpu32bug
+ append serialport /dev/ttyb
+ append netport ""
+ append baud 9600
+ set noargs 1
+ set noresults 1
+ set nosignals 1
+ append CFLAGS -Tidp.ld
+ append CXXFLAGS -Tidp.ld
+ }
+ { "m68k-*-coff" } {
+ set target_abbrev rom68k
+ set connectmode telnet
+ set targetname rom68k
+ set serialport /dev/ttya
+ set netport ""
+ set baud 9600
+ set noargs 1
+ set noresults 1
+ set nosignals 1
+ set CFLAGS -Tidp.ld
+ set CXXFLAGS -Tidp.ld
+ }
+ { "i960-*-nindy" } {
+ append target_abbrev nind
+ append connectmode ""
+ append targetname ""
+ append netport ""
+ append serialport ""
+ append baud ""
+ }
+ { "m68*-*-vxworks" "m68*-vxworks" } { # Motorola MVME167 board running VxWorks
+ append target_abbrev vx
+ append connectmode "telnet"
+ append targetname "foobar"
+ append serialport "/dev/tstty16"
+ append netport "termserv:900016"
+ append baud "9600"
+ append CFLAGS "-r"
+ append CXXFLAGS "-r"
+ append LDFLAGS "-r"
+ }
+ { "m68*-*-spectra" "m68*-spectra-*" } {
+ append target_abbrev vrtx
+ append connectmode ""
+ append targetname ""
+ append netport ""
+ append serialport ""
+ append baud ""
+ }
+ { "sparc-*-vxworks" } {
+ append target_abbrev vx
+ append connectmode ""
+ append targetname ""
+ append netport ""
+ append serialport ""
+ append baud ""
+ append CFLAGS "-r"
+ append CXXFLAGS "-r"
+ append LDFLAGS "-r"
+ }
+ { "i960-*-vxworks" } {
+ append target_abbrev vx
+ append connectmode "telnet"
+ append targetname "barfoo"
+ append netport ""
+ append serialport ""
+ append baud "9600"
+ append CFLAGS "-r"
+ append CXXFLAGS "-r"
+ append LDFLAGS "-r"
+ }
+ { "a29k-*-udi" } {
+ append target_abbrev udi
+ append connectmode "mondfe"
+ append targetname "ser"
+ append netport ""
+ append serialport ""
+ append baud ""
+ }
+ { "a29k-isstip-*" } {
+ append target_abbrev itip
+ append connectmode "mondfe"
+ append targetname "isst"
+ append netport ""
+ append serialport ""
+ append baud ""
+ }
+ { "mips-idt-ecoff" } {
+ append target_abbrev mips
+ append connectmode ""
+ append targetname ""
+ append netport ""
+ append serialport ""
+ append baud ""
+ }
+ { "h8300*-*-*" } {
+ append target_abbrev sim
+ append connectmode ""
+ append targetname ""
+ append netport ""
+ append serialport ""
+ append baud ""
+ }
+ { "h8500*-*-*" } {
+ append target_abbrev sim
+ append connectmode ""
+ append targetname ""
+ append netport ""
+ append serialport ""
+ append baud ""
+ }
+ { "sh-*-*" } {
+ append target_abbrev sh
+ append connectmode ""
+ append targetname ""
+ append netport ""
+ append serialport ""
+ append baud ""
+ }
+ { "sparc-*-aout" } {
+ append target_abbrev aout
+ append connectmode ""
+ append targetname ""
+ append netport ""
+ append serialport ""
+ append baud ""
+ }
+ { "sparclite-*-*" } {
+ append target_abbrev slite
+ append connectmode "aload"
+ append targetname ""
+ append netport ""
+ append serialport ""
+ append baud ""
+ append CFLAGS "-Tex930"
+ append CXXFLAGS ""
+ }
+ { "sparclitefrwcompat-*-*" } {
+ append target_abbrev frwcom
+ append connectmode ""
+ append targetname ""
+ append netport ""
+ append serialport ""
+ append baud ""
+ }
+ default {
+ # For now only run default gdbserver framework for lynx cross
+ # targets in the future it should be the default for any cross
+ # targets not explicitly handled above.
+ if { $host_triplet != $target_triplet } then {
+ set target_abbrev gdbserver
+ set targetname extended-remote
+ append connectmode ""
+ append netport ""
+ append serialport ""
+ append baud ""
+ } else {
+ append target_abbrev unix
+ append connectmode ""
+ append targetname ""
+ append netport ""
+ append serialport ""
+ append baud ""
+ }
+ }
+}
diff --git a/contrib/bluegnu2.0.3/tcl-mode.el b/contrib/bluegnu2.0.3/tcl-mode.el
new file mode 100644
index 0000000..90b3503
--- /dev/null
+++ b/contrib/bluegnu2.0.3/tcl-mode.el
@@ -0,0 +1,2223 @@
+;; tcl.el --- Tcl code editing commands for Emacs
+
+;; Copyright (C) 1994 Free Software Foundation, Inc.
+
+;; Maintainer: Tom Tromey <tromey@busco.lanl.gov>
+;; Author: Tom Tromey <tromey@busco.lanl.gov>
+;; Chris Lindblad <cjl@lcs.mit.edu>
+;; Keywords: languages tcl modes
+;; Version: 1.49
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs 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.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to
+;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+;; HOW TO INSTALL:
+;; Put the following forms in your .emacs to enable autoloading of Tcl
+;; mode, and auto-recognition of ".tcl" files.
+;;
+;; (autoload 'tcl-mode "tcl" "Tcl mode." t)
+;; (autoload 'inferior-tcl "tcl" "Run inferior Tcl process." t)
+;; (setq auto-mode-alist (append '(("\\.tcl$" . tcl-mode)) auto-mode-alist))
+;;
+;; If you plan to use the interface to the TclX help files, you must
+;; set the variable tcl-help-directory-list to point to the topmost
+;; directories containing the TclX help files. Eg:
+;;
+;; (setq tcl-help-directory-list '("/usr/local/lib/tclx/help"))
+;;
+;; Also you will want to add the following to your .emacs:
+;;
+;; (autoload 'tcl-help-on-word "tcl" "Help on Tcl commands" t)
+;;
+;; FYI a *very* useful thing to do is nroff all the Tk man pages and
+;; put them in a subdir of the help system.
+;;
+
+;;; Commentary:
+
+;; LCD Archive Entry:
+;; tcl|Tom Tromey|tromey@busco.lanl.gov|
+;; Major mode for editing Tcl|
+;; 1995/12/07 18:27:47|1.49|~/modes/tcl.el.Z|
+
+;; CUSTOMIZATION NOTES:
+;; * tcl-proc-list can be used to customize a list of things that
+;; "define" other things. Eg in my project I put "defvar" in this
+;; list.
+;; * tcl-typeword-list is similar, but uses font-lock-type-face.
+;; * tcl-keyword-list is a list of keywords. I've generally used this
+;; for flow-control words. Eg I add "unwind_protect" to this list.
+;; * tcl-type-alist can be used to minimally customize indentation
+;; according to context.
+
+;; Change log:
+;; tcl.el,v
+;; Revision 1.49 1995/12/07 18:27:47 tromey
+;; (add-log-tcl-defun): Don't use tcl-beginning-of-defun; just go to end
+;; of line before searching.
+;;
+;; Revision 1.48 1995/12/07 18:18:21 tromey
+;; (add-log-tcl-defun): Now uses tcl-beginning-of-defun.
+;;
+;; Revision 1.47 1995/08/22 17:49:45 tromey
+;; (tcl-hilit): New function from "Chris Alfeld" <calfeld@math.utah.edu>
+;; (tcl-mode): Call it
+;;
+;; Revision 1.46 1995/08/07 16:02:01 tromey
+;; (tcl-do-auto-fill): Only fill past fill-column; for 19.29.
+;; (tcl-auto-fill-mode): Use force-mode-line-update.
+;;
+;; Revision 1.45 1995/07/23 23:51:25 tromey
+;; (tcl-word-no-props): New function.
+;; (tcl-figure-type): Use it.
+;; (tcl-current-word): Ditto.
+;;
+;; Revision 1.44 1995/07/23 20:26:47 tromey
+;; Doc fixes.
+;;
+;; Revision 1.43 1995/07/17 19:59:49 tromey
+;; (inferior-tcl-mode): Use modeline-process if it exists.
+;;
+;; Revision 1.42 1995/07/17 19:55:25 tromey
+;; XEmacs currently must use tcl-internal-end-of-defun
+;;
+;; Revision 1.41 1995/07/14 21:54:56 tromey
+;; Changes to make menus work in XEmacs.
+;; From Mike Scheidler <c23mts@kocrsv01.delcoelect.com>
+;;
+;; Revision 1.40 1995/07/11 03:13:15 tromey
+;; (tcl-mode): Customize for new dabbrev.
+;;
+;; Revision 1.39 1995/07/09 21:58:03 tromey
+;; (tcl-do-fill-paragraph): New function.
+;; (tcl-mode): Set up for paragraph filling.
+;;
+;; Revision 1.38 1995/07/09 21:30:32 tromey
+;; (tcl-mode): Fixes to 19.29 paragraph variables.
+;;
+;; Revision 1.37 1995/07/09 18:52:16 tromey
+;; (tcl-do-auto-fill): Set fill-prefix.
+;;
+;; Revision 1.36 1995/07/09 01:07:57 tromey
+;; (tcl-imenu-create-index-function): Work with imenu from Emacs 19.29
+;;
+;; Revision 1.35 1995/06/27 20:12:00 tromey
+;; (tcl-type-alist): More itcl changes.
+;;
+;; Revision 1.34 1995/06/27 20:06:05 tromey
+;; More changes for itcl.
+;; Bug fixes for Emacs 19.29.
+;;
+;; Revision 1.33 1995/06/27 20:01:29 tromey
+;; (tcl-set-proc-regexp): Allow leading spaces.
+;; (tcl-proc-list): Changes for itcl.
+;; (tcl-typeword-list): Ditto.
+;; (tcl-keyword-list): Ditto.
+;;
+;; Revision 1.32 1995/05/11 22:12:49 tromey
+;; (tcl-type-alist): Include entry for "proc".
+;;
+;; Revision 1.31 1995/05/10 23:38:12 tromey
+;; (tcl-add-fsf-menu): Use make-lucid-menu-keymap, not
+;; "make-xemacs-menu-keymap".
+;;
+;; Revision 1.30 1995/05/10 18:22:21 tromey
+;; Bug fix in menu code for XEmacs.
+;;
+;; Revision 1.29 1995/05/09 21:36:53 tromey
+;; Changed "Lucid Emacs" to "XEmacs".
+;; Tcl's popup menu now added to existing one, courtesy
+;; dfarmer@evolving.com (Doug Farmer)
+;;
+;; Revision 1.28 1995/04/08 19:52:50 tromey
+;; (tcl-outline-level): New function
+;; (tcl-mode): Added outline-handling stuff.
+;; From Jesper Pedersen <blackie@imada.ou.dk>
+;;
+;; Revision 1.27 1994/10/11 02:01:27 tromey
+;; (tcl-mode): imenu-create-index-function made buffer local.
+;;
+;; Revision 1.26 1994/09/01 18:06:24 tromey
+;; Added filename completion in inferior tcl mode
+;;
+;; Revision 1.25 1994/08/22 15:56:24 tromey
+;; tcl-load-file default to current buffer.
+;;
+;; Revision 1.24 1994/08/21 20:33:05 tromey
+;; Fixed bug in tcl-guess-application.
+;;
+;; Revision 1.23 1994/08/21 03:54:45 tromey
+;; Keybindings don't overshadown comint bindings.
+;;
+;; Revision 1.22 1994/07/26 00:46:07 tromey
+;; Emacs 18 changes from Carl Witty.
+;;
+;; Revision 1.21 1994/07/14 22:49:21 tromey
+;; Added ";;;###autoload" comments where appropriate.
+;;
+; Revision 1.20 1994/06/05 16:57:22 tromey
+; tcl-current-word does the right thing in inferior-tcl-mode.
+;
+; Revision 1.19 1994/06/03 21:09:19 tromey
+; Another menu fix.
+;
+; Revision 1.18 1994/06/03 20:39:14 tromey
+; Fixed menu bug.
+;
+; Revision 1.17 1994/06/03 00:47:15 tromey
+; Fixed bug in bug-reporting code.
+;
+; Revision 1.16 1994/05/26 05:06:14 tromey
+; Menu items now sensitive as appropriate.
+;
+; Revision 1.15 1994/05/22 20:38:11 tromey
+; Added bug-report keybindings and menu entries.
+;
+; Revision 1.14 1994/05/22 20:18:28 tromey
+; Even more compile stuff.
+;
+; Revision 1.13 1994/05/22 20:17:15 tromey
+; Moved emacs version checking code to very beginning.
+;
+; Revision 1.12 1994/05/22 20:14:59 tromey
+; Compile fixes.
+;
+; Revision 1.11 1994/05/22 20:12:44 tromey
+; Fixed mark-defun for 19.23.
+; More menu fixes.
+;
+; Revision 1.10 1994/05/22 20:02:03 tromey
+; Fixed bug with M-;.
+; Wrote bug-reporting code.
+;
+; Revision 1.9 1994/05/22 05:26:51 tromey
+; Fixes for imenu.
+;
+; Revision 1.8 1994/05/22 03:38:07 tromey
+; Fixed menu support.
+;
+; Revision 1.7 1994/05/03 01:23:42 tromey
+; *** empty log message ***
+;
+; Revision 1.6 1994/04/23 16:23:36 tromey
+; Wrote tcl-indent-for-comment
+;
+;;
+;; 18-Mar-1994 Tom Tromey Fourth beta release.
+;; Added {un,}comment-region to menu. Idea from
+;; Mike Scheidler <c23mts@kocrsv01.delcoelect.com>
+;; 17-Mar-1994 Tom Tromey
+;; Fixed tcl-restart-with-file. Bug fix attempt in
+;; tcl-internal-end-of-defun.
+;; 16-Mar-1994 Tom Tromey Third beta release
+;; Added support code for menu (from Tcl mode written by
+;; schmid@fb3-s7.math.TU-Berlin.DE (Gregor Schmid)).
+;; 12-Mar-1994 Tom Tromey
+;; Better documentation for inferior-tcl-buffer. Wrote
+;; tcl-restart-with-file. Wrote Lucid Emacs menu (but no
+;; code to install it).
+;; 12-Mar-1994 Tom Tromey
+;; Wrote tcl-guess-application. Another stab at making
+;; tcl-omit-ws-regexp work.
+;; 10-Mar-1994 Tom Tromey Second beta release
+;; Last Modified: Thu Mar 10 01:24:25 1994 (Tom Tromey)
+;; Wrote perl-mode style line indentation command.
+;; Wrote more documentation. Added tcl-continued-indent-level.
+;; Integrated help code.
+;; 8-Mar-1994 Tom Tromey
+;; Last Modified: Tue Mar 8 11:58:44 1994 (Tom Tromey)
+;; Bug fixes.
+;; 6-Mar-1994 Tom Tromey
+;; Last Modified: Sun Mar 6 18:55:41 1994 (Tom Tromey)
+;; Updated auto-newline support.
+;; 6-Mar-1994 Tom Tromey Beta release
+;; Last Modified: Sat Mar 5 17:24:32 1994 (Tom Tromey)
+;; Wrote tcl-hashify-buffer. Other minor bug fixes.
+;; 5-Mar-1994 Tom Tromey
+;; Last Modified: Sat Mar 5 16:11:20 1994 (Tom Tromey)
+;; Wrote electric-hash code.
+;; 3-Mar-1994 Tom Tromey
+;; Last Modified: Thu Mar 3 02:53:40 1994 (Tom Tromey)
+;; Added code to handle auto-fill in comments.
+;; Added imenu support code.
+;; Cleaned up code.
+;; Better font-lock support.
+;; 28-Feb-1994 Tom Tromey
+;; Last Modified: Mon Feb 28 14:08:05 1994 (Tom Tromey)
+;; Made tcl-figure-type more easily configurable.
+;; 28-Feb-1994 Tom Tromey
+;; Last Modified: Mon Feb 28 01:02:58 1994 (Tom Tromey)
+;; Wrote inferior-tcl mode.
+;; 16-Feb-1994 Tom Tromey
+;; Last Modified: Wed Feb 16 17:05:19 1994 (Tom Tromey)
+;; Added support for font-lock-mode.
+;; 29-Oct-1993 Tom Tromey
+;; Last Modified: Sun Oct 24 17:39:14 1993 (Tom Tromey)
+;; Patches from Guido Bosch to make things work with Lucid Emacs.
+;; 22-Oct-1993 Tom Tromey
+;; Last Modified: Fri Oct 22 15:26:46 1993 (Tom Tromey)
+;; Made many characters have "_" syntax class; suggested by Guido
+;; Bosch <Guido.Bosch@loria.fr>. Note that this includes the "$"
+;; character, which might be a change you'd notice.
+;; 21-Oct-1993 Tom Tromey
+;; Last Modified: Thu Oct 21 20:28:40 1993 (Tom Tromey)
+;; More fixes for tcl-omit-ws-regexp.
+;; 20-Oct-1993 Tom Tromey
+;; Started keeping history. Fixed tcl-{beginning,end}-of-defun.
+;; Added some code to make things work with Emacs 18.
+
+;; THANKS TO:
+;; Guido Bosch <Guido.Bosch@loria.fr>
+;; pgs1002@esc.cam.ac.uk (Dr P.G. Sjoerdsma)
+;; Mike Scheidler <c23mts@kocrsv01.delcoelect.com>
+;; Matt Newman <men@charney.colorado.edu>
+;; rwhitby@research.canon.oz.au (Rod Whitby)
+;; h9118101@hkuxa.hku.hk (Yip Chi Lap [Beta])
+;; Pertti Tapio Kasanen <ptk@delta.hut.fi>
+;; schmid@fb3-s7.math.TU-Berlin.DE (Gregor Schmid)
+;; warsaw@nlm.nih.gov (Barry A. Warsaw)
+;; Carl Witty <cwitty@ai.mit.edu>
+;; T. V. Raman <raman@crl.dec.com>
+;; Jesper Pedersen <blackie@imada.ou.dk>
+;; dfarmer@evolving.com (Doug Farmer)
+;; "Chris Alfeld" <calfeld@math.utah.edu>
+
+;; KNOWN BUGS:
+;; * indent-region should skip blank lines. (It does in v19, so I'm
+;; not motivated to fix it here).
+;; * In Tcl "#" is not always a comment character. This can confuse
+;; tcl.el in certain circumstances. For now the only workaround is
+;; to enclose offending hash characters in quotes or precede it with
+;; a backslash. Note that using braces won't work -- quotes change
+;; the syntax class of characters between them, while braces do not.
+;; The electric-# mode helps alleviate this problem somewhat.
+;; * indent-tcl-exp is untested.
+;; * Doesn't work under Emacs 18 yet.
+;; * There's been a report that font-lock does strange things under
+;; Lucid Emacs 19.6. For instance in "proc foobar", the space
+;; before "foobar" is highlighted.
+
+;; TODO:
+;; * make add-log-tcl-defun smarter. should notice if we are in the
+;; middle of a defun, or between defuns. should notice if point is
+;; on first line of defun (or maybe even in comments before defun).
+;; * Allow continuation lines to be indented under the first argument
+;; of the preceeding line, like this:
+;; [list something \
+;; something-else]
+;; * There is a request that indentation work like this:
+;; button .fred -label Fred \
+;; -command {puts fred}
+;; * Should have tcl-complete-symbol that queries the inferior process.
+;; * Should have describe-symbol that works by sending the magic
+;; command to a tclX process.
+;; * Need C-x C-e binding (tcl-eval-last-exp).
+;; * Write indent-region function that is faster than indenting each
+;; line individually.
+;; * tcl-figure-type should stop at "beginning of line" (only ws
+;; before point, and no "\" on previous line). (see tcl-real-command-p).
+;; * overrides some comint keybindings; fix.
+;; * Trailing \ will eat blank lines. Should deal with this.
+;; (this would help catch some potential bugs).
+;; * Inferior should display in half the screen, not the whole screen.
+;; * Indentation should deal with "switch".
+;; * Consider writing code to find help files automatically (for
+;; common cases).
+;; * `#' shouldn't insert `\#' when point is in string.
+
+
+
+;;; Code:
+
+;; I sure wish Emacs had a package that made it easy to extract this
+;; sort of information.
+(defconst tcl-using-emacs-19 (string-match "19\\." emacs-version)
+ "Nil unless using Emacs 19 (XEmacs or FSF).")
+
+;; FIXME this will break on Emacs 19.100.
+(defconst tcl-using-emacs-19-23
+ (string-match "19\\.\\(2[3-9]\\|[3-9][0-9]\\)" emacs-version)
+ "Nil unless using Emacs 19-23 or later.")
+
+(defconst tcl-using-xemacs-19 (string-match "XEmacs" emacs-version)
+ "Nil unless using XEmacs).")
+
+(require 'comint)
+
+;; When compiling under GNU Emacs, load imenu during compilation. If
+;; you have 19.22 or earlier, comment this out, or get imenu.
+(and (fboundp 'eval-when-compile)
+ (eval-when-compile
+ (if (and (string-match "19\\." emacs-version)
+ (not (string-match "XEmacs" emacs-version)))
+ (require 'imenu))
+ ()))
+
+(defconst tcl-version "1.49")
+(defconst tcl-maintainer "Tom Tromey <tromey@drip.colorado.edu>")
+
+;;
+;; User variables.
+;;
+
+(defvar tcl-indent-level 4
+ "*Indentation of Tcl statements with respect to containing block.")
+
+(defvar tcl-continued-indent-level 4
+ "*Indentation of continuation line relative to first line of command.")
+
+(defvar tcl-auto-newline nil
+ "*Non-nil means automatically newline before and after braces
+inserted in Tcl code.")
+
+(defvar tcl-tab-always-indent t
+ "*Control effect of TAB key.
+If t (the default), always indent current line.
+If nil and point is not in the indentation area at the beginning of
+the line, a TAB is inserted.
+Other values cause the first possible action from the following list
+to take place:
+
+ 1. Move from beginning of line to correct indentation.
+ 2. Delete an empty comment.
+ 3. Move forward to start of comment, indenting if necessary.
+ 4. Move forward to end of line, indenting if necessary.
+ 5. Create an empty comment.
+ 6. Move backward to start of comment, indenting if necessary.")
+
+(defvar tcl-use-hairy-comment-detector t
+ "*If not `nil', the the more complicated, but slower, comment
+detecting function is used. This variable is only used in GNU Emacs
+19 (the fast function is always used elsewhere).")
+
+(defvar tcl-electric-hash-style 'smart
+ "*Style of electric hash insertion to use.
+Possible values are 'backslash, meaning that `\\' quoting should be
+done; 'quote, meaning that `\"' quoting should be done; 'smart,
+meaning that the choice between 'backslash and 'quote should be
+made depending on the number of hashes inserted; or nil, meaning that
+no quoting should be done. Any other value for this variable is
+taken to mean 'smart. The default is 'smart.")
+
+(defvar tcl-help-directory-list nil
+ "*List of topmost directories containing TclX help files")
+
+(defvar tcl-use-smart-word-finder t
+ "*If not nil, use a better way of finding the current word when
+looking up help on a Tcl command.")
+
+(defvar tcl-application "wish"
+ "*Name of Tcl application to run in inferior Tcl mode.")
+
+(defvar tcl-command-switches nil
+ "*Switches to supply to `tcl-application'.")
+
+(defvar tcl-prompt-regexp "^\\(% \\|\\)"
+ "*If not nil, a regexp that will match the prompt in the inferior process.
+If nil, the prompt is the name of the application with \">\" appended.
+
+The default is \"^\\(% \\|\\)\", which will match the default primary
+and secondary prompts for tclsh and wish.")
+
+(defvar inferior-tcl-source-command "source %s\n"
+ "*Format-string for building a Tcl command to load a file.
+This format string should use `%s' to substitute a file name
+and should result in a Tcl expression that will command the
+inferior Tcl to load that file. The filename will be appropriately
+quoted for Tcl.")
+
+;;
+;; Keymaps, abbrevs, syntax tables.
+;;
+
+(defvar tcl-mode-abbrev-table nil
+ "Abbrev table in use in Tcl-mode buffers.")
+(if tcl-mode-abbrev-table
+ ()
+ (define-abbrev-table 'tcl-mode-abbrev-table ()))
+
+(defvar tcl-mode-map ()
+ "Keymap used in Tcl mode.")
+
+(defvar tcl-mode-syntax-table nil
+ "Syntax table in use in Tcl-mode buffers.")
+(if tcl-mode-syntax-table
+ ()
+ (setq tcl-mode-syntax-table (make-syntax-table))
+ (modify-syntax-entry ?% "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?@ "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?& "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?* "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?+ "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?- "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?. "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?: "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?! "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?$ "_" tcl-mode-syntax-table) ; FIXME use "'"?
+ (modify-syntax-entry ?/ "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?~ "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?< "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?= "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?> "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?| "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?\( "()" tcl-mode-syntax-table)
+ (modify-syntax-entry ?\) ")(" tcl-mode-syntax-table)
+ (modify-syntax-entry ?\; "." tcl-mode-syntax-table)
+ (modify-syntax-entry ?\n "> " tcl-mode-syntax-table)
+ (modify-syntax-entry ?\f "> " tcl-mode-syntax-table)
+ (modify-syntax-entry ?# "< " tcl-mode-syntax-table))
+
+(defvar inferior-tcl-mode-map nil
+ "Keymap used in Inferior Tcl mode.")
+
+;; XEmacs menu.
+(defvar tcl-xemacs-menu
+ '(["Beginning of function" tcl-beginning-of-defun t]
+ ["End of function" tcl-end-of-defun t]
+ ["Mark function" tcl-mark-defun t]
+ ["Indent region" indent-region (tcl-mark)]
+ ["Comment region" comment-region (tcl-mark)]
+ ["Uncomment region" tcl-uncomment-region (tcl-mark)]
+ "----"
+ ["Show Tcl process buffer" inferior-tcl t]
+ ["Send function to Tcl process" tcl-eval-defun
+ (and inferior-tcl-buffer (get-buffer inferior-tcl-buffer))]
+ ["Send region to Tcl process" tcl-eval-region
+ (and inferior-tcl-buffer (get-buffer inferior-tcl-buffer))]
+ ["Send file to Tcl process" tcl-load-file
+ (and inferior-tcl-buffer (get-buffer inferior-tcl-buffer))]
+ ["Restart Tcl process with file" tcl-restart-with-file t]
+ "----"
+ ["Tcl help" tcl-help-on-word tcl-help-directory-list]
+ ["Send bug report" tcl-submit-bug-report t])
+ "XEmacs menu for Tcl mode.")
+
+;; GNU Emacs does menus via keymaps. Do it in a function in case we
+;; later decide to add it to inferior Tcl mode as well.
+(defun tcl-add-fsf-menu (map)
+ (define-key map [menu-bar] (make-sparse-keymap))
+ ;; This fails in Emacs 19.22 and earlier.
+ (require 'lmenu)
+ (let ((menu (make-lucid-menu-keymap "Tcl" tcl-xemacs-menu)))
+ (define-key map [menu-bar tcl] (cons "Tcl" menu))
+ ;; The following is intended to compute the key sequence
+ ;; information for the menu. It doesn't work.
+ (x-popup-menu nil menu)))
+
+(defun tcl-fill-mode-map ()
+ (define-key tcl-mode-map "{" 'tcl-electric-char)
+ (define-key tcl-mode-map "}" 'tcl-electric-brace)
+ (define-key tcl-mode-map "[" 'tcl-electric-char)
+ (define-key tcl-mode-map "]" 'tcl-electric-char)
+ (define-key tcl-mode-map ";" 'tcl-electric-char)
+ (define-key tcl-mode-map "#" 'tcl-electric-hash)
+ ;; FIXME.
+ (define-key tcl-mode-map "\e\C-a" 'tcl-beginning-of-defun)
+ ;; FIXME.
+ (define-key tcl-mode-map "\e\C-e" 'tcl-end-of-defun)
+ ;; FIXME.
+ (define-key tcl-mode-map "\e\C-h" 'tcl-mark-defun)
+ (define-key tcl-mode-map "\e\C-q" 'indent-tcl-exp)
+ (define-key tcl-mode-map "\177" 'backward-delete-char-untabify)
+ (define-key tcl-mode-map "\t" 'tcl-indent-command)
+ (define-key tcl-mode-map "\M-;" 'tcl-indent-for-comment)
+ (define-key tcl-mode-map "\M-\C-x" 'tcl-eval-defun)
+ (define-key tcl-mode-map "\C-c\C-b" 'tcl-submit-bug-report)
+ (and (fboundp 'comment-region)
+ (define-key tcl-mode-map "\C-c\C-c" 'comment-region))
+ (define-key tcl-mode-map "\C-c\C-i" 'tcl-help-on-word)
+ (define-key tcl-mode-map "\C-c\C-v" 'tcl-eval-defun)
+ (define-key tcl-mode-map "\C-c\C-f" 'tcl-load-file)
+ (define-key tcl-mode-map "\C-c\C-t" 'inferior-tcl)
+ (define-key tcl-mode-map "\C-c\C-x" 'tcl-eval-region)
+ (define-key tcl-mode-map "\C-c\C-s" 'switch-to-tcl)
+
+ ;; Make menus.
+ (if (and tcl-using-emacs-19 (not tcl-using-xemacs-19))
+ (progn
+ (tcl-add-fsf-menu tcl-mode-map))))
+
+(defun tcl-fill-inferior-map ()
+ (define-key inferior-tcl-mode-map "\t" 'comint-dynamic-complete)
+ (define-key inferior-tcl-mode-map "\M-?"
+ 'comint-dynamic-list-filename-completions)
+ (define-key inferior-tcl-mode-map "\e\C-a" 'tcl-beginning-of-defun)
+ (define-key inferior-tcl-mode-map "\e\C-e" 'tcl-end-of-defun)
+ (define-key inferior-tcl-mode-map "\177" 'backward-delete-char-untabify)
+ (define-key inferior-tcl-mode-map "\M-\C-x" 'tcl-eval-defun)
+ (define-key inferior-tcl-mode-map "\C-c\C-b" 'tcl-submit-bug-report)
+ (define-key inferior-tcl-mode-map "\C-c\C-i" 'tcl-help-on-word)
+ (define-key inferior-tcl-mode-map "\C-c\C-v" 'tcl-eval-defun)
+ (define-key inferior-tcl-mode-map "\C-c\C-f" 'tcl-load-file)
+ (define-key inferior-tcl-mode-map "\C-c\C-t" 'inferior-tcl)
+ (define-key inferior-tcl-mode-map "\C-c\C-x" 'tcl-eval-region)
+ (define-key inferior-tcl-mode-map "\C-c\C-s" 'switch-to-tcl))
+
+(if tcl-mode-map
+ ()
+ (setq tcl-mode-map (make-sparse-keymap))
+ (tcl-fill-mode-map))
+
+(if inferior-tcl-mode-map
+ ()
+ ;; FIXME Use keymap inheritance here? FIXME we override comint
+ ;; keybindings here. Maybe someone has a better set?
+ (setq inferior-tcl-mode-map (copy-keymap comint-mode-map))
+ (tcl-fill-inferior-map))
+
+
+(defvar inferior-tcl-buffer nil
+ "*The current inferior-tcl process buffer.
+
+MULTIPLE PROCESS SUPPORT
+===========================================================================
+To run multiple Tcl processes, you start the first up with
+\\[inferior-tcl]. It will be in a buffer named `*inferior-tcl*'.
+Rename this buffer with \\[rename-buffer]. You may now start up a new
+process with another \\[inferior-tcl]. It will be in a new buffer,
+named `*inferior-tcl*'. You can switch between the different process
+buffers with \\[switch-to-buffer].
+
+Commands that send text from source buffers to Tcl processes -- like
+`tcl-eval-defun' or `tcl-load-file' -- have to choose a process to
+send to, when you have more than one Tcl process around. This is
+determined by the global variable `inferior-tcl-buffer'. Suppose you
+have three inferior Lisps running:
+ Buffer Process
+ foo inferior-tcl
+ bar inferior-tcl<2>
+ *inferior-tcl* inferior-tcl<3>
+If you do a \\[tcl-eval-defun] command on some Lisp source code, what
+process do you send it to?
+
+- If you're in a process buffer (foo, bar, or *inferior-tcl*),
+ you send it to that process.
+- If you're in some other buffer (e.g., a source file), you
+ send it to the process attached to buffer `inferior-tcl-buffer'.
+This process selection is performed by function `inferior-tcl-proc'.
+
+Whenever \\[inferior-tcl] fires up a new process, it resets
+`inferior-tcl-buffer' to be the new process's buffer. If you only run
+one process, this does the right thing. If you run multiple
+processes, you can change `inferior-tcl-buffer' to another process
+buffer with \\[set-variable].")
+
+;;
+;; Hooks and other customization.
+;;
+
+(defvar tcl-mode-hook nil
+ "Hook run on entry to Tcl mode.
+
+Several functions exist which are useful to run from your
+`tcl-mode-hook' (see each function's documentation for more
+information):
+
+ tcl-guess-application
+ Guesses a default setting for `tcl-application' based on any
+ \"#!\" line at the top of the file.
+ tcl-hashify-buffer
+ Quotes all \"#\" characters that don't correspond to actual
+ Tcl comments. (Useful when editing code not originally created
+ with this mode).
+ tcl-auto-fill-mode
+ Auto-filling of Tcl comments.
+
+Emacs 19 users can add functions to the hook with `add-hook':
+
+ (add-hook 'tcl-mode-hook 'tcl-guess-application)
+
+Emacs 18 users must use `setq':
+
+ (setq tcl-mode-hook (cons 'tcl-guess-application tcl-mode-hook))")
+
+
+(defvar inferior-tcl-mode-hook nil
+ "Hook for customizing Inferior Tcl mode.")
+
+(defvar tcl-proc-list
+ '("proc" "method" "itcl_class")
+ "List of commands whose first argument defines something.
+This exists because some people (eg, me) use \"defvar\" et al.
+Call `tcl-set-proc-regexp' and `tcl-set-font-lock-keywords'
+after changing this list.")
+
+(defvar tcl-proc-regexp nil
+ "Regexp to use when matching proc headers.")
+
+(defvar tcl-typeword-list
+ '("global" "upvar" "inherit" "public" "protected" "common")
+ "List of Tcl keywords denoting \"type\". Used only for highlighting.
+Call `tcl-set-font-lock-keywords' after changing this list.")
+
+;; Generally I've picked control operators to be keywords.
+(defvar tcl-keyword-list
+ '("if" "then" "else" "elseif" "for" "foreach" "break" "continue" "while"
+ "eval" "case" "in" "switch" "default" "exit" "error" "proc" "return"
+ "uplevel" "constructor" "destructor" "itcl_class" "loop" "for_array_keys"
+ "for_recursive_glob" "for_file")
+ "List of Tcl keywords. Used only for highlighting.
+Default list includes some TclX keywords.
+Call `tcl-set-font-lock-keywords' after changing this list.")
+
+(defvar tcl-font-lock-keywords nil
+ "Keywords to highlight for Tcl. See variable `font-lock-keywords'.
+This variable is generally set from `tcl-proc-regexp',
+`tcl-typeword-list', and `tcl-keyword-list' by the function
+`tcl-set-font-lock-keywords'.")
+
+;; FIXME need some way to recognize variables because array refs look
+;; like 2 sexps.
+(defvar tcl-type-alist
+ '(
+ ("proc" nil tcl-expr tcl-commands)
+ ("method" nil tcl-expr tcl-commands)
+ ("destructor" tcl-commands)
+ ("constructor" tcl-commands)
+ ("expr" tcl-expr)
+ ("catch" tcl-commands)
+ ("if" tcl-expr "then" tcl-commands)
+ ("elseif" tcl-expr "then" tcl-commands)
+ ("elseif" tcl-expr tcl-commands)
+ ("if" tcl-expr tcl-commands)
+ ("while" tcl-expr tcl-commands)
+ ("for" tcl-commands tcl-expr tcl-commands tcl-commands)
+ ("foreach" nil nil tcl-commands)
+ ("for_file" nil nil tcl-commands)
+ ("for_array_keys" nil nil tcl-commands)
+ ("for_recursive_glob" nil nil nil tcl-commands)
+ ;; Loop handling is not perfect, because the third argument can be
+ ;; either a command or an expr, and there is no real way to look
+ ;; forward.
+ ("loop" nil tcl-expr tcl-expr tcl-commands)
+ ("loop" nil tcl-expr tcl-commands)
+ )
+ "Alist that controls indentation.
+\(Actually, this really only controls what happens on continuation lines).
+Each entry looks like `(KEYWORD TYPE ...)'.
+Each type entry describes a sexp after the keyword, and can be one of:
+* nil, meaning that this sexp has no particular type.
+* tcl-expr, meaning that this sexp is an arithmetic expression.
+* tcl-commands, meaning that this sexp holds Tcl commands.
+* a string, which must exactly match the string at the corresponding
+ position for a match to be made.
+
+For example, the entry for the \"loop\" command is:
+
+ (\"loop\" nil tcl-expr tcl-commands)
+
+This means that the \"loop\" command has three arguments. The first
+argument is ignored (for indentation purposes). The second argument
+is a Tcl expression, and the last argument is Tcl commands.")
+
+(defvar tcl-explain-indentation nil
+ "If not `nil', debugging message will be printed during indentation.")
+
+
+
+;;
+;; Work around differences between various versions of Emacs.
+;;
+
+;; We use this because Lemacs 19.9 has what we need.
+(defconst tcl-pps-has-arg-6
+ (or tcl-using-emacs-19
+ (and tcl-using-xemacs-19
+ (condition-case nil
+ (progn
+ (parse-partial-sexp (point) (point) nil nil nil t)
+ t)
+ (error nil))))
+ "t if using an emacs which supports sixth (\"commentstop\") argument
+to parse-partial-sexp.")
+
+;; Its pretty bogus to have to do this, but there is no easier way to
+;; say "match not syntax-1 and not syntax-2". Too bad you can't put
+;; \s in [...]. This sickness is used in Emacs 19 to match a defun
+;; starter. (It is used for this in v18 as well).
+;;(defconst tcl-omit-ws-regexp
+;; (concat "^\\(\\s"
+;; (mapconcat 'char-to-string "w_.()\"\\$'/" "\\|\\s")
+;; "\\)\\S(*")
+;; "Regular expression that matches everything except space, comment
+;;starter, and comment ender syntax codes.")
+
+;; FIXME? Instead of using the hairy regexp above, we just use a
+;; simple one.
+;;(defconst tcl-omit-ws-regexp "^[^] \t\n#}]\\S(*"
+;; "Regular expression used in locating function definitions.")
+
+;; Here's another stab. I think this one actually works. Now the
+;; problem seems to be that there is a bug in Emacs 19.22 where
+;; end-of-defun doesn't really use the brace matching the one that
+;; trails defun-prompt-regexp.
+(defconst tcl-omit-ws-regexp "^[^ \t\n#}][^\n}]+}*[ \t]+")
+
+(defun tcl-internal-beginning-of-defun (&optional arg)
+ "Move backward to next beginning-of-defun.
+With argument, do this that many times.
+Returns t unless search stops due to end of buffer."
+ (interactive "p")
+ (if (or (null arg) (= arg 0))
+ (setq arg 1))
+ (let (success)
+ (while (progn
+ (setq arg (1- arg))
+ (and (>= arg 0)
+ (setq success
+ (re-search-backward tcl-omit-ws-regexp nil 'move 1))))
+ (while (and (looking-at "[]#}]")
+ (setq success
+ (re-search-backward tcl-omit-ws-regexp nil 'move 1)))))
+ (beginning-of-line)
+ (not (null success))))
+
+(defun tcl-internal-end-of-defun (&optional arg)
+ "Move forward to next end of defun.
+An end of a defun is found by moving forward from the beginning of one."
+ (interactive "p")
+ (if (or (null arg) (= arg 0)) (setq arg 1))
+ (let ((start (point)))
+ ;; Was forward-char. I think this works a little better.
+ (forward-line)
+ (tcl-beginning-of-defun)
+ (while (> arg 0)
+ (while (and (re-search-forward tcl-omit-ws-regexp nil 'move 1)
+ (progn (beginning-of-line) t)
+ (looking-at "[]#}]")
+ (progn (forward-line) t)))
+ (let ((next-line (save-excursion
+ (forward-line)
+ (point))))
+ (while (< (point) next-line)
+ (forward-sexp)))
+ (forward-line)
+ (if (> (point) start) (setq arg (1- arg))))))
+
+;; In Emacs 19, we can use begining-of-defun as long as we set up a
+;; certain regexp. In Emacs 18, we need our own function.
+(fset 'tcl-beginning-of-defun
+ (if tcl-using-emacs-19
+ 'beginning-of-defun
+ 'tcl-internal-beginning-of-defun))
+
+;; Ditto end-of-defun.
+(fset 'tcl-end-of-defun
+ (if (and tcl-using-emacs-19 (not tcl-using-xemacs-19))
+ 'end-of-defun
+ 'tcl-internal-end-of-defun))
+
+;; Internal mark-defun that is used for losing Emacsen.
+(defun tcl-internal-mark-defun ()
+ "Put mark at end of Tcl function, point at beginning."
+ (interactive)
+ (push-mark (point))
+ (tcl-end-of-defun)
+ (if tcl-using-emacs-19
+ (push-mark (point) nil t)
+ (push-mark (point)))
+ (tcl-beginning-of-defun)
+ (backward-paragraph))
+
+;; In GNU Emacs 19-23 and later, mark-defun works as advertised. I
+;; don't know about XEmacs, so for now it and Emacs 18 just lose.
+(fset 'tcl-mark-defun
+ (if tcl-using-emacs-19-23
+ 'mark-defun
+ 'tcl-internal-mark-defun))
+
+;; In GNU Emacs 19, mark takes an additional "force" argument. I
+;; don't know about XEmacs, so I'm just assuming it is the same.
+;; Emacs 18 doesn't have this argument.
+(defun tcl-mark ()
+ "Return mark, or nil if none."
+ (if tcl-using-emacs-19
+ (mark t)
+ (mark)))
+
+
+
+;;
+;; Some helper functions.
+;;
+
+(defun tcl-set-proc-regexp ()
+ "Set `tcl-proc-regexp' from variable `tcl-proc-list'."
+ (setq tcl-proc-regexp (concat "^\\s-*\\("
+ (mapconcat 'identity tcl-proc-list "\\|")
+ "\\)[ \t]+")))
+
+(defun tcl-set-font-lock-keywords ()
+ "Set `tcl-font-lock-keywords'.
+Uses variables `tcl-proc-regexp' and `tcl-keyword-list'."
+ (setq tcl-font-lock-keywords
+ (list
+ ;; Names of functions (and other "defining things").
+ (list (concat tcl-proc-regexp "\\([^ \t\n]+\\)")
+ 2 'font-lock-function-name-face)
+
+ ;; Names of type-defining things.
+ (list (concat "\\(\\s-\\|^\\)\\("
+ ;; FIXME Use 'regexp-quote?
+ (mapconcat 'identity tcl-typeword-list "\\|")
+ "\\)\\(\\s-\\|$\\)")
+ 2 'font-lock-type-face)
+
+ ;; Keywords. Only recognized if surrounded by whitespace.
+ ;; FIXME consider using "not word or symbol", not
+ ;; "whitespace".
+ (cons (concat "\\(\\s-\\|^\\)\\("
+ ;; FIXME Use regexp-quote?
+ (mapconcat 'identity tcl-keyword-list "\\|")
+ "\\)\\(\\s-\\|$\\)")
+ 2)
+ )))
+
+(if tcl-proc-regexp
+ ()
+ (tcl-set-proc-regexp))
+
+(if tcl-font-lock-keywords
+ ()
+ (tcl-set-font-lock-keywords))
+
+
+
+;;
+;; The mode itself.
+;;
+
+;;;###autoload
+(defun tcl-mode ()
+ "Major mode for editing Tcl code.
+Expression and list commands understand all Tcl brackets.
+Tab indents for Tcl code.
+Paragraphs are separated by blank lines only.
+Delete converts tabs to spaces as it moves back.
+
+Variables controlling indentation style:
+ tcl-indent-level
+ Indentation of Tcl statements within surrounding block.
+ tcl-continued-indent-level
+ Indentation of continuation line relative to first line of command.
+
+Variables controlling user interaction with mode (see variable
+documentation for details):
+ tcl-tab-always-indent
+ Controls action of TAB key.
+ tcl-auto-newline
+ Non-nil means automatically newline before and after braces, brackets,
+ and semicolons inserted in Tcl code.
+ tcl-electric-hash-style
+ Controls action of `#' key.
+ tcl-use-hairy-comment-detector
+ If t, use more complicated, but slower, comment detector.
+ This variable is only used in GNU Emacs 19.
+ tcl-use-smart-word-finder
+ If not nil, use a smarter, Tcl-specific way to find the current
+ word when looking up help on a Tcl command.
+
+Turning on Tcl mode calls the value of the variable `tcl-mode-hook'
+with no args, if that value is non-nil. Read the documentation for
+`tcl-mode-hook' to see what kinds of interesting hook functions
+already exist.
+
+Commands:
+\\{tcl-mode-map}"
+ (interactive)
+ (kill-all-local-variables)
+ (use-local-map tcl-mode-map)
+ (setq major-mode 'tcl-mode)
+ (setq mode-name "Tcl")
+ (setq local-abbrev-table tcl-mode-abbrev-table)
+ (set-syntax-table tcl-mode-syntax-table)
+
+ (make-local-variable 'paragraph-start)
+ (make-local-variable 'paragraph-separate)
+ (if (and tcl-using-emacs-19-23
+ (>= emacs-minor-version 29))
+ (progn
+ ;; In Emacs 19.29, you aren't supposed to start these with a
+ ;; ^.
+ (setq paragraph-start "$\\| ")
+ (setq paragraph-separate paragraph-start))
+ (setq paragraph-start (concat "^$\\|" page-delimiter))
+ (setq paragraph-separate paragraph-start))
+ (make-local-variable 'paragraph-ignore-fill-prefix)
+ (setq paragraph-ignore-fill-prefix t)
+ (make-local-variable 'fill-paragraph-function)
+ (setq fill-paragraph-function 'tcl-do-fill-paragraph)
+
+ (make-local-variable 'indent-line-function)
+ (setq indent-line-function 'tcl-indent-line)
+ ;; Tcl doesn't require a final newline.
+ ;; (make-local-variable 'require-final-newline)
+ ;; (setq require-final-newline t)
+
+ (make-local-variable 'comment-start)
+ (setq comment-start "# ")
+ (make-local-variable 'comment-start-skip)
+ (setq comment-start-skip "#+ *")
+ (make-local-variable 'comment-column)
+ (setq comment-column 40)
+ (make-local-variable 'comment-end)
+ (setq comment-end "")
+
+ (make-local-variable 'outline-regexp)
+ (setq outline-regexp "[^\n\^M]")
+ (make-local-variable 'outline-level)
+ (setq outline-level 'tcl-outline-level)
+
+ (make-local-variable 'font-lock-keywords)
+ (setq font-lock-keywords tcl-font-lock-keywords)
+
+ ;; The following only really makes sense under GNU Emacs 19.
+ (make-local-variable 'imenu-create-index-function)
+ (setq imenu-create-index-function 'tcl-imenu-create-index-function)
+ (make-local-variable 'parse-sexp-ignore-comments)
+
+ ;; Settings for new dabbrev code.
+ (make-local-variable 'dabbrev-case-fold-search)
+ (setq dabbrev-case-fold-search nil)
+ (make-local-variable 'dabbrev-case-replace)
+ (setq dabbrev-case-replace nil)
+ (make-local-variable 'dabbrev-abbrev-skip-leading-regexp)
+ (setq dabbrev-abbrev-skip-leading-regexp "[$!]")
+ (make-local-variable 'dabbrev-abbrev-char-regexp)
+ (setq dabbrev-abbrev-char-regexp "\\sw\\|\\s_")
+
+ (if tcl-using-emacs-19
+ (progn
+ ;; This can only be set to t in Emacs 19 and XEmacs.
+ ;; Emacs 18 and Epoch lose.
+ (setq parse-sexp-ignore-comments t)
+ ;; XEmacs has defun-prompt-regexp, but I don't believe
+ ;; that it works for end-of-defun -- only for
+ ;; beginning-of-defun.
+ (make-local-variable 'defun-prompt-regexp)
+ (setq defun-prompt-regexp tcl-omit-ws-regexp)
+ ;; The following doesn't work in Lucid Emacs 19.6, but maybe
+ ;; it will appear in later versions.
+ (make-local-variable 'add-log-current-defun-function)
+ (setq add-log-current-defun-function 'add-log-tcl-defun))
+ (setq parse-sexp-ignore-comments nil))
+
+ ;; Put Tcl menu into menubar for XEmacs. This happens
+ ;; automatically for GNU Emacs.
+ (if (and tcl-using-xemacs-19
+ current-menubar
+ (not (assoc "Tcl" current-menubar)))
+ (progn
+ (set-buffer-menubar (copy-sequence current-menubar))
+ (add-menu nil "Tcl" tcl-xemacs-menu)))
+ ;; Append Tcl menu to popup menu for XEmacs.
+ (if (and tcl-using-xemacs-19 (boundp 'mode-popup-menu))
+ (setq mode-popup-menu
+ (cons (concat mode-name " Mode Commands") tcl-xemacs-menu)))
+
+ ;; If hilit19 is loaded, add our stuff.
+ (if (featurep 'hilit19)
+ (tcl-hilit))
+
+ (run-hooks 'tcl-mode-hook))
+
+
+
+;; This is used for braces, brackets, and semi (except for closing
+;; braces, which are handled specially).
+(defun tcl-electric-char (arg)
+ "Insert character and correct line's indentation."
+ (interactive "p")
+ ;; Indent line first; this looks better if parens blink.
+ (tcl-indent-line)
+ (self-insert-command arg)
+ (if (and tcl-auto-newline (= last-command-char ?\;))
+ (progn
+ (newline)
+ (tcl-indent-line))))
+
+;; This is used for closing braces. If tcl-auto-newline is set, can
+;; insert a newline both before and after the brace, depending on
+;; context. FIXME should this be configurable? Does anyone use this?
+(defun tcl-electric-brace (arg)
+ "Insert character and correct line's indentation."
+ (interactive "p")
+ ;; If auto-newlining and there is stuff on the same line, insert a
+ ;; newline first.
+ (if tcl-auto-newline
+ (progn
+ (if (save-excursion
+ (skip-chars-backward " \t")
+ (bolp))
+ ()
+ (tcl-indent-line)
+ (newline))
+ ;; In auto-newline case, must insert a newline after each
+ ;; brace. So an explicit loop is needed.
+ (while (> arg 0)
+ (insert last-command-char)
+ (tcl-indent-line)
+ (newline)
+ (setq arg (1- arg))))
+ (self-insert-command arg))
+ (tcl-indent-line))
+
+
+
+(defun tcl-indent-command (&optional arg)
+ "Indent current line as Tcl code, or in some cases insert a tab character.
+If tcl-tab-always-indent is t (the default), always indent current line.
+If tcl-tab-always-indent is nil and point is not in the indentation
+area at the beginning of the line, a TAB is inserted.
+Other values of tcl-tab-always-indent cause the first possible action
+from the following list to take place:
+
+ 1. Move from beginning of line to correct indentation.
+ 2. Delete an empty comment.
+ 3. Move forward to start of comment, indenting if necessary.
+ 4. Move forward to end of line, indenting if necessary.
+ 5. Create an empty comment.
+ 6. Move backward to start of comment, indenting if necessary."
+ (interactive "p")
+ (cond
+ ((not tcl-tab-always-indent)
+ ;; Indent if in indentation area, otherwise insert TAB.
+ (if (<= (current-column) (current-indentation))
+ (tcl-indent-line)
+ (self-insert-command arg)))
+ ((eq tcl-tab-always-indent t)
+ ;; Always indent.
+ (tcl-indent-line))
+ (t
+ ;; "Perl-mode" style TAB command.
+ (let* ((ipoint (point))
+ (eolpoint (progn
+ (end-of-line)
+ (point)))
+ (comment-p (tcl-in-comment)))
+ (cond
+ ((= ipoint (save-excursion
+ (beginning-of-line)
+ (point)))
+ (beginning-of-line)
+ (tcl-indent-line)
+ ;; If indenting didn't leave us in column 0, go to the
+ ;; indentation. Otherwise leave point at end of line. This
+ ;; is a hack.
+ (if (= (point) (save-excursion
+ (beginning-of-line)
+ (point)))
+ (end-of-line)
+ (back-to-indentation)))
+ ((and comment-p (looking-at "[ \t]*$"))
+ ;; Empty comment, so delete it. We also delete any ";"
+ ;; characters at the end of the line. I think this is
+ ;; friendlier, but I don't know how other people will feel.
+ (backward-char)
+ (skip-chars-backward " \t;")
+ (delete-region (point) eolpoint))
+ ((and comment-p (< ipoint (point)))
+ ;; Before comment, so skip to it.
+ (tcl-indent-line)
+ (indent-for-comment))
+ ((/= ipoint eolpoint)
+ ;; Go to end of line (since we're not there yet).
+ (goto-char eolpoint)
+ (tcl-indent-line))
+ ((not comment-p)
+ (tcl-indent-line)
+ (tcl-indent-for-comment))
+ (t
+ ;; Go to start of comment. We don't leave point where it is
+ ;; because we want to skip comment-start-skip.
+ (tcl-indent-line)
+ (indent-for-comment)))))))
+
+(defun tcl-indent-line ()
+ "Indent current line as Tcl code.
+Return the amount the indentation changed by."
+ (let ((indent (calculate-tcl-indent nil))
+ beg shift-amt
+ (case-fold-search nil)
+ (pos (- (point-max) (point))))
+ (beginning-of-line)
+ (setq beg (point))
+ (cond ((eq indent nil)
+ (setq indent (current-indentation)))
+ (t
+ (skip-chars-forward " \t")
+ (if (listp indent) (setq indent (car indent)))
+ (cond ((= (following-char) ?})
+ (setq indent (- indent tcl-indent-level)))
+ ((= (following-char) ?\])
+ (setq indent (- indent 1))))))
+ (skip-chars-forward " \t")
+ (setq shift-amt (- indent (current-column)))
+ (if (zerop shift-amt)
+ (if (> (- (point-max) pos) (point))
+ (goto-char (- (point-max) pos)))
+ (delete-region beg (point))
+ (indent-to indent)
+ ;; If initial point was within line's indentation,
+ ;; position after the indentation. Else stay at same point in text.
+ (if (> (- (point-max) pos) (point))
+ (goto-char (- (point-max) pos))))
+ shift-amt))
+
+(defun tcl-figure-type ()
+ "Determine type of sexp at point.
+This is either 'tcl-expr, 'tcl-commands, or nil. Puts point at start
+of sexp that indicates types.
+
+See documentation for variable `tcl-type-alist' for more information."
+ (let ((count 0)
+ result
+ word-stack)
+ (while (and (< count 5)
+ (not result))
+ (condition-case nil
+ (progn
+ ;; FIXME should use "tcl-backward-sexp", which would skip
+ ;; over entire variables, etc.
+ (backward-sexp)
+ (if (looking-at "[a-zA-Z_]+")
+ (let ((list tcl-type-alist)
+ entry)
+ (setq word-stack (cons (tcl-word-no-props) word-stack))
+ (while (and list (not result))
+ (setq entry (car list))
+ (setq list (cdr list))
+ (let ((index 0))
+ (while (and entry (<= index count))
+ ;; Abort loop if string does not match word on
+ ;; stack.
+ (and (stringp (car entry))
+ (not (string= (car entry)
+ (nth index word-stack)))
+ (setq entry nil))
+ (setq entry (cdr entry))
+ (setq index (1+ index)))
+ (and (> index count)
+ (not (stringp (car entry)))
+ (setq result (car entry)))
+ )))
+ (setq word-stack (cons nil word-stack))))
+ (error nil))
+ (setq count (1+ count)))
+ (and tcl-explain-indentation
+ (message "Indentation type %s" result))
+ result))
+
+(defun calculate-tcl-indent (&optional parse-start)
+ "Return appropriate indentation for current line as Tcl code.
+In usual case returns an integer: the column to indent to.
+Returns nil if line starts inside a string, t if in a comment."
+ (save-excursion
+ (beginning-of-line)
+ (let* ((indent-point (point))
+ (case-fold-search nil)
+ (continued-line
+ (save-excursion
+ (if (bobp)
+ nil
+ (backward-char)
+ (= ?\\ (preceding-char)))))
+ (continued-indent-value (if continued-line
+ tcl-continued-indent-level
+ 0))
+ state
+ containing-sexp
+ found-next-line)
+ (if parse-start
+ (goto-char parse-start)
+ (tcl-beginning-of-defun))
+ (while (< (point) indent-point)
+ (setq parse-start (point))
+ (setq state (parse-partial-sexp (point) indent-point 0))
+ (setq containing-sexp (car (cdr state))))
+ (cond ((or (nth 3 state) (nth 4 state))
+ ;; Inside comment or string. Return nil or t if should
+ ;; not change this line
+ (nth 4 state))
+ ((null containing-sexp)
+ ;; Line is at top level.
+ continued-indent-value)
+ (t
+ ;; Set expr-p if we are looking at the expression part of
+ ;; an "if", "expr", etc statement. Set commands-p if we
+ ;; are looking at the body part of an if, while, etc
+ ;; statement. FIXME Should check for "for" loops here.
+ (goto-char containing-sexp)
+ (let* ((sexpr-type (tcl-figure-type))
+ (expr-p (eq sexpr-type 'tcl-expr))
+ (commands-p (eq sexpr-type 'tcl-commands))
+ (expr-start (point)))
+ ;; Find the first statement in the block and indent
+ ;; like it. The first statement in the block might be
+ ;; on the same line, so what we do is skip all
+ ;; "virtually blank" lines, looking for a non-blank
+ ;; one. A line is virtually blank if it only contains
+ ;; a comment and whitespace. FIXME continued comments
+ ;; aren't supported. They are a wart on Tcl anyway.
+ ;; We do it this funky way because we want to know if
+ ;; we've found a statement on some line _after_ the
+ ;; line holding the sexp opener.
+ (goto-char containing-sexp)
+ (forward-char)
+ (if (and (< (point) indent-point)
+ (looking-at "[ \t]*\\(#.*\\)?$"))
+ (progn
+ (forward-line)
+ (while (and (< (point) indent-point)
+ (looking-at "[ \t]*\\(#.*\\)?$"))
+ (setq found-next-line t)
+ (forward-line))))
+ (if (or continued-line
+ (/= (char-after containing-sexp) ?{)
+ expr-p)
+ (progn
+ ;; Line is continuation line, or the sexp opener
+ ;; is not a curly brace, or we are are looking at
+ ;; an `expr' expression (which must be split
+ ;; specially). So indentation is column of first
+ ;; good spot after sexp opener (with some added
+ ;; in the continued-line case). If there is no
+ ;; nonempty line before the indentation point, we
+ ;; use the column of the character after the sexp
+ ;; opener.
+ (if (>= (point) indent-point)
+ (progn
+ (goto-char containing-sexp)
+ (forward-char))
+ (skip-chars-forward " \t"))
+ (+ (current-column) continued-indent-value))
+ ;; After a curly brace, and not a continuation line.
+ ;; So take indentation from first good line after
+ ;; start of block, unless that line is on the same
+ ;; line as the opening brace. In this case use the
+ ;; indentation of the opening brace's line, plus
+ ;; another indent step. If we are in the body part
+ ;; of an "if" or "while" then the indentation is
+ ;; taken from the line holding the start of the
+ ;; statement.
+ (if (and (< (point) indent-point)
+ found-next-line)
+ (current-indentation)
+ (if commands-p
+ (goto-char expr-start)
+ (goto-char containing-sexp))
+ (+ (current-indentation) tcl-indent-level)))))))))
+
+
+
+(defun indent-tcl-exp ()
+ "Indent each line of the Tcl grouping following point."
+ (interactive)
+ (let ((indent-stack (list nil))
+ (contain-stack (list (point)))
+ (case-fold-search nil)
+ outer-loop-done inner-loop-done state ostate
+ this-indent last-sexp continued-line
+ (next-depth 0)
+ last-depth)
+ (save-excursion
+ (forward-sexp 1))
+ (save-excursion
+ (setq outer-loop-done nil)
+ (while (and (not (eobp)) (not outer-loop-done))
+ (setq last-depth next-depth)
+ ;; Compute how depth changes over this line
+ ;; plus enough other lines to get to one that
+ ;; does not end inside a comment or string.
+ ;; Meanwhile, do appropriate indentation on comment lines.
+ (setq inner-loop-done nil)
+ (while (and (not inner-loop-done)
+ (not (and (eobp) (setq outer-loop-done t))))
+ (setq ostate state)
+ (setq state (parse-partial-sexp (point) (progn (end-of-line) (point))
+ nil nil state))
+ (setq next-depth (car state))
+ (if (and (car (cdr (cdr state)))
+ (>= (car (cdr (cdr state))) 0))
+ (setq last-sexp (car (cdr (cdr state)))))
+ (if (or (nth 4 ostate))
+ (tcl-indent-line))
+ (if (or (nth 3 state))
+ (forward-line 1)
+ (setq inner-loop-done t)))
+ (if (<= next-depth 0)
+ (setq outer-loop-done t))
+ (if outer-loop-done
+ nil
+ ;; If this line had ..))) (((.. in it, pop out of the levels
+ ;; that ended anywhere in this line, even if the final depth
+ ;; doesn't indicate that they ended.
+ (while (> last-depth (nth 6 state))
+ (setq indent-stack (cdr indent-stack)
+ contain-stack (cdr contain-stack)
+ last-depth (1- last-depth)))
+ (if (/= last-depth next-depth)
+ (setq last-sexp nil))
+ ;; Add levels for any parens that were started in this line.
+ (while (< last-depth next-depth)
+ (setq indent-stack (cons nil indent-stack)
+ contain-stack (cons nil contain-stack)
+ last-depth (1+ last-depth)))
+ (if (null (car contain-stack))
+ (setcar contain-stack
+ (or (car (cdr state))
+ (save-excursion
+ (forward-sexp -1)
+ (point)))))
+ (forward-line 1)
+ (setq continued-line
+ (save-excursion
+ (backward-char)
+ (= (preceding-char) ?\\)))
+ (skip-chars-forward " \t")
+ (if (eolp)
+ nil
+ (if (and (car indent-stack)
+ (>= (car indent-stack) 0))
+ ;; Line is on an existing nesting level.
+ (setq this-indent (car indent-stack))
+ ;; Just started a new nesting level.
+ ;; Compute the standard indent for this level.
+ (let ((val (calculate-tcl-indent
+ (if (car indent-stack)
+ (- (car indent-stack))))))
+ (setcar indent-stack
+ (setq this-indent val))
+ (setq continued-line nil)))
+ (cond ((not (numberp this-indent)))
+ ((= (following-char) ?})
+ (setq this-indent (- this-indent tcl-indent-level)))
+ ((= (following-char) ?\])
+ (setq this-indent (- this-indent 1))))
+ ;; Put chosen indentation into effect.
+ (or (null this-indent)
+ (= (current-column)
+ (if continued-line
+ (+ this-indent tcl-indent-level)
+ this-indent))
+ (progn
+ (delete-region (point) (progn (beginning-of-line) (point)))
+ (indent-to
+ (if continued-line
+ (+ this-indent tcl-indent-level)
+ this-indent)))))))))
+ )
+
+
+
+;;
+;; Interfaces to other packages.
+;;
+
+(defun tcl-imenu-create-index-function ()
+ "Generate alist of indices for imenu."
+ (let ((re (concat tcl-proc-regexp "\\([^ \t\n{]+\\)"))
+ alist prev-pos)
+ (goto-char (point-min))
+ (imenu-progress-message prev-pos 0)
+ (save-match-data
+ (while (re-search-forward re nil t)
+ (imenu-progress-message prev-pos)
+ ;; Position on start of proc name, not beginning of line.
+ (setq alist (cons
+ (cons (buffer-substring (match-beginning 2) (match-end 2))
+ (match-beginning 2))
+ alist))))
+ (imenu-progress-message prev-pos 100)
+ (nreverse alist)))
+
+;; FIXME Definition of function is very ad-hoc. Should use
+;; tcl-beginning-of-defun. Also has incestuous knowledge about the
+;; format of tcl-proc-regexp.
+(defun add-log-tcl-defun ()
+ "Return name of Tcl function point is in, or nil."
+ (save-excursion
+ (end-of-line)
+ (if (re-search-backward (concat tcl-proc-regexp "\\([^ \t\n{]+\\)") nil t)
+ (buffer-substring (match-beginning 2)
+ (match-end 2)))))
+
+(defun tcl-outline-level ()
+ (save-excursion
+ (skip-chars-forward " \t")
+ (current-column)))
+
+
+
+;;
+;; Helper functions for inferior Tcl mode.
+;;
+
+;; This exists to let us delete the prompt when commands are sent
+;; directly to the inferior Tcl. See gud.el for an explanation of how
+;; it all works (I took it from there). This stuff doesn't really
+;; work as well as I'd like it to. But I don't believe there is
+;; anything useful that can be done.
+(defvar inferior-tcl-delete-prompt-marker nil)
+
+(defun tcl-filter (proc string)
+ (let ((inhibit-quit t))
+ (save-excursion
+ (set-buffer (process-buffer proc))
+ (goto-char (process-mark proc))
+ ;; Delete prompt if requested.
+ (if (marker-buffer inferior-tcl-delete-prompt-marker)
+ (progn
+ (delete-region (point) inferior-tcl-delete-prompt-marker)
+ (set-marker inferior-tcl-delete-prompt-marker nil)))))
+ (if tcl-using-emacs-19
+ (comint-output-filter proc string)
+ (funcall comint-output-filter string)))
+
+(defun tcl-send-string (proc string)
+ (save-excursion
+ (set-buffer (process-buffer proc))
+ (goto-char (process-mark proc))
+ (beginning-of-line)
+ (if (looking-at comint-prompt-regexp)
+ (set-marker inferior-tcl-delete-prompt-marker (point))))
+ (comint-send-string proc string))
+
+(defun tcl-send-region (proc start end)
+ (save-excursion
+ (set-buffer (process-buffer proc))
+ (goto-char (process-mark proc))
+ (beginning-of-line)
+ (if (looking-at comint-prompt-regexp)
+ (set-marker inferior-tcl-delete-prompt-marker (point))))
+ (comint-send-region proc start end))
+
+(defun switch-to-tcl (eob-p)
+ "Switch to inferior Tcl process buffer.
+With argument, positions cursor at end of buffer."
+ (interactive "P")
+ (if (get-buffer inferior-tcl-buffer)
+ (pop-to-buffer inferior-tcl-buffer)
+ (error "No current inferior Tcl buffer"))
+ (cond (eob-p
+ (push-mark)
+ (goto-char (point-max)))))
+
+(defun inferior-tcl-proc ()
+ "Return current inferior Tcl process.
+See variable `inferior-tcl-buffer'."
+ (let ((proc (get-buffer-process (if (eq major-mode 'inferior-tcl-mode)
+ (current-buffer)
+ inferior-tcl-buffer))))
+ (or proc
+ (error "No Tcl process; see variable `inferior-tcl-buffer'"))))
+
+(defun tcl-eval-region (start end &optional and-go)
+ "Send the current region to the inferior Tcl process.
+Prefix argument means switch to the Tcl buffer afterwards."
+ (interactive "r\nP")
+ (let ((proc (inferior-tcl-proc)))
+ (tcl-send-region proc start end)
+ (tcl-send-string proc "\n")
+ (if and-go (switch-to-tcl t))))
+
+(defun tcl-eval-defun (&optional and-go)
+ "Send the current defun to the inferior Tcl process.
+Prefix argument means switch to the Tcl buffer afterwards."
+ (interactive "P")
+ (save-excursion
+ (tcl-end-of-defun)
+ (let ((end (point)))
+ (tcl-beginning-of-defun)
+ (tcl-eval-region (point) end)))
+ (if and-go (switch-to-tcl t)))
+
+
+
+;;
+;; Inferior Tcl mode itself.
+;;
+
+(defun inferior-tcl-mode ()
+ "Major mode for interacting with Tcl interpreter.
+
+A Tcl process can be started with M-x inferior-tcl.
+
+Entry to this mode runs the hooks comint-mode-hook and
+inferior-tcl-mode-hook, in that order.
+
+You can send text to the inferior Tcl process from other buffers
+containing Tcl source.
+
+Variables controlling Inferior Tcl mode:
+ tcl-application
+ Name of program to run.
+ tcl-command-switches
+ Command line arguments to `tcl-application'.
+ tcl-prompt-regexp
+ Matches prompt.
+ inferior-tcl-source-command
+ Command to use to read Tcl file in running application.
+ inferior-tcl-buffer
+ The current inferior Tcl process buffer. See variable
+ documentation for details on multiple-process support.
+
+The following commands are available:
+\\{inferior-tcl-mode-map}"
+ (interactive)
+ (comint-mode)
+ (setq comint-prompt-regexp (or tcl-prompt-regexp
+ (concat "^"
+ (regexp-quote tcl-application)
+ ">")))
+ (setq major-mode 'inferior-tcl-mode)
+ (setq mode-name "Inferior Tcl")
+ (if (boundp 'modeline-process)
+ (setq modeline-process '(": %s")) ; For XEmacs.
+ (setq mode-line-process '(": %s")))
+ (use-local-map inferior-tcl-mode-map)
+ (setq local-abbrev-table tcl-mode-abbrev-table)
+ (set-syntax-table tcl-mode-syntax-table)
+ (if tcl-using-emacs-19
+ (progn
+ (make-local-variable 'defun-prompt-regexp)
+ (setq defun-prompt-regexp tcl-omit-ws-regexp)))
+ (make-local-variable 'inferior-tcl-delete-prompt-marker)
+ (setq inferior-tcl-delete-prompt-marker (make-marker))
+ (set-process-filter (get-buffer-process (current-buffer)) 'tcl-filter)
+ (run-hooks 'inferior-tcl-mode-hook))
+
+;;;###autoload
+(defun inferior-tcl (cmd)
+ "Run inferior Tcl process.
+Prefix arg means enter program name interactively.
+See documentation for function `inferior-tcl-mode' for more information."
+ (interactive
+ (list (if current-prefix-arg
+ (read-string "Run Tcl: " tcl-application)
+ tcl-application)))
+ (if (not (comint-check-proc "*inferior-tcl*"))
+ (progn
+ (set-buffer (apply (function make-comint) "inferior-tcl" cmd nil
+ tcl-command-switches))
+ (inferior-tcl-mode)))
+ (make-local-variable 'tcl-application)
+ (setq tcl-application cmd)
+ (setq inferior-tcl-buffer "*inferior-tcl*")
+ (switch-to-buffer "*inferior-tcl*"))
+
+(and (fboundp 'defalias)
+ (defalias 'run-tcl 'inferior-tcl))
+
+
+
+;;
+;; Auto-fill support.
+;;
+
+(defun tcl-real-command-p ()
+ "Return nil if point is not at the beginning of a command.
+A command is the first word on an otherwise empty line, or the
+first word following a semicolon, opening brace, or opening bracket."
+ (save-excursion
+ (skip-chars-backward " \t")
+ (cond
+ ((bobp) t)
+ ((bolp)
+ (backward-char)
+ ;; Note -- continued comments are not supported here. I
+ ;; consider those to be a wart on the language.
+ (not (eq ?\\ (preceding-char))))
+ (t
+ (memq (preceding-char) '(?\; ?{ ?\[))))))
+
+;; FIXME doesn't actually return t. See last case.
+(defun tcl-real-comment-p ()
+ "Return t if point is just after the `#' beginning a real comment.
+Does not check to see if previous char is actually `#'.
+A real comment is either at the beginning of the buffer,
+preceeded only by whitespace on the line, or has a preceeding
+semicolon, opening brace, or opening bracket on the same line."
+ (save-excursion
+ (backward-char)
+ (tcl-real-command-p)))
+
+(defun tcl-hairy-scan-for-comment (state end always-stop)
+ "Determine if point is in a comment.
+Returns a list of the form `(FLAG . STATE)'. STATE can be used
+as input to future invocations. FLAG is nil if not in comment,
+t otherwise. If in comment, leaves point at beginning of comment.
+Only works in Emacs 19. See also `tcl-simple-scan-for-comment', a
+simpler version that is often right, and works in Emacs 18."
+ (let ((bol (save-excursion
+ (goto-char end)
+ (beginning-of-line)
+ (point)))
+ real-comment
+ last-cstart)
+ (while (and (not last-cstart) (< (point) end))
+ (setq real-comment nil) ;In case we've looped around and it is
+ ;set.
+ (setq state (parse-partial-sexp (point) end nil nil state t))
+ (if (nth 4 state)
+ (progn
+ ;; If ALWAYS-STOP is set, stop even if we don't have a
+ ;; real comment, or if the comment isn't on the same line
+ ;; as the end.
+ (if always-stop (setq last-cstart (point)))
+ ;; If we have a real comment, then set the comment
+ ;; starting point if we are on the same line as the ending
+ ;; location.
+ (setq real-comment (tcl-real-comment-p))
+ (if real-comment
+ (progn
+ (and (> (point) bol) (setq last-cstart (point)))
+ ;; NOTE Emacs 19 has a misfeature whereby calling
+ ;; parse-partial-sexp with COMMENTSTOP set and with
+ ;; an initial list that says point is in a comment
+ ;; will cause an immediate return. So we must skip
+ ;; over the comment ourselves.
+ (beginning-of-line 2)))
+ ;; Frob the state to make it look like we aren't in a
+ ;; comment.
+ (setcar (nthcdr 4 state) nil))))
+ (and last-cstart
+ (goto-char last-cstart))
+ (cons real-comment state)))
+
+(defun tcl-hairy-in-comment ()
+ "Return t if point is in a comment, and leave point at beginning
+of comment."
+ (let ((save (point)))
+ (tcl-beginning-of-defun)
+ (car (tcl-hairy-scan-for-comment nil save nil))))
+
+(defun tcl-simple-in-comment ()
+ "Return t if point is in comment, and leave point at beginning
+of comment. This is faster that `tcl-hairy-in-comment', but is
+correct less often."
+ (let ((save (point))
+ comment)
+ (beginning-of-line)
+ (while (and (< (point) save) (not comment))
+ (search-forward "#" save 'move)
+ (setq comment (tcl-real-comment-p)))
+ comment))
+
+(defun tcl-in-comment ()
+ "Return t if point is in comment, and leave point at beginning
+of comment."
+ (if (and tcl-pps-has-arg-6
+ tcl-use-hairy-comment-detector)
+ (tcl-hairy-in-comment)
+ (tcl-simple-in-comment)))
+
+(defun tcl-do-fill-paragraph (ignore)
+ "fill-paragraph function for Tcl mode. Only fills in a comment."
+ (let (in-comment col where)
+ (save-excursion
+ (end-of-line)
+ (setq in-comment (tcl-in-comment))
+ (if in-comment
+ (progn
+ (setq where (1+ (point)))
+ (setq col (1- (current-column))))))
+ (and in-comment
+ (save-excursion
+ (back-to-indentation)
+ (= col (current-column)))
+ ;; In a comment. Set the fill prefix, and find the paragraph
+ ;; boundaries by searching for lines that look like
+ ;; comment-only lines.
+ (let ((fill-prefix (buffer-substring (progn
+ (beginning-of-line)
+ (point))
+ where))
+ p-start p-end)
+ ;; Search backwards.
+ (save-excursion
+ (while (looking-at "^[ \t]*#")
+ (forward-line -1))
+ (forward-line)
+ (setq p-start (point)))
+
+ ;; Search forwards.
+ (save-excursion
+ (while (looking-at "^[ \t]*#")
+ (forward-line))
+ (setq p-end (point)))
+
+ ;; Narrow and do the fill.
+ (save-restriction
+ (narrow-to-region p-start p-end)
+ (fill-paragraph ignore)))))
+ t)
+
+(defun tcl-do-auto-fill ()
+ "Auto-fill function for Tcl mode. Only auto-fills in a comment."
+ (if (> (current-column) fill-column)
+ (let ((fill-prefix "# ")
+ in-comment col)
+ (save-excursion
+ (setq in-comment (tcl-in-comment))
+ (if in-comment
+ (setq col (1- (current-column)))))
+ (if in-comment
+ (progn
+ (do-auto-fill)
+ (save-excursion
+ (back-to-indentation)
+ (delete-region (point) (save-excursion
+ (beginning-of-line)
+ (point)))
+ (indent-to-column col)))))))
+
+
+
+;;
+;; Help-related code.
+;;
+
+(defvar tcl-help-saved-dirs nil
+ "Saved help directories.
+If `tcl-help-directory-list' changes, this allows `tcl-help-on-word'
+to update the alist.")
+
+(defvar tcl-help-alist nil
+ "Alist with command names as keys and filenames as values.")
+
+(defun tcl-help-snarf-commands (dirlist)
+ "Build alist of commands and filenames."
+ (while dirlist
+ (let ((files (directory-files (car dirlist) t)))
+ (while files
+ (if (and (file-directory-p (car files))
+ (not
+ (let ((fpart (file-name-nondirectory (car files))))
+ (or (equal fpart ".")
+ (equal fpart "..")))))
+ (let ((matches (directory-files (car files) t)))
+ (while matches
+ (or (file-directory-p (car matches))
+ (setq tcl-help-alist
+ (cons
+ (cons (file-name-nondirectory (car matches))
+ (car matches))
+ tcl-help-alist)))
+ (setq matches (cdr matches)))))
+ (setq files (cdr files))))
+ (setq dirlist (cdr dirlist))))
+
+(defun tcl-reread-help-files ()
+ "Set up to re-read files, and then do it."
+ (interactive)
+ (message "Building Tcl help file index...")
+ (setq tcl-help-saved-dirs tcl-help-directory-list)
+ (setq tcl-help-alist nil)
+ (tcl-help-snarf-commands tcl-help-directory-list)
+ (message "Building Tcl help file index...done"))
+
+(defun tcl-word-no-props ()
+ "Like current-word, but strips properties."
+ (let ((word (current-word)))
+ (and (fboundp 'set-text-properties)
+ (set-text-properties 0 (length word) nil word))
+ word))
+
+(defun tcl-current-word (flag)
+ "Return current command word, or nil.
+If FLAG is nil, just uses `current-word'.
+Otherwise scans backward for most likely Tcl command word."
+ (if (and flag
+ (memq major-mode '(tcl-mode inferior-tcl-mode)))
+ (condition-case nil
+ (save-excursion
+ ;; Look backward for first word actually in alist.
+ (if (bobp)
+ ()
+ (while (and (not (bobp))
+ (not (tcl-real-command-p)))
+ (backward-sexp)))
+ (if (assoc (tcl-word-no-props) tcl-help-alist)
+ (tcl-word-no-props)))
+ (error nil))
+ (tcl-word-no-props)))
+
+;;;###autoload
+(defun tcl-help-on-word (command &optional arg)
+ "Get help on Tcl command. Default is word at point.
+Prefix argument means invert sense of `tcl-use-smart-word-finder'."
+ (interactive
+ (list
+ (progn
+ (if (not (equal tcl-help-directory-list tcl-help-saved-dirs))
+ (tcl-reread-help-files))
+ (let ((word (tcl-current-word
+ (if current-prefix-arg
+ (not tcl-use-smart-word-finder)
+ tcl-use-smart-word-finder))))
+ (completing-read
+ (if (or (null word) (string= word ""))
+ "Help on Tcl command: "
+ (format "Help on Tcl command (default %s): " word))
+ tcl-help-alist nil t)))
+ current-prefix-arg))
+ (if (not (equal tcl-help-directory-list tcl-help-saved-dirs))
+ (tcl-reread-help-files))
+ (if (string= command "")
+ (setq command (tcl-current-word
+ (if arg
+ (not tcl-use-smart-word-finder)
+ tcl-use-smart-word-finder))))
+ (let* ((help (get-buffer-create "*Tcl help*"))
+ (cell (assoc command tcl-help-alist))
+ (file (and cell (cdr cell))))
+ (set-buffer help)
+ (delete-region (point-min) (point-max))
+ (if file
+ (progn
+ (insert "*** " command "\n\n")
+ (insert-file-contents file))
+ (if (string= command "")
+ (insert "Magical Pig!")
+ (insert "Tcl command " command " not in help\n")))
+ (set-buffer-modified-p nil)
+ (goto-char (point-min))
+ (display-buffer help)))
+
+
+
+;;
+;; Other interactive stuff.
+;;
+
+(defvar tcl-previous-dir/file nil
+ "Record last directory and file used in loading.
+This holds a cons cell of the form `(DIRECTORY . FILE)'
+describing the last `tcl-load-file' command.")
+
+(defun tcl-load-file (file &optional and-go)
+ "Load a Tcl file into the inferior Tcl process.
+Prefix argument means switch to the Tcl buffer afterwards."
+ (interactive
+ (list
+ ;; car because comint-get-source returns a list holding the
+ ;; filename.
+ (car (comint-get-source "Load Tcl file: "
+ (or (and
+ (eq major-mode 'tcl-mode)
+ (buffer-file-name))
+ tcl-previous-dir/file)
+ '(tcl-mode) t))
+ current-prefix-arg))
+ (comint-check-source file)
+ (setq tcl-previous-dir/file (cons (file-name-directory file)
+ (file-name-nondirectory file)))
+ (tcl-send-string (inferior-tcl-proc)
+ (format inferior-tcl-source-command (tcl-quote file)))
+ (if and-go (switch-to-tcl t)))
+
+(defun tcl-restart-with-file (file &optional and-go)
+ "Restart inferior Tcl with file.
+If an inferior Tcl process exists, it is killed first.
+Prefix argument means switch to the Tcl buffer afterwards."
+ (interactive
+ (list
+ (car (comint-get-source "Restart with Tcl file: "
+ (or (and
+ (eq major-mode 'tcl-mode)
+ (buffer-file-name))
+ tcl-previous-dir/file)
+ '(tcl-mode) t))
+ current-prefix-arg))
+ (let* ((buf (if (eq major-mode 'inferior-tcl-mode)
+ (current-buffer)
+ inferior-tcl-buffer))
+ (proc (and buf (get-process buf))))
+ (cond
+ ((not (and buf (get-buffer buf)))
+ ;; I think this will be ok.
+ (inferior-tcl tcl-application)
+ (tcl-load-file file and-go))
+ ((or
+ (not (comint-check-proc buf))
+ (yes-or-no-p
+ "A Tcl process is running, are you sure you want to reset it? "))
+ (save-excursion
+ (comint-check-source file)
+ (setq tcl-previous-dir/file (cons (file-name-directory file)
+ (file-name-nondirectory file)))
+ (comint-exec (get-buffer-create buf)
+ (if proc
+ (process-name proc)
+ "inferior-tcl")
+ tcl-application file tcl-command-switches)
+ (if and-go (switch-to-tcl t)))))))
+
+;; FIXME I imagine you can do this under Emacs 18. I just don't know
+;; how.
+(defun tcl-auto-fill-mode (&optional arg)
+ "Like `auto-fill-mode', but controls filling of Tcl comments."
+ (interactive "P")
+ (and (not tcl-using-emacs-19)
+ (error "You must use Emacs 19 to get this feature."))
+ ;; Following code taken from "auto-fill-mode" (simple.el).
+ (prog1
+ (setq auto-fill-function
+ (if (if (null arg)
+ (not auto-fill-function)
+ (> (prefix-numeric-value arg) 0))
+ 'tcl-do-auto-fill
+ nil))
+ (force-mode-line-update)))
+
+;; hilit19 support from "Chris Alfeld" <calfeld@math.utah.edu>
+(defun tcl-hilit ()
+ (hilit-set-mode-patterns
+ '(tcl-mode)
+ '(
+ ("\\(^ *\\|\; *\\)#.*$" nil comment)
+ ("[^\\]\\(\\$[A-Za-z0-9\\-\\_./\\(\\)]+\\)" 1 label)
+ ("[^_]\\<\\(append\\|array\\|auto_execok\\|auto_load\\|auto_mkindex\\|auto_reset\\|break\\|case\\|catch\\|cd\\|close\\|concat\\|continue\\|eof\\|error\\|eval\\|exec\\|exit\\|expr\\|file\\|flush\\|for\\|foreach\\|format\\|gets\\|glob\\|global\\|history\\|if\\|incr\\|info\\|join\\|lappend\\|lindex\\|linsert\\|list\\|llength\\|lrange\\|lreplace\\|lsearch\\|lsort\\|open\\|pid\\|proc\\|puts\\|pwd\\|read\\|regexp\\|regsub\\|rename\\|return\\|scan\\|seek\\|set\\|source\\|split\\|string\\|switch\\|tell\\|time\\|trace\\|unknown\\|unset\\|uplevel\\|upvar\\|while\\)\\>[^_]" 1 keyword) ; tcl keywords
+ ("[^_]\\<\\(after\\|bell\\|bind\\|bindtags\\|clipboard\\|destroy\\|fileevent\\|focus\\|grab\\|image\\|lower\\|option\\|pack\\|place\\|raise\\|scale\\|selection\\|send\\|subst\\|tk\\|tk_popup\\|tkwait\\|update\\|winfo\\|wm\\)\\>[^_]" 1 define) ; tk keywords
+ ("[^_]\\<\\(button\\|canvas\\|checkbutton\\|entry\\|frame\\|label\\|listbox\\|menu\\|menubutton\\|message\\|radiobutton\\|scrollbar\\|text\\|toplevel\\)\\>[^_]" 1 decl) ; tk widgets
+ ("[^_]\\<\\(tix\\((ButtonBox\\|Baloon\\|Control\\|DirList\\|ExFileSelectBox\\|ExFileSelectDialog\\|FileEntry\\|HList\\|LabelEntry\\|LabelFrame\\|NoteBook\\|OptionMenu\\|PanedWindow\\|PopupMenu\\|ScrolledHList\\|ScrolledText\\|ScrolledWindow\\|Select\\|StdButtonBox\\)\\)\\>[^_]" 1 defun) ; tix widgets
+ ("[{}\\\"\\(\\)]" nil include) ; misc punctuation
+ )))
+
+(defun tcl-electric-hash (&optional count)
+ "Insert a `#' and quote if it does not start a real comment.
+Prefix arg is number of `#'s to insert.
+See variable `tcl-electric-hash-style' for description of quoting
+styles."
+ (interactive "p")
+ (or count (setq count 1))
+ (if (> count 0)
+ (let ((type
+ (if (eq tcl-electric-hash-style 'smart)
+ (if (> count 3) ; FIXME what is "smart"?
+ 'quote
+ 'backslash)
+ tcl-electric-hash-style))
+ comment)
+ (if type
+ (progn
+ (save-excursion
+ (insert "#")
+ (setq comment (tcl-in-comment)))
+ (delete-char 1)
+ (and tcl-explain-indentation (message "comment: %s" comment))
+ (cond
+ ((eq type 'quote)
+ (if (not comment)
+ (insert "\"")))
+ ((eq type 'backslash)
+ ;; The following will set count to 0, so the
+ ;; insert-char can still be run.
+ (if (not comment)
+ (while (> count 0)
+ (insert "\\#")
+ (setq count (1- count)))))
+ (t nil))))
+ (insert-char ?# count))))
+
+(defun tcl-hashify-buffer ()
+ "Quote all `#'s in current buffer that aren't Tcl comments."
+ (interactive)
+ (save-excursion
+ (goto-char (point-min))
+ (if (and tcl-pps-has-arg-6 tcl-use-hairy-comment-detector)
+ (let (state
+ result)
+ (while (< (point) (point-max))
+ (setq result (tcl-hairy-scan-for-comment state (point-max) t))
+ (if (car result)
+ (beginning-of-line 2)
+ (backward-char)
+ (if (eq ?# (following-char))
+ (insert "\\"))
+ (forward-char))
+ (setq state (cdr result))))
+ (while (and (< (point) (point-max))
+ (search-forward "#" nil 'move))
+ (if (tcl-real-comment-p)
+ (beginning-of-line 2)
+ ;; There's really no good way for the simple converter to
+ ;; work. So we just quote # if it isn't already quoted.
+ ;; Bogus, but it works.
+ (backward-char)
+ (if (not (eq ?\\ (preceding-char)))
+ (insert "\\"))
+ (forward-char))))))
+
+(defun tcl-indent-for-comment ()
+ "Indent this line's comment to comment column, or insert an empty comment.
+Is smart about syntax of Tcl comments.
+Parts of this were taken from indent-for-comment (simple.el)."
+ (interactive "*")
+ (end-of-line)
+ (or (tcl-in-comment)
+ (progn
+ ;; Not in a comment, so we have to insert one. Create an
+ ;; empty comment (since there isn't one on this line). If
+ ;; line is not blank, make sure we insert a ";" first.
+ (skip-chars-backward " \t")
+ (let ((eolpoint (point)))
+ (beginning-of-line)
+ (if (/= (point) eolpoint)
+ (progn
+ (goto-char eolpoint)
+ (insert
+ (if (tcl-real-command-p) "" ";")
+ "# ")
+ (backward-char))))))
+ ;; Point is just after the "#" starting a comment. Move it as
+ ;; appropriate.
+ (let* ((indent (if comment-indent-hook
+ (funcall comment-indent-hook)
+ (funcall comment-indent-function)))
+ (begpos (progn
+ (backward-char)
+ (point))))
+ (if (/= begpos indent)
+ (progn
+ (skip-chars-backward " \t" (save-excursion
+ (beginning-of-line)
+ (point)))
+ (delete-region (point) begpos)
+ (indent-to indent)))
+ (looking-at comment-start-skip) ; Always true.
+ (goto-char (match-end 0))
+ ;; I don't like the effect of the next two.
+ ;;(skip-chars-backward " \t" (match-beginning 0))
+ ;;(skip-chars-backward "^ \t" (match-beginning 0))
+ ))
+
+;; The following was inspired by the Tcl editing mode written by
+;; Gregor Schmid <schmid@fb3-s7.math.TU-Berlin.DE>. His version also
+;; attempts to snarf the command line options from the command line,
+;; but I didn't think that would really be that helpful (doesn't seem
+;; like it owould be right enough. His version also looks for the
+;; "#!/bin/csh ... exec" hack, but that seemed even less useful.
+;; FIXME should make sure that the application mentioned actually
+;; exists.
+(defun tcl-guess-application ()
+ "Attempt to guess Tcl application by looking at first line.
+The first line is assumed to look like \"#!.../program ...\"."
+ (save-excursion
+ (goto-char (point-min))
+ (if (looking-at "#![^ \t]*/\\([^ \t\n/]+\\)\\([ \t]\\|$\\)")
+ (progn
+ (make-local-variable 'tcl-application)
+ (setq tcl-application (buffer-substring (match-beginning 1)
+ (match-end 1)))))))
+
+;; This only exists to put on the menubar. I couldn't figure out any
+;; other way to do it. FIXME should take "number of #-marks"
+;; argument.
+(defun tcl-uncomment-region (beg end)
+ "Uncomment region."
+ (interactive "r")
+ (comment-region beg end -1))
+
+
+
+;;
+;; XEmacs menu support.
+;; Taken from schmid@fb3-s7.math.TU-Berlin.DE (Gregor Schmid),
+;; who wrote a different Tcl mode.
+;; We also have support for menus in FSF. We do this by
+;; loading the XEmacs menu emulation code.
+;;
+
+(defun tcl-popup-menu (e)
+ (interactive "@e")
+ (and tcl-using-emacs-19
+ (not tcl-using-xemacs-19)
+ (if tcl-using-emacs-19-23
+ (require 'lmenu)
+ ;; CAVEATS:
+ ;; * lmenu.el provides 'menubar, which is bogus.
+ ;; * lmenu.el causes menubars to be turned on everywhere.
+ ;; Doubly bogus!
+ ;; Both of these problems are fixed in Emacs 19.23. People
+ ;; using an Emacs before that just suffer.
+ (require 'menubar "lmenu"))) ;; This is annoying
+ ;; IMHO popup-menu should be autoloaded in FSF Emacs. Oh well.
+ (popup-menu tcl-xemacs-menu))
+
+
+
+;;
+;; Quoting and unquoting functions.
+;;
+
+;; This quoting is sufficient to protect eg a filename from any sort
+;; of expansion or splitting. Tcl quoting sure sucks.
+(defun tcl-quote (string)
+ "Quote STRING according to Tcl rules."
+ (mapconcat (function (lambda (char)
+ (if (memq char '(?[ ?] ?{ ?} ?\\ ?\" ?$ ? ?\;))
+ (concat "\\" (char-to-string char))
+ (char-to-string char))))
+ string ""))
+
+
+
+;;
+;; Bug reporting.
+;;
+
+(and (fboundp 'eval-when-compile)
+ (eval-when-compile
+ (require 'reporter)))
+
+(defun tcl-submit-bug-report ()
+ "Submit via mail a bug report on Tcl mode."
+ (interactive)
+ (require 'reporter)
+ (and
+ (y-or-n-p "Do you really want to submit a bug report on Tcl mode? ")
+ (reporter-submit-bug-report
+ tcl-maintainer
+ (concat "Tcl mode " tcl-version)
+ '(tcl-indent-level
+ tcl-continued-indent-level
+ tcl-auto-newline
+ tcl-tab-always-indent
+ tcl-use-hairy-comment-detector
+ tcl-electric-hash-style
+ tcl-help-directory-list
+ tcl-use-smart-word-finder
+ tcl-application
+ tcl-command-switches
+ tcl-prompt-regexp
+ inferior-tcl-source-command
+ tcl-using-emacs-19
+ tcl-using-emacs-19-23
+ tcl-using-xemacs-19
+ tcl-proc-list
+ tcl-proc-regexp
+ tcl-typeword-list
+ tcl-keyword-list
+ tcl-font-lock-keywords
+ tcl-pps-has-arg-6))))
+
+
+
+(provide 'tcl)
+
+;;; tcl.el ends here
diff --git a/contrib/test-g++ b/contrib/test-g++
new file mode 100755
index 0000000..91f14c1
--- /dev/null
+++ b/contrib/test-g++
@@ -0,0 +1,89 @@
+#!/bin/sh
+
+# Default DEVOSRCDIR
+if [ "$DEVOSRCDIR" = "" ]; then
+ DEVOSRCDIR=$HOME/devo ; export DEVOSRCDIR
+fi
+
+# Check DEVOSRCDIR
+if [ ! -d "$DEVOSRCDIR" ]; then
+ echo "$0: no directory $DEVOSRCDIR" >&2
+ exit 2
+fi
+
+# Default DEVOBINDIR
+if [ "$DEVOBINDIR" = "" ]; then
+ CPU=`$DEVOSRCDIR/config.guess`
+ if [ $? != 0 ]; then
+ echo "$0: cannot run config.guess" >&2
+ exit 2
+ fi
+ DEVOBINDIR=$HOME/$CPU ; export DEVOBINDIR
+fi
+
+# Check DEVOBINDIR
+if [ ! -d "$DEVOBINDIR" ]; then
+ echo "$0: no directory $DEVOBINDIR" >&2
+ exit 2
+fi
+
+# Default LOGDIR
+if [ "$LOGDIR" = "" ]; then
+ LOGDIR=$HOME/logs ; export LOGDIR
+fi
+
+# Check LOGDIR
+if [ ! -d "$LOGDIR" ]; then
+ echo "$0: no directory $LOGDIR" >&2
+ exit 2
+fi
+
+cd $LOGDIR || exit 2
+
+sum=g++-`date '+%y%m%d'`
+
+$DEVOSRCDIR/dejagnu/contrib/test-tool g++ > $sum 2>&1
+status=$?
+
+if [ -d $DEVOBINDIR/libg++ ]; then
+
+cd $DEVOBINDIR/libg++
+make check >/tmp/clgpp$$ 2>&1
+if [ $? != 0 ]; then
+ cd $LOGDIR
+ echo "" >> $sum
+ echo "libg++ fails to make check:" >> $sum
+ tail -20 /tmp/clgpp$$ >> $sum
+ if [ $status = 0 ]; then
+ status=1
+ fi
+fi
+
+# libg++?
+fi
+
+cd $DEVOBINDIR/libio
+make check >/tmp/clgpp$$ 2>&1
+if [ $? != 0 ]; then
+ cd $LOGDIR
+ echo "" >> $sum
+ echo "libio fails to make check:" >> $sum
+ tail -20 /tmp/clgpp$$ >> $sum
+ if [ $status = 0 ]; then
+ status=1
+ fi
+fi
+
+cd $DEVOBINDIR/libstdc++
+make check >/tmp/clgpp$$ 2>&1
+if [ $? != 0 ]; then
+ cd $LOGDIR
+ echo "" >> $sum
+ echo "libstdc++ fails to make check:" >> $sum
+ tail -20 /tmp/clgpp$$ >> $sum
+ if [ $status = 0 ]; then
+ status=1
+ fi
+fi
+
+exit $status
diff --git a/contrib/test-tool b/contrib/test-tool
new file mode 100755
index 0000000..32ab887
--- /dev/null
+++ b/contrib/test-tool
@@ -0,0 +1,378 @@
+#!/bin/sh
+# This script automatically test the given tool with the tool's test cases,
+# reporting anything of interest.
+
+# exits with 1 if there is nothing of interest
+# exits with 0 if there is something interesting
+# exits with 2 if an error occurred
+
+# Syntax: test-tool [-expectedpass] [-keepoutput] [-noupdate] g++|gcc|gdb|...
+#
+# -expectedpass: Turn XFAIL into "pass", XPASS into "fail".
+# The default is XFAIL->fail, XPASS->pass.
+# -keepoutput: Save "make check" output in test-$tool.log.
+# -noupdate: Don't update log files.
+
+# Limitations, don't run this multiple times in one day, unless the -noupdate
+# flag is given.
+
+# Written by Mike Stump <mrs@cygnus.com>
+
+expectedpass=no
+keepoutput=no
+update=yes
+tool=""
+
+# See if cp -p works.
+pwd=`pwd`
+cd /tmp
+rm -f test-tool-$$-1 test-tool-$$-2
+touch test-tool-$$-1
+cp -p test-tool-$$-1 test-tool-$$-2 2>/dev/null
+if [ $? = 0 -a -f test-tool-$$-2 ] ; then
+ CP="cp -p"
+else
+ CP=cp
+fi
+rm -f test-tool-$$-1 test-tool-$$-2
+cd $pwd
+
+for arg in $*
+do
+ case $arg in
+ -expectedpass) expectedpass=yes ;;
+ -keepoutput) keepoutput=yes ;;
+ -noupdate) update=no ;;
+ -*)
+ echo "Usage: [-expectedpass] [-keepoutput] [-noupdate] tool_name" >&2
+ exit 2
+ ;;
+ *)
+ if [ "$tool" != "" ]; then
+ echo "Usage: [-expectedpass] [-keepoutput] [-noupdate] tool_name" >&2
+ exit 2
+ fi
+ tool=$arg
+ ;;
+ esac
+done
+
+# FIXME: It sure would be nice if `testdir' wasn't necessary. :-(
+
+case $tool in
+ g++)
+ devoname=gcc
+ checktarget=check-g++
+ testdir=testsuite
+ ;;
+ gcc)
+ devoname=gcc
+ checktarget=check-gcc
+ testdir=testsuite
+ ;;
+ ld|gld)
+ devoname=ld
+ checktarget=check
+ testdir=.
+ ;;
+ binutils)
+ devoname=binutils
+ checktarget=check
+ testdir=.
+ ;;
+ *)
+ devoname=$tool
+ checktarget=check
+ testdir=testsuite
+ ;;
+esac
+
+# Default DEVOSRCDIR
+if [ "$DEVOSRCDIR" = "" ]; then
+ DEVOSRCDIR=$HOME/devo ; export DEVOSRCDIR
+fi
+
+# Check DEVOSRCDIR
+if [ ! -d "$DEVOSRCDIR" ]; then
+ echo "$0: no directory $DEVOSRCDIR" >&2
+ exit 2
+fi
+
+# Default DEVOBINDIR
+if [ "$DEVOBINDIR" = "" ]; then
+ CPU=`$DEVOSRCDIR/config.guess`
+ if [ $? != 0 ]; then
+ echo "$0: cannot run config.guess" >&2
+ exit 2
+ fi
+ DEVOBINDIR=$HOME/$CPU ; export DEVOBINDIR
+fi
+
+# Check DEVOBINDIR
+if [ ! -d "$DEVOBINDIR" ]; then
+ echo "$0: no directory $DEVOBINDIR" >&2
+ exit 2
+fi
+
+# Specialize DEVOSRCDIR
+if [ -d "$DEVOSRCDIR/$devoname" ]; then
+ DEVOSRCDIR=$DEVOSRCDIR/$devoname
+else
+ echo "$0: Cannot find source directory." >&2
+ exit 2
+fi
+
+# Default LOGDIR
+if [ "$LOGDIR" = "" ]; then
+ LOGDIR=$HOME/logs ; export LOGDIR
+fi
+
+# Check LOGDIR
+if [ ! -d "$LOGDIR" ]; then
+ echo "$0: no directory $LOGDIR" >&2
+ exit 2
+fi
+
+# Specialize DEVOBINDIR
+if [ -d "$DEVOBINDIR/$devoname" ]; then
+ DEVOBINDIR=$DEVOBINDIR/$devoname
+else
+ echo "$0: Cannot find binary directory." >&2
+ exit 2
+fi
+
+# Binary directory
+cd $DEVOBINDIR || exit 2
+
+TMPDIR=${TMPDIR-/tmp}
+
+tmp=$TMPDIR/$tool-testing.$$a
+tmp1=$TMPDIR/$tool-testing.$$b
+tmp2=$TMPDIR/$tool-testing.$$c
+now_s=$TMPDIR/$tool-testing.$$d
+before_s=$TMPDIR/$tool-testing.$$e
+
+if [ "$keepoutput" = yes ]; then
+ rm -f test-$tool.log
+ make RUNTESTFLAGS="-v -v" $checktarget >test-$tool.log 2>&1
+else
+ make RUNTESTFLAGS="-v -v" $checktarget >/dev/null 2>&1
+fi
+
+# Check for DEJAGNU errors that prevented any output at all.
+if [ ! -f $testdir/$tool.sum ]; then
+ echo "Tests didn't run, probably because of a framework error."
+ if [ "$keepoutput" = yes ]; then
+ echo
+ tail -20 test-$tool.log
+ else
+ echo "Unable to determine why. Rerun with -keepoutput."
+ fi
+ exit 2
+fi
+
+# Canonicalize XFAIL and XPASS so the rest of the script can ignore them.
+if [ "$expectedpass" = yes ]; then
+ sed 's/^XFAIL/PASS(XFAIL)/; s/^XPASS/FAIL(XPASS)/' <$testdir/$tool.sum >$testdir/$tool.1.sum || exit 2
+else
+ sed 's/^XFAIL/FAIL(XFAIL)/; s/^XPASS/PASS(XPASS)/' <$testdir/$tool.sum >$testdir/$tool.1.sum || exit 2
+fi
+mv $testdir/$tool.1.sum $testdir/$tool.sum
+
+patterns="$LOGDIR/$tool-??????.sum $LOGDIR/$tool-??????.sum.gz $LOGDIR/$tool-??????????.sum $LOGDIR/$tool-??????????.sum.gz"
+before=`ls -1t $patterns 2>/dev/null | sed 1q`
+
+todayname=`date '+%y%m%d'`
+if [ "$update" = no ]; then
+ now=$testdir/$tool.sum
+else
+ mv -f $testdir/$tool.sum $LOGDIR/$tool-$todayname.sum || exit 2
+ mv -f $testdir/$tool.log $LOGDIR/$tool-$todayname.log || exit 2
+
+ # Say where the logs are stored so they appear in email messages.
+ echo
+ echo "Log files: $LOGDIR/$tool-$todayname.*"
+ echo
+
+ now="$LOGDIR/$tool-$todayname.sum";
+fi
+
+trap "rm -f $tmp $tmp1 $tmp2 $now_s $before_s" 0 1 2 3 5 9 13 15
+
+case $before in
+ "") before="cat /dev/null" ;;
+ *.gz) before="gunzip -c $before" ;;
+ *) before="cat $before" ;;
+esac
+
+# First, the test summary.
+egrep '^# of |===.*Summary.*===' "$now" || echo "(No test summary?)"
+echo
+
+# Pick out the PASS/FAIL/Ufoo messages.
+# We grep for them again later but that's for robustness' sake.
+grep '^[PFU][A-Z()]*:' "$now" | sort -t ':' +1 > "$now_s"
+$before | grep '^[PFU][A-Z()]*:' | sort -t ':' +1 > "$before_s"
+
+grep '^FAIL:' "$now_s" | sed 's/^[^:]*:[ ]*//' >$tmp1
+grep '^PASS' "$before_s" | sed 's/^[^:]*:[ ]*//' | comm -12 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "Tests that now unexpectedly fail, but worked before:"
+ echo
+ cat $tmp2
+ showchangelog=1
+ echo
+fi
+
+grep '^FAIL:' "$now_s" | sed 's/^[^:]*:[ ]*//' >$tmp1
+grep '^[PFU][A-Z()]*:' "$before_s" | sed 's/^[^:]*:[ ]*//' | comm -23 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "New tests that unexpectedly FAIL:"
+ echo
+ cat $tmp2
+ echo
+fi
+
+grep '^FAIL:' "$now_s" | sed 's/^[^:]*:[ ]*//' >$tmp1
+grep '^FAIL' "$before_s" | sed 's/^[^:]*:[ ]*//' | comm -12 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "Tests that still don't work:"
+ echo
+ cat $tmp2
+ echo
+fi
+
+grep '^PASS' "$now_s" | sed 's/^[^:]*:[ ]*//' >$tmp1
+grep '^FAIL' "$before_s" | sed 's/^[^:]*:[ ]*//' | comm -12 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "Tests that now work, but didn't before:"
+ echo
+ cat $tmp2
+ echo
+fi
+
+grep '^PASS' "$now_s" | sed 's/^[^:]*:[ ]*//' >$tmp1
+grep '^[PFU][A-Z()]*:' "$before_s" | sed 's/^[^:]*:[ ]*//' | comm -23 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "New tests that PASS:"
+ echo
+ cat $tmp2
+ echo
+fi
+
+grep '^[PFU][A-Z()]*:' "$now_s" | sed 's/^[^:]*:[ ]*//' >$tmp1
+grep '^PASS' "$before_s" | sed 's/^[^:]*:[ ]*//' | comm -13 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "Old tests that passed, that have disappeared: (Eeek!)"
+ echo
+ cat $tmp2
+ echo
+fi
+
+grep '^[PFU][A-Z()]*:' "$now_s" | sed 's/^[^:]*:[ ]*//' >$tmp1
+grep '^FAIL' "$before_s" | sed 's/^[^:]*:[ ]*//' | comm -13 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "Old tests that failed, that have disappeared: (Eeek!)"
+ echo
+ cat $tmp2
+ echo
+fi
+
+egrep '^(ERROR|WARNING):' "$now" >$tmp1
+
+if grep -s . $tmp1 > /dev/null; then
+ echo "Errors and warnings:"
+ echo
+ cat $tmp1
+ echo
+fi
+
+if [ "$tool" = g++ ]; then
+ if [ -f $DEVOBINDIR/libio/run-make-check ]; then
+ cd $DEVOBINDIR/libio
+ make check >$TMPDIR/clgpp$$ 2>&1
+ if [ $? != 0 ]; then
+ echo
+ echo "libio fails to make check:"
+ tail -20 $TMPDIR/clgpp$$
+ fi
+ fi
+ if [ -f $DEVOBINDIR/libstdc++/run-make-check ]; then
+ cd $DEVOBINDIR/libstdc++
+ make check >$TMPDIR/clgpp$$ 2>&1
+ if [ $? != 0 ]; then
+ echo
+ echo "libstdc++ fails to make check:"
+ tail -20 $TMPDIR/clgpp$$
+ fi
+ fi
+ if [ -f $DEVOBINDIR/libg++/run-make-check ]; then
+ cd $DEVOBINDIR/libg++
+ make check >$TMPDIR/clgpp$$ 2>&1
+ if [ $? != 0 ]; then
+ echo
+ echo "libg++ fails to make check:"
+ tail -20 $TMPDIR/clgpp$$
+ fi
+ fi
+ rm -f $TMPDIR/clgpp$$
+ cd $DEVOBINDIR
+fi
+
+if [ "$devoname" != "" ]; then
+ if [ "$showchangelog" = 1 ]; then
+ echo "Here is what's new in the ChangeLog:"
+ echo
+ diff -c $LOGDIR/$devoname.ChangeLog $DEVOSRCDIR/ChangeLog
+ echo
+ if [ "$tool" = g++ ]; then
+ echo
+ echo "Here is what's new in the ChangeLog.egcs:"
+ echo
+ diff -c $LOGDIR/gcc.ChangeLog.egcs $DEVOSRCDIR/ChangeLog.egcs
+
+ echo
+ echo "Here is what's new in the cp/ChangeLog:"
+ echo
+ diff -c $LOGDIR/g++.ChangeLog $DEVOSRCDIR/cp/ChangeLog
+ fi
+ echo
+ fi
+ if [ "$update" != no ]; then
+ # save the old ChangeLog as a reference for next time
+ rm -f $LOGDIR/$devoname.ChangeLog.BAK
+ mv $LOGDIR/$devoname.ChangeLog $LOGDIR/$devoname.ChangeLog.BAK 2>/dev/null
+ $CP $DEVOSRCDIR/ChangeLog $LOGDIR/$devoname.ChangeLog
+ if [ "$tool" = g++ ]; then
+ rm -f $LOGDIR/gcc.ChangeLog.egcs.BAK
+ mv $LOGDIR/gcc.ChangeLog.egcs $LOGDIR/gcc.ChangeLog.egcs.BAK 2>/dev/null
+ $CP $DEVOSRCDIR/ChangeLog.egcs $LOGDIR/gcc.ChangeLog.egcs
+
+ rm -f $LOGDIR/g++.ChangeLog.BAK
+ mv $LOGDIR/g++.ChangeLog $LOGDIR/g++.ChangeLog.BAK 2>/dev/null
+ $CP $DEVOSRCDIR/cp/ChangeLog $LOGDIR/g++.ChangeLog
+ fi
+ fi
+fi
+
+$before | diff - $now | grep -s . >/dev/null
+if [ $? = 0 ]; then
+ echo "Details:"
+ echo
+ $before | diff - $now
+ echo
+fi
diff --git a/contrib/testit b/contrib/testit
new file mode 100755
index 0000000..e866aa6
--- /dev/null
+++ b/contrib/testit
@@ -0,0 +1,1149 @@
+#!/usr/latest/bin/wish -f
+# Program: testit
+# Tcl version: 7.2 (Tcl/Tk/XF)
+# Tk version: 3.5
+# XF version: 2.2
+#
+
+
+# procedure to show window .
+proc ShowWindow. {args} {# xf ignore me 7
+
+ # Window manager configurations
+ global tkVersion
+ wm positionfrom . user
+ wm sizefrom . ""
+ wm maxsize . 1152 900
+ wm title . {xf}
+
+ # bindings
+ bind . <Button-3> {MenuPopupPost .frame0.menubutton3.m.menu4 %X %Y}
+ bind . <ButtonRelease-3> {MenuPopupRelease .frame0.menubutton3.m.menu4 %W}
+
+ # build widget .frame0
+ frame .frame0 \
+ -background {white} \
+ -borderwidth {2} \
+ -relief {raised}
+
+ # build widget .frame0.menubutton0
+ menubutton .frame0.menubutton0 \
+ -background {white} \
+ -foreground {black} \
+ -menu {.frame0.menubutton0.m} \
+ -text {Summaries}
+
+ # build widget .frame0.menubutton0.m
+ menu .frame0.menubutton0.m \
+ -background {white} \
+ -foreground {black}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/gcc.sum
+
+} \
+ -label {Gcc}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/g++.sum
+
+} \
+ -label {G++}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/gdb.sum
+
+} \
+ -label {Gdb}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/gas.sum
+
+} \
+ -label {Gas}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/binutils.sum
+
+} \
+ -label {Binutils}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/runtest.sum
+
+} \
+ -label {Runtest}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/tcl.sum
+
+} \
+ -label {Tcl}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/expect.sum
+
+} \
+ -label {Expect}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/libg++.sum
+
+} \
+ -label {Libg++}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/libio.sum
+
+} \
+ -label {Libio}
+ .frame0.menubutton0.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/libm.sum
+
+} \
+ -label {Libm}
+
+ # build widget .frame0.menubutton1
+ menubutton .frame0.menubutton1 \
+ -background {white} \
+ -foreground {black} \
+ -menu {.frame0.menubutton1.m} \
+ -text {Misc}
+
+ # build widget .frame0.menubutton1.m
+ menu .frame0.menubutton1.m \
+ -background {white} \
+ -foreground {black}
+ .frame0.menubutton1.m add command \
+ -command {EndSrc
+destroy .} \
+ -label {Exit}
+ .frame0.menubutton1.m add command \
+ -command {.frame6.frame.text2 delete 0.0 end} \
+ -label {Clear window}
+ .frame0.menubutton1.m add command \
+ -command {dialogbox} \
+ -label {Editor}
+ .frame0.menubutton1.m add command \
+ -command {.frame6.frame.text2 insert 0.0 "Top of tree is $testbase\n"} \
+ -label {Show filename}
+
+ # build widget .frame0.menubutton3
+ menubutton .frame0.menubutton3 \
+ -background {white} \
+ -foreground {black} \
+ -menu {.frame0.menubutton3.m} \
+ -text {Host}
+
+ # build widget .frame0.menubutton3.m
+ menu .frame0.menubutton3.m \
+ -background {white} \
+ -foreground {black}
+ .frame0.menubutton3.m add command \
+ -command {set host "alpha-dec-osf1.3"} \
+ -label {alpha-dec-osf1.3}
+ .frame0.menubutton3.m add command \
+ -command {set host "hppa1.1-hp-hpux"} \
+ -label {hppa1.1-hp-hpux}
+ .frame0.menubutton3.m add command \
+ -command {set host "i386-unknown-sysv4.2"} \
+ -label {i386-unknown-sysv4.2}
+ .frame0.menubutton3.m add command \
+ -command {set host "m68k-hp-hpux"} \
+ -label {m68k-hp-hpux}
+ .frame0.menubutton3.m add command \
+ -command {set host "m68k-sun-sunos4.1.1"} \
+ -label {m68k-sun-sunos4.1.1}
+ .frame0.menubutton3.m add command \
+ -command {set host "mips-dec-ultrix4.2"} \
+ -label {mips-dec-ultrix4.2}
+ .frame0.menubutton3.m add command \
+ -command {set host "mips-sgi-irix4.0.5H"} \
+ -label {mips-sgi-irix4.0.5H}
+ .frame0.menubutton3.m add command \
+ -command {set host "rs6000-ibm-aix3.2"} \
+ -label {rs6000-ibm-aix3.2}
+ .frame0.menubutton3.m add command \
+ -command {set host "sparc-sun-solaris2.3"} \
+ -label {sparc-sun-solaris2.3}
+ .frame0.menubutton3.m add command \
+ -command {set host "sparc-sun-sunos4.1.3"} \
+ -label {sparc-sun-sunos4.1.3}
+
+ # build widget .frame0.menubutton2
+ menubutton .frame0.menubutton2 \
+ -background {white} \
+ -foreground {black} \
+ -menu {.frame0.menubutton2.m} \
+ -text {Target}
+
+ # build widget .frame0.menubutton2.m
+ menu .frame0.menubutton2.m \
+ -background {white} \
+ -foreground {black}
+ .frame0.menubutton2.m add command \
+ -command {set target "a29k-amd-udi"} \
+ -label {a29k-amd-udi}
+ .frame0.menubutton2.m add command \
+ -command {set target "h8300-hms"} \
+ -label {h8300-hms}
+ .frame0.menubutton2.m add command \
+ -command {set target "i386-aout"} \
+ -label {i386-aout}
+ .frame0.menubutton2.m add command \
+ -command {set target "i386-lynx"} \
+ -label {i386-lynx}
+ .frame0.menubutton2.m add command \
+ -command {set target "i960-intel-nindy"} \
+ -label {i960-intel-nindy}
+ .frame0.menubutton2.m add command \
+ -command {set target "i960-vxwork"} \
+ -label {i960-vxworks}
+ .frame0.menubutton2.m add command \
+ -command {set target "m68k-aout"} \
+ -label {m68k-aout}
+ .frame0.menubutton2.m add command \
+ -command {set target "m68k-coff"} \
+ -label {m68k-coff}
+ .frame0.menubutton2.m add command \
+ -command {set target "m68k-lynx"} \
+ -label {m68k-lynx}
+ .frame0.menubutton2.m add command \
+ -command {set target "m68k-vxworks"} \
+ -label {m68k-vxworks}
+ .frame0.menubutton2.m add command \
+ -command {set target "mips-idt-ecoff"} \
+ -label {mips-idt-ecoff}
+ .frame0.menubutton2.m add command \
+ -command {set target "sh-hms"} \
+ -label {sh-hms}
+ .frame0.menubutton2.m add command \
+ -command {set target "sparc-aout"} \
+ -label {sparc-aout}
+ .frame0.menubutton2.m add command \
+ -command {set target "sparc-sun-sunos4.1.3"} \
+ -label {sparc-sun-sunos4.1.3}
+ .frame0.menubutton2.m add command \
+ -command {set target "sparc-vxworks"} \
+ -label {sparc-vxworks}
+ .frame0.menubutton2.m add command \
+ -command {set target "sparclite-aout"} \
+ -label {sparclite-aout}
+ .frame0.menubutton2.m add command \
+ -command {set target "sparclite-coff"} \
+ -label {sparclite-coff}
+ .frame0.menubutton2.m add command \
+ -command {set target "hppa1.1-hp-hpux"} \
+ -label {hppa1.1-hp-hpux}
+ .frame0.menubutton2.m add command \
+ -command {set target "i386-unknown-sysv4.2"} \
+ -label {i386-unknown-sysv4.2}
+ .frame0.menubutton2.m add command \
+ -command {set target "m68k-hp-hpux"} \
+ -label {m68k-hp-hpux}
+ .frame0.menubutton2.m add command \
+ -command {set target "m68k-sun-sunos4.1.1"} \
+ -label {m68k-sun-sunos4.1.1}
+ .frame0.menubutton2.m add command \
+ -command {set target "mips-dec-ultrix4.2"} \
+ -label {mips-dec-ultrix4.2}
+ .frame0.menubutton2.m add command \
+ -command {set target "mips-sgi-irix4.0.5H"} \
+ -label {mips-sgi-irix4.0.5H}
+ .frame0.menubutton2.m add command \
+ -command {set target "rs6000-ibm-aix3.2"} \
+ -label {rs6000-ibm-aix3.2}
+ .frame0.menubutton2.m add command \
+ -command {set target "sparc-sun-solaris2.3"} \
+ -label {sparc-sun-solaris2.3}
+
+ # build widget .frame0.menubutton9
+ menubutton .frame0.menubutton9 \
+ -background {white} \
+ -foreground {black} \
+ -menu {.frame0.menubutton9.m} \
+ -text {Results}
+
+ # build widget .frame0.menubutton9.m
+ menu .frame0.menubutton9.m \
+ -background {white} \
+ -foreground {black}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/gcc
+
+} \
+ -label {Gcc}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/g++
+
+} \
+ -label {G++}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/gdb
+
+} \
+ -label {Gdb}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/gas
+
+} \
+ -label {Gas}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/binutils
+
+} \
+ -label {Binutils}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/runtest
+} \
+ -label {Runtest}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/tcl
+
+} \
+ -label {Tcl}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/expect
+
+} \
+ -label {Expect}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/libg++
+
+} \
+ -label {Libg++}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/libio
+} \
+ -label {Libio}
+ .frame0.menubutton9.m add command \
+ -command {getresult $testbase/objdir/$host/$target/logs/libm
+
+} \
+ -label {Libm}
+
+ # build widget .frame0.menubutton10
+ menubutton .frame0.menubutton10 \
+ -background {white} \
+ -foreground {black} \
+ -menu {.frame0.menubutton10.m} \
+ -text {Logs}
+
+ # build widget .frame0.menubutton10.m
+ menu .frame0.menubutton10.m \
+ -background {white} \
+ -foreground {black}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/gcc.log
+
+} \
+ -label {Gcc}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/g++.log
+
+} \
+ -label {G++}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/gdb.log
+
+} \
+ -label {Gdb}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/gas.log
+
+} \
+ -label {Gas}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/binutils.log
+
+} \
+ -label {Binutils}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/runtest.log
+
+} \
+ -label {Runtest}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/tcl.log
+
+} \
+ -label {Tcl}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/expect.log
+
+} \
+ -label {Expect}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/libg++.log
+
+} \
+ -label {Libg++}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/libio.log
+
+} \
+ -label {Libio}
+ .frame0.menubutton10.m add command \
+ -command {loadfile $testbase/objdir/$host/$target/logs/libm.log
+
+} \
+ -label {Libm}
+
+ # pack widget .frame0
+ pack append .frame0 \
+ .frame0.menubutton0 {left frame center} \
+ .frame0.menubutton1 {right frame center} \
+ .frame0.menubutton3 {left frame center} \
+ .frame0.menubutton2 {left frame center} \
+ .frame0.menubutton9 {left frame center} \
+ .frame0.menubutton10 {left frame center}
+
+ # build widget .frame1
+ frame .frame1 \
+ -background {white} \
+ -borderwidth {2} \
+ -relief {raised}
+
+ # build widget .frame1.message3
+ message .frame1.message3 \
+ -aspect {1500} \
+ -background {white} \
+ -borderwidth {0} \
+ -foreground {black} \
+ -padx {5} \
+ -pady {2} \
+ -relief {raised} \
+ -text {sparc-sun-sunos4.1.3} \
+ -textvariable {host}
+
+ # build widget .frame1.message4
+ message .frame1.message4 \
+ -aspect {1500} \
+ -background {white} \
+ -borderwidth {0} \
+ -foreground {black} \
+ -padx {5} \
+ -pady {2} \
+ -relief {raised} \
+ -text {sparc-sun-sunos4.1.3} \
+ -textvariable {target}
+
+ # pack widget .frame1
+ pack append .frame1 \
+ .frame1.message3 {left frame center} \
+ .frame1.message4 {right frame center}
+
+ # build widget .frame6
+ frame .frame6 \
+ -background {white} \
+ -borderwidth {2} \
+ -relief {raised}
+
+ # build widget .frame6.frame
+ frame .frame6.frame \
+ -background {white} \
+ -relief {raised}
+
+ # build widget .frame6.frame.scrollbar1
+ scrollbar .frame6.frame.scrollbar1 \
+ -background {white} \
+ -command {.frame6.frame.text2 yview} \
+ -foreground {black} \
+ -relief {raised}
+
+ # build widget .frame6.frame.text2
+ text .frame6.frame.text2 \
+ -background {white} \
+ -borderwidth {2} \
+ -foreground {black} \
+ -relief {raised} \
+ -wrap {word} \
+ -yscrollcommand {.frame6.frame.scrollbar1 set}
+
+ # pack widget .frame6.frame
+ pack append .frame6.frame \
+ .frame6.frame.scrollbar1 {left frame center filly} \
+ .frame6.frame.text2 {top frame center expand fill}
+
+ # pack widget .frame6
+ pack append .frame6 \
+ .frame6.frame {top frame center fill}
+
+ # pack widget .
+ pack append . \
+ .frame0 {top frame center fillx} \
+ .frame1 {bottom frame center fillx} \
+ .frame6 {top frame center expand fill}
+
+ .frame6.frame.text2 insert end {}
+
+
+
+ if {"[info procs XFEdit]" != ""} {
+ catch "XFMiscBindWidgetTree ."
+ after 2 "catch {XFEditSetShowWindows}"
+ }
+}
+
+
+# Procedure: Alias
+if {"[info procs Alias]" == ""} {
+proc Alias { args} {
+# xf ignore me 7
+##########
+# Procedure: Alias
+# Description: establish an alias for a procedure
+# Arguments: args - no argument means that a list of all aliases
+# is returned. Otherwise the first parameter is
+# the alias name, and the second parameter is
+# the procedure that is aliased.
+# Returns: nothing, the command that is bound to the alias or a
+# list of all aliases - command pairs.
+# Sideeffects: internalAliasList is updated, and the alias
+# proc is inserted
+##########
+ global internalAliasList
+
+ if {[llength $args] == 0} {
+ return $internalAliasList
+ } {
+ if {[llength $args] == 1} {
+ set xfTmpIndex [lsearch $internalAliasList "[lindex $args 0] *"]
+ if {$xfTmpIndex != -1} {
+ return [lindex [lindex $internalAliasList $xfTmpIndex] 1]
+ }
+ } {
+ if {[llength $args] == 2} {
+ eval "proc [lindex $args 0] {args} {#xf ignore me 4
+return \[eval \"[lindex $args 1] \$args\"\]}"
+ set xfTmpIndex [lsearch $internalAliasList "[lindex $args 0] *"]
+ if {$xfTmpIndex != -1} {
+ set internalAliasList [lreplace $internalAliasList $xfTmpIndex $xfTmpIndex "[lindex $args 0] [lindex $args 1]"]
+ } {
+ lappend internalAliasList "[lindex $args 0] [lindex $args 1]"
+ }
+ } {
+ error "Alias: wrong number or args: $args"
+ }
+ }
+ }
+}
+}
+
+
+# Procedure: GetSelection
+if {"[info procs GetSelection]" == ""} {
+proc GetSelection {} {
+# xf ignore me 7
+##########
+# Procedure: GetSelection
+# Description: get current selection
+# Arguments: none
+# Returns: none
+# Sideeffects: none
+##########
+
+ # the save way
+ set xfSelection ""
+ catch "selection get" xfSelection
+ if {"$xfSelection" == "selection doesn't exist or form \"STRING\" not defined"} {
+ return ""
+ } {
+ return $xfSelection
+ }
+}
+}
+
+
+# Procedure: MenuPopupAdd
+if {"[info procs MenuPopupAdd]" == ""} {
+proc MenuPopupAdd { xfW xfButton xfMenu {xfModifier ""} {xfCanvasTag ""}} {
+# xf ignore me 7
+# the popup menu handling is from (I already gave up with popup handling :-):
+#
+# Copyright 1991,1992 by James Noble.
+# Everyone is granted permission to copy, modify and redistribute.
+# This notice must be preserved on all copies or derivates.
+#
+##########
+# Procedure: MenuPopupAdd
+# Description: attach a popup menu to widget
+# Arguments: xfW - the widget
+# xfButton - the button we use
+# xfMenu - the menu to attach
+# {xfModifier} - a optional modifier
+# {xfCanvasTag} - a canvas tagOrId
+# Returns: none
+# Sideeffects: none
+##########
+ global tk_popupPriv
+
+ set tk_popupPriv($xfMenu,focus) ""
+ set tk_popupPriv($xfMenu,grab) ""
+ if {"$xfModifier" != ""} {
+ set press "$xfModifier-"
+ set motion "$xfModifier-"
+ set release "Any-"
+ } {
+ set press ""
+ set motion ""
+ set release ""
+ }
+
+ bind $xfMenu "<${motion}B${xfButton}-Motion>" "MenuPopupMotion $xfMenu %W %X %Y"
+ bind $xfMenu "<${release}ButtonRelease-${xfButton}>" "MenuPopupRelease $xfMenu %W"
+ if {"$xfCanvasTag" == ""} {
+ bind $xfW "<${press}ButtonPress-${xfButton}>" "MenuPopupPost $xfMenu %X %Y"
+ bind $xfW "<${release}ButtonRelease-${xfButton}>" "MenuPopupRelease $xfMenu %W"
+ } {
+ $xfW bind $xfCanvasTag "<${press}ButtonPress-${xfButton}>" "MenuPopupPost $xfMenu %X %Y"
+ $xfW bind $xfCanvasTag "<${release}ButtonRelease-${xfButton}>" "MenuPopupRelease $xfMenu %W"
+ }
+}
+}
+
+
+# Procedure: MenuPopupMotion
+if {"[info procs MenuPopupMotion]" == ""} {
+proc MenuPopupMotion { xfMenu xfW xfX xfY} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupMotion
+# Description: handle the popup menu motion
+# Arguments: xfMenu - the topmost menu
+# xfW - the menu
+# xfX - the root x coordinate
+# xfY - the root x coordinate
+# Returns: none
+# Sideeffects: none
+##########
+ global tk_popupPriv
+
+ if {"[info commands $xfW]" != "" && [winfo ismapped $xfW] &&
+ "[winfo class $xfW]" == "Menu" &&
+ [info exists tk_popupPriv($xfMenu,focus)] &&
+ "$tk_popupPriv($xfMenu,focus)" != "" &&
+ [info exists tk_popupPriv($xfMenu,grab)] &&
+ "$tk_popupPriv($xfMenu,grab)" != ""} {
+ set xfPopMinX [winfo rootx $xfW]
+ set xfPopMaxX [expr $xfPopMinX+[winfo width $xfW]]
+ if {$xfX >= $xfPopMinX && $xfX <= $xfPopMaxX} {
+ $xfW activate @[expr $xfY-[winfo rooty $xfW]]
+ if {![catch "$xfW entryconfig @[expr $xfY-[winfo rooty $xfW]] -menu" result]} {
+ if {"[lindex $result 4]" != ""} {
+ foreach binding [bind $xfMenu] {
+ bind [lindex $result 4] $binding [bind $xfMenu $binding]
+ }
+ }
+ }
+ } {
+ $xfW activate none
+ }
+ }
+}
+}
+
+
+# Procedure: MenuPopupPost
+if {"[info procs MenuPopupPost]" == ""} {
+proc MenuPopupPost { xfMenu xfX xfY} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupPost
+# Description: post the popup menu
+# Arguments: xfMenu - the menu
+# xfX - the root x coordinate
+# xfY - the root x coordinate
+# Returns: none
+# Sideeffects: none
+##########
+ global tk_popupPriv
+
+ if {"[info commands $xfMenu]" != ""} {
+ if {![info exists tk_popupPriv($xfMenu,focus)]} {
+ set tk_popupPriv($xfMenu,focus) [focus]
+ } {
+ if {"$tk_popupPriv($xfMenu,focus)" == ""} {
+ set tk_popupPriv($xfMenu,focus) [focus]
+ }
+ }
+ set tk_popupPriv($xfMenu,grab) $xfMenu
+
+ catch "$xfMenu activate none"
+ catch "$xfMenu post $xfX $xfY"
+ catch "focus $xfMenu"
+ catch "grab -global $xfMenu"
+ }
+}
+}
+
+
+# Procedure: MenuPopupRelease
+if {"[info procs MenuPopupRelease]" == ""} {
+proc MenuPopupRelease { xfMenu xfW} {
+# xf ignore me 7
+##########
+# Procedure: MenuPopupRelease
+# Description: remove the popup menu
+# Arguments: xfMenu - the topmost menu widget
+# xfW - the menu widget
+# Returns: none
+# Sideeffects: none
+##########
+ global tk_popupPriv
+ global tkVersion
+
+ if {"[info commands $xfW]" != "" && [winfo ismapped $xfW] &&
+ "[winfo class $xfW]" == "Menu" &&
+ [info exists tk_popupPriv($xfMenu,focus)] &&
+ "$tk_popupPriv($xfMenu,focus)" != "" &&
+ [info exists tk_popupPriv($xfMenu,grab)] &&
+ "$tk_popupPriv($xfMenu,grab)" != ""} {
+ if {$tkVersion >= 3.0} {
+ catch "grab release $tk_popupPriv($xfMenu,grab)"
+ } {
+ catch "grab none"
+ }
+ catch "focus $tk_popupPriv($xfMenu,focus)"
+ set tk_popupPriv($xfMenu,focus) ""
+ set tk_popupPriv($xfMenu,grab) ""
+ if {"[$xfW index active]" != "none"} {
+ $xfW invoke active; catch "$xfMenu unpost"
+ }
+ }
+ catch "$xfMenu unpost"
+}
+}
+
+
+# Procedure: NoFunction
+if {"[info procs NoFunction]" == ""} {
+proc NoFunction { args} {
+# xf ignore me 7
+##########
+# Procedure: NoFunction
+# Description: do nothing (especially with scales and scrollbars)
+# Arguments: args - a number of ignored parameters
+# Returns: none
+# Sideeffects: none
+##########
+}
+}
+
+
+# Procedure: SN
+if {"[info procs SN]" == ""} {
+proc SN { {xfName ""}} {
+# xf ignore me 7
+##########
+# Procedure: SN
+# Description: map a symbolic name to the widget path
+# Arguments: xfName
+# Returns: the symbolic name
+# Sideeffects: none
+##########
+
+ SymbolicName $xfName
+}
+}
+
+
+# Procedure: SymbolicName
+if {"[info procs SymbolicName]" == ""} {
+proc SymbolicName { {xfName ""}} {
+# xf ignore me 7
+##########
+# Procedure: SymbolicName
+# Description: map a symbolic name to the widget path
+# Arguments: xfName
+# Returns: the symbolic name
+# Sideeffects: none
+##########
+
+ global symbolicName
+
+ if {"$xfName" != ""} {
+ set xfArrayName ""
+ append xfArrayName symbolicName ( $xfName )
+ if {![catch "set \"$xfArrayName\"" xfValue]} {
+ return $xfValue
+ } {
+ if {"[info commands XFProcError]" != ""} {
+ XFProcError "Unknown symbolic name:\n$xfName"
+ } {
+ puts stderr "XF error: unknown symbolic name:\n$xfName"
+ }
+ }
+ }
+ return ""
+}
+}
+
+
+# Procedure: Unalias
+if {"[info procs Unalias]" == ""} {
+proc Unalias { aliasName} {
+# xf ignore me 7
+##########
+# Procedure: Unalias
+# Description: remove an alias for a procedure
+# Arguments: aliasName - the alias name to remove
+# Returns: none
+# Sideeffects: internalAliasList is updated, and the alias
+# proc is removed
+##########
+ global internalAliasList
+
+ set xfIndex [lsearch $internalAliasList "$aliasName *"]
+ if {$xfIndex != -1} {
+ rename $aliasName ""
+ set internalAliasList [lreplace $internalAliasList $xfIndex $xfIndex]
+ }
+}
+}
+
+
+# Procedure: getbase
+proc getbase {} {
+ global env
+ global testbase
+ if [info exists env(TESTBASE)] then {
+ set testbase $env(TESTBASE)
+ } else {
+ set testbase /lisa/test/rob
+ }
+ return $testbase
+}
+
+
+# Procedure: getresult
+proc getresult { name} {
+set tmp "[lsort [glob -nocomplain $name-results-??????-????]]"
+set tmp [lindex $tmp [expr [llength $tmp] - 1]]
+if [string match "" $tmp] then {
+ .frame6.frame.text2 delete 0.0 end
+ .frame6.frame.text2 insert 0.0 "Couldn't find results for: $name\n"
+ return
+} else {
+ return [loadfile $tmp]
+}
+}
+
+# Procedure: dialogbox
+proc dialogbox {} {
+ set w .frame6.top2
+ catch {destroy $w}
+ catch {destroy $w.e1}
+ toplevel $w
+# dpos $w
+ wm title $w "Change Editor"
+ wm iconname $w "Entries"
+ message $w.msg -font -Adobe-times-medium-r-normal--*-180* -aspect 200 \
+ -text "Hey Now. Click the \"OK\" button when you've seen enough."
+ frame $w.frame -borderwidth 10
+ button $w.ok -text OK -command "destroy $w"
+ pack $w.msg $w.frame $w.ok -side top -fill both
+
+ entry $w.frame.e1 -relief sunken -textvariable editor
+ pack $w.frame.e1 -side top -pady 5 -fill x
+ bind $w.frame.e1 <Return> "destroy $w"
+}
+
+# Procedure: loadfile
+proc loadfile { name} {
+if ![file exists $name] then {
+ .frame6.frame.text2 delete 0.0 end
+ .frame6.frame.text2 insert 0.0 "Couldn't find:\t$name\n"
+ return
+}
+
+global editor
+if [info exists editor] then {
+ if ![string match "" $editor] then {
+ catch "exec $editor $name&" tmp
+ if [info exists tmp] then {
+ .frame6.frame.text2 delete 0.0 end
+ .frame6.frame.text2 insert 0.0 "Editor returned $tmp\n"
+ }
+ }
+}
+.frame6.frame.text2 delete 0.0 end
+set fd [open $name r]
+while { [gets $fd line]>=0 } {
+.frame6.frame.text2 insert end "$line\n"
+.frame6.frame.text2 mark set insert 0.0
+}
+close $fd
+unset fd
+}
+
+
+
+# application parsing procedure
+proc XFLocalParseAppDefs {xfAppDefFile} {
+ global xfAppDefaults
+
+ # basically from: Michael Moore
+ if {[file exists $xfAppDefFile] &&
+ [file readable $xfAppDefFile] &&
+ "[file type $xfAppDefFile]" == "link"} {
+ catch "file type $xfAppDefFile" xfType
+ while {"$xfType" == "link"} {
+ if {[catch "file readlink $xfAppDefFile" xfAppDefFile]} {
+ return
+ }
+ catch "file type $xfAppDefFile" xfType
+ }
+ }
+ if {!("$xfAppDefFile" != "" &&
+ [file exists $xfAppDefFile] &&
+ [file readable $xfAppDefFile] &&
+ "[file type $xfAppDefFile]" == "file")} {
+ return
+ }
+ if {![catch "open $xfAppDefFile r" xfResult]} {
+ set xfAppFileContents [read $xfResult]
+ close $xfResult
+ foreach line [split $xfAppFileContents "\n"] {
+ # backup indicates how far to backup. It applies to the
+ # situation where a resource name ends in . and when it
+ # ends in *. In the second case you want to keep the *
+ # in the widget name for pattern matching, but you want
+ # to get rid of the . if it is the end of the name.
+ set backup -2
+ set line [string trim $line]
+ if {[string index $line 0] == "#" || "$line" == ""} {
+ # skip comments and empty lines
+ continue
+ }
+ set list [split $line ":"]
+ set resource [string trim [lindex $list 0]]
+ set i [string last "." $resource]
+ set j [string last "*" $resource]
+ if {$j > $i} {
+ set i $j
+ set backup -1
+ }
+ incr i
+ set name [string range $resource $i end]
+ incr i $backup
+ set widname [string range $resource 0 $i]
+ set value [string trim [lindex $list 1]]
+ if {"$widname" != "" && "$widname" != "*"} {
+ # insert the widget and resourcename to the application
+ # defaults list.
+ if {![info exists xfAppDefaults]} {
+ set xfAppDefaults ""
+ }
+ lappend xfAppDefaults [list $widname [string tolower $name] $value]
+ }
+ }
+ }
+}
+
+# application loading procedure
+proc XFLocalLoadAppDefs {{xfClasses ""} {xfPriority "startupFile"} {xfAppDefFile ""}} {
+ global env
+
+ if {"$xfAppDefFile" == ""} {
+ set xfFileList ""
+ if {[info exists env(XUSERFILESEARCHPATH)]} {
+ append xfFileList [split $env(XUSERFILESEARCHPATH) :]
+ }
+ if {[info exists env(XAPPLRESDIR)]} {
+ append xfFileList [split $env(XAPPLRESDIR) :]
+ }
+ if {[info exists env(XFILESEARCHPATH)]} {
+ append xfFileList [split $env(XFILESEARCHPATH) :]
+ }
+ append xfFileList " /usr/lib/X11/app-defaults"
+ append xfFileList " /usr/X11/lib/X11/app-defaults"
+
+ foreach xfCounter1 $xfClasses {
+ foreach xfCounter2 $xfFileList {
+ set xfPathName $xfCounter2
+ if {[regsub -all "%N" "$xfPathName" "$xfCounter1" xfResult]} {
+ set xfPathName $xfResult
+ }
+ if {[regsub -all "%T" "$xfPathName" "app-defaults" xfResult]} {
+ set xfPathName $xfResult
+ }
+ if {[regsub -all "%S" "$xfPathName" "" xfResult]} {
+ set xfPathName $xfResult
+ }
+ if {[regsub -all "%C" "$xfPathName" "" xfResult]} {
+ set xfPathName $xfResult
+ }
+ if {[file exists $xfPathName] &&
+ [file readable $xfPathName] &&
+ ("[file type $xfPathName]" == "file" ||
+ "[file type $xfPathName]" == "link")} {
+ catch "option readfile $xfPathName $xfPriority"
+ if {"[info commands XFParseAppDefs]" != ""} {
+ XFParseAppDefs $xfPathName
+ } {
+ if {"[info commands XFLocalParseAppDefs]" != ""} {
+ XFLocalParseAppDefs $xfPathName
+ }
+ }
+ } {
+ if {[file exists $xfCounter2/$xfCounter1] &&
+ [file readable $xfCounter2/$xfCounter1] &&
+ ("[file type $xfCounter2/$xfCounter1]" == "file" ||
+ "[file type $xfCounter2/$xfCounter1]" == "link")} {
+ catch "option readfile $xfCounter2/$xfCounter1 $xfPriority"
+ if {"[info commands XFParseAppDefs]" != ""} {
+ XFParseAppDefs $xfCounter2/$xfCounter1
+ } {
+ if {"[info commands XFLocalParseAppDefs]" != ""} {
+ XFLocalParseAppDefs $xfCounter2/$xfCounter1
+ }
+ }
+ }
+ }
+ }
+ }
+ } {
+ # load a specific application defaults file
+ if {[file exists $xfAppDefFile] &&
+ [file readable $xfAppDefFile] &&
+ ("[file type $xfAppDefFile]" == "file" ||
+ "[file type $xfAppDefFile]" == "link")} {
+ catch "option readfile $xfAppDefFile $xfPriority"
+ if {"[info commands XFParseAppDefs]" != ""} {
+ XFParseAppDefs $xfAppDefFile
+ } {
+ if {"[info commands XFLocalParseAppDefs]" != ""} {
+ XFLocalParseAppDefs $xfAppDefFile
+ }
+ }
+ }
+ }
+}
+
+# application setting procedure
+proc XFLocalSetAppDefs {{xfWidgetPath "."}} {
+ global xfAppDefaults
+
+ if {![info exists xfAppDefaults]} {
+ return
+ }
+ foreach xfCounter $xfAppDefaults {
+ if {"$xfCounter" == ""} {
+ break
+ }
+ set widname [lindex $xfCounter 0]
+ if {[string match $widname ${xfWidgetPath}] ||
+ [string match "${xfWidgetPath}*" $widname]} {
+ set name [string tolower [lindex $xfCounter 1]]
+ set value [lindex $xfCounter 2]
+ # Now lets see how many tcl commands match the name
+ # pattern specified.
+ set widlist [info command $widname]
+ if {"$widlist" != ""} {
+ foreach widget $widlist {
+ # make sure this command is a widget.
+ if {![catch "winfo id $widget"] &&
+ [string match "${xfWidgetPath}*" $widget]} {
+ catch "$widget configure -$name $value"
+ }
+ }
+ }
+ }
+ }
+}
+
+
+
+# startup source
+proc StartupSrc {args} {
+global testbase
+global hostlist
+global targlist
+global host
+
+set host [exec config.guess]
+set target $host
+}
+
+
+# end source
+proc EndSrc {} {
+.frame6.frame.text2 delete 0.0 end
+}
+
+# startup source
+StartupSrc
+
+# initialize global variables
+global {editor}
+set {editor} {}
+global {fsBox}
+set {fsBox(activeBackground)} {}
+set {fsBox(activeForeground)} {}
+set {fsBox(all)} {0}
+set {fsBox(background)} {}
+set {fsBox(button)} {0}
+set {fsBox(extensions)} {0}
+set {fsBox(font)} {}
+set {fsBox(foreground)} {}
+set {fsBox(internalPath)} {/offsite/rob/DejaGnu/devo/dejagnu}
+set {fsBox(name)} {}
+set {fsBox(path)} {/offsite/rob/DejaGnu/devo/dejagnu}
+set {fsBox(pattern)} {*}
+set {fsBox(scrollActiveForeground)} {}
+set {fsBox(scrollBackground)} {}
+set {fsBox(scrollForeground)} {}
+set {fsBox(scrollSide)} {left}
+set {fsBox(showPixmap)} {0}
+global {host}
+set {host} {sparc-sun-sunos4.1.3}
+global {result}
+set {result} {can't read "editor": no such variable}
+global {target}
+set {target} {sparc-sun-sunos4.1.3}
+global {testbase}
+set {testbase} {/lisa/test/rob}
+
+# please don't modify the following
+# variables. They are needed by xf.
+global {autoLoadList}
+set {autoLoadList(testit)} {0}
+global {internalAliasList}
+set {internalAliasList} {}
+global {moduleList}
+set {moduleList(testit)} {}
+global {preloadList}
+set {preloadList(xfInternal)} {}
+global {symbolicName}
+set {symbolicName(binutils)} {.frame0.menubutton7}
+set {symbolicName(dialogbox)} {.top2}
+set {symbolicName(editor)} {.top2.entry4}
+set {symbolicName(g++)} {.frame0.menubutton4}
+set {symbolicName(gas)} {.frame0.menubutton6}
+set {symbolicName(gdb)} {.frame0.menubutton5}
+set {symbolicName(host)} {.frame0.menubutton3.m}
+set {symbolicName(hostlist)} {.frame0.menubutton3}
+set {symbolicName(logs)} {.frame0.menubutton10}
+set {symbolicName(misc)} {.frame0.menubutton1}
+set {symbolicName(ok)} {.top2.button7}
+set {symbolicName(results)} {.frame0.menubutton9}
+set {symbolicName(root)} {.}
+set {symbolicName(sum)} {.frame0.menubutton0}
+set {symbolicName(targlist)} {.frame0.menubutton2}
+global {xfWmSetPosition}
+set {xfWmSetPosition} {}
+global {xfWmSetSize}
+set {xfWmSetSize} {}
+global {xfAppDefToplevels}
+set {xfAppDefToplevels} {}
+
+# display/remove toplevel windows.
+ShowWindow.
+
+# load default bindings.
+if {[info exists env(XF_BIND_FILE)] &&
+ "[info procs XFShowHelp]" == ""} {
+ source $env(XF_BIND_FILE)
+}
+
+# parse and apply application defaults.
+XFLocalLoadAppDefs Testit
+XFLocalSetAppDefs
+
+# end source
+EndSrc
+
+# eof
+#
+
diff --git a/i960glue.c b/i960glue.c
new file mode 100644
index 0000000..0dc569d
--- /dev/null
+++ b/i960glue.c
@@ -0,0 +1,19 @@
+#include "../newlib/libc/ctype/ctype_.c"
+#include "../newlib/libc/stdlib/strtol.c"
+#include "../newlib/libc/stdlib/atoi.c"
+#include "../newlib/libc/reent/impure.c"
+
+
+/* these are for ld -r -wrap */
+
+void
+__real_exit (int code)
+{
+ exit (code);
+}
+
+void
+__real_abort (void)
+{
+ abort ();
+}
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..e0421dd
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,250 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission. M.I.T. makes no representations about the
+# suitability of this software for any purpose. It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+#
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+else
+ true
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d $dst ]; then
+ instcmd=:
+ else
+ instcmd=mkdir
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f $src -o -d $src ]
+ then
+ true
+ else
+ echo "install: $src does not exist"
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "install: no destination specified"
+ exit 1
+ else
+ true
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d $dst ]
+ then
+ dst="$dst"/`basename $src`
+ else
+ true
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp="${pathcomp}${1}"
+ shift
+
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $mkdirprog "${pathcomp}"
+ else
+ true
+ fi
+
+ pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd $dst &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ dstfile=`basename $dst $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ true
+ fi
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd $src $dsttmp &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+
+fi &&
+
+
+exit 0
diff --git a/mkinstalldirs b/mkinstalldirs
new file mode 100755
index 0000000..0801ec2
--- /dev/null
+++ b/mkinstalldirs
@@ -0,0 +1,32 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Last modified: 1994-03-25
+# Public domain
+
+errstatus=0
+
+for file in ${1+"$@"} ; do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d in ${1+"$@"} ; do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp" 1>&2
+ mkdir "$pathcomp" || errstatus=$?
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/runtest b/runtest
new file mode 100755
index 0000000..7c4fe7d
--- /dev/null
+++ b/runtest
@@ -0,0 +1,122 @@
+#!/bin/sh
+#
+# runtest -- basically all this script does is find the proper expect
+# shell and then run DejaGnu.
+#
+# Written by Rob Savoye <rob@cygnus.com>
+#
+
+#
+# Get the execution path to this script and the current directory.
+#
+mypath=${0-.}
+if expr ${mypath} : '.*/.*' > /dev/null
+then
+ :
+else
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH
+ do
+ test -z "$dir" && dir=.
+ if test -x $dir/$mypath
+ then
+ mypath=$dir/$mypath
+ break
+ fi
+ done
+ IFS="$save_ifs"
+fi
+execpath=`echo ${mypath} | sed -e 's@/[^/]*$@@'`
+# rootme=`pwd`
+
+#
+# get the name by which runtest was invoked and extract the config triplet
+#
+runtest=`echo ${mypath} | sed -e 's@^.*/@@'`
+target=`echo $runtest | sed -e 's/-runtest$//'`
+if [ "$target" != runtest ] ; then
+ target="--target ${target}"
+else
+ target=""
+fi
+
+#
+# Find the right expect binary to use. If a variable EXPECT exists,
+# it takes precedence over all other tests. Otherwise look for a freshly
+# built one, and then use one in the path.
+#
+if [ x"$EXPECT" != x ] ; then
+ expectbin=$EXPECT
+else
+ if [ -x "$execpath/expect" ] ; then
+ expectbin=$execpath/expect
+ else
+ expectbin=expect
+ fi
+fi
+
+# just to be safe...
+if [ -z "$expectbin" ]; then
+ echo "ERROR: No expect shell found"
+ exit 1
+fi
+
+# This wrapper script will set up run-time library search PATHs
+if [ -x "$expectbin-bld.sh" ]; then
+ expectbin="${CONFIG_SHELL-/bin/sh} $expectbin-bld.sh"
+fi
+
+#
+# Extract a few options from the option list.
+#
+verbose=0
+debug=""
+for a in "$@" ; do
+ case $a in
+ -v|--v|-verb*|--verb*) verbose=`expr $verbose + 1`;;
+ -D0|--D0) debug="-D 0" ;;
+ -D1|--D1) debug="-D 1" ;;
+ esac
+done
+
+if expr $verbose \> 0 > /dev/null ; then
+ echo Expect binary is $expectbin
+fi
+
+#
+# find runtest.exp. First we look in it's installed location, otherwise
+# start if from the source tree.
+#
+# runtest.exp is found in (autoconf-configure-set) @datadir@, but
+# $execpath is @bindir@. We're assuming that
+#
+# @datadir@ == @bindir@/../share
+# or
+# @datadir@ == @bindir@/../../share
+#
+# which is a very weak assumption
+#
+for i in `echo ${execpath} | sed -e 's@/[^/]*$@/share/dejagnu@'` `echo ${execpath} | sed -e 's@/[^/]*/[^/]*$@/share/dejagnu@'` $execpath ; do
+ if expr $verbose \> 1 > /dev/null ; then
+ echo Looking for $i/runtest.exp.
+ fi
+ if [ -f $i/runtest.exp ] ; then
+ runpath=$i
+ if expr $verbose \> 0 > /dev/null ; then
+ echo Using $i/runtest.exp as main test driver
+ fi
+ fi
+done
+# check for an environment variable
+if [ x"$DEJAGNULIBS" != x ] ; then
+ runpath=$DEJAGNULIBS
+ if expr $verbose \> 0 > /dev/null ; then
+ echo Using $DEJAGNULIBS/runtest.exp as main test driver
+ fi
+fi
+if [ x"$runpath" = x ] ; then
+ echo "ERROR: runtest.exp does not exist."
+ exit 1
+fi
+
+exec $expectbin $debug -- $runpath/runtest.exp $target ${1+"$@"}
diff --git a/runtest.exp b/runtest.exp
new file mode 100755
index 0000000..cfc2ea8
--- /dev/null
+++ b/runtest.exp
@@ -0,0 +1,1873 @@
+# Test Framework Driver
+# Copyright (C) 92, 93, 94, 95, 96, 97, 98, 1999 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@prep.ai.mit.edu
+
+# This file was written by Rob Savoye. (rob@cygnus.com)
+
+set frame_version 1.3.1
+if ![info exists argv0] {
+ send_error "Must use a version of Expect greater than 5.0\n"
+ exit 1
+}
+
+#
+# trap some signals so we know whats happening. These definitions are only
+# temporary until we read in the library stuff
+#
+trap { send_user "\nterminated\n"; exit 1 } SIGTERM
+trap { send_user "\ninterrupted by user\n"; exit 1 } SIGINT
+trap { send_user "\nsigquit\n"; exit 1 } SIGQUIT
+
+#
+# Initialize a few global variables used by all tests.
+# `reset_vars' resets several of these, we define them here to document their
+# existence. In fact, it would be nice if all globals used by some interface
+# of dejagnu proper were documented here.
+#
+# Keep these all lowercase. Interface variables used by the various
+# testsuites (eg: the gcc testsuite) should be in all capitals
+# (eg: TORTURE_OPTIONS).
+#
+set mail_logs 0 ;# flag for mailing of summary and diff logs
+set psum_file "latest" ;# file name of previous summary to diff against
+
+set exit_status 0 ;# exit code returned by this program
+
+set xfail_flag 0
+set xfail_prms 0
+set sum_file "" ;# name of the file that contains the summary log
+set base_dir "" ;# the current working directory
+set logname "" ;# the users login name
+set prms_id 0 ;# GNATS prms id number
+set bug_id 0 ;# optional bug id number
+set dir "" ;# temp variable for directory names
+set srcdir "." ;# source directory containing the test suite
+set ignoretests "" ;# list of tests to not execute
+set objdir "." ;# directory where test case binaries live
+set reboot 0
+set configfile site.exp ;# (local to this file)
+set multipass "" ;# list of passes and var settings
+set errno ""; ;#
+#
+# These describe the host and target environments.
+#
+set build_triplet "" ;# type of architecture to run tests on
+set build_os "" ;# type of os the tests are running on
+set build_vendor "" ;# vendor name of the OS or workstation the test are running on
+set build_cpu "" ;# type of the cpu tests are running on
+set host_triplet "" ;# type of architecture to run tests on, sometimes remotely
+set host_os "" ;# type of os the tests are running on
+set host_vendor "" ;# vendor name of the OS or workstation the test are running on
+set host_cpu "" ;# type of the cpu tests are running on
+set target_triplet "" ;# type of architecture to run tests on, final remote
+set target_os "" ;# type of os the tests are running on
+set target_vendor "" ;# vendor name of the OS or workstation the test are running on
+set target_cpu "" ;# type of the cpu tests are running on
+set target_alias "" ;# standard abbreviation of target
+set compiler_flags "" ;# the flags used by the compiler
+
+#
+# some convenience abbreviations
+#
+if ![info exists hex] {
+ set hex "0x\[0-9A-Fa-f\]+"
+}
+if ![info exists decimal] {
+ set decimal "\[0-9\]+"
+}
+
+#
+# set the base dir (current working directory)
+#
+set base_dir [pwd]
+
+#
+# These are tested in case they are not initialized in $configfile. They are
+# tested here instead of the init module so they can be overridden by command
+# line options.
+#
+if ![info exists all_flag] {
+ set all_flag 0
+}
+if ![info exists binpath] {
+ set binpath ""
+}
+if ![info exists debug] {
+ set debug 0
+}
+if ![info exists options] {
+ set options ""
+}
+if ![info exists outdir] {
+ set outdir "."
+}
+if ![info exists reboot] {
+ set reboot 1
+}
+if ![info exists tracelevel] {
+ set tracelevel 0
+}
+if ![info exists verbose] {
+ set verbose 0
+}
+
+#
+# verbose [-n] [-log] [--] message [level]
+#
+# Print MESSAGE if the verbose level is >= LEVEL.
+# The default value of LEVEL is 1.
+# "-n" says to not print a trailing newline.
+# "-log" says to add the text to the log file even if it won't be printed.
+# Note that the apparent behaviour of `send_user' dictates that if the message
+# is printed it is also added to the log file.
+# Use "--" if MESSAGE begins with "-".
+#
+# This is defined here rather than in framework.exp so we can use it
+# while still loading in the support files.
+#
+proc verbose { args } {
+ global verbose
+ set newline 1
+ set logfile 0
+
+ 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 { [lindex $args $i] == "-log" } {
+ set logfile 1
+ } elseif { [string index [lindex $args $i] 0] == "-" } {
+ clone_output "ERROR: verbose: illegal argument: [lindex $args $i]"
+ return
+ } else {
+ break
+ }
+ }
+ if { [llength $args] == $i } {
+ clone_output "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 } {
+ send_user -- "$message\n"
+ } else {
+ send_user -- "$message"
+ }
+ } elseif { $logfile } {
+ if { $newline } {
+ send_log "$message\n"
+ } else {
+ send_log "$message"
+ }
+ }
+}
+
+#
+# Transform a tool name to get the installed name.
+# target_triplet is the canonical target name. target_alias is the
+# target name used when configure was run.
+#
+proc transform { name } {
+ global target_triplet
+ global target_alias
+ global host_triplet
+ global board;
+
+ if [string match $target_triplet $host_triplet] {
+ return $name
+ }
+ if [string match "native" $target_triplet] {
+ return $name
+ }
+ if [board_info host exists no_transform_name] {
+ return $name
+ }
+ if [string match "" $target_triplet] {
+ return $name
+ } else {
+ if [info exists board] {
+ if [board_info $board exists target_install] {
+ set target_install [board_info $board target_install];
+ }
+ }
+ if [target_info exists target_install] {
+ set target_install [target_info target_install];
+ }
+ if [info exists target_alias] {
+ set tmp ${target_alias}-${name};
+ } elseif [info exists target_install] {
+ if { [lsearch -exact $target_install $target_alias] >= 0 } {
+ set tmp ${target_alias}-${name};
+ } else {
+ set tmp "[lindex $target_install 0]-${name}";
+ }
+ }
+ verbose "Transforming $name to $tmp";
+ return $tmp;
+ }
+}
+
+#
+# findfile arg0 [arg1] [arg2]
+#
+# Find a file and see if it exists. If you only care about the false
+# condition, then you'll need to pass a null "" for arg1.
+# arg0 is the filename to look for. If the only arg,
+# then that's what gets returned. If this is the
+# only arg, then if it exists, arg0 gets returned.
+# if it doesn't exist, return only the prog name.
+# arg1 is optional, and it's what gets returned if
+# the file exists.
+# arg2 is optional, and it's what gets returned if
+# the file doesn't exist.
+#
+proc findfile { args } {
+ # look for the file
+ verbose "Seeing if [lindex $args 0] exists." 2
+ if [file exists [lindex $args 0]] {
+ if { [llength $args] > 1 } {
+ verbose "Found file, returning [lindex $args 1]"
+ return [lindex $args 1]
+ } else {
+ verbose "Found file, returning [lindex $args 0]"
+ return [lindex $args 0]
+ }
+ } else {
+ if { [llength $args] > 2 } {
+ verbose "Didn't find file [lindex $args 0], returning [lindex $args 2]"
+ return [lindex $args 2]
+ } else {
+ verbose "Didn't find file, returning [file tail [lindex $args 0]]"
+ return [transform [file tail [lindex $args 0]]]
+ }
+ }
+}
+
+#
+# load_file [-1] [--] file1 [ file2 ... ]
+#
+# Utility to source a file. All are sourced in order unless the flag "-1"
+# is given in which case we stop after finding the first one.
+# The result is 1 if a file was found, 0 if not.
+# If a tcl error occurs while sourcing a file, we print an error message
+# and exit.
+#
+# ??? Perhaps add an optional argument of some descriptive text to add to
+# verbose and error messages (eg: -t "library file" ?).
+#
+proc load_file { args } {
+ set i 0
+ set only_one 0
+ if { [lindex $args $i] == "-1" } {
+ set only_one 1
+ incr i
+ }
+ if { [lindex $args $i] == "--" } {
+ incr i
+ }
+
+ set found 0
+ foreach file [lrange $args $i end] {
+ verbose "Looking for $file" 2
+ # In Tcl7.5a2, "file exists" can fail if the filename looks
+ # like ~/FILE and the environment variable HOME does not
+ # exist.
+ if {! [catch {file exists $file} result] && $result} {
+ set found 1
+ verbose "Found $file"
+ if { [catch "uplevel #0 source $file"] == 1 } {
+ send_error "ERROR: tcl error sourcing $file.\n"
+ global errorInfo
+ if [info exists errorInfo] {
+ send_error "$errorInfo\n"
+ }
+ exit 1
+ }
+ if $only_one {
+ break
+ }
+ }
+ }
+ return $found
+}
+
+#
+# search_and_load_file -- search DIRLIST looking for FILELIST.
+# TYPE is used when displaying error and progress messages.
+#
+proc search_and_load_file { type filelist dirlist } {
+ set found 0;
+
+ foreach dir $dirlist {
+ foreach initfile $filelist {
+ verbose "Looking for $type ${dir}/${initfile}" 1
+ if [file exists ${dir}/${initfile}] {
+ set found 1
+ set error ""
+ if { ${type} != "library file" } {
+ send_user "Using ${dir}/${initfile} as ${type}.\n"
+ } else {
+ verbose "Loading ${dir}/${initfile}"
+ }
+ if [catch "uplevel #0 source ${dir}/${initfile}" error]==1 {
+ global errorInfo
+ send_error "ERROR: tcl error sourcing ${type} ${dir}/${initfile}.\n${error}\n"
+ if [info exists errorInfo] {
+ send_error "$errorInfo\n"
+ }
+ exit 1
+ }
+ break
+ }
+ }
+ if $found {
+ break
+ }
+ }
+ return $found;
+}
+
+#
+# Give a usage statement.
+#
+proc usage { } {
+ global tool;
+
+ send_user "USAGE: runtest \[options...\]\n"
+ send_user "\t--all (-a)\t\tPrint all test output to screen\n"
+ send_user "\t--build \[string\]\tThe canonical config name of the build machine\n"
+ send_user "\t--host \[string\]\t\tThe canonical config name of the host machine\n"
+ send_user "\t--host_board \[name\]\tThe host board to use\n"
+ send_user "\t--target \[string\]\tThe canonical config name of the target board\n"
+ send_user "\t--debug (-de)\t\tSet expect debugging ON\n"
+ send_user "\t--help (-he)\t\tPrint help text\n"
+ send_user "\t--mail \[name(s)\]\tWhom to mail the results to\n"
+ send_user "\t--ignore \[name(s)\]\tThe names of specific tests to ignore\n"
+ send_user "\t--objdir \[name\]\t\tThe test suite binary directory\n"
+ send_user "\t--outdir \[name\]\t\tThe directory to put logs in\n"
+ send_user "\t--reboot \[name\]\t\tReboot the target (if supported)\n"
+ send_user "\t--srcdir \[name\]\t\tThe test suite source code directory\n"
+ send_user "\t--strace \[number\]\tSet expect tracing ON\n"
+ send_user "\t--target_board \[name(s)\] The list of target boards to run tests on\n"
+ send_user "\t--tool\[name(s)\]\t\tRun tests on these tools\n"
+ send_user "\t--tool_exec \[name\]\tThe path to the tool executable to test\n"
+ send_user "\t--tool_opts \[options\]\tA list of additional options to pass to the tool\n"
+ send_user "\t--directory (-di) name\tRun only the tests in directory 'name'\n"
+ send_user "\t--verbose (-v)\t\tEmit verbose output\n"
+ send_user "\t--version (-V)\t\tEmit all version numbers\n"
+ send_user "\t--D\[0-1\]\t\tTcl debugger\n"
+ send_user "\tscript.exp\[=arg(s)\]\tRun these tests only\n"
+ if { [info exists tool] } {
+ if { [info proc ${tool}_option_help] != "" } {
+ ${tool}_option_help;
+ }
+ }
+}
+
+#
+# Parse the arguments the first time looking for these. We will ultimately
+# parse them twice. Things are complicated because:
+# - we want to parse --verbose early on
+# - we don't want config files to override command line arguments
+# (eg: $base_dir/$configfile vs --host/--target)
+# - we need some command line arguments before we can process some config files
+# (eg: --objdir before $objdir/$configfile, --host/--target before $DEJAGNU)
+# The use of `arg_host_triplet' and `arg_target_triplet' lets us avoid parsing
+# the arguments three times.
+#
+
+set arg_host_triplet ""
+set arg_target_triplet ""
+set arg_build_triplet ""
+set argc [ llength $argv ]
+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"
+ }
+ }
+
+ # split out the argument for options that take them
+ switch -glob -- $option {
+ "--*=*" {
+ regexp {^[^=]*=(.*)$} $option nil optarg
+ }
+ "--bu*" -
+ "--ho*" -
+ "--ig*" -
+ "--m*" -
+ "--n*" -
+ "--ob*" -
+ "--ou*" -
+ "--sr*" -
+ "--st*" -
+ "--ta*" -
+ "--di*" -
+ "--to*" {
+ incr i
+ set optarg [lindex $argv $i]
+ }
+ }
+
+ switch -glob -- $option {
+ "--bu*" { # (--build) the build host configuration
+ set arg_build_triplet $optarg
+ continue
+ }
+
+ "--host_bo*" {
+ set host_board $optarg
+ continue
+ }
+
+ "--ho*" { # (--host) the host configuration
+ set arg_host_triplet $optarg
+ continue
+ }
+
+ "--ob*" { # (--objdir) where the test case object code lives
+ set objdir $optarg
+ continue
+ }
+
+ "--sr*" { # (--srcdir) where the testsuite source code lives
+ set srcdir $optarg
+ continue
+ }
+
+ "--target_bo*" {
+ set target_list $optarg;
+ continue;
+ }
+
+ "--ta*" { # (--target) the target configuration
+ set arg_target_triplet $optarg
+ continue
+ }
+
+ "--tool_opt*" {
+ set TOOL_OPTIONS $optarg
+ continue
+ }
+
+ "--tool_exec*" {
+ set TOOL_EXECUTABLE $optarg
+ continue
+ }
+
+ "--tool_ro*" {
+ set tool_root_dir $optarg
+ continue;
+ }
+
+ "--to*" { # (--tool) specify tool name
+ set tool $optarg
+ set comm_line_tool $optarg;
+ continue
+ }
+
+ "--di*" {
+ set cmdline_dir_to_run $optarg
+ puts "cmdline_dir_to_run = $cmdline_dir_to_run"
+ continue
+ }
+
+ "--v" -
+ "--verb*" { # (--verbose) verbose output
+ incr verbose
+ continue
+ }
+ }
+}
+verbose "Verbose level is $verbose"
+
+#
+# get the users login name
+#
+if [string match "" $logname] {
+ if [info exists env(USER)] {
+ set logname $env(USER)
+ } else {
+ if [info exists env(LOGNAME)] {
+ set logname $env(LOGNAME)
+ } else {
+ # try getting it with whoami
+ catch "set logname [exec whoami]" tmp
+ if [string match "*couldn't find*to execute*" $tmp] {
+ # try getting it with who am i
+ unset tmp
+ catch "set logname [exec who am i]" tmp
+ if [string match "*Command not found*" $tmp] {
+ send_user "ERROR: couldn't get the users login name\n"
+ set logname "Unknown"
+ } else {
+ set logname [lindex [split $logname " !"] 1]
+ }
+ }
+ }
+ }
+}
+
+#
+# lookfor_file -- try to find a file by searching up multiple directory levels
+#
+proc lookfor_file { dir name } {
+ foreach x ".. ../.. ../../.. ../../../.." {
+ verbose "$dir/$name"
+ if [file exists $dir/$name] {
+ return $dir/$name;
+ }
+ set dir [remote_file build dirname $dir];
+ }
+ return ""
+}
+
+#
+# load_lib -- load a library by sourcing it
+#
+# If there a multiple files with the same name, stop after the first one found.
+# The order is first look in the install dir, then in a parallel dir in the
+# source tree, (up one or two levels), then in the current dir.
+#
+proc load_lib { file } {
+ global verbose libdir srcdir base_dir execpath tool
+ global loaded_libs
+
+ if [info exists loaded_libs($file)] {
+ return;
+ }
+
+ set loaded_libs($file) "";
+
+ if { [search_and_load_file "library file" $file [list $libdir $libdir/lib [file dirname [file dirname $srcdir]]/dejagnu/lib $srcdir/lib . [file dirname [file dirname [file dirname $srcdir]]]/dejagnu/lib]] == 0 } {
+ send_error "ERROR: Couldn't find library file $file.\n"
+ exit 1
+ }
+}
+
+verbose "Login name is $logname"
+
+#
+# Begin sourcing the config files.
+# All are sourced in order.
+#
+# Search order:
+# $HOME/.dejagnurc -> $base_dir/$configfile -> $objdir/$configfile
+# -> installed -> $DEJAGNU
+#
+# ??? It might be nice to do $HOME last as it would allow it to be the
+# ultimate override. Though at present there is still $DEJAGNU.
+#
+# For the normal case, we rely on $base_dir/$configfile to set
+# host_triplet and target_triplet.
+#
+
+load_file ~/.dejagnurc $base_dir/$configfile
+
+#
+# If objdir didn't get set in $base_dir/$configfile, set it to $base_dir.
+# Make sure we source $objdir/$configfile in case $base_dir/$configfile doesn't
+# exist and objdir was given on the command line.
+#
+
+if [expr [string match "." $objdir] || [string match $srcdir $objdir]] {
+ set objdir $base_dir
+} else {
+ load_file $objdir/$configfile
+}
+
+# Well, this just demonstrates the real problem...
+if ![info exists tool_root_dir] {
+ set tool_root_dir [file dirname $objdir];
+ if [file exists "$tool_root_dir/testsuite"] {
+ set tool_root_dir [file dirname $tool_root_dir];
+ }
+}
+
+verbose "Using test sources in $srcdir"
+verbose "Using test binaries in $objdir"
+verbose "Tool root directory is $tool_root_dir"
+
+set execpath [file dirname $argv0]
+set libdir [file dirname $execpath]/dejagnu
+if [info exists env(DEJAGNULIBS)] {
+ set libdir $env(DEJAGNULIBS)
+}
+
+verbose "Using $libdir to find libraries"
+
+#
+# If the host or target was given on the command line, override the above
+# config files. We allow $DEJAGNU to massage them though in case it would
+# ever want to do such a thing.
+#
+if { $arg_host_triplet != "" } {
+ set host_triplet $arg_host_triplet
+}
+if { $arg_build_triplet != "" } {
+ set build_triplet $arg_build_triplet
+}
+
+# if we only specify --host, then that must be the build machne too, and we're
+# stuck using the old functionality of a simple cross test
+if [expr { $build_triplet == "" && $host_triplet != "" } ] {
+ set build_triplet $host_triplet
+}
+# if we only specify --build, then we'll use that as the host too
+if [expr { $build_triplet != "" && $host_triplet == "" } ] {
+ set host_triplet $build_triplet
+}
+unset arg_host_triplet arg_build_triplet
+
+#
+# If the build machine type hasn't been specified by now, use config.guess.
+#
+
+if [expr { $build_triplet == "" && $host_triplet == ""} ] {
+ # find config.guess
+ foreach dir "$libdir $libdir/.. $srcdir/.. $srcdir/../.." {
+ verbose "Looking for ${dir}/config.guess" 2
+ if [file exists ${dir}/config.guess] {
+ set config_guess ${dir}/config.guess
+ verbose "Found ${dir}/config.guess"
+ break
+ }
+ }
+
+ # get the canonical config name
+ if ![info exists config_guess] {
+ send_error "ERROR: Couldn't find config.guess program.\n"
+ exit 1
+ }
+ catch "exec $config_guess" build_triplet
+ case $build_triplet in {
+ { "No uname command or uname output not recognized" "Unable to guess system type" } {
+ verbose "WARNING: Uname output not recognized"
+ set build_triplet unknown
+ }
+ }
+ verbose "Assuming build host is $build_triplet"
+ if { $host_triplet == "" } {
+ set host_triplet $build_triplet
+ }
+
+}
+
+#
+# Figure out the target. If the target hasn't been specified, then we have to
+# assume we are native.
+#
+if { $arg_target_triplet != "" } {
+ set target_triplet $arg_target_triplet
+} elseif { $target_triplet == "" } {
+ set target_triplet $build_triplet
+ verbose "Assuming native target is $target_triplet" 2
+}
+unset arg_target_triplet
+#
+# Default target_alias to target_triplet.
+#
+if ![info exists target_alias] {
+ set target_alias $target_triplet
+}
+
+proc get_local_hostname { } {
+ if [catch "info hostname" hb] {
+ set hb ""
+ } else {
+ regsub "\\..*$" $hb "" hb;
+ }
+ verbose "hostname=$hb" 3;
+ return $hb;
+}
+
+#
+# We put these here so that they can be overridden later by site.exp or
+# friends.
+#
+# Set up the target as machine NAME. We also load base-config.exp as a
+# default configuration. The config files are sourced with the global
+# variable $board set to the name of the current target being defined.
+#
+proc setup_target_hook { whole_name name } {
+ global board;
+ global host_board;
+
+ if [info exists host_board] {
+ set hb $host_board;
+ } else {
+ set hb [get_local_hostname];
+ }
+
+ set board $whole_name;
+
+ global board_type;
+ set board_type "target";
+
+ load_config base-config.exp;
+ if ![load_board_description ${name} ${whole_name} ${hb}] {
+ if { $name != "unix" } {
+ perror "couldn't load description file for ${name}";
+ exit 1;
+ } else {
+ load_generic_config "unix"
+ }
+ }
+
+ if [board_info $board exists generic_name] {
+ load_tool_target_config [board_info $board generic_name];
+ }
+
+ unset board;
+ unset board_type;
+
+ push_target $whole_name;
+
+ if { [info procs ${whole_name}_init] != "" } {
+ ${whole_name}_init $whole_name;
+ }
+
+ if { ![isnative] && ![is_remote target] } {
+ global env build_triplet target_triplet
+ if { (![info exists env(DEJAGNU)]) && ($build_triplet != $target_triplet) } {
+ warning "Assuming target board is the local machine (which is probably wrong).\nYou may need to set your DEJAGNU environment variable."
+ }
+ }
+}
+
+#
+# Clean things up afterwards.
+#
+proc cleanup_target_hook { name } {
+ global tool;
+ # Clean up the target board.
+ if { [info procs "${name}_exit"] != "" } {
+ ${name}_exit;
+ }
+ # We also call the tool exit routine here.
+ if [info exists tool] {
+ if { [info procs "${tool}_exit"] != "" } {
+ ${tool}_exit;
+ }
+ }
+ remote_close target;
+ pop_target;
+}
+
+proc setup_host_hook { name } {
+ global board;
+ global board_info;
+ global board_type;
+
+ set board $name;
+ set board_type "host";
+
+ load_board_description $name;
+ unset board;
+ unset board_type;
+ push_host $name;
+ if { [info proc ${name}_init] != "" } {
+ ${name}_init $name;
+ }
+}
+
+proc setup_build_hook { name } {
+ global board;
+ global board_info;
+ global board_type;
+
+ set board $name;
+ set board_type "build";
+
+ load_board_description $name;
+ unset board;
+ unset board_type;
+ push_build $name;
+ if { [info proc ${name}_init] != "" } {
+ ${name}_init $name;
+ }
+}
+
+#
+# Find and load the global config file if it exists.
+# The global config file is used to set the connect mode and other
+# parameters specific to each particular target.
+# These files assume the host and target have been set.
+#
+
+if { [load_file -- $libdir/$configfile] == 0 } {
+ # If $DEJAGNU isn't set either then there isn't any global config file.
+ # Warn the user as there really should be one.
+ if { ! [info exists env(DEJAGNU)] } {
+ send_error "WARNING: Couldn't find the global config file.\n"
+ }
+}
+
+if [info exists env(DEJAGNU)] {
+ if { [load_file -- $env(DEJAGNU)] == 0 } {
+ # It may seem odd to only issue a warning if there isn't a global
+ # config file, but issue an error if $DEJAGNU is erroneously defined.
+ # Since $DEJAGNU is set there is *supposed* to be a global config file,
+ # so the current behaviour seems reasonable.
+ send_error "WARNING: global config file $env(DEJAGNU) not found.\n"
+ }
+ if ![info exists boards_dir] {
+ set boards_dir "[file dirname $env(DEJAGNU)]/boards";
+ }
+}
+
+if ![info exists boards_dir] {
+ set boards_dir ""
+}
+
+#
+# parse out the config parts of the triplet name
+#
+
+# build values
+if { $build_cpu == "" } {
+ regsub -- "-.*-.*" ${build_triplet} "" build_cpu
+}
+if { $build_vendor == "" } {
+ regsub -- "^\[a-z0-9\]*-" ${build_triplet} "" build_vendor
+ regsub -- "-.*" ${build_vendor} "" build_vendor
+}
+if { $build_os == "" } {
+ regsub -- ".*-.*-" ${build_triplet} "" build_os
+}
+
+# host values
+if { $host_cpu == "" } {
+ regsub -- "-.*-.*" ${host_triplet} "" host_cpu
+}
+if { $host_vendor == "" } {
+ regsub -- "^\[a-z0-9\]*-" ${host_triplet} "" host_vendor
+ regsub -- "-.*" ${host_vendor} "" host_vendor
+}
+if { $host_os == "" } {
+ regsub -- ".*-.*-" ${host_triplet} "" host_os
+}
+
+# target values
+if { $target_cpu == "" } {
+ regsub -- "-.*-.*" ${target_triplet} "" target_cpu
+}
+if { $target_vendor == "" } {
+ regsub -- "^\[a-z0-9\]*-" ${target_triplet} "" target_vendor
+ regsub -- "-.*" ${target_vendor} "" target_vendor
+}
+if { $target_os == "" } {
+ regsub -- ".*-.*-" ${target_triplet} "" target_os
+}
+
+#
+# Load the primary tool initialization file.
+#
+
+proc load_tool_init { file } {
+ global srcdir
+ global loaded_libs
+
+ if [info exists loaded_libs($file)] {
+ return;
+ }
+
+ set loaded_libs($file) "";
+
+ if [file exists ${srcdir}/lib/$file] {
+ verbose "Loading library file ${srcdir}/lib/$file"
+ if { [catch "uplevel #0 source ${srcdir}/lib/$file"] == 1 } {
+ send_error "ERROR: tcl error sourcing library file ${srcdir}/lib/$file.\n"
+ global errorInfo
+ if [info exists errorInfo] {
+ send_error "$errorInfo\n"
+ }
+ exit 1
+ }
+ } else {
+ warning "Couldn't find tool init file"
+ }
+}
+
+#
+# load the testing framework libraries
+#
+load_lib utils.exp
+load_lib framework.exp
+load_lib debugger.exp
+load_lib remote.exp
+load_lib target.exp
+load_lib targetdb.exp
+load_lib libgloss.exp
+
+# Initialize the test counters and reset them to 0.
+init_testcounts;
+reset_vars;
+
+#
+# Parse the command line arguments.
+#
+
+# Load the tool initialization file. Allow the --tool option to override
+# what's set in the site.exp file.
+if [info exists comm_line_tool] {
+ set tool $comm_line_tool;
+}
+
+if [info exists tool] {
+ load_tool_init ${tool}.exp;
+}
+
+set argc [ llength $argv ]
+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"
+ }
+ }
+
+ # split out the argument for options that take them
+ switch -glob -- $option {
+ "--*=*" {
+ regexp {^[^=]*=(.*)$} $option nil optarg
+ }
+ "--bu*" -
+ "--ho*" -
+ "--ig*" -
+ "--m*" -
+ "--n*" -
+ "--ob*" -
+ "--ou*" -
+ "--sr*" -
+ "--st*" -
+ "--ta*" -
+ "--di*" -
+ "--to*" {
+ incr i
+ set optarg [lindex $argv $i]
+ }
+ }
+
+ switch -glob -- $option {
+ "--V*" -
+ "--vers*" { # (--version) version numbers
+ send_user "Expect version is\t[exp_version]\n"
+ send_user "Tcl version is\t\t[ info tclversion ]\n"
+ send_user "Framework version is\t$frame_version\n"
+ exit
+ }
+
+ "--v*" { # (--verbose) verbose output
+ # Already parsed.
+ continue
+ }
+
+ "--bu*" { # (--build) the build host configuration
+ # Already parsed (and don't set again). Let $DEJAGNU rename it.
+ continue
+ }
+
+ "--ho*" { # (--host) the host configuration
+ # Already parsed (and don't set again). Let $DEJAGNU rename it.
+ continue
+ }
+
+ "--target_bo*" {
+ # Set it again, father knows best.
+ set target_list $optarg;
+ continue;
+ }
+
+ "--ta*" { # (--target) the target configuration
+ # Already parsed (and don't set again). Let $DEJAGNU rename it.
+ continue
+ }
+
+ "--a*" { # (--all) print all test output to screen
+ set all_flag 1
+ verbose "Print all test output to screen"
+ continue
+ }
+
+ "--di*" {
+ # Already parsed (and don't set again). Let $DEJAGNU rename it.
+ # set cmdline_dir_to_run $optarg
+ continue
+ }
+
+
+ "--de*" { # (--debug) expect internal debugging
+ if [file exists ./dbg.log] {
+ catch "exec rm -f ./dbg.log"
+ }
+ if { $verbose > 2 } {
+ exp_internal -f dbg.log 1
+ } else {
+ exp_internal -f dbg.log 0
+ }
+ verbose "Expect Debugging is ON"
+ continue
+ }
+
+ "--D[01]" { # (-Debug) turn on Tcl debugger
+ verbose "Tcl debugger is ON"
+ continue
+ }
+
+ "--m*" { # (--mail) mail the output
+ set mailing_list $optarg
+ set mail_logs 1
+ verbose "Mail results to $mailing_list"
+ continue
+ }
+
+ "--r*" { # (--reboot) reboot the target
+ set reboot 1
+ verbose "Will reboot the target (if supported)"
+ continue
+ }
+
+ "--ob*" { # (--objdir) where the test case object code lives
+ # Already parsed, but parse again to make sure command line
+ # options override any config file.
+ set objdir $optarg
+ verbose "Using test binaries in $objdir"
+ continue
+ }
+
+ "--ou*" { # (--outdir) where to put the output files
+ set outdir $optarg
+ verbose "Test output put in $outdir"
+ continue
+ }
+
+ "*.exp" { # specify test names to run
+ set all_runtests($option) ""
+ verbose "Running only tests $option"
+ continue
+ }
+
+ "*.exp=*" { # specify test names to run
+ set tmp [split $option "="]
+ set all_runtests([lindex $tmp 0]) [lindex $tmp 1]
+ verbose "Running only tests $option"
+ unset tmp
+ continue
+ }
+
+ "--ig*" { # (--ignore) specify test names to exclude
+ set ignoretests $optarg
+ verbose "Ignoring test $ignoretests"
+ continue
+ }
+
+ "--sr*" { # (--srcdir) where the testsuite source code lives
+ # Already parsed, but parse again to make sure command line
+ # options override any config file.
+
+ set srcdir $optarg
+ continue
+ }
+
+ "--st*" { # (--strace) expect trace level
+ set tracelevel $optarg
+ strace $tracelevel
+ verbose "Source Trace level is now $tracelevel"
+ continue
+ }
+
+ "--tool_opt*" {
+ continue
+ }
+
+ "--tool_exec*" {
+ set TOOL_EXECUTABLE $optarg
+ continue
+ }
+
+ "--tool_ro*" {
+ set tool_root_dir $optarg
+ continue;
+ }
+
+ "--to*" { # (--tool) specify tool name
+ set tool $optarg
+ verbose "Testing $tool"
+ continue
+ }
+
+ "[A-Z0-9_-.]*=*" { # process makefile style args like CC=gcc, etc...
+ if [regexp "^(\[A-Z0-9_-\]+)=(.*)$" $option junk var val] {
+ set $var $val
+ verbose "$var is now $val"
+ append makevars "set $var $val;" ;# FIXME: Used anywhere?
+ unset junk var val
+ } else {
+ send_error "Illegal variable specification:\n"
+ send_error "$option\n"
+ }
+ continue
+ }
+
+ "--he*" { # (--help) help text
+ usage;
+ exit 0
+ }
+
+ default {
+ if [info exists tool] {
+ if { [info proc ${tool}_option_proc] != "" } {
+ if [${tool}_option_proc $option] {
+ continue;
+ }
+ }
+ }
+ send_error "\nIllegal Argument \"$option\"\n"
+ send_error "try \"runtest --help\" for option list\n"
+ exit 1
+ }
+ }
+}
+
+#
+# check for a few crucial variables
+#
+if ![info exists tool] {
+ send_error "WARNING: No tool specified\n"
+ set tool ""
+}
+
+#
+# initialize a few Tcl variables to something other than their default
+#
+if { $verbose > 2 } {
+ log_user 1
+} else {
+ log_user 0
+}
+
+set timeout 10
+
+
+
+#
+# open log files
+#
+open_logs
+
+# print the config info
+clone_output "Test Run By $logname on [timestamp -format %c]"
+if [is3way] {
+ clone_output "Target is $target_triplet"
+ clone_output "Host is $host_triplet"
+ clone_output "Build is $build_triplet"
+} else {
+ if [isnative] {
+ clone_output "Native configuration is $target_triplet"
+ } else {
+ clone_output "Target is $target_triplet"
+ clone_output "Host is $host_triplet"
+ }
+}
+
+clone_output "\n\t\t=== $tool tests ===\n"
+
+#
+# Look for the generic board configuration file. It searches in several
+# places: ${libdir}/config, ${libdir}/../config, and $boards_dir.
+#
+
+proc load_generic_config { name } {
+ global srcdir;
+ global configfile;
+ global libdir;
+ global env;
+ global board;
+ global board_info;
+ global boards_dir;
+ global board_type;
+
+ if [info exists board] {
+ if ![info exists board_info($board,generic_name)] {
+ set board_info($board,generic_name) $name;
+ }
+ }
+
+ if [info exists board_type] {
+ set type "for $board_type";
+ } else {
+ set type ""
+ }
+
+ set dirlist [concat ${libdir}/config [file dirname $libdir]/config $boards_dir];
+ set result [search_and_load_file "generic interface file $type" ${name}.exp $dirlist];
+
+ return $result;
+}
+
+#
+# Load the tool-specific target description.
+#
+proc load_config { args } {
+ global srcdir;
+ global board_type;
+
+ set found 0;
+
+ return [search_and_load_file "tool-and-target-specific interface file" $args [list ${srcdir}/config ${srcdir}/../config ${srcdir}/../../config ${srcdir}/../../../config]];
+}
+
+#
+# Find the files that set up the configuration for the target. There
+# are assumed to be two of them; one defines a basic set of
+# functionality for the target that can be used by all tool
+# testsuites, and the other defines any necessary tool-specific
+# functionality. These files are loaded via load_config.
+#
+# These used to all be named $target_abbrev-$tool.exp, but as the
+# $tool variable goes away, it's now just $target_abbrev.exp. First
+# we look for a file named with both the abbrev and the tool names.
+# Then we look for one named with just the abbrev name. Finally, we
+# look for a file called default, which is the default actions, as
+# some tools could be purely host based. Unknown is mostly for error
+# trapping.
+#
+
+proc load_tool_target_config { name } {
+ global target_os
+
+ set found [load_config "${name}.exp" "${target_os}.exp" "default.exp" "unknown.exp"];
+
+ if { $found == 0 } {
+ send_error "ERROR: Couldn't find tool config file for $name.\n"
+ }
+}
+
+
+#
+# Find the file that describes the machine specified by board_name.
+#
+
+proc load_board_description { board_name args } {
+ global srcdir;
+ global configfile;
+ global libdir;
+ global env;
+ global board;
+ global board_info
+ global boards_dir;
+ global board_type;
+
+ set dejagnu ""
+
+ if { [llength $args] > 0 } {
+ set whole_name [lindex $args 0];
+ } else {
+ set whole_name $board_name;
+ }
+
+ set board_info($whole_name,name) $whole_name;
+ if ![info exists board] {
+ set board $whole_name;
+ set board_set 1;
+ } else {
+ set board_set 0;
+ }
+
+ set dirlist {};
+ if { [llength $args] > 1 } {
+ set suffix [lindex $args 1];
+ if { ${suffix} != "" } {
+ foreach x ${boards_dir} {
+ lappend dirlist ${x}/${suffix}
+ }
+ lappend dirlist ${libdir}/baseboards/${suffix};
+ }
+ }
+ set dirlist [concat $dirlist $boards_dir];
+ lappend dirlist ${libdir}/baseboards;
+ verbose "dirlist is $dirlist"
+ if [info exists board_type] {
+ set type "for $board_type";
+ } else {
+ set type "";
+ }
+ if ![info exists board_info($whole_name,isremote)] {
+ set board_info($whole_name,isremote) 1;
+ if [info exists board_type] {
+ if { $board_type == "build" } {
+ set board_info($whole_name,isremote) 0;
+ }
+ }
+ if { ${board_name} == [get_local_hostname] } {
+ set board_info($whole_name,isremote) 0;
+ }
+ }
+ search_and_load_file "standard board description file $type" standard.exp $dirlist;
+ set found [search_and_load_file "board description file $type" ${board_name}.exp $dirlist];
+ if { $board_set != 0 } {
+ unset board;
+ }
+
+ return $found;
+}
+
+#
+# Find the base-level file that describes the machine specified by args. We
+# only look in one directory, ${libdir}/baseboards.
+#
+
+proc load_base_board_description { board_name } {
+ global srcdir;
+ global configfile;
+ global libdir;
+ global env;
+ global board;
+ global board_info
+ global board_type;
+
+ set board_set 0;
+ set board_info($board_name,name) $board_name;
+ if ![info exists board] {
+ set board $board_name;
+ set board_set 1;
+ }
+ if [info exists board_type] {
+ set type "for $board_type";
+ } else {
+ set type ""
+ };
+ if ![info exists board_info($board_name,isremote)] {
+ set board_info($board_name,isremote) 1;
+ if [info exists board_type] {
+ if { $board_type == "build" } {
+ set board_info($board_name,isremote) 0;
+ }
+ }
+ }
+
+ if { ${board_name} == [get_local_hostname] } {
+ set board_info($board_name,isremote) 0;
+ }
+ set found [search_and_load_file "board description file $type" ${board_name}.exp ${libdir}/baseboards];
+ if { $board_set != 0 } {
+ unset board;
+ }
+
+ return $found;
+}
+
+#
+# Source the testcase in TEST_FILE_NAME.
+#
+
+proc runtest { test_file_name } {
+ global prms_id
+ global bug_id
+ global test_result
+ global errcnt
+ global errorInfo
+ global tool
+
+ clone_output "Running $test_file_name ..."
+ set prms_id 0
+ set bug_id 0
+ set test_result ""
+
+ if [file exists $test_file_name] {
+ set timestart [timestamp];
+
+ if [info exists tool] {
+ if { [info procs "${tool}_init"] != "" } {
+ ${tool}_init $test_file_name;
+ }
+ }
+
+ if { [catch "uplevel #0 source $test_file_name"] == 1 } {
+ # We can't call `perror' here, it resets `errorInfo'
+ # before we want to look at it. Also remember that perror
+ # increments `errcnt'. If we do call perror we'd have to
+ # reset errcnt afterwards.
+ clone_output "ERROR: tcl error sourcing $test_file_name."
+ if [info exists errorInfo] {
+ clone_output "ERROR: $errorInfo"
+ unset errorInfo
+ }
+ }
+
+ if [info exists tool] {
+ if { [info procs "${tool}_finish"] != "" } {
+ ${tool}_finish;
+ }
+ }
+ set timeend [timestamp];
+ set timediff [expr $timeend - $timestart];
+ verbose -log "testcase $test_file_name completed in $timediff seconds" 4
+ } else {
+ # This should never happen, but maybe if the file got removed
+ # between the `find' above and here.
+ perror "$test_file_name does not exist."
+ # ??? This is a hack. We want to send a message to stderr and
+ # to the summary file (just like perror does), but we don't
+ # want the next testcase to get a spurious "unresolved" because
+ # errcnt != 0. Calling `clone_output' is also supposed to be a
+ # no-no (see the comments for clone_output).
+ set errcnt 0
+ }
+}
+
+#
+# Trap some signals so we know what's happening. These replace the previous
+# ones because we've now loaded the library stuff.
+#
+if ![exp_debug] {
+ foreach sig "{SIGTERM {terminated}} \
+ {SIGINT {interrupted by user}} \
+ {SIGQUIT {interrupted by user}} \
+ {SIGSEGV {segmentation violation}}" {
+ set signal [lindex $sig 0];
+ set str [lindex $sig 1];
+ trap "send_error \"got a \[trap -name\] signal, $str \\n\"; log_and_exit;" $signal;
+ verbose "setting trap for $signal to $str" 1
+ }
+ unset signal str sig;
+}
+
+#
+# Given a list of targets, process any iterative lists.
+#
+proc process_target_variants { target_list } {
+ set result {};
+ foreach x $target_list {
+ if [regexp "\\(" $x] {
+ regsub "^.*\\((\[^()\]*)\\)$" "$x" "\\1" variant_list;
+ regsub "\\(\[^(\]*$" "$x" "" x;
+ set list [process_target_variants $x];
+ set result {}
+ foreach x $list {
+ set result [concat $result [iterate_target_variants $x [split $variant_list ","]]];
+ }
+ } elseif [regexp "\{" $x] {
+ regsub "^.*\{(\[^\{\}\]*)\}$" "$x" "\\1" variant_list;
+ regsub "\{\[^\{\]*$" "$x" "" x;
+ set list [process_target_variants $x];
+ foreach x $list {
+ foreach i [split $variant_list ","] {
+ set name $x;
+ if { $i != "" } {
+ append name "/" $i;
+ }
+ lappend result $name;
+ }
+ }
+ } else {
+ lappend result "$x";
+ }
+ }
+ return $result;
+}
+
+proc iterate_target_variants { target variants } {
+ return [iterate_target_variants_two $target $target $variants];
+}
+
+#
+# Given a list of variants, produce the list of all possible combinations.
+#
+proc iterate_target_variants_two { orig_target target variants } {
+
+ if { [llength $variants] == 0 } {
+ return [list $target];
+ } else {
+ if { [llength $variants] > 1 } {
+ set result [iterate_target_variants_two $orig_target $target [lrange $variants 1 end]];
+ } else {
+ if { $target != $orig_target } {
+ set result [list $target];
+ } else {
+ set result {};
+ }
+ }
+ if { [lindex $variants 0] != "" } {
+ append target "/" [lindex $variants 0];
+ return [concat $result [iterate_target_variants_two $orig_target $target [lrange $variants 1 end]]];
+ } else {
+ return [concat $result $target];
+ }
+ }
+}
+
+setup_build_hook [get_local_hostname];
+
+if [info exists host_board] {
+ setup_host_hook $host_board;
+} else {
+ set hb [get_local_hostname];
+ if { $hb != "" } {
+ setup_host_hook $hb;
+ }
+}
+
+#
+# main test execution loop
+#
+
+if [info exists errorInfo] {
+ unset errorInfo
+}
+# make sure we have only single path delimiters
+regsub -all "\(\[^/\]\)//*" $srcdir "\\1/" srcdir
+
+if ![info exists target_list] {
+# Make sure there is at least one target machine. It's probably a Unix box,
+# but that's just a guess.
+ set target_list { "unix" }
+} else {
+ verbose "target list is $target_list"
+}
+
+#
+# Iterate through the list of targets.
+#
+global current_target;
+
+set target_list [process_target_variants $target_list];
+
+set target_count [llength $target_list]
+
+clone_output "Schedule of variations:"
+foreach current_target $target_list {
+ clone_output " $current_target"
+}
+clone_output ""
+
+
+foreach current_target $target_list {
+ verbose "target is $current_target";
+ set current_target_name $current_target;
+ set tlist [split $current_target /];
+ set current_target [lindex $tlist 0];
+ set board_variant_list [lrange $tlist 1 end];
+
+ # Set the counts for this target to 0.
+ reset_vars;
+ clone_output "Running target $current_target_name"
+
+ setup_target_hook $current_target_name $current_target;
+
+# If multiple passes requested, set them up. Otherwise prepare just one.
+# The format of `MULTIPASS' is a list of elements containing
+# "{ name var1=value1 ... }" where `name' is a generic name for the pass and
+# currently has no other meaning.
+
+ global env
+
+ if { [info exists MULTIPASS] } {
+ set multipass $MULTIPASS
+ }
+ if { $multipass == "" } {
+ set multipass { "" }
+ }
+
+# If PASS is specified, we want to run only the tests specified.
+# Its value should be a number or a list of numbers that specify
+# the passes that we want to run.
+ if [info exists PASS] {
+ set pass $PASS
+ } else {
+ set pass ""
+ }
+
+ if {$pass != ""} {
+ set passes [list]
+ foreach p $pass {
+ foreach multipass_elem $multipass {
+ set multipass_name [lindex $multipass_elem 0]
+ if {$p == $multipass_name} {
+ lappend passes $multipass_elem
+ break;
+ }
+ }
+ }
+ set multipass $passes
+ }
+
+ foreach pass $multipass {
+
+ # multipass_name is set for `record_test' to use (see framework.exp).
+ if { [lindex $pass 0] != "" } {
+ set multipass_name [lindex $pass 0]
+ clone_output "Running pass `$multipass_name' ..."
+ } else {
+ set multipass_name ""
+ }
+ set restore ""
+ foreach varval [lrange $pass 1 end] {
+ set tmp [string first "=" $varval]
+ set var [string range $varval 0 [expr $tmp - 1]]
+ # Save previous value.
+ if [info exists $var] {
+ lappend restore "$var [list [eval concat \$$var]]"
+ } else {
+ lappend restore "$var"
+ }
+ # Handle "CFLAGS=$CFLAGS foo".
+ # FIXME: Do we need to `catch' this?
+ eval set $var \[string range \"$varval\" [expr $tmp + 1] end\]
+ verbose "$var is now [eval concat \$$var]"
+ unset tmp var
+ }
+
+ # look for the top level testsuites. if $tool doesn't
+ # exist and there are no subdirectories in $srcdir, then
+ # we default to srcdir.
+ set test_top_dirs [lsort [getdirs -all ${srcdir} "${tool}*"]]
+ if { ${test_top_dirs} == "" } {
+ set test_top_dirs ${srcdir}
+ } else {
+ # JYG:
+ # DejaGNU's notion of test tree and test files is very
+ # general:
+ # given ${srcdir} and ${tool}, any subdirectory (at any
+ # level deep) with the "${tool}" prefix starts a test tree;
+ # given a test tree, any *.exp file underneath (at any
+ # level deep) is a test file.
+ #
+ # For test tree layouts with ${tool} prefix on
+ # both a parent and a child directory, we need to eliminate
+ # the child directory entry from test_top_dirs list.
+ # e.g. gdb.hp/gdb.base-hp/ would result in two entries
+ # in the list: gdb.hp, gdb.hp/gdb.base-hp.
+ # If the latter not eliminated, test files under
+ # gdb.hp/gdb.base-hp would be run twice (since test files
+ # are gathered from all sub-directories underneath a
+ # directory).
+ #
+ # Since ${tool} may be g++, etc. which could confuse
+ # regexp, we cannot do the simpler test:
+ # ...
+ # if [regexp "${srcdir}/.*${tool}.*/.*${tool}.*" ${dir}]
+ # ...
+ # instead, we rely on the fact that test_top_dirs is
+ # a sorted list of entries, and any entry that contains
+ # the previous valid test top dir entry in its own pathname
+ # must be excluded.
+
+ set temp_top_dirs ""
+ set prev_dir ""
+ foreach dir "${test_top_dirs}" {
+ if { [string length ${prev_dir}] == 0 ||
+ [string first "${prev_dir}/" ${dir}] == -1} {
+ # the first top dir entry, or an entry that
+ # does not share the previous entry's entire
+ # pathname, record it as a valid top dir entry.
+ #
+ lappend temp_top_dirs ${dir}
+ set prev_dir ${dir}
+ }
+ }
+ set test_top_dirs ${temp_top_dirs}
+ }
+ verbose "Top level testsuite dirs are ${test_top_dirs}" 2
+ set testlist "";
+ if [info exists all_runtests] {
+ foreach x [array names all_runtests] {
+ verbose "trying to glob ${srcdir}/${x}" 2
+ set s [glob -nocomplain ${srcdir}/$x];
+ if { $s != "" } {
+ set testlist [concat $testlist $s];
+ }
+ }
+ }
+ #
+ # If we have a list of tests, run all of them.
+ #
+ if { $testlist != "" } {
+ foreach test_name $testlist {
+ if { ${ignoretests} != "" } {
+ if { 0 <= [lsearch ${ignoretests} [file tail ${test_name}]]} {
+ continue
+ }
+ }
+
+ # set subdir to the tail of the dirname after $srcdir,
+ # for the driver files that want it. XXX this is silly.
+ # drivers should get a single var, not "$srcdir/$subdir"
+ set subdir [file dirname $test_name]
+ set p [expr [string length $srcdir]-1]
+ while {0 < $p && [string index $srcdir $p] == "/"} {
+ incr p -1
+ }
+ if {[string range $subdir 0 $p] == $srcdir} {
+ set subdir [string range $subdir [expr $p+1] end];
+ regsub "^/" $subdir "" subdir
+ }
+
+ # XXX not the right thing to do.
+ set runtests [list [file tail $test_name] ""]
+
+ runtest $test_name;
+ }
+ } else {
+ #
+ # Go digging for tests.
+ #
+ foreach dir "${test_top_dirs}" {
+ if { ${dir} != ${srcdir} } {
+ # Ignore this directory if is a directory to be
+ # ignored.
+ if {[info exists ignoredirs] && $ignoredirs != ""} {
+ set found 0
+ foreach directory $ignoredirs {
+ if [string match "*${directory}*" $dir] {
+ set found 1
+ break
+ }
+ }
+ if {$found} {
+ continue
+ }
+ }
+
+ # Run the test if dir_to_run was specified as a
+ # value (for example in MULTIPASS) and the test
+ # directory matches that directory.
+ if {[info exists dir_to_run] && $dir_to_run != ""} {
+ # JYG: dir_to_run might be a space delimited list
+ # of directories. Look for match on each item.
+ set found 0
+ foreach directory $dir_to_run {
+ if [string match "*${directory}*" $dir] {
+ set found 1
+ break
+ }
+ }
+ if {!$found} {
+ continue
+ }
+ }
+
+ # Run the test if cmdline_dir_to_run was specified
+ # by the user using --directory and the test
+ # directory matches that directory
+ if {[info exists cmdline_dir_to_run] \
+ && $cmdline_dir_to_run != ""} {
+ # JYG: cmdline_dir_to_run might be a space delimited
+ # list of directories. Look for match on each item.
+ set found 0
+ foreach directory $cmdline_dir_to_run {
+ if [string match "*${directory}*" $dir] {
+ set found 1
+ break
+ }
+ }
+ if {!$found} {
+ continue
+ }
+ }
+
+ foreach test_name [lsort [find ${dir} *.exp]] {
+ if { ${test_name} == "" } {
+ continue
+ }
+ # Ignore this one if asked to.
+ if { ${ignoretests} != "" } {
+ if { 0 <= [lsearch ${ignoretests} [file tail ${test_name}]]} {
+ continue
+ }
+ }
+
+ # Get the path after the $srcdir so we know
+ # the subdir we're in.
+ set subdir [file dirname $test_name]
+ # We used to do
+ # regsub $srcdir [file dirname $test_name] "" subdir
+ # but what if [file dirname $test_name] contains regexp
+ # characters? We lose. Instead...
+ set first [string first $srcdir $subdir]
+ if { $first >= 0 } {
+ set first [expr $first + [string length $srcdir]];
+ set subdir [string range $subdir $first end];
+ regsub "^/" "$subdir" "" subdir;
+ }
+ if { "$srcdir" == "$subdir" || "$srcdir" == "$subdir/" } {
+ set subdir ""
+ }
+ # Check to see if the range of tests is limited,
+ # set `runtests' to a list of two elements: the script name
+ # and any arguments ("" if none).
+ if [info exists all_runtests] {
+ verbose "searching for $test_name in [array names all_runtests]"
+ if { 0 > [lsearch [array names all_runtests] [file tail $test_name]]} {
+ if { 0 > [lsearch [array names all_runtests] $test_name] } {
+ continue
+ }
+ }
+ set runtests [list [file tail $test_name] $all_runtests([file tail $test_name])]
+ } else {
+ set runtests [list [file tail $test_name] ""]
+ }
+ runtest $test_name;
+ }
+ }
+ }
+ # Restore the variables set by this pass.
+ foreach varval $restore {
+ if { [llength $varval] > 1 } {
+ verbose "Restoring [lindex $varval 0] to [lindex $varval 1]" 4;
+ set [lindex $varval 0] [lindex $varval 1];
+ } else {
+ verbose "Restoring [lindex $varval 0] to `unset'" 4;
+ unset [lindex $varval 0];
+ }
+ }
+ }
+ }
+ cleanup_target_hook $current_target;
+ if { $target_count > 1 } {
+ log_summary;
+ }
+}
+
+log_and_exit;
diff --git a/site.tmpl b/site.tmpl
new file mode 100644
index 0000000..ab8c3b0
--- /dev/null
+++ b/site.tmpl
@@ -0,0 +1,48 @@
+#
+# site.tmpl -- Sample template for a global config file.
+# NOTE: This file contains mostly site specific
+# configuration data that is custom to Cygnus
+# Support. You'll have to change most of the
+# values to work at your site.
+# Written by manson@cygnus.com
+#
+
+#
+# transform -- transform a tool name to get the installed name. We only define
+# this if there wasn't one. This was the global config file can
+# override how the tool names are calculated.
+#
+
+#
+# uncomment this if you wish to redefine the transform procedure
+#
+
+#if ![string match "transform" [info procs transform]] then {
+# proc transform { name } {
+# global target_triplet
+#
+# if [string match "" $target_triplet] then {
+# return $name
+# } else {
+# return ${target_triplet}-$name
+# }
+# }
+#}
+
+#
+# Set a default target list for various target triplets.
+#
+case "$target_triplet" in {
+ { "hppa*-*-proelf*" } {
+ set target_list { winbond }
+ }
+ { "i386-*-aout" } {
+ set target_list { i386-aout }
+ }
+ { "m68k-mvme135-*" } { # Motorola MVME135 board running Bug monitor
+ set target_list { "mvme135-bug" }
+ }
+ { "m68k-idp-*" "m68k-rom68k-*" } { # Motorola IDP board running rom68k monitor
+ set target_list "bozo"
+ }
+}
diff --git a/stub-loader.c b/stub-loader.c
new file mode 100644
index 0000000..d84d41b
--- /dev/null
+++ b/stub-loader.c
@@ -0,0 +1,7 @@
+/* Bleah!! */
+int remote_debug = 0;
+
+main() {
+ set_debug_traps();
+ breakpoint();
+}
diff --git a/tcl-mode.el b/tcl-mode.el
new file mode 100644
index 0000000..90b3503
--- /dev/null
+++ b/tcl-mode.el
@@ -0,0 +1,2223 @@
+;; tcl.el --- Tcl code editing commands for Emacs
+
+;; Copyright (C) 1994 Free Software Foundation, Inc.
+
+;; Maintainer: Tom Tromey <tromey@busco.lanl.gov>
+;; Author: Tom Tromey <tromey@busco.lanl.gov>
+;; Chris Lindblad <cjl@lcs.mit.edu>
+;; Keywords: languages tcl modes
+;; Version: 1.49
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs 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.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to
+;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+;; HOW TO INSTALL:
+;; Put the following forms in your .emacs to enable autoloading of Tcl
+;; mode, and auto-recognition of ".tcl" files.
+;;
+;; (autoload 'tcl-mode "tcl" "Tcl mode." t)
+;; (autoload 'inferior-tcl "tcl" "Run inferior Tcl process." t)
+;; (setq auto-mode-alist (append '(("\\.tcl$" . tcl-mode)) auto-mode-alist))
+;;
+;; If you plan to use the interface to the TclX help files, you must
+;; set the variable tcl-help-directory-list to point to the topmost
+;; directories containing the TclX help files. Eg:
+;;
+;; (setq tcl-help-directory-list '("/usr/local/lib/tclx/help"))
+;;
+;; Also you will want to add the following to your .emacs:
+;;
+;; (autoload 'tcl-help-on-word "tcl" "Help on Tcl commands" t)
+;;
+;; FYI a *very* useful thing to do is nroff all the Tk man pages and
+;; put them in a subdir of the help system.
+;;
+
+;;; Commentary:
+
+;; LCD Archive Entry:
+;; tcl|Tom Tromey|tromey@busco.lanl.gov|
+;; Major mode for editing Tcl|
+;; 1995/12/07 18:27:47|1.49|~/modes/tcl.el.Z|
+
+;; CUSTOMIZATION NOTES:
+;; * tcl-proc-list can be used to customize a list of things that
+;; "define" other things. Eg in my project I put "defvar" in this
+;; list.
+;; * tcl-typeword-list is similar, but uses font-lock-type-face.
+;; * tcl-keyword-list is a list of keywords. I've generally used this
+;; for flow-control words. Eg I add "unwind_protect" to this list.
+;; * tcl-type-alist can be used to minimally customize indentation
+;; according to context.
+
+;; Change log:
+;; tcl.el,v
+;; Revision 1.49 1995/12/07 18:27:47 tromey
+;; (add-log-tcl-defun): Don't use tcl-beginning-of-defun; just go to end
+;; of line before searching.
+;;
+;; Revision 1.48 1995/12/07 18:18:21 tromey
+;; (add-log-tcl-defun): Now uses tcl-beginning-of-defun.
+;;
+;; Revision 1.47 1995/08/22 17:49:45 tromey
+;; (tcl-hilit): New function from "Chris Alfeld" <calfeld@math.utah.edu>
+;; (tcl-mode): Call it
+;;
+;; Revision 1.46 1995/08/07 16:02:01 tromey
+;; (tcl-do-auto-fill): Only fill past fill-column; for 19.29.
+;; (tcl-auto-fill-mode): Use force-mode-line-update.
+;;
+;; Revision 1.45 1995/07/23 23:51:25 tromey
+;; (tcl-word-no-props): New function.
+;; (tcl-figure-type): Use it.
+;; (tcl-current-word): Ditto.
+;;
+;; Revision 1.44 1995/07/23 20:26:47 tromey
+;; Doc fixes.
+;;
+;; Revision 1.43 1995/07/17 19:59:49 tromey
+;; (inferior-tcl-mode): Use modeline-process if it exists.
+;;
+;; Revision 1.42 1995/07/17 19:55:25 tromey
+;; XEmacs currently must use tcl-internal-end-of-defun
+;;
+;; Revision 1.41 1995/07/14 21:54:56 tromey
+;; Changes to make menus work in XEmacs.
+;; From Mike Scheidler <c23mts@kocrsv01.delcoelect.com>
+;;
+;; Revision 1.40 1995/07/11 03:13:15 tromey
+;; (tcl-mode): Customize for new dabbrev.
+;;
+;; Revision 1.39 1995/07/09 21:58:03 tromey
+;; (tcl-do-fill-paragraph): New function.
+;; (tcl-mode): Set up for paragraph filling.
+;;
+;; Revision 1.38 1995/07/09 21:30:32 tromey
+;; (tcl-mode): Fixes to 19.29 paragraph variables.
+;;
+;; Revision 1.37 1995/07/09 18:52:16 tromey
+;; (tcl-do-auto-fill): Set fill-prefix.
+;;
+;; Revision 1.36 1995/07/09 01:07:57 tromey
+;; (tcl-imenu-create-index-function): Work with imenu from Emacs 19.29
+;;
+;; Revision 1.35 1995/06/27 20:12:00 tromey
+;; (tcl-type-alist): More itcl changes.
+;;
+;; Revision 1.34 1995/06/27 20:06:05 tromey
+;; More changes for itcl.
+;; Bug fixes for Emacs 19.29.
+;;
+;; Revision 1.33 1995/06/27 20:01:29 tromey
+;; (tcl-set-proc-regexp): Allow leading spaces.
+;; (tcl-proc-list): Changes for itcl.
+;; (tcl-typeword-list): Ditto.
+;; (tcl-keyword-list): Ditto.
+;;
+;; Revision 1.32 1995/05/11 22:12:49 tromey
+;; (tcl-type-alist): Include entry for "proc".
+;;
+;; Revision 1.31 1995/05/10 23:38:12 tromey
+;; (tcl-add-fsf-menu): Use make-lucid-menu-keymap, not
+;; "make-xemacs-menu-keymap".
+;;
+;; Revision 1.30 1995/05/10 18:22:21 tromey
+;; Bug fix in menu code for XEmacs.
+;;
+;; Revision 1.29 1995/05/09 21:36:53 tromey
+;; Changed "Lucid Emacs" to "XEmacs".
+;; Tcl's popup menu now added to existing one, courtesy
+;; dfarmer@evolving.com (Doug Farmer)
+;;
+;; Revision 1.28 1995/04/08 19:52:50 tromey
+;; (tcl-outline-level): New function
+;; (tcl-mode): Added outline-handling stuff.
+;; From Jesper Pedersen <blackie@imada.ou.dk>
+;;
+;; Revision 1.27 1994/10/11 02:01:27 tromey
+;; (tcl-mode): imenu-create-index-function made buffer local.
+;;
+;; Revision 1.26 1994/09/01 18:06:24 tromey
+;; Added filename completion in inferior tcl mode
+;;
+;; Revision 1.25 1994/08/22 15:56:24 tromey
+;; tcl-load-file default to current buffer.
+;;
+;; Revision 1.24 1994/08/21 20:33:05 tromey
+;; Fixed bug in tcl-guess-application.
+;;
+;; Revision 1.23 1994/08/21 03:54:45 tromey
+;; Keybindings don't overshadown comint bindings.
+;;
+;; Revision 1.22 1994/07/26 00:46:07 tromey
+;; Emacs 18 changes from Carl Witty.
+;;
+;; Revision 1.21 1994/07/14 22:49:21 tromey
+;; Added ";;;###autoload" comments where appropriate.
+;;
+; Revision 1.20 1994/06/05 16:57:22 tromey
+; tcl-current-word does the right thing in inferior-tcl-mode.
+;
+; Revision 1.19 1994/06/03 21:09:19 tromey
+; Another menu fix.
+;
+; Revision 1.18 1994/06/03 20:39:14 tromey
+; Fixed menu bug.
+;
+; Revision 1.17 1994/06/03 00:47:15 tromey
+; Fixed bug in bug-reporting code.
+;
+; Revision 1.16 1994/05/26 05:06:14 tromey
+; Menu items now sensitive as appropriate.
+;
+; Revision 1.15 1994/05/22 20:38:11 tromey
+; Added bug-report keybindings and menu entries.
+;
+; Revision 1.14 1994/05/22 20:18:28 tromey
+; Even more compile stuff.
+;
+; Revision 1.13 1994/05/22 20:17:15 tromey
+; Moved emacs version checking code to very beginning.
+;
+; Revision 1.12 1994/05/22 20:14:59 tromey
+; Compile fixes.
+;
+; Revision 1.11 1994/05/22 20:12:44 tromey
+; Fixed mark-defun for 19.23.
+; More menu fixes.
+;
+; Revision 1.10 1994/05/22 20:02:03 tromey
+; Fixed bug with M-;.
+; Wrote bug-reporting code.
+;
+; Revision 1.9 1994/05/22 05:26:51 tromey
+; Fixes for imenu.
+;
+; Revision 1.8 1994/05/22 03:38:07 tromey
+; Fixed menu support.
+;
+; Revision 1.7 1994/05/03 01:23:42 tromey
+; *** empty log message ***
+;
+; Revision 1.6 1994/04/23 16:23:36 tromey
+; Wrote tcl-indent-for-comment
+;
+;;
+;; 18-Mar-1994 Tom Tromey Fourth beta release.
+;; Added {un,}comment-region to menu. Idea from
+;; Mike Scheidler <c23mts@kocrsv01.delcoelect.com>
+;; 17-Mar-1994 Tom Tromey
+;; Fixed tcl-restart-with-file. Bug fix attempt in
+;; tcl-internal-end-of-defun.
+;; 16-Mar-1994 Tom Tromey Third beta release
+;; Added support code for menu (from Tcl mode written by
+;; schmid@fb3-s7.math.TU-Berlin.DE (Gregor Schmid)).
+;; 12-Mar-1994 Tom Tromey
+;; Better documentation for inferior-tcl-buffer. Wrote
+;; tcl-restart-with-file. Wrote Lucid Emacs menu (but no
+;; code to install it).
+;; 12-Mar-1994 Tom Tromey
+;; Wrote tcl-guess-application. Another stab at making
+;; tcl-omit-ws-regexp work.
+;; 10-Mar-1994 Tom Tromey Second beta release
+;; Last Modified: Thu Mar 10 01:24:25 1994 (Tom Tromey)
+;; Wrote perl-mode style line indentation command.
+;; Wrote more documentation. Added tcl-continued-indent-level.
+;; Integrated help code.
+;; 8-Mar-1994 Tom Tromey
+;; Last Modified: Tue Mar 8 11:58:44 1994 (Tom Tromey)
+;; Bug fixes.
+;; 6-Mar-1994 Tom Tromey
+;; Last Modified: Sun Mar 6 18:55:41 1994 (Tom Tromey)
+;; Updated auto-newline support.
+;; 6-Mar-1994 Tom Tromey Beta release
+;; Last Modified: Sat Mar 5 17:24:32 1994 (Tom Tromey)
+;; Wrote tcl-hashify-buffer. Other minor bug fixes.
+;; 5-Mar-1994 Tom Tromey
+;; Last Modified: Sat Mar 5 16:11:20 1994 (Tom Tromey)
+;; Wrote electric-hash code.
+;; 3-Mar-1994 Tom Tromey
+;; Last Modified: Thu Mar 3 02:53:40 1994 (Tom Tromey)
+;; Added code to handle auto-fill in comments.
+;; Added imenu support code.
+;; Cleaned up code.
+;; Better font-lock support.
+;; 28-Feb-1994 Tom Tromey
+;; Last Modified: Mon Feb 28 14:08:05 1994 (Tom Tromey)
+;; Made tcl-figure-type more easily configurable.
+;; 28-Feb-1994 Tom Tromey
+;; Last Modified: Mon Feb 28 01:02:58 1994 (Tom Tromey)
+;; Wrote inferior-tcl mode.
+;; 16-Feb-1994 Tom Tromey
+;; Last Modified: Wed Feb 16 17:05:19 1994 (Tom Tromey)
+;; Added support for font-lock-mode.
+;; 29-Oct-1993 Tom Tromey
+;; Last Modified: Sun Oct 24 17:39:14 1993 (Tom Tromey)
+;; Patches from Guido Bosch to make things work with Lucid Emacs.
+;; 22-Oct-1993 Tom Tromey
+;; Last Modified: Fri Oct 22 15:26:46 1993 (Tom Tromey)
+;; Made many characters have "_" syntax class; suggested by Guido
+;; Bosch <Guido.Bosch@loria.fr>. Note that this includes the "$"
+;; character, which might be a change you'd notice.
+;; 21-Oct-1993 Tom Tromey
+;; Last Modified: Thu Oct 21 20:28:40 1993 (Tom Tromey)
+;; More fixes for tcl-omit-ws-regexp.
+;; 20-Oct-1993 Tom Tromey
+;; Started keeping history. Fixed tcl-{beginning,end}-of-defun.
+;; Added some code to make things work with Emacs 18.
+
+;; THANKS TO:
+;; Guido Bosch <Guido.Bosch@loria.fr>
+;; pgs1002@esc.cam.ac.uk (Dr P.G. Sjoerdsma)
+;; Mike Scheidler <c23mts@kocrsv01.delcoelect.com>
+;; Matt Newman <men@charney.colorado.edu>
+;; rwhitby@research.canon.oz.au (Rod Whitby)
+;; h9118101@hkuxa.hku.hk (Yip Chi Lap [Beta])
+;; Pertti Tapio Kasanen <ptk@delta.hut.fi>
+;; schmid@fb3-s7.math.TU-Berlin.DE (Gregor Schmid)
+;; warsaw@nlm.nih.gov (Barry A. Warsaw)
+;; Carl Witty <cwitty@ai.mit.edu>
+;; T. V. Raman <raman@crl.dec.com>
+;; Jesper Pedersen <blackie@imada.ou.dk>
+;; dfarmer@evolving.com (Doug Farmer)
+;; "Chris Alfeld" <calfeld@math.utah.edu>
+
+;; KNOWN BUGS:
+;; * indent-region should skip blank lines. (It does in v19, so I'm
+;; not motivated to fix it here).
+;; * In Tcl "#" is not always a comment character. This can confuse
+;; tcl.el in certain circumstances. For now the only workaround is
+;; to enclose offending hash characters in quotes or precede it with
+;; a backslash. Note that using braces won't work -- quotes change
+;; the syntax class of characters between them, while braces do not.
+;; The electric-# mode helps alleviate this problem somewhat.
+;; * indent-tcl-exp is untested.
+;; * Doesn't work under Emacs 18 yet.
+;; * There's been a report that font-lock does strange things under
+;; Lucid Emacs 19.6. For instance in "proc foobar", the space
+;; before "foobar" is highlighted.
+
+;; TODO:
+;; * make add-log-tcl-defun smarter. should notice if we are in the
+;; middle of a defun, or between defuns. should notice if point is
+;; on first line of defun (or maybe even in comments before defun).
+;; * Allow continuation lines to be indented under the first argument
+;; of the preceeding line, like this:
+;; [list something \
+;; something-else]
+;; * There is a request that indentation work like this:
+;; button .fred -label Fred \
+;; -command {puts fred}
+;; * Should have tcl-complete-symbol that queries the inferior process.
+;; * Should have describe-symbol that works by sending the magic
+;; command to a tclX process.
+;; * Need C-x C-e binding (tcl-eval-last-exp).
+;; * Write indent-region function that is faster than indenting each
+;; line individually.
+;; * tcl-figure-type should stop at "beginning of line" (only ws
+;; before point, and no "\" on previous line). (see tcl-real-command-p).
+;; * overrides some comint keybindings; fix.
+;; * Trailing \ will eat blank lines. Should deal with this.
+;; (this would help catch some potential bugs).
+;; * Inferior should display in half the screen, not the whole screen.
+;; * Indentation should deal with "switch".
+;; * Consider writing code to find help files automatically (for
+;; common cases).
+;; * `#' shouldn't insert `\#' when point is in string.
+
+
+
+;;; Code:
+
+;; I sure wish Emacs had a package that made it easy to extract this
+;; sort of information.
+(defconst tcl-using-emacs-19 (string-match "19\\." emacs-version)
+ "Nil unless using Emacs 19 (XEmacs or FSF).")
+
+;; FIXME this will break on Emacs 19.100.
+(defconst tcl-using-emacs-19-23
+ (string-match "19\\.\\(2[3-9]\\|[3-9][0-9]\\)" emacs-version)
+ "Nil unless using Emacs 19-23 or later.")
+
+(defconst tcl-using-xemacs-19 (string-match "XEmacs" emacs-version)
+ "Nil unless using XEmacs).")
+
+(require 'comint)
+
+;; When compiling under GNU Emacs, load imenu during compilation. If
+;; you have 19.22 or earlier, comment this out, or get imenu.
+(and (fboundp 'eval-when-compile)
+ (eval-when-compile
+ (if (and (string-match "19\\." emacs-version)
+ (not (string-match "XEmacs" emacs-version)))
+ (require 'imenu))
+ ()))
+
+(defconst tcl-version "1.49")
+(defconst tcl-maintainer "Tom Tromey <tromey@drip.colorado.edu>")
+
+;;
+;; User variables.
+;;
+
+(defvar tcl-indent-level 4
+ "*Indentation of Tcl statements with respect to containing block.")
+
+(defvar tcl-continued-indent-level 4
+ "*Indentation of continuation line relative to first line of command.")
+
+(defvar tcl-auto-newline nil
+ "*Non-nil means automatically newline before and after braces
+inserted in Tcl code.")
+
+(defvar tcl-tab-always-indent t
+ "*Control effect of TAB key.
+If t (the default), always indent current line.
+If nil and point is not in the indentation area at the beginning of
+the line, a TAB is inserted.
+Other values cause the first possible action from the following list
+to take place:
+
+ 1. Move from beginning of line to correct indentation.
+ 2. Delete an empty comment.
+ 3. Move forward to start of comment, indenting if necessary.
+ 4. Move forward to end of line, indenting if necessary.
+ 5. Create an empty comment.
+ 6. Move backward to start of comment, indenting if necessary.")
+
+(defvar tcl-use-hairy-comment-detector t
+ "*If not `nil', the the more complicated, but slower, comment
+detecting function is used. This variable is only used in GNU Emacs
+19 (the fast function is always used elsewhere).")
+
+(defvar tcl-electric-hash-style 'smart
+ "*Style of electric hash insertion to use.
+Possible values are 'backslash, meaning that `\\' quoting should be
+done; 'quote, meaning that `\"' quoting should be done; 'smart,
+meaning that the choice between 'backslash and 'quote should be
+made depending on the number of hashes inserted; or nil, meaning that
+no quoting should be done. Any other value for this variable is
+taken to mean 'smart. The default is 'smart.")
+
+(defvar tcl-help-directory-list nil
+ "*List of topmost directories containing TclX help files")
+
+(defvar tcl-use-smart-word-finder t
+ "*If not nil, use a better way of finding the current word when
+looking up help on a Tcl command.")
+
+(defvar tcl-application "wish"
+ "*Name of Tcl application to run in inferior Tcl mode.")
+
+(defvar tcl-command-switches nil
+ "*Switches to supply to `tcl-application'.")
+
+(defvar tcl-prompt-regexp "^\\(% \\|\\)"
+ "*If not nil, a regexp that will match the prompt in the inferior process.
+If nil, the prompt is the name of the application with \">\" appended.
+
+The default is \"^\\(% \\|\\)\", which will match the default primary
+and secondary prompts for tclsh and wish.")
+
+(defvar inferior-tcl-source-command "source %s\n"
+ "*Format-string for building a Tcl command to load a file.
+This format string should use `%s' to substitute a file name
+and should result in a Tcl expression that will command the
+inferior Tcl to load that file. The filename will be appropriately
+quoted for Tcl.")
+
+;;
+;; Keymaps, abbrevs, syntax tables.
+;;
+
+(defvar tcl-mode-abbrev-table nil
+ "Abbrev table in use in Tcl-mode buffers.")
+(if tcl-mode-abbrev-table
+ ()
+ (define-abbrev-table 'tcl-mode-abbrev-table ()))
+
+(defvar tcl-mode-map ()
+ "Keymap used in Tcl mode.")
+
+(defvar tcl-mode-syntax-table nil
+ "Syntax table in use in Tcl-mode buffers.")
+(if tcl-mode-syntax-table
+ ()
+ (setq tcl-mode-syntax-table (make-syntax-table))
+ (modify-syntax-entry ?% "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?@ "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?& "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?* "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?+ "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?- "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?. "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?: "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?! "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?$ "_" tcl-mode-syntax-table) ; FIXME use "'"?
+ (modify-syntax-entry ?/ "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?~ "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?< "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?= "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?> "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?| "_" tcl-mode-syntax-table)
+ (modify-syntax-entry ?\( "()" tcl-mode-syntax-table)
+ (modify-syntax-entry ?\) ")(" tcl-mode-syntax-table)
+ (modify-syntax-entry ?\; "." tcl-mode-syntax-table)
+ (modify-syntax-entry ?\n "> " tcl-mode-syntax-table)
+ (modify-syntax-entry ?\f "> " tcl-mode-syntax-table)
+ (modify-syntax-entry ?# "< " tcl-mode-syntax-table))
+
+(defvar inferior-tcl-mode-map nil
+ "Keymap used in Inferior Tcl mode.")
+
+;; XEmacs menu.
+(defvar tcl-xemacs-menu
+ '(["Beginning of function" tcl-beginning-of-defun t]
+ ["End of function" tcl-end-of-defun t]
+ ["Mark function" tcl-mark-defun t]
+ ["Indent region" indent-region (tcl-mark)]
+ ["Comment region" comment-region (tcl-mark)]
+ ["Uncomment region" tcl-uncomment-region (tcl-mark)]
+ "----"
+ ["Show Tcl process buffer" inferior-tcl t]
+ ["Send function to Tcl process" tcl-eval-defun
+ (and inferior-tcl-buffer (get-buffer inferior-tcl-buffer))]
+ ["Send region to Tcl process" tcl-eval-region
+ (and inferior-tcl-buffer (get-buffer inferior-tcl-buffer))]
+ ["Send file to Tcl process" tcl-load-file
+ (and inferior-tcl-buffer (get-buffer inferior-tcl-buffer))]
+ ["Restart Tcl process with file" tcl-restart-with-file t]
+ "----"
+ ["Tcl help" tcl-help-on-word tcl-help-directory-list]
+ ["Send bug report" tcl-submit-bug-report t])
+ "XEmacs menu for Tcl mode.")
+
+;; GNU Emacs does menus via keymaps. Do it in a function in case we
+;; later decide to add it to inferior Tcl mode as well.
+(defun tcl-add-fsf-menu (map)
+ (define-key map [menu-bar] (make-sparse-keymap))
+ ;; This fails in Emacs 19.22 and earlier.
+ (require 'lmenu)
+ (let ((menu (make-lucid-menu-keymap "Tcl" tcl-xemacs-menu)))
+ (define-key map [menu-bar tcl] (cons "Tcl" menu))
+ ;; The following is intended to compute the key sequence
+ ;; information for the menu. It doesn't work.
+ (x-popup-menu nil menu)))
+
+(defun tcl-fill-mode-map ()
+ (define-key tcl-mode-map "{" 'tcl-electric-char)
+ (define-key tcl-mode-map "}" 'tcl-electric-brace)
+ (define-key tcl-mode-map "[" 'tcl-electric-char)
+ (define-key tcl-mode-map "]" 'tcl-electric-char)
+ (define-key tcl-mode-map ";" 'tcl-electric-char)
+ (define-key tcl-mode-map "#" 'tcl-electric-hash)
+ ;; FIXME.
+ (define-key tcl-mode-map "\e\C-a" 'tcl-beginning-of-defun)
+ ;; FIXME.
+ (define-key tcl-mode-map "\e\C-e" 'tcl-end-of-defun)
+ ;; FIXME.
+ (define-key tcl-mode-map "\e\C-h" 'tcl-mark-defun)
+ (define-key tcl-mode-map "\e\C-q" 'indent-tcl-exp)
+ (define-key tcl-mode-map "\177" 'backward-delete-char-untabify)
+ (define-key tcl-mode-map "\t" 'tcl-indent-command)
+ (define-key tcl-mode-map "\M-;" 'tcl-indent-for-comment)
+ (define-key tcl-mode-map "\M-\C-x" 'tcl-eval-defun)
+ (define-key tcl-mode-map "\C-c\C-b" 'tcl-submit-bug-report)
+ (and (fboundp 'comment-region)
+ (define-key tcl-mode-map "\C-c\C-c" 'comment-region))
+ (define-key tcl-mode-map "\C-c\C-i" 'tcl-help-on-word)
+ (define-key tcl-mode-map "\C-c\C-v" 'tcl-eval-defun)
+ (define-key tcl-mode-map "\C-c\C-f" 'tcl-load-file)
+ (define-key tcl-mode-map "\C-c\C-t" 'inferior-tcl)
+ (define-key tcl-mode-map "\C-c\C-x" 'tcl-eval-region)
+ (define-key tcl-mode-map "\C-c\C-s" 'switch-to-tcl)
+
+ ;; Make menus.
+ (if (and tcl-using-emacs-19 (not tcl-using-xemacs-19))
+ (progn
+ (tcl-add-fsf-menu tcl-mode-map))))
+
+(defun tcl-fill-inferior-map ()
+ (define-key inferior-tcl-mode-map "\t" 'comint-dynamic-complete)
+ (define-key inferior-tcl-mode-map "\M-?"
+ 'comint-dynamic-list-filename-completions)
+ (define-key inferior-tcl-mode-map "\e\C-a" 'tcl-beginning-of-defun)
+ (define-key inferior-tcl-mode-map "\e\C-e" 'tcl-end-of-defun)
+ (define-key inferior-tcl-mode-map "\177" 'backward-delete-char-untabify)
+ (define-key inferior-tcl-mode-map "\M-\C-x" 'tcl-eval-defun)
+ (define-key inferior-tcl-mode-map "\C-c\C-b" 'tcl-submit-bug-report)
+ (define-key inferior-tcl-mode-map "\C-c\C-i" 'tcl-help-on-word)
+ (define-key inferior-tcl-mode-map "\C-c\C-v" 'tcl-eval-defun)
+ (define-key inferior-tcl-mode-map "\C-c\C-f" 'tcl-load-file)
+ (define-key inferior-tcl-mode-map "\C-c\C-t" 'inferior-tcl)
+ (define-key inferior-tcl-mode-map "\C-c\C-x" 'tcl-eval-region)
+ (define-key inferior-tcl-mode-map "\C-c\C-s" 'switch-to-tcl))
+
+(if tcl-mode-map
+ ()
+ (setq tcl-mode-map (make-sparse-keymap))
+ (tcl-fill-mode-map))
+
+(if inferior-tcl-mode-map
+ ()
+ ;; FIXME Use keymap inheritance here? FIXME we override comint
+ ;; keybindings here. Maybe someone has a better set?
+ (setq inferior-tcl-mode-map (copy-keymap comint-mode-map))
+ (tcl-fill-inferior-map))
+
+
+(defvar inferior-tcl-buffer nil
+ "*The current inferior-tcl process buffer.
+
+MULTIPLE PROCESS SUPPORT
+===========================================================================
+To run multiple Tcl processes, you start the first up with
+\\[inferior-tcl]. It will be in a buffer named `*inferior-tcl*'.
+Rename this buffer with \\[rename-buffer]. You may now start up a new
+process with another \\[inferior-tcl]. It will be in a new buffer,
+named `*inferior-tcl*'. You can switch between the different process
+buffers with \\[switch-to-buffer].
+
+Commands that send text from source buffers to Tcl processes -- like
+`tcl-eval-defun' or `tcl-load-file' -- have to choose a process to
+send to, when you have more than one Tcl process around. This is
+determined by the global variable `inferior-tcl-buffer'. Suppose you
+have three inferior Lisps running:
+ Buffer Process
+ foo inferior-tcl
+ bar inferior-tcl<2>
+ *inferior-tcl* inferior-tcl<3>
+If you do a \\[tcl-eval-defun] command on some Lisp source code, what
+process do you send it to?
+
+- If you're in a process buffer (foo, bar, or *inferior-tcl*),
+ you send it to that process.
+- If you're in some other buffer (e.g., a source file), you
+ send it to the process attached to buffer `inferior-tcl-buffer'.
+This process selection is performed by function `inferior-tcl-proc'.
+
+Whenever \\[inferior-tcl] fires up a new process, it resets
+`inferior-tcl-buffer' to be the new process's buffer. If you only run
+one process, this does the right thing. If you run multiple
+processes, you can change `inferior-tcl-buffer' to another process
+buffer with \\[set-variable].")
+
+;;
+;; Hooks and other customization.
+;;
+
+(defvar tcl-mode-hook nil
+ "Hook run on entry to Tcl mode.
+
+Several functions exist which are useful to run from your
+`tcl-mode-hook' (see each function's documentation for more
+information):
+
+ tcl-guess-application
+ Guesses a default setting for `tcl-application' based on any
+ \"#!\" line at the top of the file.
+ tcl-hashify-buffer
+ Quotes all \"#\" characters that don't correspond to actual
+ Tcl comments. (Useful when editing code not originally created
+ with this mode).
+ tcl-auto-fill-mode
+ Auto-filling of Tcl comments.
+
+Emacs 19 users can add functions to the hook with `add-hook':
+
+ (add-hook 'tcl-mode-hook 'tcl-guess-application)
+
+Emacs 18 users must use `setq':
+
+ (setq tcl-mode-hook (cons 'tcl-guess-application tcl-mode-hook))")
+
+
+(defvar inferior-tcl-mode-hook nil
+ "Hook for customizing Inferior Tcl mode.")
+
+(defvar tcl-proc-list
+ '("proc" "method" "itcl_class")
+ "List of commands whose first argument defines something.
+This exists because some people (eg, me) use \"defvar\" et al.
+Call `tcl-set-proc-regexp' and `tcl-set-font-lock-keywords'
+after changing this list.")
+
+(defvar tcl-proc-regexp nil
+ "Regexp to use when matching proc headers.")
+
+(defvar tcl-typeword-list
+ '("global" "upvar" "inherit" "public" "protected" "common")
+ "List of Tcl keywords denoting \"type\". Used only for highlighting.
+Call `tcl-set-font-lock-keywords' after changing this list.")
+
+;; Generally I've picked control operators to be keywords.
+(defvar tcl-keyword-list
+ '("if" "then" "else" "elseif" "for" "foreach" "break" "continue" "while"
+ "eval" "case" "in" "switch" "default" "exit" "error" "proc" "return"
+ "uplevel" "constructor" "destructor" "itcl_class" "loop" "for_array_keys"
+ "for_recursive_glob" "for_file")
+ "List of Tcl keywords. Used only for highlighting.
+Default list includes some TclX keywords.
+Call `tcl-set-font-lock-keywords' after changing this list.")
+
+(defvar tcl-font-lock-keywords nil
+ "Keywords to highlight for Tcl. See variable `font-lock-keywords'.
+This variable is generally set from `tcl-proc-regexp',
+`tcl-typeword-list', and `tcl-keyword-list' by the function
+`tcl-set-font-lock-keywords'.")
+
+;; FIXME need some way to recognize variables because array refs look
+;; like 2 sexps.
+(defvar tcl-type-alist
+ '(
+ ("proc" nil tcl-expr tcl-commands)
+ ("method" nil tcl-expr tcl-commands)
+ ("destructor" tcl-commands)
+ ("constructor" tcl-commands)
+ ("expr" tcl-expr)
+ ("catch" tcl-commands)
+ ("if" tcl-expr "then" tcl-commands)
+ ("elseif" tcl-expr "then" tcl-commands)
+ ("elseif" tcl-expr tcl-commands)
+ ("if" tcl-expr tcl-commands)
+ ("while" tcl-expr tcl-commands)
+ ("for" tcl-commands tcl-expr tcl-commands tcl-commands)
+ ("foreach" nil nil tcl-commands)
+ ("for_file" nil nil tcl-commands)
+ ("for_array_keys" nil nil tcl-commands)
+ ("for_recursive_glob" nil nil nil tcl-commands)
+ ;; Loop handling is not perfect, because the third argument can be
+ ;; either a command or an expr, and there is no real way to look
+ ;; forward.
+ ("loop" nil tcl-expr tcl-expr tcl-commands)
+ ("loop" nil tcl-expr tcl-commands)
+ )
+ "Alist that controls indentation.
+\(Actually, this really only controls what happens on continuation lines).
+Each entry looks like `(KEYWORD TYPE ...)'.
+Each type entry describes a sexp after the keyword, and can be one of:
+* nil, meaning that this sexp has no particular type.
+* tcl-expr, meaning that this sexp is an arithmetic expression.
+* tcl-commands, meaning that this sexp holds Tcl commands.
+* a string, which must exactly match the string at the corresponding
+ position for a match to be made.
+
+For example, the entry for the \"loop\" command is:
+
+ (\"loop\" nil tcl-expr tcl-commands)
+
+This means that the \"loop\" command has three arguments. The first
+argument is ignored (for indentation purposes). The second argument
+is a Tcl expression, and the last argument is Tcl commands.")
+
+(defvar tcl-explain-indentation nil
+ "If not `nil', debugging message will be printed during indentation.")
+
+
+
+;;
+;; Work around differences between various versions of Emacs.
+;;
+
+;; We use this because Lemacs 19.9 has what we need.
+(defconst tcl-pps-has-arg-6
+ (or tcl-using-emacs-19
+ (and tcl-using-xemacs-19
+ (condition-case nil
+ (progn
+ (parse-partial-sexp (point) (point) nil nil nil t)
+ t)
+ (error nil))))
+ "t if using an emacs which supports sixth (\"commentstop\") argument
+to parse-partial-sexp.")
+
+;; Its pretty bogus to have to do this, but there is no easier way to
+;; say "match not syntax-1 and not syntax-2". Too bad you can't put
+;; \s in [...]. This sickness is used in Emacs 19 to match a defun
+;; starter. (It is used for this in v18 as well).
+;;(defconst tcl-omit-ws-regexp
+;; (concat "^\\(\\s"
+;; (mapconcat 'char-to-string "w_.()\"\\$'/" "\\|\\s")
+;; "\\)\\S(*")
+;; "Regular expression that matches everything except space, comment
+;;starter, and comment ender syntax codes.")
+
+;; FIXME? Instead of using the hairy regexp above, we just use a
+;; simple one.
+;;(defconst tcl-omit-ws-regexp "^[^] \t\n#}]\\S(*"
+;; "Regular expression used in locating function definitions.")
+
+;; Here's another stab. I think this one actually works. Now the
+;; problem seems to be that there is a bug in Emacs 19.22 where
+;; end-of-defun doesn't really use the brace matching the one that
+;; trails defun-prompt-regexp.
+(defconst tcl-omit-ws-regexp "^[^ \t\n#}][^\n}]+}*[ \t]+")
+
+(defun tcl-internal-beginning-of-defun (&optional arg)
+ "Move backward to next beginning-of-defun.
+With argument, do this that many times.
+Returns t unless search stops due to end of buffer."
+ (interactive "p")
+ (if (or (null arg) (= arg 0))
+ (setq arg 1))
+ (let (success)
+ (while (progn
+ (setq arg (1- arg))
+ (and (>= arg 0)
+ (setq success
+ (re-search-backward tcl-omit-ws-regexp nil 'move 1))))
+ (while (and (looking-at "[]#}]")
+ (setq success
+ (re-search-backward tcl-omit-ws-regexp nil 'move 1)))))
+ (beginning-of-line)
+ (not (null success))))
+
+(defun tcl-internal-end-of-defun (&optional arg)
+ "Move forward to next end of defun.
+An end of a defun is found by moving forward from the beginning of one."
+ (interactive "p")
+ (if (or (null arg) (= arg 0)) (setq arg 1))
+ (let ((start (point)))
+ ;; Was forward-char. I think this works a little better.
+ (forward-line)
+ (tcl-beginning-of-defun)
+ (while (> arg 0)
+ (while (and (re-search-forward tcl-omit-ws-regexp nil 'move 1)
+ (progn (beginning-of-line) t)
+ (looking-at "[]#}]")
+ (progn (forward-line) t)))
+ (let ((next-line (save-excursion
+ (forward-line)
+ (point))))
+ (while (< (point) next-line)
+ (forward-sexp)))
+ (forward-line)
+ (if (> (point) start) (setq arg (1- arg))))))
+
+;; In Emacs 19, we can use begining-of-defun as long as we set up a
+;; certain regexp. In Emacs 18, we need our own function.
+(fset 'tcl-beginning-of-defun
+ (if tcl-using-emacs-19
+ 'beginning-of-defun
+ 'tcl-internal-beginning-of-defun))
+
+;; Ditto end-of-defun.
+(fset 'tcl-end-of-defun
+ (if (and tcl-using-emacs-19 (not tcl-using-xemacs-19))
+ 'end-of-defun
+ 'tcl-internal-end-of-defun))
+
+;; Internal mark-defun that is used for losing Emacsen.
+(defun tcl-internal-mark-defun ()
+ "Put mark at end of Tcl function, point at beginning."
+ (interactive)
+ (push-mark (point))
+ (tcl-end-of-defun)
+ (if tcl-using-emacs-19
+ (push-mark (point) nil t)
+ (push-mark (point)))
+ (tcl-beginning-of-defun)
+ (backward-paragraph))
+
+;; In GNU Emacs 19-23 and later, mark-defun works as advertised. I
+;; don't know about XEmacs, so for now it and Emacs 18 just lose.
+(fset 'tcl-mark-defun
+ (if tcl-using-emacs-19-23
+ 'mark-defun
+ 'tcl-internal-mark-defun))
+
+;; In GNU Emacs 19, mark takes an additional "force" argument. I
+;; don't know about XEmacs, so I'm just assuming it is the same.
+;; Emacs 18 doesn't have this argument.
+(defun tcl-mark ()
+ "Return mark, or nil if none."
+ (if tcl-using-emacs-19
+ (mark t)
+ (mark)))
+
+
+
+;;
+;; Some helper functions.
+;;
+
+(defun tcl-set-proc-regexp ()
+ "Set `tcl-proc-regexp' from variable `tcl-proc-list'."
+ (setq tcl-proc-regexp (concat "^\\s-*\\("
+ (mapconcat 'identity tcl-proc-list "\\|")
+ "\\)[ \t]+")))
+
+(defun tcl-set-font-lock-keywords ()
+ "Set `tcl-font-lock-keywords'.
+Uses variables `tcl-proc-regexp' and `tcl-keyword-list'."
+ (setq tcl-font-lock-keywords
+ (list
+ ;; Names of functions (and other "defining things").
+ (list (concat tcl-proc-regexp "\\([^ \t\n]+\\)")
+ 2 'font-lock-function-name-face)
+
+ ;; Names of type-defining things.
+ (list (concat "\\(\\s-\\|^\\)\\("
+ ;; FIXME Use 'regexp-quote?
+ (mapconcat 'identity tcl-typeword-list "\\|")
+ "\\)\\(\\s-\\|$\\)")
+ 2 'font-lock-type-face)
+
+ ;; Keywords. Only recognized if surrounded by whitespace.
+ ;; FIXME consider using "not word or symbol", not
+ ;; "whitespace".
+ (cons (concat "\\(\\s-\\|^\\)\\("
+ ;; FIXME Use regexp-quote?
+ (mapconcat 'identity tcl-keyword-list "\\|")
+ "\\)\\(\\s-\\|$\\)")
+ 2)
+ )))
+
+(if tcl-proc-regexp
+ ()
+ (tcl-set-proc-regexp))
+
+(if tcl-font-lock-keywords
+ ()
+ (tcl-set-font-lock-keywords))
+
+
+
+;;
+;; The mode itself.
+;;
+
+;;;###autoload
+(defun tcl-mode ()
+ "Major mode for editing Tcl code.
+Expression and list commands understand all Tcl brackets.
+Tab indents for Tcl code.
+Paragraphs are separated by blank lines only.
+Delete converts tabs to spaces as it moves back.
+
+Variables controlling indentation style:
+ tcl-indent-level
+ Indentation of Tcl statements within surrounding block.
+ tcl-continued-indent-level
+ Indentation of continuation line relative to first line of command.
+
+Variables controlling user interaction with mode (see variable
+documentation for details):
+ tcl-tab-always-indent
+ Controls action of TAB key.
+ tcl-auto-newline
+ Non-nil means automatically newline before and after braces, brackets,
+ and semicolons inserted in Tcl code.
+ tcl-electric-hash-style
+ Controls action of `#' key.
+ tcl-use-hairy-comment-detector
+ If t, use more complicated, but slower, comment detector.
+ This variable is only used in GNU Emacs 19.
+ tcl-use-smart-word-finder
+ If not nil, use a smarter, Tcl-specific way to find the current
+ word when looking up help on a Tcl command.
+
+Turning on Tcl mode calls the value of the variable `tcl-mode-hook'
+with no args, if that value is non-nil. Read the documentation for
+`tcl-mode-hook' to see what kinds of interesting hook functions
+already exist.
+
+Commands:
+\\{tcl-mode-map}"
+ (interactive)
+ (kill-all-local-variables)
+ (use-local-map tcl-mode-map)
+ (setq major-mode 'tcl-mode)
+ (setq mode-name "Tcl")
+ (setq local-abbrev-table tcl-mode-abbrev-table)
+ (set-syntax-table tcl-mode-syntax-table)
+
+ (make-local-variable 'paragraph-start)
+ (make-local-variable 'paragraph-separate)
+ (if (and tcl-using-emacs-19-23
+ (>= emacs-minor-version 29))
+ (progn
+ ;; In Emacs 19.29, you aren't supposed to start these with a
+ ;; ^.
+ (setq paragraph-start "$\\| ")
+ (setq paragraph-separate paragraph-start))
+ (setq paragraph-start (concat "^$\\|" page-delimiter))
+ (setq paragraph-separate paragraph-start))
+ (make-local-variable 'paragraph-ignore-fill-prefix)
+ (setq paragraph-ignore-fill-prefix t)
+ (make-local-variable 'fill-paragraph-function)
+ (setq fill-paragraph-function 'tcl-do-fill-paragraph)
+
+ (make-local-variable 'indent-line-function)
+ (setq indent-line-function 'tcl-indent-line)
+ ;; Tcl doesn't require a final newline.
+ ;; (make-local-variable 'require-final-newline)
+ ;; (setq require-final-newline t)
+
+ (make-local-variable 'comment-start)
+ (setq comment-start "# ")
+ (make-local-variable 'comment-start-skip)
+ (setq comment-start-skip "#+ *")
+ (make-local-variable 'comment-column)
+ (setq comment-column 40)
+ (make-local-variable 'comment-end)
+ (setq comment-end "")
+
+ (make-local-variable 'outline-regexp)
+ (setq outline-regexp "[^\n\^M]")
+ (make-local-variable 'outline-level)
+ (setq outline-level 'tcl-outline-level)
+
+ (make-local-variable 'font-lock-keywords)
+ (setq font-lock-keywords tcl-font-lock-keywords)
+
+ ;; The following only really makes sense under GNU Emacs 19.
+ (make-local-variable 'imenu-create-index-function)
+ (setq imenu-create-index-function 'tcl-imenu-create-index-function)
+ (make-local-variable 'parse-sexp-ignore-comments)
+
+ ;; Settings for new dabbrev code.
+ (make-local-variable 'dabbrev-case-fold-search)
+ (setq dabbrev-case-fold-search nil)
+ (make-local-variable 'dabbrev-case-replace)
+ (setq dabbrev-case-replace nil)
+ (make-local-variable 'dabbrev-abbrev-skip-leading-regexp)
+ (setq dabbrev-abbrev-skip-leading-regexp "[$!]")
+ (make-local-variable 'dabbrev-abbrev-char-regexp)
+ (setq dabbrev-abbrev-char-regexp "\\sw\\|\\s_")
+
+ (if tcl-using-emacs-19
+ (progn
+ ;; This can only be set to t in Emacs 19 and XEmacs.
+ ;; Emacs 18 and Epoch lose.
+ (setq parse-sexp-ignore-comments t)
+ ;; XEmacs has defun-prompt-regexp, but I don't believe
+ ;; that it works for end-of-defun -- only for
+ ;; beginning-of-defun.
+ (make-local-variable 'defun-prompt-regexp)
+ (setq defun-prompt-regexp tcl-omit-ws-regexp)
+ ;; The following doesn't work in Lucid Emacs 19.6, but maybe
+ ;; it will appear in later versions.
+ (make-local-variable 'add-log-current-defun-function)
+ (setq add-log-current-defun-function 'add-log-tcl-defun))
+ (setq parse-sexp-ignore-comments nil))
+
+ ;; Put Tcl menu into menubar for XEmacs. This happens
+ ;; automatically for GNU Emacs.
+ (if (and tcl-using-xemacs-19
+ current-menubar
+ (not (assoc "Tcl" current-menubar)))
+ (progn
+ (set-buffer-menubar (copy-sequence current-menubar))
+ (add-menu nil "Tcl" tcl-xemacs-menu)))
+ ;; Append Tcl menu to popup menu for XEmacs.
+ (if (and tcl-using-xemacs-19 (boundp 'mode-popup-menu))
+ (setq mode-popup-menu
+ (cons (concat mode-name " Mode Commands") tcl-xemacs-menu)))
+
+ ;; If hilit19 is loaded, add our stuff.
+ (if (featurep 'hilit19)
+ (tcl-hilit))
+
+ (run-hooks 'tcl-mode-hook))
+
+
+
+;; This is used for braces, brackets, and semi (except for closing
+;; braces, which are handled specially).
+(defun tcl-electric-char (arg)
+ "Insert character and correct line's indentation."
+ (interactive "p")
+ ;; Indent line first; this looks better if parens blink.
+ (tcl-indent-line)
+ (self-insert-command arg)
+ (if (and tcl-auto-newline (= last-command-char ?\;))
+ (progn
+ (newline)
+ (tcl-indent-line))))
+
+;; This is used for closing braces. If tcl-auto-newline is set, can
+;; insert a newline both before and after the brace, depending on
+;; context. FIXME should this be configurable? Does anyone use this?
+(defun tcl-electric-brace (arg)
+ "Insert character and correct line's indentation."
+ (interactive "p")
+ ;; If auto-newlining and there is stuff on the same line, insert a
+ ;; newline first.
+ (if tcl-auto-newline
+ (progn
+ (if (save-excursion
+ (skip-chars-backward " \t")
+ (bolp))
+ ()
+ (tcl-indent-line)
+ (newline))
+ ;; In auto-newline case, must insert a newline after each
+ ;; brace. So an explicit loop is needed.
+ (while (> arg 0)
+ (insert last-command-char)
+ (tcl-indent-line)
+ (newline)
+ (setq arg (1- arg))))
+ (self-insert-command arg))
+ (tcl-indent-line))
+
+
+
+(defun tcl-indent-command (&optional arg)
+ "Indent current line as Tcl code, or in some cases insert a tab character.
+If tcl-tab-always-indent is t (the default), always indent current line.
+If tcl-tab-always-indent is nil and point is not in the indentation
+area at the beginning of the line, a TAB is inserted.
+Other values of tcl-tab-always-indent cause the first possible action
+from the following list to take place:
+
+ 1. Move from beginning of line to correct indentation.
+ 2. Delete an empty comment.
+ 3. Move forward to start of comment, indenting if necessary.
+ 4. Move forward to end of line, indenting if necessary.
+ 5. Create an empty comment.
+ 6. Move backward to start of comment, indenting if necessary."
+ (interactive "p")
+ (cond
+ ((not tcl-tab-always-indent)
+ ;; Indent if in indentation area, otherwise insert TAB.
+ (if (<= (current-column) (current-indentation))
+ (tcl-indent-line)
+ (self-insert-command arg)))
+ ((eq tcl-tab-always-indent t)
+ ;; Always indent.
+ (tcl-indent-line))
+ (t
+ ;; "Perl-mode" style TAB command.
+ (let* ((ipoint (point))
+ (eolpoint (progn
+ (end-of-line)
+ (point)))
+ (comment-p (tcl-in-comment)))
+ (cond
+ ((= ipoint (save-excursion
+ (beginning-of-line)
+ (point)))
+ (beginning-of-line)
+ (tcl-indent-line)
+ ;; If indenting didn't leave us in column 0, go to the
+ ;; indentation. Otherwise leave point at end of line. This
+ ;; is a hack.
+ (if (= (point) (save-excursion
+ (beginning-of-line)
+ (point)))
+ (end-of-line)
+ (back-to-indentation)))
+ ((and comment-p (looking-at "[ \t]*$"))
+ ;; Empty comment, so delete it. We also delete any ";"
+ ;; characters at the end of the line. I think this is
+ ;; friendlier, but I don't know how other people will feel.
+ (backward-char)
+ (skip-chars-backward " \t;")
+ (delete-region (point) eolpoint))
+ ((and comment-p (< ipoint (point)))
+ ;; Before comment, so skip to it.
+ (tcl-indent-line)
+ (indent-for-comment))
+ ((/= ipoint eolpoint)
+ ;; Go to end of line (since we're not there yet).
+ (goto-char eolpoint)
+ (tcl-indent-line))
+ ((not comment-p)
+ (tcl-indent-line)
+ (tcl-indent-for-comment))
+ (t
+ ;; Go to start of comment. We don't leave point where it is
+ ;; because we want to skip comment-start-skip.
+ (tcl-indent-line)
+ (indent-for-comment)))))))
+
+(defun tcl-indent-line ()
+ "Indent current line as Tcl code.
+Return the amount the indentation changed by."
+ (let ((indent (calculate-tcl-indent nil))
+ beg shift-amt
+ (case-fold-search nil)
+ (pos (- (point-max) (point))))
+ (beginning-of-line)
+ (setq beg (point))
+ (cond ((eq indent nil)
+ (setq indent (current-indentation)))
+ (t
+ (skip-chars-forward " \t")
+ (if (listp indent) (setq indent (car indent)))
+ (cond ((= (following-char) ?})
+ (setq indent (- indent tcl-indent-level)))
+ ((= (following-char) ?\])
+ (setq indent (- indent 1))))))
+ (skip-chars-forward " \t")
+ (setq shift-amt (- indent (current-column)))
+ (if (zerop shift-amt)
+ (if (> (- (point-max) pos) (point))
+ (goto-char (- (point-max) pos)))
+ (delete-region beg (point))
+ (indent-to indent)
+ ;; If initial point was within line's indentation,
+ ;; position after the indentation. Else stay at same point in text.
+ (if (> (- (point-max) pos) (point))
+ (goto-char (- (point-max) pos))))
+ shift-amt))
+
+(defun tcl-figure-type ()
+ "Determine type of sexp at point.
+This is either 'tcl-expr, 'tcl-commands, or nil. Puts point at start
+of sexp that indicates types.
+
+See documentation for variable `tcl-type-alist' for more information."
+ (let ((count 0)
+ result
+ word-stack)
+ (while (and (< count 5)
+ (not result))
+ (condition-case nil
+ (progn
+ ;; FIXME should use "tcl-backward-sexp", which would skip
+ ;; over entire variables, etc.
+ (backward-sexp)
+ (if (looking-at "[a-zA-Z_]+")
+ (let ((list tcl-type-alist)
+ entry)
+ (setq word-stack (cons (tcl-word-no-props) word-stack))
+ (while (and list (not result))
+ (setq entry (car list))
+ (setq list (cdr list))
+ (let ((index 0))
+ (while (and entry (<= index count))
+ ;; Abort loop if string does not match word on
+ ;; stack.
+ (and (stringp (car entry))
+ (not (string= (car entry)
+ (nth index word-stack)))
+ (setq entry nil))
+ (setq entry (cdr entry))
+ (setq index (1+ index)))
+ (and (> index count)
+ (not (stringp (car entry)))
+ (setq result (car entry)))
+ )))
+ (setq word-stack (cons nil word-stack))))
+ (error nil))
+ (setq count (1+ count)))
+ (and tcl-explain-indentation
+ (message "Indentation type %s" result))
+ result))
+
+(defun calculate-tcl-indent (&optional parse-start)
+ "Return appropriate indentation for current line as Tcl code.
+In usual case returns an integer: the column to indent to.
+Returns nil if line starts inside a string, t if in a comment."
+ (save-excursion
+ (beginning-of-line)
+ (let* ((indent-point (point))
+ (case-fold-search nil)
+ (continued-line
+ (save-excursion
+ (if (bobp)
+ nil
+ (backward-char)
+ (= ?\\ (preceding-char)))))
+ (continued-indent-value (if continued-line
+ tcl-continued-indent-level
+ 0))
+ state
+ containing-sexp
+ found-next-line)
+ (if parse-start
+ (goto-char parse-start)
+ (tcl-beginning-of-defun))
+ (while (< (point) indent-point)
+ (setq parse-start (point))
+ (setq state (parse-partial-sexp (point) indent-point 0))
+ (setq containing-sexp (car (cdr state))))
+ (cond ((or (nth 3 state) (nth 4 state))
+ ;; Inside comment or string. Return nil or t if should
+ ;; not change this line
+ (nth 4 state))
+ ((null containing-sexp)
+ ;; Line is at top level.
+ continued-indent-value)
+ (t
+ ;; Set expr-p if we are looking at the expression part of
+ ;; an "if", "expr", etc statement. Set commands-p if we
+ ;; are looking at the body part of an if, while, etc
+ ;; statement. FIXME Should check for "for" loops here.
+ (goto-char containing-sexp)
+ (let* ((sexpr-type (tcl-figure-type))
+ (expr-p (eq sexpr-type 'tcl-expr))
+ (commands-p (eq sexpr-type 'tcl-commands))
+ (expr-start (point)))
+ ;; Find the first statement in the block and indent
+ ;; like it. The first statement in the block might be
+ ;; on the same line, so what we do is skip all
+ ;; "virtually blank" lines, looking for a non-blank
+ ;; one. A line is virtually blank if it only contains
+ ;; a comment and whitespace. FIXME continued comments
+ ;; aren't supported. They are a wart on Tcl anyway.
+ ;; We do it this funky way because we want to know if
+ ;; we've found a statement on some line _after_ the
+ ;; line holding the sexp opener.
+ (goto-char containing-sexp)
+ (forward-char)
+ (if (and (< (point) indent-point)
+ (looking-at "[ \t]*\\(#.*\\)?$"))
+ (progn
+ (forward-line)
+ (while (and (< (point) indent-point)
+ (looking-at "[ \t]*\\(#.*\\)?$"))
+ (setq found-next-line t)
+ (forward-line))))
+ (if (or continued-line
+ (/= (char-after containing-sexp) ?{)
+ expr-p)
+ (progn
+ ;; Line is continuation line, or the sexp opener
+ ;; is not a curly brace, or we are are looking at
+ ;; an `expr' expression (which must be split
+ ;; specially). So indentation is column of first
+ ;; good spot after sexp opener (with some added
+ ;; in the continued-line case). If there is no
+ ;; nonempty line before the indentation point, we
+ ;; use the column of the character after the sexp
+ ;; opener.
+ (if (>= (point) indent-point)
+ (progn
+ (goto-char containing-sexp)
+ (forward-char))
+ (skip-chars-forward " \t"))
+ (+ (current-column) continued-indent-value))
+ ;; After a curly brace, and not a continuation line.
+ ;; So take indentation from first good line after
+ ;; start of block, unless that line is on the same
+ ;; line as the opening brace. In this case use the
+ ;; indentation of the opening brace's line, plus
+ ;; another indent step. If we are in the body part
+ ;; of an "if" or "while" then the indentation is
+ ;; taken from the line holding the start of the
+ ;; statement.
+ (if (and (< (point) indent-point)
+ found-next-line)
+ (current-indentation)
+ (if commands-p
+ (goto-char expr-start)
+ (goto-char containing-sexp))
+ (+ (current-indentation) tcl-indent-level)))))))))
+
+
+
+(defun indent-tcl-exp ()
+ "Indent each line of the Tcl grouping following point."
+ (interactive)
+ (let ((indent-stack (list nil))
+ (contain-stack (list (point)))
+ (case-fold-search nil)
+ outer-loop-done inner-loop-done state ostate
+ this-indent last-sexp continued-line
+ (next-depth 0)
+ last-depth)
+ (save-excursion
+ (forward-sexp 1))
+ (save-excursion
+ (setq outer-loop-done nil)
+ (while (and (not (eobp)) (not outer-loop-done))
+ (setq last-depth next-depth)
+ ;; Compute how depth changes over this line
+ ;; plus enough other lines to get to one that
+ ;; does not end inside a comment or string.
+ ;; Meanwhile, do appropriate indentation on comment lines.
+ (setq inner-loop-done nil)
+ (while (and (not inner-loop-done)
+ (not (and (eobp) (setq outer-loop-done t))))
+ (setq ostate state)
+ (setq state (parse-partial-sexp (point) (progn (end-of-line) (point))
+ nil nil state))
+ (setq next-depth (car state))
+ (if (and (car (cdr (cdr state)))
+ (>= (car (cdr (cdr state))) 0))
+ (setq last-sexp (car (cdr (cdr state)))))
+ (if (or (nth 4 ostate))
+ (tcl-indent-line))
+ (if (or (nth 3 state))
+ (forward-line 1)
+ (setq inner-loop-done t)))
+ (if (<= next-depth 0)
+ (setq outer-loop-done t))
+ (if outer-loop-done
+ nil
+ ;; If this line had ..))) (((.. in it, pop out of the levels
+ ;; that ended anywhere in this line, even if the final depth
+ ;; doesn't indicate that they ended.
+ (while (> last-depth (nth 6 state))
+ (setq indent-stack (cdr indent-stack)
+ contain-stack (cdr contain-stack)
+ last-depth (1- last-depth)))
+ (if (/= last-depth next-depth)
+ (setq last-sexp nil))
+ ;; Add levels for any parens that were started in this line.
+ (while (< last-depth next-depth)
+ (setq indent-stack (cons nil indent-stack)
+ contain-stack (cons nil contain-stack)
+ last-depth (1+ last-depth)))
+ (if (null (car contain-stack))
+ (setcar contain-stack
+ (or (car (cdr state))
+ (save-excursion
+ (forward-sexp -1)
+ (point)))))
+ (forward-line 1)
+ (setq continued-line
+ (save-excursion
+ (backward-char)
+ (= (preceding-char) ?\\)))
+ (skip-chars-forward " \t")
+ (if (eolp)
+ nil
+ (if (and (car indent-stack)
+ (>= (car indent-stack) 0))
+ ;; Line is on an existing nesting level.
+ (setq this-indent (car indent-stack))
+ ;; Just started a new nesting level.
+ ;; Compute the standard indent for this level.
+ (let ((val (calculate-tcl-indent
+ (if (car indent-stack)
+ (- (car indent-stack))))))
+ (setcar indent-stack
+ (setq this-indent val))
+ (setq continued-line nil)))
+ (cond ((not (numberp this-indent)))
+ ((= (following-char) ?})
+ (setq this-indent (- this-indent tcl-indent-level)))
+ ((= (following-char) ?\])
+ (setq this-indent (- this-indent 1))))
+ ;; Put chosen indentation into effect.
+ (or (null this-indent)
+ (= (current-column)
+ (if continued-line
+ (+ this-indent tcl-indent-level)
+ this-indent))
+ (progn
+ (delete-region (point) (progn (beginning-of-line) (point)))
+ (indent-to
+ (if continued-line
+ (+ this-indent tcl-indent-level)
+ this-indent)))))))))
+ )
+
+
+
+;;
+;; Interfaces to other packages.
+;;
+
+(defun tcl-imenu-create-index-function ()
+ "Generate alist of indices for imenu."
+ (let ((re (concat tcl-proc-regexp "\\([^ \t\n{]+\\)"))
+ alist prev-pos)
+ (goto-char (point-min))
+ (imenu-progress-message prev-pos 0)
+ (save-match-data
+ (while (re-search-forward re nil t)
+ (imenu-progress-message prev-pos)
+ ;; Position on start of proc name, not beginning of line.
+ (setq alist (cons
+ (cons (buffer-substring (match-beginning 2) (match-end 2))
+ (match-beginning 2))
+ alist))))
+ (imenu-progress-message prev-pos 100)
+ (nreverse alist)))
+
+;; FIXME Definition of function is very ad-hoc. Should use
+;; tcl-beginning-of-defun. Also has incestuous knowledge about the
+;; format of tcl-proc-regexp.
+(defun add-log-tcl-defun ()
+ "Return name of Tcl function point is in, or nil."
+ (save-excursion
+ (end-of-line)
+ (if (re-search-backward (concat tcl-proc-regexp "\\([^ \t\n{]+\\)") nil t)
+ (buffer-substring (match-beginning 2)
+ (match-end 2)))))
+
+(defun tcl-outline-level ()
+ (save-excursion
+ (skip-chars-forward " \t")
+ (current-column)))
+
+
+
+;;
+;; Helper functions for inferior Tcl mode.
+;;
+
+;; This exists to let us delete the prompt when commands are sent
+;; directly to the inferior Tcl. See gud.el for an explanation of how
+;; it all works (I took it from there). This stuff doesn't really
+;; work as well as I'd like it to. But I don't believe there is
+;; anything useful that can be done.
+(defvar inferior-tcl-delete-prompt-marker nil)
+
+(defun tcl-filter (proc string)
+ (let ((inhibit-quit t))
+ (save-excursion
+ (set-buffer (process-buffer proc))
+ (goto-char (process-mark proc))
+ ;; Delete prompt if requested.
+ (if (marker-buffer inferior-tcl-delete-prompt-marker)
+ (progn
+ (delete-region (point) inferior-tcl-delete-prompt-marker)
+ (set-marker inferior-tcl-delete-prompt-marker nil)))))
+ (if tcl-using-emacs-19
+ (comint-output-filter proc string)
+ (funcall comint-output-filter string)))
+
+(defun tcl-send-string (proc string)
+ (save-excursion
+ (set-buffer (process-buffer proc))
+ (goto-char (process-mark proc))
+ (beginning-of-line)
+ (if (looking-at comint-prompt-regexp)
+ (set-marker inferior-tcl-delete-prompt-marker (point))))
+ (comint-send-string proc string))
+
+(defun tcl-send-region (proc start end)
+ (save-excursion
+ (set-buffer (process-buffer proc))
+ (goto-char (process-mark proc))
+ (beginning-of-line)
+ (if (looking-at comint-prompt-regexp)
+ (set-marker inferior-tcl-delete-prompt-marker (point))))
+ (comint-send-region proc start end))
+
+(defun switch-to-tcl (eob-p)
+ "Switch to inferior Tcl process buffer.
+With argument, positions cursor at end of buffer."
+ (interactive "P")
+ (if (get-buffer inferior-tcl-buffer)
+ (pop-to-buffer inferior-tcl-buffer)
+ (error "No current inferior Tcl buffer"))
+ (cond (eob-p
+ (push-mark)
+ (goto-char (point-max)))))
+
+(defun inferior-tcl-proc ()
+ "Return current inferior Tcl process.
+See variable `inferior-tcl-buffer'."
+ (let ((proc (get-buffer-process (if (eq major-mode 'inferior-tcl-mode)
+ (current-buffer)
+ inferior-tcl-buffer))))
+ (or proc
+ (error "No Tcl process; see variable `inferior-tcl-buffer'"))))
+
+(defun tcl-eval-region (start end &optional and-go)
+ "Send the current region to the inferior Tcl process.
+Prefix argument means switch to the Tcl buffer afterwards."
+ (interactive "r\nP")
+ (let ((proc (inferior-tcl-proc)))
+ (tcl-send-region proc start end)
+ (tcl-send-string proc "\n")
+ (if and-go (switch-to-tcl t))))
+
+(defun tcl-eval-defun (&optional and-go)
+ "Send the current defun to the inferior Tcl process.
+Prefix argument means switch to the Tcl buffer afterwards."
+ (interactive "P")
+ (save-excursion
+ (tcl-end-of-defun)
+ (let ((end (point)))
+ (tcl-beginning-of-defun)
+ (tcl-eval-region (point) end)))
+ (if and-go (switch-to-tcl t)))
+
+
+
+;;
+;; Inferior Tcl mode itself.
+;;
+
+(defun inferior-tcl-mode ()
+ "Major mode for interacting with Tcl interpreter.
+
+A Tcl process can be started with M-x inferior-tcl.
+
+Entry to this mode runs the hooks comint-mode-hook and
+inferior-tcl-mode-hook, in that order.
+
+You can send text to the inferior Tcl process from other buffers
+containing Tcl source.
+
+Variables controlling Inferior Tcl mode:
+ tcl-application
+ Name of program to run.
+ tcl-command-switches
+ Command line arguments to `tcl-application'.
+ tcl-prompt-regexp
+ Matches prompt.
+ inferior-tcl-source-command
+ Command to use to read Tcl file in running application.
+ inferior-tcl-buffer
+ The current inferior Tcl process buffer. See variable
+ documentation for details on multiple-process support.
+
+The following commands are available:
+\\{inferior-tcl-mode-map}"
+ (interactive)
+ (comint-mode)
+ (setq comint-prompt-regexp (or tcl-prompt-regexp
+ (concat "^"
+ (regexp-quote tcl-application)
+ ">")))
+ (setq major-mode 'inferior-tcl-mode)
+ (setq mode-name "Inferior Tcl")
+ (if (boundp 'modeline-process)
+ (setq modeline-process '(": %s")) ; For XEmacs.
+ (setq mode-line-process '(": %s")))
+ (use-local-map inferior-tcl-mode-map)
+ (setq local-abbrev-table tcl-mode-abbrev-table)
+ (set-syntax-table tcl-mode-syntax-table)
+ (if tcl-using-emacs-19
+ (progn
+ (make-local-variable 'defun-prompt-regexp)
+ (setq defun-prompt-regexp tcl-omit-ws-regexp)))
+ (make-local-variable 'inferior-tcl-delete-prompt-marker)
+ (setq inferior-tcl-delete-prompt-marker (make-marker))
+ (set-process-filter (get-buffer-process (current-buffer)) 'tcl-filter)
+ (run-hooks 'inferior-tcl-mode-hook))
+
+;;;###autoload
+(defun inferior-tcl (cmd)
+ "Run inferior Tcl process.
+Prefix arg means enter program name interactively.
+See documentation for function `inferior-tcl-mode' for more information."
+ (interactive
+ (list (if current-prefix-arg
+ (read-string "Run Tcl: " tcl-application)
+ tcl-application)))
+ (if (not (comint-check-proc "*inferior-tcl*"))
+ (progn
+ (set-buffer (apply (function make-comint) "inferior-tcl" cmd nil
+ tcl-command-switches))
+ (inferior-tcl-mode)))
+ (make-local-variable 'tcl-application)
+ (setq tcl-application cmd)
+ (setq inferior-tcl-buffer "*inferior-tcl*")
+ (switch-to-buffer "*inferior-tcl*"))
+
+(and (fboundp 'defalias)
+ (defalias 'run-tcl 'inferior-tcl))
+
+
+
+;;
+;; Auto-fill support.
+;;
+
+(defun tcl-real-command-p ()
+ "Return nil if point is not at the beginning of a command.
+A command is the first word on an otherwise empty line, or the
+first word following a semicolon, opening brace, or opening bracket."
+ (save-excursion
+ (skip-chars-backward " \t")
+ (cond
+ ((bobp) t)
+ ((bolp)
+ (backward-char)
+ ;; Note -- continued comments are not supported here. I
+ ;; consider those to be a wart on the language.
+ (not (eq ?\\ (preceding-char))))
+ (t
+ (memq (preceding-char) '(?\; ?{ ?\[))))))
+
+;; FIXME doesn't actually return t. See last case.
+(defun tcl-real-comment-p ()
+ "Return t if point is just after the `#' beginning a real comment.
+Does not check to see if previous char is actually `#'.
+A real comment is either at the beginning of the buffer,
+preceeded only by whitespace on the line, or has a preceeding
+semicolon, opening brace, or opening bracket on the same line."
+ (save-excursion
+ (backward-char)
+ (tcl-real-command-p)))
+
+(defun tcl-hairy-scan-for-comment (state end always-stop)
+ "Determine if point is in a comment.
+Returns a list of the form `(FLAG . STATE)'. STATE can be used
+as input to future invocations. FLAG is nil if not in comment,
+t otherwise. If in comment, leaves point at beginning of comment.
+Only works in Emacs 19. See also `tcl-simple-scan-for-comment', a
+simpler version that is often right, and works in Emacs 18."
+ (let ((bol (save-excursion
+ (goto-char end)
+ (beginning-of-line)
+ (point)))
+ real-comment
+ last-cstart)
+ (while (and (not last-cstart) (< (point) end))
+ (setq real-comment nil) ;In case we've looped around and it is
+ ;set.
+ (setq state (parse-partial-sexp (point) end nil nil state t))
+ (if (nth 4 state)
+ (progn
+ ;; If ALWAYS-STOP is set, stop even if we don't have a
+ ;; real comment, or if the comment isn't on the same line
+ ;; as the end.
+ (if always-stop (setq last-cstart (point)))
+ ;; If we have a real comment, then set the comment
+ ;; starting point if we are on the same line as the ending
+ ;; location.
+ (setq real-comment (tcl-real-comment-p))
+ (if real-comment
+ (progn
+ (and (> (point) bol) (setq last-cstart (point)))
+ ;; NOTE Emacs 19 has a misfeature whereby calling
+ ;; parse-partial-sexp with COMMENTSTOP set and with
+ ;; an initial list that says point is in a comment
+ ;; will cause an immediate return. So we must skip
+ ;; over the comment ourselves.
+ (beginning-of-line 2)))
+ ;; Frob the state to make it look like we aren't in a
+ ;; comment.
+ (setcar (nthcdr 4 state) nil))))
+ (and last-cstart
+ (goto-char last-cstart))
+ (cons real-comment state)))
+
+(defun tcl-hairy-in-comment ()
+ "Return t if point is in a comment, and leave point at beginning
+of comment."
+ (let ((save (point)))
+ (tcl-beginning-of-defun)
+ (car (tcl-hairy-scan-for-comment nil save nil))))
+
+(defun tcl-simple-in-comment ()
+ "Return t if point is in comment, and leave point at beginning
+of comment. This is faster that `tcl-hairy-in-comment', but is
+correct less often."
+ (let ((save (point))
+ comment)
+ (beginning-of-line)
+ (while (and (< (point) save) (not comment))
+ (search-forward "#" save 'move)
+ (setq comment (tcl-real-comment-p)))
+ comment))
+
+(defun tcl-in-comment ()
+ "Return t if point is in comment, and leave point at beginning
+of comment."
+ (if (and tcl-pps-has-arg-6
+ tcl-use-hairy-comment-detector)
+ (tcl-hairy-in-comment)
+ (tcl-simple-in-comment)))
+
+(defun tcl-do-fill-paragraph (ignore)
+ "fill-paragraph function for Tcl mode. Only fills in a comment."
+ (let (in-comment col where)
+ (save-excursion
+ (end-of-line)
+ (setq in-comment (tcl-in-comment))
+ (if in-comment
+ (progn
+ (setq where (1+ (point)))
+ (setq col (1- (current-column))))))
+ (and in-comment
+ (save-excursion
+ (back-to-indentation)
+ (= col (current-column)))
+ ;; In a comment. Set the fill prefix, and find the paragraph
+ ;; boundaries by searching for lines that look like
+ ;; comment-only lines.
+ (let ((fill-prefix (buffer-substring (progn
+ (beginning-of-line)
+ (point))
+ where))
+ p-start p-end)
+ ;; Search backwards.
+ (save-excursion
+ (while (looking-at "^[ \t]*#")
+ (forward-line -1))
+ (forward-line)
+ (setq p-start (point)))
+
+ ;; Search forwards.
+ (save-excursion
+ (while (looking-at "^[ \t]*#")
+ (forward-line))
+ (setq p-end (point)))
+
+ ;; Narrow and do the fill.
+ (save-restriction
+ (narrow-to-region p-start p-end)
+ (fill-paragraph ignore)))))
+ t)
+
+(defun tcl-do-auto-fill ()
+ "Auto-fill function for Tcl mode. Only auto-fills in a comment."
+ (if (> (current-column) fill-column)
+ (let ((fill-prefix "# ")
+ in-comment col)
+ (save-excursion
+ (setq in-comment (tcl-in-comment))
+ (if in-comment
+ (setq col (1- (current-column)))))
+ (if in-comment
+ (progn
+ (do-auto-fill)
+ (save-excursion
+ (back-to-indentation)
+ (delete-region (point) (save-excursion
+ (beginning-of-line)
+ (point)))
+ (indent-to-column col)))))))
+
+
+
+;;
+;; Help-related code.
+;;
+
+(defvar tcl-help-saved-dirs nil
+ "Saved help directories.
+If `tcl-help-directory-list' changes, this allows `tcl-help-on-word'
+to update the alist.")
+
+(defvar tcl-help-alist nil
+ "Alist with command names as keys and filenames as values.")
+
+(defun tcl-help-snarf-commands (dirlist)
+ "Build alist of commands and filenames."
+ (while dirlist
+ (let ((files (directory-files (car dirlist) t)))
+ (while files
+ (if (and (file-directory-p (car files))
+ (not
+ (let ((fpart (file-name-nondirectory (car files))))
+ (or (equal fpart ".")
+ (equal fpart "..")))))
+ (let ((matches (directory-files (car files) t)))
+ (while matches
+ (or (file-directory-p (car matches))
+ (setq tcl-help-alist
+ (cons
+ (cons (file-name-nondirectory (car matches))
+ (car matches))
+ tcl-help-alist)))
+ (setq matches (cdr matches)))))
+ (setq files (cdr files))))
+ (setq dirlist (cdr dirlist))))
+
+(defun tcl-reread-help-files ()
+ "Set up to re-read files, and then do it."
+ (interactive)
+ (message "Building Tcl help file index...")
+ (setq tcl-help-saved-dirs tcl-help-directory-list)
+ (setq tcl-help-alist nil)
+ (tcl-help-snarf-commands tcl-help-directory-list)
+ (message "Building Tcl help file index...done"))
+
+(defun tcl-word-no-props ()
+ "Like current-word, but strips properties."
+ (let ((word (current-word)))
+ (and (fboundp 'set-text-properties)
+ (set-text-properties 0 (length word) nil word))
+ word))
+
+(defun tcl-current-word (flag)
+ "Return current command word, or nil.
+If FLAG is nil, just uses `current-word'.
+Otherwise scans backward for most likely Tcl command word."
+ (if (and flag
+ (memq major-mode '(tcl-mode inferior-tcl-mode)))
+ (condition-case nil
+ (save-excursion
+ ;; Look backward for first word actually in alist.
+ (if (bobp)
+ ()
+ (while (and (not (bobp))
+ (not (tcl-real-command-p)))
+ (backward-sexp)))
+ (if (assoc (tcl-word-no-props) tcl-help-alist)
+ (tcl-word-no-props)))
+ (error nil))
+ (tcl-word-no-props)))
+
+;;;###autoload
+(defun tcl-help-on-word (command &optional arg)
+ "Get help on Tcl command. Default is word at point.
+Prefix argument means invert sense of `tcl-use-smart-word-finder'."
+ (interactive
+ (list
+ (progn
+ (if (not (equal tcl-help-directory-list tcl-help-saved-dirs))
+ (tcl-reread-help-files))
+ (let ((word (tcl-current-word
+ (if current-prefix-arg
+ (not tcl-use-smart-word-finder)
+ tcl-use-smart-word-finder))))
+ (completing-read
+ (if (or (null word) (string= word ""))
+ "Help on Tcl command: "
+ (format "Help on Tcl command (default %s): " word))
+ tcl-help-alist nil t)))
+ current-prefix-arg))
+ (if (not (equal tcl-help-directory-list tcl-help-saved-dirs))
+ (tcl-reread-help-files))
+ (if (string= command "")
+ (setq command (tcl-current-word
+ (if arg
+ (not tcl-use-smart-word-finder)
+ tcl-use-smart-word-finder))))
+ (let* ((help (get-buffer-create "*Tcl help*"))
+ (cell (assoc command tcl-help-alist))
+ (file (and cell (cdr cell))))
+ (set-buffer help)
+ (delete-region (point-min) (point-max))
+ (if file
+ (progn
+ (insert "*** " command "\n\n")
+ (insert-file-contents file))
+ (if (string= command "")
+ (insert "Magical Pig!")
+ (insert "Tcl command " command " not in help\n")))
+ (set-buffer-modified-p nil)
+ (goto-char (point-min))
+ (display-buffer help)))
+
+
+
+;;
+;; Other interactive stuff.
+;;
+
+(defvar tcl-previous-dir/file nil
+ "Record last directory and file used in loading.
+This holds a cons cell of the form `(DIRECTORY . FILE)'
+describing the last `tcl-load-file' command.")
+
+(defun tcl-load-file (file &optional and-go)
+ "Load a Tcl file into the inferior Tcl process.
+Prefix argument means switch to the Tcl buffer afterwards."
+ (interactive
+ (list
+ ;; car because comint-get-source returns a list holding the
+ ;; filename.
+ (car (comint-get-source "Load Tcl file: "
+ (or (and
+ (eq major-mode 'tcl-mode)
+ (buffer-file-name))
+ tcl-previous-dir/file)
+ '(tcl-mode) t))
+ current-prefix-arg))
+ (comint-check-source file)
+ (setq tcl-previous-dir/file (cons (file-name-directory file)
+ (file-name-nondirectory file)))
+ (tcl-send-string (inferior-tcl-proc)
+ (format inferior-tcl-source-command (tcl-quote file)))
+ (if and-go (switch-to-tcl t)))
+
+(defun tcl-restart-with-file (file &optional and-go)
+ "Restart inferior Tcl with file.
+If an inferior Tcl process exists, it is killed first.
+Prefix argument means switch to the Tcl buffer afterwards."
+ (interactive
+ (list
+ (car (comint-get-source "Restart with Tcl file: "
+ (or (and
+ (eq major-mode 'tcl-mode)
+ (buffer-file-name))
+ tcl-previous-dir/file)
+ '(tcl-mode) t))
+ current-prefix-arg))
+ (let* ((buf (if (eq major-mode 'inferior-tcl-mode)
+ (current-buffer)
+ inferior-tcl-buffer))
+ (proc (and buf (get-process buf))))
+ (cond
+ ((not (and buf (get-buffer buf)))
+ ;; I think this will be ok.
+ (inferior-tcl tcl-application)
+ (tcl-load-file file and-go))
+ ((or
+ (not (comint-check-proc buf))
+ (yes-or-no-p
+ "A Tcl process is running, are you sure you want to reset it? "))
+ (save-excursion
+ (comint-check-source file)
+ (setq tcl-previous-dir/file (cons (file-name-directory file)
+ (file-name-nondirectory file)))
+ (comint-exec (get-buffer-create buf)
+ (if proc
+ (process-name proc)
+ "inferior-tcl")
+ tcl-application file tcl-command-switches)
+ (if and-go (switch-to-tcl t)))))))
+
+;; FIXME I imagine you can do this under Emacs 18. I just don't know
+;; how.
+(defun tcl-auto-fill-mode (&optional arg)
+ "Like `auto-fill-mode', but controls filling of Tcl comments."
+ (interactive "P")
+ (and (not tcl-using-emacs-19)
+ (error "You must use Emacs 19 to get this feature."))
+ ;; Following code taken from "auto-fill-mode" (simple.el).
+ (prog1
+ (setq auto-fill-function
+ (if (if (null arg)
+ (not auto-fill-function)
+ (> (prefix-numeric-value arg) 0))
+ 'tcl-do-auto-fill
+ nil))
+ (force-mode-line-update)))
+
+;; hilit19 support from "Chris Alfeld" <calfeld@math.utah.edu>
+(defun tcl-hilit ()
+ (hilit-set-mode-patterns
+ '(tcl-mode)
+ '(
+ ("\\(^ *\\|\; *\\)#.*$" nil comment)
+ ("[^\\]\\(\\$[A-Za-z0-9\\-\\_./\\(\\)]+\\)" 1 label)
+ ("[^_]\\<\\(append\\|array\\|auto_execok\\|auto_load\\|auto_mkindex\\|auto_reset\\|break\\|case\\|catch\\|cd\\|close\\|concat\\|continue\\|eof\\|error\\|eval\\|exec\\|exit\\|expr\\|file\\|flush\\|for\\|foreach\\|format\\|gets\\|glob\\|global\\|history\\|if\\|incr\\|info\\|join\\|lappend\\|lindex\\|linsert\\|list\\|llength\\|lrange\\|lreplace\\|lsearch\\|lsort\\|open\\|pid\\|proc\\|puts\\|pwd\\|read\\|regexp\\|regsub\\|rename\\|return\\|scan\\|seek\\|set\\|source\\|split\\|string\\|switch\\|tell\\|time\\|trace\\|unknown\\|unset\\|uplevel\\|upvar\\|while\\)\\>[^_]" 1 keyword) ; tcl keywords
+ ("[^_]\\<\\(after\\|bell\\|bind\\|bindtags\\|clipboard\\|destroy\\|fileevent\\|focus\\|grab\\|image\\|lower\\|option\\|pack\\|place\\|raise\\|scale\\|selection\\|send\\|subst\\|tk\\|tk_popup\\|tkwait\\|update\\|winfo\\|wm\\)\\>[^_]" 1 define) ; tk keywords
+ ("[^_]\\<\\(button\\|canvas\\|checkbutton\\|entry\\|frame\\|label\\|listbox\\|menu\\|menubutton\\|message\\|radiobutton\\|scrollbar\\|text\\|toplevel\\)\\>[^_]" 1 decl) ; tk widgets
+ ("[^_]\\<\\(tix\\((ButtonBox\\|Baloon\\|Control\\|DirList\\|ExFileSelectBox\\|ExFileSelectDialog\\|FileEntry\\|HList\\|LabelEntry\\|LabelFrame\\|NoteBook\\|OptionMenu\\|PanedWindow\\|PopupMenu\\|ScrolledHList\\|ScrolledText\\|ScrolledWindow\\|Select\\|StdButtonBox\\)\\)\\>[^_]" 1 defun) ; tix widgets
+ ("[{}\\\"\\(\\)]" nil include) ; misc punctuation
+ )))
+
+(defun tcl-electric-hash (&optional count)
+ "Insert a `#' and quote if it does not start a real comment.
+Prefix arg is number of `#'s to insert.
+See variable `tcl-electric-hash-style' for description of quoting
+styles."
+ (interactive "p")
+ (or count (setq count 1))
+ (if (> count 0)
+ (let ((type
+ (if (eq tcl-electric-hash-style 'smart)
+ (if (> count 3) ; FIXME what is "smart"?
+ 'quote
+ 'backslash)
+ tcl-electric-hash-style))
+ comment)
+ (if type
+ (progn
+ (save-excursion
+ (insert "#")
+ (setq comment (tcl-in-comment)))
+ (delete-char 1)
+ (and tcl-explain-indentation (message "comment: %s" comment))
+ (cond
+ ((eq type 'quote)
+ (if (not comment)
+ (insert "\"")))
+ ((eq type 'backslash)
+ ;; The following will set count to 0, so the
+ ;; insert-char can still be run.
+ (if (not comment)
+ (while (> count 0)
+ (insert "\\#")
+ (setq count (1- count)))))
+ (t nil))))
+ (insert-char ?# count))))
+
+(defun tcl-hashify-buffer ()
+ "Quote all `#'s in current buffer that aren't Tcl comments."
+ (interactive)
+ (save-excursion
+ (goto-char (point-min))
+ (if (and tcl-pps-has-arg-6 tcl-use-hairy-comment-detector)
+ (let (state
+ result)
+ (while (< (point) (point-max))
+ (setq result (tcl-hairy-scan-for-comment state (point-max) t))
+ (if (car result)
+ (beginning-of-line 2)
+ (backward-char)
+ (if (eq ?# (following-char))
+ (insert "\\"))
+ (forward-char))
+ (setq state (cdr result))))
+ (while (and (< (point) (point-max))
+ (search-forward "#" nil 'move))
+ (if (tcl-real-comment-p)
+ (beginning-of-line 2)
+ ;; There's really no good way for the simple converter to
+ ;; work. So we just quote # if it isn't already quoted.
+ ;; Bogus, but it works.
+ (backward-char)
+ (if (not (eq ?\\ (preceding-char)))
+ (insert "\\"))
+ (forward-char))))))
+
+(defun tcl-indent-for-comment ()
+ "Indent this line's comment to comment column, or insert an empty comment.
+Is smart about syntax of Tcl comments.
+Parts of this were taken from indent-for-comment (simple.el)."
+ (interactive "*")
+ (end-of-line)
+ (or (tcl-in-comment)
+ (progn
+ ;; Not in a comment, so we have to insert one. Create an
+ ;; empty comment (since there isn't one on this line). If
+ ;; line is not blank, make sure we insert a ";" first.
+ (skip-chars-backward " \t")
+ (let ((eolpoint (point)))
+ (beginning-of-line)
+ (if (/= (point) eolpoint)
+ (progn
+ (goto-char eolpoint)
+ (insert
+ (if (tcl-real-command-p) "" ";")
+ "# ")
+ (backward-char))))))
+ ;; Point is just after the "#" starting a comment. Move it as
+ ;; appropriate.
+ (let* ((indent (if comment-indent-hook
+ (funcall comment-indent-hook)
+ (funcall comment-indent-function)))
+ (begpos (progn
+ (backward-char)
+ (point))))
+ (if (/= begpos indent)
+ (progn
+ (skip-chars-backward " \t" (save-excursion
+ (beginning-of-line)
+ (point)))
+ (delete-region (point) begpos)
+ (indent-to indent)))
+ (looking-at comment-start-skip) ; Always true.
+ (goto-char (match-end 0))
+ ;; I don't like the effect of the next two.
+ ;;(skip-chars-backward " \t" (match-beginning 0))
+ ;;(skip-chars-backward "^ \t" (match-beginning 0))
+ ))
+
+;; The following was inspired by the Tcl editing mode written by
+;; Gregor Schmid <schmid@fb3-s7.math.TU-Berlin.DE>. His version also
+;; attempts to snarf the command line options from the command line,
+;; but I didn't think that would really be that helpful (doesn't seem
+;; like it owould be right enough. His version also looks for the
+;; "#!/bin/csh ... exec" hack, but that seemed even less useful.
+;; FIXME should make sure that the application mentioned actually
+;; exists.
+(defun tcl-guess-application ()
+ "Attempt to guess Tcl application by looking at first line.
+The first line is assumed to look like \"#!.../program ...\"."
+ (save-excursion
+ (goto-char (point-min))
+ (if (looking-at "#![^ \t]*/\\([^ \t\n/]+\\)\\([ \t]\\|$\\)")
+ (progn
+ (make-local-variable 'tcl-application)
+ (setq tcl-application (buffer-substring (match-beginning 1)
+ (match-end 1)))))))
+
+;; This only exists to put on the menubar. I couldn't figure out any
+;; other way to do it. FIXME should take "number of #-marks"
+;; argument.
+(defun tcl-uncomment-region (beg end)
+ "Uncomment region."
+ (interactive "r")
+ (comment-region beg end -1))
+
+
+
+;;
+;; XEmacs menu support.
+;; Taken from schmid@fb3-s7.math.TU-Berlin.DE (Gregor Schmid),
+;; who wrote a different Tcl mode.
+;; We also have support for menus in FSF. We do this by
+;; loading the XEmacs menu emulation code.
+;;
+
+(defun tcl-popup-menu (e)
+ (interactive "@e")
+ (and tcl-using-emacs-19
+ (not tcl-using-xemacs-19)
+ (if tcl-using-emacs-19-23
+ (require 'lmenu)
+ ;; CAVEATS:
+ ;; * lmenu.el provides 'menubar, which is bogus.
+ ;; * lmenu.el causes menubars to be turned on everywhere.
+ ;; Doubly bogus!
+ ;; Both of these problems are fixed in Emacs 19.23. People
+ ;; using an Emacs before that just suffer.
+ (require 'menubar "lmenu"))) ;; This is annoying
+ ;; IMHO popup-menu should be autoloaded in FSF Emacs. Oh well.
+ (popup-menu tcl-xemacs-menu))
+
+
+
+;;
+;; Quoting and unquoting functions.
+;;
+
+;; This quoting is sufficient to protect eg a filename from any sort
+;; of expansion or splitting. Tcl quoting sure sucks.
+(defun tcl-quote (string)
+ "Quote STRING according to Tcl rules."
+ (mapconcat (function (lambda (char)
+ (if (memq char '(?[ ?] ?{ ?} ?\\ ?\" ?$ ? ?\;))
+ (concat "\\" (char-to-string char))
+ (char-to-string char))))
+ string ""))
+
+
+
+;;
+;; Bug reporting.
+;;
+
+(and (fboundp 'eval-when-compile)
+ (eval-when-compile
+ (require 'reporter)))
+
+(defun tcl-submit-bug-report ()
+ "Submit via mail a bug report on Tcl mode."
+ (interactive)
+ (require 'reporter)
+ (and
+ (y-or-n-p "Do you really want to submit a bug report on Tcl mode? ")
+ (reporter-submit-bug-report
+ tcl-maintainer
+ (concat "Tcl mode " tcl-version)
+ '(tcl-indent-level
+ tcl-continued-indent-level
+ tcl-auto-newline
+ tcl-tab-always-indent
+ tcl-use-hairy-comment-detector
+ tcl-electric-hash-style
+ tcl-help-directory-list
+ tcl-use-smart-word-finder
+ tcl-application
+ tcl-command-switches
+ tcl-prompt-regexp
+ inferior-tcl-source-command
+ tcl-using-emacs-19
+ tcl-using-emacs-19-23
+ tcl-using-xemacs-19
+ tcl-proc-list
+ tcl-proc-regexp
+ tcl-typeword-list
+ tcl-keyword-list
+ tcl-font-lock-keywords
+ tcl-pps-has-arg-6))))
+
+
+
+(provide 'tcl)
+
+;;; tcl.el ends here
diff --git a/testglue.c b/testglue.c
new file mode 100644
index 0000000..3d2b272
--- /dev/null
+++ b/testglue.c
@@ -0,0 +1,147 @@
+#include <stdio.h>
+#include <string.h>
+#ifndef NO_UNISTD_H
+#include <sys/unistd.h>
+#endif
+
+/* A simple glue file for embedded targets so we can get the real exit
+ status from the program. This assumes we're using GNU ld and can use
+ the -wrap option, and that write(1, ...) does something useful. */
+
+/* There is a bunch of weird cruft with #ifdef UNDERSCORES. This is needed
+ because currently GNU ld doesn't deal well with a.out targets and
+ the -wrap option. When GNU ld is fixed, this should definitely be
+ removed. Note that we actually wrap __exit, not _exit on a target
+ that has UNDERSCORES defined. */
+
+#ifdef WRAP_M68K_AOUT
+#define REAL_EXIT(code) asm ( "trap %0" : : "i" (0) );
+#define REAL_ABORT() REAL_EXIT(6)
+#define ORIG_EXIT _exit
+#define ORIG_ABORT abort
+#else
+#ifdef UNDERSCORES
+#define REAL_EXIT _real___exit
+#define REAL_MAIN _real__main
+#define REAL_ABORT _real__abort
+#define ORIG_EXIT _wrap___exit
+#define ORIG_ABORT _wrap__abort
+#define ORIG_MAIN _wrap__main
+#else
+#define REAL_EXIT __real_exit
+#define REAL_MAIN __real_main
+#define REAL_ABORT __real_abort
+#define ORIG_EXIT __wrap_exit
+#define ORIG_ABORT __wrap_abort
+#define ORIG_MAIN __wrap_main
+#endif
+#endif
+
+#ifdef REAL_MAIN
+extern void REAL_EXIT ();
+extern void REAL_ABORT ();
+extern int REAL_MAIN (int argc, char **argv, char **envp);
+#endif
+
+int ___constval = 1;
+
+#ifdef VXWORKS
+static void __runexit();
+#endif
+
+static char *
+write_int(val, ptr)
+ int val;
+ char *ptr;
+{
+ char c;
+ if (val<0) {
+ *(ptr++) = '-';
+ val = -val;
+ }
+ if (val>9) {
+ ptr = write_int (val/10, ptr);
+ }
+ c = (val%10)+'0';
+ *(ptr++) = c;
+ return ptr;
+}
+
+void
+ORIG_EXIT (code)
+ int code;
+{
+ char buf[30];
+ char *ptr;
+
+#ifdef VXWORKS
+ __runexit ();
+#endif
+ strcpy (buf, "\n*** EXIT code ");
+ ptr = write_int (code, buf + strlen(buf));
+ *(ptr++) = '\n';
+ write (1, buf, ptr-buf);
+ REAL_EXIT (code);
+ while (___constval);
+}
+
+void
+ORIG_ABORT ()
+{
+ write (1, "\n*** EXIT code 4242\n", 20);
+ REAL_ABORT ();
+ while (___constval);
+ abort ();
+}
+
+#ifdef REAL_MAIN
+int
+ORIG_MAIN (argc, argv, envp)
+ int argc;
+ char **argv;
+ char **envp;
+{
+#ifdef WRAP_FILE_ARGS
+ extern int __argc;
+ extern char *__args[];
+
+ exit (REAL_MAIN (__argc,__args,envp));
+#else
+ exit (REAL_MAIN (argc, argv, envp));
+#endif
+ while (___constval);
+}
+#endif
+
+#ifdef VXWORKS
+void
+_exit (status)
+ int status;
+{
+ REAL_EXIT (status);
+}
+
+typedef (*PFV)(void);
+
+static PFV __list[32];
+static int __listcnt = 0;
+static int __running = 0;
+
+int
+atexit (PFV func)
+{
+ __list[__listcnt++] = func;
+}
+
+static void
+__runexit ()
+{
+ int i;
+ if (__running++)
+ return;
+
+ for (i = 0; i < __listcnt; i++)
+ __list[i]();
+ __running = 0;
+}
+#endif