Browse Source

* Modify the packaging scripts for GCC4TI, add a small description.
* Commit modified (and documented...) help system configuration file.
* Add chm2dcf program and dcf2adp script. They're present in the TIGCC sources distribution, but are still missing from the TIGCC CVS repository.

git-svn-id: file:///var/svn/tigccpp/trunk@1328 9552661e-59e3-4036-b4f2-dbe53926924f

debrouxl 15 years ago
parent
commit
5fc02ddde9

+ 202 - 0
tigcc-linux/README

@@ -0,0 +1,202 @@
+
+           GCC4TI Cross Compiler for the TI-89 and TI-92 Plus v0.96 Beta 9
+          ================================================================
+(based on TIGCC v0.96 Beta 8 + CVS modifications)
+
+Xavier Vassor       Xavier@tigcc.ticalc.org    (original linker and tigcc)
+Zeljko Juric        Zeljko@tigcc.ticalc.org    (library and documentation)
+Kevin Kofler        Kevin@tigcc.ticalc.org     (linker, fixes for A68k, GCC,
+                                                GAS, library, ...)
+Sebastian Reichelt  Sebastian@tigcc.ticalc.org (linker, IDE, GCC fixes)
+Niklas Brunlid      Niklas@tigcc.ticalc.org    (bugfixes and additions)
+Jean Canazzi        Jean@tigcc.ticalc.org      (first modification of GCC)
+Philipp Winkler     p.winkler@atn.nu           (library help file conversion)
+
+Lionel Debroux      lionel_debroux@yahoo.fr  
+Patrick Pelissier   patrick.pelissier@gmail.com
+
+Email us at:        tigccpp@box.godzil.net
+
+
+                      +-------------------------------+
+                      |        README CONTENTS        |
+                      |===============================|
+                      |  1. Disclaimer                |
+                      |  2. About GCC4TI              |
+                      |  3. Installation              |
+                      |  4. The Library               |
+                      |  5. The Command Line Compiler |
+                      |  6. The IDE                   |
+                      |  7. Examples                  |
+                      |  8. Bug Reports               |
+                      |  9. History                   |
+                      +-------------------------------+
+
+1. Disclaimer
+-------------
+
+Original files Copyright (C) 1999-2005 Xavier Vassor, Niklas Brunlid,
+                                       and Jean Canazzi
+ld-tigcc Copyright (C) 2002-2009 Sebastian Reichelt and Kevin Kofler
+Library & Documentation Copyright (C) 2000-2009 Zeljko Juric and contributors
+IDE Copyright (C) 2000-2009 Sebastian Reichelt and contributors
+TIGCC Tools Suite Copyright (C) 2000-2009 Thomas Nussbaumer
+                                          (http://tict.ticalc.org/)
+
+Included programs with different licenses:
+A68k Copyright (C) 1987-2009 Charlie Gibbs, David Ellsworth, Kevin Kofler,
+                             Julien Muchembled, and Paul Froissart
+
+Setup executable created using NSIS (http://nsis.sourceforge.net) and
+compressed using LZMA (http://www.7-zip.org/sdk.html) for the data and UPX
+(http://upx.sourceforge.net/) for the stub.
+
+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.
+
+Some components (TIGCCLIB, ttpack, pstarter) have additional permissions
+beyond the GPL.
+
+A different license applies to A68k.
+
+
+2. About GCC4TI
+--------------
+
+GCC4TI is a fork ( http://en.wikipedia.org/wiki/Fork_(software_development) )
+of TIGCC, with different goals and different planning.
+
+Please check out http://trac.godzil.net/gcc4ti/ , the official GCC4TI site,
+for more information on the todo/wish list.
+
+3. Installation
+---------------
+
+In the ZIP file containing GCC4TI, you will find a program called
+'setup-gcc4ti.exe'. Run this program and follow the instructions of the setup
+program. It will add a few new items to your start menu, so you should not
+use a program group that already exists.
+
+If you want to uninstall GCC4TI, you can do this at any time from either the
+start menu or the control panel. Please be aware that this will remove the
+whole folder in which the program was installed, not only the files which
+were installed by the setup program.
+
+If you experience any problems installing GCC4TI, or running it after it has
+been installed, please use the GCC4TI mailing list, tigccpp@box.godzil.net .
+
+4. The Library
+--------------
+
+The library included in this release of GCC4TI is a collection of over 750
+functions. With this library, it is possible to create kernel-free (so-called
+"nostub") programs as well as programs that make use of kernel features. A
+very detailed documentation in HTML Help format is included, in which more
+than 600 TIOS entries are described in detail. This documentation may be very
+valuable for assembly programmers too. To read the documentation, open
+'tigcc.chm', located in the 'Doc' folder, or click on the appropriate item in
+the start menu.
+
+5. The Command Line Compiler
+----------------------------
+
+The following paragraphs apply only to the command line compiler. If you want
+to use the IDE instead, you do not need to worry about these topics.
+
+The command line compiler (tigcc.exe) works almost the same way that the
+standard gcc.exe does. Aside from accepting .asm files as parameters and
+calling the a68k assembler to compile them, it also supports a few
+non-standard options:
+
+-pack <varname>
+  Compress the file generated during compilation. 'varname' is the name of
+  the on-calc packed variable. Although 'varname' cannot have an extension,
+  the variable on the calculator will always have the extension 'ppg'.
+  'varname' cannot be the same as the on-calc name of the program itself.
+  When you use this switch, two variables will be created; one with the
+  extension '.89y' or '.9xy', and one '.89z' or '.9xz' variable.
+  This option comes from Thomas Nussbaumer's (thomas.nussbaumer@gmx.net)
+  excellent TIGCC Tools Suite, where this feature is called "ExePack
+  Technology." You can read about it on the official TI-Chess Team site
+  (tict.ticalc.org).
+
+-q
+  Keep as quiet as possible while assembling and linking. This option is not
+  needed by the compiler because it is always quiet, but the linker and
+  especially the assembler output some information.
+
+-v0
+  This switch is an addition to the '-v' switch. It tells tigcc.exe to output
+  only the commands that are run directly. This was the default in some
+  previous releases.
+
+-g
+  The '-g' switch in GCC turns on debugging information in the preferred
+  format for the target. In GCC4TI, this is DWARF 2, which can be used with a
+  GDB-enabled TiEmu.
+
+-standalone
+  Do not link against tigcc.a. All of GCC's internal functions are
+  implemented in this library, as well as all non-TIOS functions. Using one
+  of these will result in an error from the linker.
+
+-ar
+  Create an archive (a static library) instead of a program. The resulting
+  file will have a '.a' ending.
+
+-bsr
+  This option is ignored for compatibility.
+
+For more info about standard options that are recognized by the compiler,
+have a look at the GCC4TI Documentation, or visit
+http://gcc.gnu.org/onlinedocs/gcc_3.html.
+
+In addition, you can use '-WA,...' instead of '-Wa,...' to pass options to
+the A68k assembler.
+
+We suggest that you use the '-O2' or '-Os' switch in all your compilations;
+it increases speed and decreases the program size at the cost of compilation
+time.
+
+There is an important difference to the standard gcc.exe: tigcc.exe always
+overwrites assembly or object files. For example, if a file 'test.c' is
+compiled, the files 'test.s' and 'test.o' will be created and overwritten if
+necessary, but they will automatically be deleted again if neither '-c' or
+'-S' nor '-g' are specified.
+
+6. The IDE
+----------
+
+Documentation of the IDE is included in the manual and will be installed by
+the setup program. You can access it from the start menu or from the IDE
+itself.
+
+7. Examples
+-----------
+
+There are some examples made by Zeljko Juric in the folder "Examples". You
+can compile and modify them to learn how to use GCC4TI. Most of them can also
+be found at some place in the documentation, with explanations and in some
+sort of context.
+
+8. Bug Reports
+--------------
+
+There may still be some bugs in the linker, in tigcc.exe, and in the IDE. If
+you encounter a bug, please use the GCC4TI mailing list, tigccpp@box.godzil.net
+
+9. History
+-----------
+
+See http://tigcc.ticalc.org/doc/info.html#history for the TIGCC history.

+ 10 - 6
tigcc-linux/scripts/package_bin

@@ -1,8 +1,12 @@
 #! /bin/sh
 #
-# This script creates a tarball of all binaries.
+# This script creates a tarball of the binaries.
+# Everything must have been build prior to running this script.
 #
-echo TIGCC script: Packaging binaries:
+
+OUTDIR=../gcc4ti-sources
+
+echo GCC4TI script: Packaging binaries:
 #echo stripping...
 #strip $TIGCC/bin/*
 echo clamscan...
@@ -10,9 +14,9 @@ clamscan -ir $TIGCC
 echo tar...
 OLDPWD="`pwd`"
 cd $TIGCC
-tar -c --exclude=projects/* --exclude=bin/quill.drv --exclude=lib/quill.drv --exclude=lib/fargo.a --exclude=lib/flashos.a -f "$OLDPWD/../tigcc_bin.tar" bin doc examples include lib projects
-cd "$OLDPWD"
+tar -c --exclude=projects/* --exclude=bin/quill.drv --exclude=lib/quill.drv --exclude=lib/fargo.a -f "$OLDPWD/$OUTDIR/gcc4ti_bin.tar" bin doc examples include lib projects
+cd "$OLDPWD/$OUTDIR"
 echo bzip2...
-rm -f ../tigcc_bin.tar.bz2
-bzip2 -9 ../tigcc_bin.tar
+rm -f gcc4ti_bin.tar.bz2
+bzip2 -9 gcc4ti_bin.tar
 echo Done.

+ 11 - 7
tigcc-linux/scripts/package_src

@@ -1,14 +1,18 @@
 #! /bin/sh
 #
-# This script creates a tarball of the source
+# This script creates a tarball of the sources.
+# updatesrc and updatedoc must be run prior to running this script.
 #
-echo TIGCC script: Packaging source:
+
+OUTDIR=../gcc4ti-sources
+
+echo GCC4TI script: Packaging source:
 echo clamscan...
-clamscan -ir --exclude=../build --exclude=../download ..
+clamscan $OUTDIR
 echo tar...
-cd ..
-tar cf tigcc_src.tar scripts sources tigcclib AUTHORS BUGS CHANGELOG COPYING DIRECTORIES HOWTO INSTALL README README.linux README.osX;
+cd $OUTDIR
+tar -c --exclude=.svn -f gcc4ti_src.tar scripts sources tigcclib AUTHORS BUGS CHANGELOG COPYING DIRECTORIES HOWTO INSTALL README README.linux README.osX;
 echo bzip2...
-rm -f tigcc_src.tar.bz2
-bzip2 -9 tigcc_src.tar;
+rm -f gcc4ti_src.tar.bz2
+bzip2 -9 gcc4ti_src.tar
 echo Done.

+ 40 - 21
tigcc-linux/scripts/updatedoc

@@ -1,44 +1,63 @@
-#!/bin/sh
-TIGCCCVSDIR=../../tigcccvs
-WINDOCDIR=../../tigccdoc/System
+#! /bin/sh
+#
+# This script rebuilds the documentation part of the tree suitable for `package_src`.
+#
+
+TIGCCDIR=../../tigcc
+WINDOCDIR=~/.wine/drive_c/docfiles/
+OUTDIR=../gcc4ti-sources
+WINE=~/wine/wine
+
+mkdir -p $OUTDIR/tigcclib/doc/html
+
+echo Generating documentation \(will take up to several minutes\)...
+echo Includes
+$WINE $TIGCCDIR/doc/Programs/Update/UpdateInclude.exe
+echo Keywords
+$WINE $TIGCCDIR/doc/Programs/Update/UpdateKeywords.exe
+echo Info
+$WINE $TIGCCDIR/doc/Programs/Update/UpdateInfo.exe
+echo Index
+$WINE $TIGCCDIR/doc/Programs/Update/UpdateIndex.exe
 
 echo Creating documentation source tarball...
-rm -f ../tigcclib/doc/source.tar.bz2
+rm -f $OUTDIR/tigcclib/doc/source.tar.bz2
 OLDPWD=`pwd`
-cd $TIGCCCVSDIR/doc
-tar -c --exclude='[cC][vV][sS]' --exclude='.*/[cC][vV][sS]' -f source.tar Programs System
-bzip2 -9 source.tar
+cd $TIGCCDIR/doc
+tar -c --exclude='*/.[sS][vV][nN]' -f $OLDPWD/$OUTDIR/tigcclib/doc/source.tar Programs System
+bzip2 -9 $OLDPWD/$OUTDIR/tigcclib/doc/source.tar
+cp -R converter $OLDPWD/$OUTDIR/tigcclib/doc/
 cd $OLDPWD
-mv -f $TIGCCCVSDIR/doc/source.tar.bz2 ../tigcclib/doc/source.tar.bz2
 
 echo Copying documentation files...
 echo -n .
-rm -f ../tigcclib/doc/html/[a-e]*
+rm -f $OUTDIR/tigcclib/doc/html/[a-e]*
 echo -n .
-rm -f ../tigcclib/doc/html/[f-j]*
+rm -f $OUTDIR/tigcclib/doc/html/[f-j]*
 echo -n .
-rm -f ../tigcclib/doc/html/[k-o]*
+rm -f $OUTDIR/tigcclib/doc/html/[k-o]*
 echo -n .
-rm -f ../tigcclib/doc/html/[p-t]*
+rm -f $OUTDIR/tigcclib/doc/html/[p-t]*
 echo -n .
-rm -f ../tigcclib/doc/html/[u-z]*
+rm -f $OUTDIR/tigcclib/doc/html/[u-z]*
 echo -n .
-cp -pf $WINDOCDIR/CHMFiles/[a-e]*.html ../tigcclib/doc/html/
+cp -pf $WINDOCDIR/CHMFiles/[a-e]*.html $OUTDIR/tigcclib/doc/html/
 echo -n .
-cp -pf $WINDOCDIR/CHMFiles/[f-j]*.html ../tigcclib/doc/html/
+cp -pf $WINDOCDIR/CHMFiles/[f-j]*.html $OUTDIR/tigcclib/doc/html/
 echo -n .
-cp -pf $WINDOCDIR/CHMFiles/[k-o]*.html ../tigcclib/doc/html/
+cp -pf $WINDOCDIR/CHMFiles/[k-o]*.html $OUTDIR/tigcclib/doc/html/
 echo -n .
-cp -pf $WINDOCDIR/CHMFiles/[p-t]*.html ../tigcclib/doc/html/
+cp -pf $WINDOCDIR/CHMFiles/[p-t]*.html $OUTDIR/tigcclib/doc/html/
 echo -n .
-cp -pf $WINDOCDIR/CHMFiles/[u-z]*.html ../tigcclib/doc/html/
+cp -pf $WINDOCDIR/CHMFiles/[u-z]*.html $OUTDIR/tigcclib/doc/html/
 echo -n .
 cp -pf $WINDOCDIR/CHMFiles/*.css $WINDOCDIR/CHMFiles/*.gif \
  $WINDOCDIR/CHMFiles/Contents.hhc $WINDOCDIR/CHMFiles/Index.hhk \
- ../tigcclib/doc/html/
+ $OUTDIR/tigcclib/doc/html/
 echo .
-cd ../tigcclib/doc/html
-echo Converting...
+
+echo Converting CHM documentation to Qt DCF/ADP format \(will take several minutes\)...
+cd $OUTDIR/tigcclib/doc/html
 ../converter/chm2dcf
 ../converter/dcf2adp
 echo Done.

+ 82 - 81
tigcc-linux/scripts/updatesrc

@@ -1,120 +1,121 @@
-#!/bin/sh
-
-TIGCCCVSDIR=../../tigcccvs
-TIGCCLIBDIR=../../tigcc-win32/Lib
-A68KSRCDIR=/e/TI-89/a68k/source
-TIGCCLINUXCVSDIR=../../tigcc-linux-cvs
-
-
-# TIGCCLIB components in CVS
+#! /bin/sh
+#
+# This script updates the tree suitable for `package_src`
+# (except the documentation: this is the duty of `updatedoc`).
+#
+
+TIGCCDIR=../../tigcc
+A68KSRCDIR=../../external/a68k/source
+TIGCCLINUXDIR=../../tigcc-linux
+OUTDIR=../gcc4ti-sources
+
+echo Updating source tree...
+mkdir -p $OUTDIR/tigcclib
+mkdir -p $OUTDIR/sources
+
+# TIGCCLIB components
 echo Updating archive \(tigcclib/src\)...
-rm -rf ../tigcclib/src/*
-cp -prf $TIGCCCVSDIR/archive/* ../tigcclib/src
-rm -rf ../tigcclib/src/CVS ../tigcclib/src/startup/CVS
+rm -rf $OUTDIR/tigcclib/src
+cp -prf $TIGCCDIR/archive $OUTDIR/tigcclib/src
+rm -Rf $OUTDIR/tigcclib/src/*.a
 
 echo Updating examples...
-rm -rf ../tigcclib/examples/*
-cp -prf $TIGCCCVSDIR/examples/* ../tigcclib/examples
-rm -rf ../tigcclib/examples/CVS
+rm -rf $OUTDIR/tigcclib/examples
+cp -prf $TIGCCDIR/examples $OUTDIR/tigcclib/examples
 
 echo Updating hsf2rc...
-rm -rf ../tigcclib/hsf2rc/*
-cp -prf $TIGCCCVSDIR/hsf2rc/* ../tigcclib/hsf2rc
-rm -rf ../tigcclib/hsf2rc/CVS
+rm -rf $OUTDIR/tigcclib/hsf2rc
+cp -prf $TIGCCDIR/hsf2rc $OUTDIR/tigcclib/hsf2rc
 
 echo Updating include...
-rm -rf ../tigcclib/include/*
-cp -prf $TIGCCCVSDIR/include/C ../tigcclib/include/c
-cp -prf $TIGCCCVSDIR/include/ASM ../tigcclib/include/asm
-cp -prf $TIGCCCVSDIR/include/S ../tigcclib/include/s
-rm -rf ../tigcclib/include/CVS ../tigcclib/include/asm/CVS ../tigcclib/include/c/CVS \
-       ../tigcclib/include/c/Completion ../tigcclib/include/s/CVS
+rm -rf $OUTDIR/tigcclib/include
+mkdir $OUTDIR/tigcclib/include
+cp -prf $TIGCCDIR/include/C $OUTDIR/tigcclib/include/c
+cp -prf $TIGCCDIR/include/ASM $OUTDIR/tigcclib/include/asm
+cp -prf $TIGCCDIR/include/S $OUTDIR/tigcclib/include/s
+rm -rf $OUTDIR/tigcclib/include/c/Completion
 
-echo Updating pstarter...
-rm -rf ../tigcclib/pstarter/*
-cp -prf $TIGCCCVSDIR/pstarter/* ../tigcclib/pstarter
-rm -rf ../tigcclib/pstarter/CVS ../tigcclib/pstarter/lzma/CVS
+echo Updating starters...
+rm -rf $OUTDIR/tigcclib/starters
+cp -prf $TIGCCDIR/starters $OUTDIR/tigcclib/starters
+rm -rf $OUTDIR/tigcclib/starters/build $OUTDIR/tigcclib/starters/test
 
 
-# Toolchain components in CVS
+# Toolchain components
 echo Updating gcc \(TIGCC patches\)...
-rm -rf ../sources/gcc/*
-cp -prf $TIGCCCVSDIR/gcc/* ../sources/gcc
-rm -rf ../sources/gcc/CVS
+rm -rf $OUTDIR/sources/gcc
+cp -prf $TIGCCDIR/gcc $OUTDIR/sources/gcc
 
 echo Updating ld-tigcc...
-rm -rf ../sources/ld-tigcc/*
-cp -prf $TIGCCCVSDIR/ld-tigcc/* ../sources/ld-tigcc
-rm -rf ../sources/ld-tigcc/CVS ../sources/ld-tigcc/ar/CVS ../sources/ld-tigcc/ar/export/CVS \
-       ../sources/ld-tigcc/ar/import/CVS ../sources/ld-tigcc/bincode/CVS ../sources/ld-tigcc/export/CVS \
-       ../sources/ld-tigcc/formats/CVS ../sources/ld-tigcc/import/CVS ../sources/ld-tigcc/insert/CVS \
-       ../sources/ld-tigcc/insert/model/CVS
+rm -rf $OUTDIR/sources/ld-tigcc
+cp -prf $TIGCCDIR/ld-tigcc $OUTDIR/sources/ld-tigcc
+rm -f $OUTDIR/sources/ld-tigcc/*.o $OUTDIR/sources/ld-tigcc/ar/*.o \
+      $OUTDIR/sources/ld-tigcc/ar/export/*.o $OUTDIR/sources/ld-tigcc/ar/import/*.o \
+      $OUTDIR/sources/ld-tigcc/bincode/*.o  $OUTDIR/sources/ld-tigcc/export/*.o \
+      $OUTDIR/sources/ld-tigcc/formats/*.o $OUTDIR/sources/ld-tigcc/import/*.o \
+      $OUTDIR/sources/ld-tigcc/insert/*.o $OUTDIR/sources/ld-tigcc/insert/model/*.o \
+      $OUTDIR/sources/ld-tigcc/ar-tigcc $OUTDIR/sources/ld-tigcc/ld-tigcc \
+      $OUTDIR/sources/ld-tigcc/link.dll
 
 echo Updating tprbuilder...
-rm -rf ../sources/tprbuilder/*
-cp -prf $TIGCCCVSDIR/tprbuilder/* ../sources/tprbuilder
-rm -rf ../sources/tprbuilder/CVS ../sources/tprbuilder/src/CVS
+rm -rf $OUTDIR/sources/tprbuilder
+cp -prf $TIGCCDIR/tprbuilder $OUTDIR/sources/tprbuilder
 
 
-# Other components in CVS
+# Other components
 echo Updating readme...
-rm -f ../README
-cp -pf $TIGCCCVSDIR/readme/Readme.txt ../README
+rm -f $OUTDIR/README
+cp -pf $TIGCCDIR/readme/Readme.txt $OUTDIR/README
 
-echo Updating ttpack...
-rm -rf ../sources/ttpack/*
-cp -prf $TIGCCCVSDIR/ttpack/* ../sources/ttpack
-rm -rf ../sources/ttpack/CVS
+echo Updating TI-68k developer utilities \(formerly TIGCC Tools Suite\)...
+rm -rf $OUTDIR/sources/tools
+cp -prf $TIGCCDIR/tools $OUTDIR/sources/tools
+rm -rf $OUTDIR/sources/tools/bin
 
-
-# Components out of CVS
 echo Updating lib...
-rm -rf ../tigcclib/lib/*
-cp -pf $TIGCCLIBDIR/tigcc.a $TIGCCLIBDIR/pstarter.o ../tigcclib/lib
+rm -rf $OUTDIR/tigcclib/lib
+mkdir $OUTDIR/tigcclib/lib
+cp -pf $TIGCCDIR/archive/tigcc.a $TIGCCDIR/archive/flashos.a \
+       $TIGCCDIR/starters/build/pstarter.o $OUTDIR/tigcclib/lib/
 
 echo Updating a68k...
-rm -rf ../sources/a68k/*
-cp -prf $A68KSRCDIR/* ../sources/a68k
-
+rm -rf $OUTDIR/sources/a68k
+mkdir -p $OUTDIR/sources/a68k
+cp -pf $A68KSRCDIR/* $OUTDIR/sources/a68k
 
-# Components in Linux/*nix CVS
+# Components in Linux/*nix
 echo Updating envreg...
-rm -rf ../sources/envreg/*
-cp -prf $TIGCCLINUXCVSDIR/sources/envreg/* ../sources/envreg
-rm -rf ../sources/envreg/CVS ../sources/envreg/src/CVS
+rm -rf $OUTDIR/sources/envreg
+cp -prf $TIGCCLINUXDIR/sources/envreg $OUTDIR/sources/envreg
 
 echo Updating patcher...
-rm -rf ../sources/patcher/*
-cp -prf $TIGCCLINUXCVSDIR/sources/patcher/* ../sources/patcher
-rm -rf ../sources/patcher/CVS ../sources/patcher/src/CVS
+rm -rf $OUTDIR/sources/patcher
+cp -prf $TIGCCLINUXDIR/sources/patcher $OUTDIR/sources/patcher
 
 echo Updating tigcc...
-rm -rf ../sources/tigcc/*
-cp -prf $TIGCCLINUXCVSDIR/sources/tigcc/* ../sources/tigcc
-rm -rf ../sources/tigcc/CVS ../sources/tigcc/src/CVS
+rm -rf $OUTDIR/sources/tigcc
+cp -prf $TIGCCLINUXDIR/sources/tigcc $OUTDIR/sources/tigcc
 
 echo Updating source directory list...
-cp -prf $TIGCCLINUXCVSDIR/sources/DIRECTORIES ../sources/
+cp -prf $TIGCCLINUXDIR/sources/DIRECTORIES $OUTDIR/sources/
 
 echo Updating text documentation...
-cp -prf $TIGCCLINUXCVSDIR/AUTHORS ../
-cp -prf $TIGCCLINUXCVSDIR/BUGS ../
-cp -prf $TIGCCLINUXCVSDIR/CHANGELOG ../
-cp -prf $TIGCCLINUXCVSDIR/COPYING ../
-cp -prf $TIGCCLINUXCVSDIR/DIRECTORIES ../
-cp -prf $TIGCCLINUXCVSDIR/HOWTO ../
-cp -prf $TIGCCLINUXCVSDIR/INSTALL ../
-cp -prf $TIGCCLINUXCVSDIR/README.linux ../
-cp -prf $TIGCCLINUXCVSDIR/README.osX ../
+cp -prf $TIGCCLINUXDIR/AUTHORS $OUTDIR/
+cp -prf $TIGCCLINUXDIR/BUGS $OUTDIR/
+cp -prf $TIGCCLINUXDIR/CHANGELOG $OUTDIR/
+cp -prf $TIGCCLINUXDIR/COPYING $OUTDIR/
+cp -prf $TIGCCLINUXDIR/DIRECTORIES $OUTDIR/
+cp -prf $TIGCCLINUXDIR/HOWTO $OUTDIR/
+cp -prf $TIGCCLINUXDIR/INSTALL $OUTDIR/
+cp -prf $TIGCCLINUXDIR/README.linux $OUTDIR/
+cp -prf $TIGCCLINUXDIR/README.osX $OUTDIR/
 
 echo Updating installation wizard...
-cp -prf $TIGCCLINUXCVSDIR/Install.sh ../
-chmod +x ../Install.sh
+cp -prf $TIGCCLINUXDIR/Install.sh $OUTDIR/
+chmod +x $OUTDIR/Install.sh
 
 echo Updating scripts...
-rm -rf ./*
-cp -prf $TIGCCLINUXCVSDIR/scripts/* .
-rm -rf CVS
-chmod +x [^S]*
+cp -prf $TIGCCLINUXDIR/scripts/ $OUTDIR/
+chmod +x $OUTDIR/scripts/[^S]*
 
 echo Done.

+ 4 - 4
tigcc-linux/sources/DIRECTORIES

@@ -1,13 +1,13 @@
 Directory list:
 
-a68k  envreg  gcc  ld-tigcc  patcher  tigcc  tprbuilder  ttpack
+a68k  envreg  gcc  ld-tigcc  patcher  tigcc  tools  tprbuilder
 
 - a68k: the assembler provided with Fargo (II)
 - envreg: a tool to register the current value of $TIGCC and the corresponding
-          $PATH entry into /etc/bashrc (when run as root) or ~/.bashrc (else)
-- gcc: TIGCC patches for binutils, binutils-geekgadgets and gcc
+          $PATH entry into /etc/bashrc (when run as root) or ~/.bashrc (otherwise)
+- gcc: TIGCC patches for binutils and gcc
 - ld-tigcc: the TIGCC linker
 - patcher: a program for applying patches on .s files
 - tigcc: the Linux equivalent of tigcc.exe
+- tools: the TI-68k Developer Utilities (formerly TIGCC Tools Suite)
 - tprbuilder: a program for building .tpr files (Tigcc PRoject).
-- ttpack: ExePack compression support from the TICT's TIGCC Tools Suite

+ 14 - 6
tigcc/doc/Programs/HelpSystem.ini

@@ -1,7 +1,15 @@
+;Example configuration:
+;SystemFolder=C:\doc\System [symlink to trunk/tigcc/doc/System]
+;SourceFolder=C:\doc [symlink to trunk/tigcc/doc]
+;DestFolder=C:\docfiles\CHMFiles [a folder initialized with the contents of trunk/tigcc/doc/System/CHMFiles]
+;WebFolder=C:\docfiles\WebFiles [a folder initialized with the contents of trunk/tigcc/doc/System/WebFiles]
+;IncludeFolder=C:\include\C [symlink to trunk/tigcc/include/C]
+;ExamplesFolder=C:\examples [symlink to trunk/tigcc/examples]
+
 [Folders]
-SystemFolder=E:\TI-89\tigcccvs\Doc\System
-SourceFolder=E:\TI-89\tigcccvs\Doc
-DestFolder=E:\TI-89\tigccdoc\CHMFiles
-WebFolder=E:\TI-89\tigccdoc\WebFiles
-IncludeFolder=E:\TI-89\tigcccvs\Include\C
-ExamplesFolder=E:\TI-89\tigcccvs\Examples
+SystemFolder=C:\doc\System
+SourceFolder=C:\doc
+DestFolder=C:\docfiles\CHMFiles
+WebFolder=C:\docfiles\WebFiles
+IncludeFolder=C:\include\C
+ExamplesFolder=C:\examples

BIN
tigcc/doc/converter/chm2dcf


+ 184 - 0
tigcc/doc/converter/chm2dcf.c

@@ -0,0 +1,184 @@
+/*
+   CHM2DCF - converter for HHC and HHK files used by the Microsoft CHM compiler
+             to a QT Assistant DCF file
+
+   Copyright (C) 2003-2004 Kevin Kofler
+
+   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, 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.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define fatal(s) ({fprintf(stderr,"Error: %s\n",s);exit(1);})
+
+int main(void)
+{
+  FILE *hhc,*hhk,*dcf;
+  char buffer[32768];
+  char **handledrefs=0;
+  int handledrefc=0;
+  int i;
+  const char *close="";
+  hhc=fopen("Contents.hhc","rt");
+  if (!hhc) fatal("Failed to open Contents.hhc.");
+  hhk=fopen("Index.hhk","rt");
+  if (!hhk) {fclose(hhc);fatal("Failed to open Index.hhk.");}
+  dcf=fopen("qt-assistant.dcf","wt");
+  if (!dcf) {fclose(hhc);fclose(hhk);fatal("Failed to open qt-assistant.dcf.");}
+  fputs("<!DOCTYPE DCF>\n<DCF ref=\"index.html\" category=\"development\" "
+        "title=\"TIGCC Documentation\">\n",dcf);
+  for (i=0;i<12;i++) fgets(buffer,32768,hhc); // skip 11 junk lines, read 12th
+                                              // line
+  while (buffer[strlen(buffer)-1]=='\r'||buffer[strlen(buffer)-1]=='\n')
+    buffer[strlen(buffer)-1]=0; // drop line ending characters
+  while (strcmp(buffer,"</BODY>")) {
+    if (!strcmp(buffer,"<LI> <OBJECT TYPE=\"TEXT/SITEMAP\">")) {
+      char title[32768],ref[32768];
+      fgets(buffer,32768,hhc); // get title
+      while (buffer[strlen(buffer)-1]=='\r'||buffer[strlen(buffer)-1]=='\n')
+        buffer[strlen(buffer)-1]=0; // drop line ending characters
+      if (strncmp(buffer,"<PARAM NAME=\"Name\" VALUE=\"",26)) goto junk;
+      strcpy(title,buffer+26);
+      if (strlen(title)<2||title[strlen(title)-1]!='>'
+          ||title[strlen(title)-2]!='\"') {
+        printf("Invalid title: %s\n",title);
+        goto junk;
+      }
+      title[strlen(title)-2]=0;
+      fgets(buffer,32768,hhc); // get ref
+      while (buffer[strlen(buffer)-1]=='\r'||buffer[strlen(buffer)-1]=='\n')
+        buffer[strlen(buffer)-1]=0; // drop line ending characters
+      if (!strcmp(buffer,"</OBJECT>")) {
+        fprintf(dcf,"%s<section ref=\"index.html\" title=\"%s\"",close,title);
+        close="/>\n";
+      } else {
+        char keywordref[32768];
+        int lineno;
+        if (strncmp(buffer,"<PARAM NAME=\"Local\" VALUE=\"",27)) goto junk;
+        strcpy(ref,buffer+27);
+        if (strlen(ref)<2||ref[strlen(ref)-1]!='>'
+            ||ref[strlen(ref)-2]!='\"') {
+          printf("Invalid ref: %s\n",ref);
+          goto junk;
+        }
+        ref[strlen(ref)-2]=0;
+        fgets(buffer,32768,hhc); // drop junk line
+        fprintf(dcf,"%s<section ref=\"%s\" title=\"%s\"",close,ref,title);
+        close="/>\n";
+        // skip keyword handling if we already had this URL
+        for (i=0;i<handledrefc;i++)
+          if (!strcmp(ref,handledrefs[i])) goto skipkwd;
+        // record this URL
+        handledrefs=realloc(handledrefs,(++handledrefc)*sizeof(char *));
+        handledrefs[handledrefc-1]=strdup(ref);
+        sprintf(keywordref,"<PARAM NAME=\"Local\" VALUE=\"%s",ref);
+        lineno=0;
+        fseek(hhk,0,SEEK_SET);
+        do {
+          char kwdref[32768],kwd[32768],fullkwd[32768];
+          int ullevel=0;
+          while(1) { // search for any keywords for this section
+            int tempullevel;
+            lineno++;
+            fgets(buffer,32768,hhk);
+            if (feof(hhk)) {lineno=0;break;}
+            if (!strncmp(buffer,"<UL>",4)) {ullevel++;continue;}
+            if (!strncmp(buffer,"</UL>",5)) {ullevel--;continue;}
+            while (buffer[strlen(buffer)-1]=='\r'||buffer[strlen(buffer)-1]=='\n')
+              buffer[strlen(buffer)-1]=0; // drop line ending characters
+            if (!strncmp(buffer,keywordref,strlen(keywordref))) { // keyword found
+              int goback=0;
+              strcpy(kwdref,buffer+27);
+              if (strlen(kwdref)<2||kwdref[strlen(kwdref)-1]!='>'
+                  ||kwdref[strlen(kwdref)-2]!='\"') {
+                printf("Invalid keyword ref: %s\n",kwdref);
+                kwdjunk:
+                fclose(hhc);
+                fclose(hhk);
+                fclose(dcf);
+                printf("Invalid line: %s\n",buffer);
+                fatal("Junk line in Index.hhk.");
+              }
+              kwdref[strlen(kwdref)-2]=0;
+              *fullkwd=0;
+              tempullevel=ullevel;
+              up2lines:
+              fseek(hhk,0,SEEK_SET); // search 2 lines higher for the title
+              goback+=2;
+              for (i=0;i<lineno-goback;i++) fgets(buffer,32768,hhk);
+              while (buffer[strlen(buffer)-1]=='\r'||buffer[strlen(buffer)-1]=='\n')
+                buffer[strlen(buffer)-1]=0; // drop line ending characters
+              if (!strncmp(buffer,"<PARAM NAME=\"Local\" VALUE=\"",27)) goto up2lines;
+              if (strncmp(buffer,"<PARAM NAME=\"Name\" VALUE=\"",26)) goto kwdjunk;
+              strcpy(kwd,buffer+26);
+              if (strlen(kwd)<2||kwd[strlen(kwd)-1]!='>'
+                  ||kwd[strlen(kwd)-2]!='\"') {
+                printf("Invalid keyword: %s\n",kwd);
+                goto kwdjunk;
+              }
+              kwd[strlen(kwd)-2]=0;
+              if (*fullkwd) {
+                memmove(fullkwd+strlen(kwd)+2,fullkwd,strlen(fullkwd)+1);
+                strncpy(fullkwd,kwd,strlen(kwd));
+                fullkwd[strlen(kwd)]=',';fullkwd[strlen(kwd)+1]=' ';
+              } else strcpy(fullkwd,kwd);
+              if (tempullevel>=2) {
+                // This is actually just a disambiguator, so we need to go up for the actual
+                // keyword.
+                fseek(hhk,0,SEEK_SET); // search 2 lines higher for <UL>
+                goback+=2;
+                for (i=0;i<lineno-goback;i++) fgets(buffer,32768,hhk);
+                if (!strncmp(buffer,"<UL>",4)) {goback+=2; tempullevel--; goto up2lines;}
+                while (1) { // We know there is an <UL> somewhere, so keep looking.
+                  fseek(hhk,0,SEEK_SET); // search 5 lines higher for <UL>
+                  goback+=5;
+                  for (i=0;i<lineno-goback;i++) fgets(buffer,32768,hhk);
+                  if (!strncmp(buffer,"<UL>",4)) {goback+=2; tempullevel--; goto up2lines;}
+                }
+              }
+              if (!strcmp(close,"/>\n")) fputs(">\n",dcf);
+              fprintf(dcf,"<keyword ref=\"%s\">%s</keyword>\n",kwdref,fullkwd);
+              close="</section>\n";
+              for (i=0;i<goback;i++) fgets(buffer,32768,hhk); // go back to the original line
+            }
+          }
+        } while (lineno);
+        skipkwd:;
+      }
+    } else if (!strcmp(buffer,"<UL>")) {
+      if (!strcmp(close,"</section>\n")) close=""; else close=">\n";
+    } else if (!strcmp(buffer,"</UL>")) {
+      fprintf(dcf,"%s",close);
+      close="</section>\n";
+    } else {
+      junk:
+      fclose(hhc);
+      fclose(hhk);
+      fclose(dcf);
+      printf("Invalid line: %s\n",buffer);
+      fatal("Junk line in Contents.hhc.");
+    }
+    fgets(buffer,32768,hhc); // read next line
+    while (buffer[strlen(buffer)-1]=='\r'||buffer[strlen(buffer)-1]=='\n')
+      buffer[strlen(buffer)-1]=0; // drop line ending characters
+  }
+  fputs("</DCF>\n",dcf);
+  fclose(hhc);
+  fclose(hhk);
+  fclose(dcf);
+  return 0;
+}

+ 32 - 0
tigcc/doc/converter/dcf2adp

@@ -0,0 +1,32 @@
+#!/bin/sh
+# DCF2ADP - converter for a QT Assistant 3.1 DCF file into a QT Assistant 3.2
+#           ADP file
+#
+# Copyright (C) 2003-2006 Kevin Kofler
+#
+# 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, 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.
+
+echo \<assistantconfig version=\"3.2.0\"\> >qt-assistant.adp
+echo \<profile\> >>qt-assistant.adp
+echo \<property name=\"name\"\>TIGCCDoc\</property\> >>qt-assistant.adp
+echo \<property name=\"title\"\>TIGCC Documentation\</property\> >>qt-assistant.adp
+#echo \<property name=\"applicationicon\"\>logo.png\</property\> >>qt-assistant.adp
+echo \<property name=\"startpage\"\>index.html\</property\> >>qt-assistant.adp
+#echo \<property name=\"aboutmenutext\"\>About Help\</property\> >>qt-assistant.adp
+#echo \<property name=\"abouturl\"\>../about.txt\</property\> >>qt-assistant.adp
+#echo \<property name=\"assistantdocs\"\>../../../doc/html\</property\> >>qt-assistant.adp
+echo \</profile\> >>qt-assistant.adp
+tail -n +2 qt-assistant.dcf >>qt-assistant.adp
+echo \</assistantconfig\> >>qt-assistant.adp

+ 20 - 0
tigcc/doc/converter/gcc4tidoc

@@ -0,0 +1,20 @@
+#!/bin/sh
+# GCC4TIDOC - View the GCC4TI documentation in QT Assistant 3.2
+#
+# Copyright (C) 2003 Kevin Kofler
+#
+# 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, 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.
+
+assistant -profile $TIGCC/doc/html/qt-assistant.adp || echo gcc4tidoc: error: QT Assistant 3.2 required

+ 19 - 19
tigcc/setup/CreateSourceZip.bat

@@ -1,19 +1,19 @@
-@ECHO OFF
-
-SET INFOZIPDIR=E:\zip\zip
-SET ZIPDIR=E:\TI-89\tigcc-096
-SET A68KSRCDIR=E:\TI-89\A68k\source
-
-MD a68k
-COPY "%A68KSRCDIR%\*.*" a68k
-
-DEL "%ZIPDIR%\tigccsrc.zip"
-CD ..\doc
-"%INFOZIPDIR%\zip.exe" -9 -r "doc.zip" Programs System -x CVS
-CD ..\setup
-"%INFOZIPDIR%\zip.exe" -9 -r "%ZIPDIR%\tigccsrc.zip" ..\Readme.txt ..\License.txt a68k ..\archive ..\components ..\doc\doc.zip ..\gcc ..\general ..\hsf2rc ..\ide ..\ld-tigcc ..\pstarter ..\setup\*.nsi ..\setup\*.ini ..\setup\*.bat ..\setup\*.sh ..\setup\makeall.pif ..\tigcc ..\tprbuilder ..\ttpack -x CVS
-DEL ..\doc\doc.zip
-
-DELTREE /Y a68k
-
-ECHO Finished.
+@ECHO OFF
+
+SET INFOZIPDIR=E:\zip\zip
+SET ZIPDIR=E:\TI-89\tigcc-096
+SET A68KSRCDIR=E:\TI-89\A68k\source
+
+MD a68k
+COPY "%A68KSRCDIR%\*.*" a68k
+
+DEL "%ZIPDIR%\tigccsrc.zip"
+CD ..\doc
+"%INFOZIPDIR%\zip.exe" -9 -r "doc.zip" Programs System -x .svn
+CD ..\setup
+"%INFOZIPDIR%\zip.exe" -9 -r "%ZIPDIR%\tigccsrc.zip" ..\Readme.txt ..\License.txt a68k ..\archive ..\components ..\doc\doc.zip ..\gcc ..\general ..\hsf2rc ..\ide ..\ld-tigcc ..\pstarter ..\setup\*.nsi ..\setup\*.ini ..\setup\*.bat ..\setup\*.sh ..\setup\makeall.pif ..\tigcc ..\tools ..\tprbuilder -x .svn
+DEL ..\doc\doc.zip
+
+DELTREE /Y a68k
+
+ECHO Finished.

+ 5 - 5
tigcc/setup/CreateSourceZip.sh

@@ -1,9 +1,9 @@
 #!/bin/bash
 
-ZIPDIR=`pwd`/../../tigcc-win32
-A68KSRCDIR=/e/TI-89/A68k/source
+ZIPDIR=`pwd`/../../../gcc4ti-source
+A68KSRCDIR=~/a68k/source
 
-rm -f "$ZIPDIR/tigccsrc.zip"
+rm -f "$ZIPDIR/gcc4tisrc.zip"
 mkdir srczip
 mkdir srczip/doc
 cp -rfp ../doc .
@@ -14,10 +14,10 @@ cd ..
 rm -rf doc
 mkdir srczip/a68k
 cp -p -f "$A68KSRCDIR"/* srczip/a68k/
-cp -rfp ../Readme.txt ../License.txt ../archive ../components ../gcc ../general ../hsf2rc ../ide ../ld-tigcc ../pstarter ../setup ../tigcc ../tprbuilder ../ttpack srczip/
+cp -rfp ../Readme.txt ../License.txt ../archive ../components ../gcc ../general ../hsf2rc ../ide ../ld-tigcc ../pstarter ../setup ../tigcc ../tools ../tprbuilder srczip/
 cd srczip
 find . -name CVS -exec rm -rf "{}" \;
-zip -9 -r "$ZIPDIR/tigccsrc.zip" Readme.txt License.txt a68k archive components doc/doc.zip gcc general hsf2rc ide ld-tigcc pstarter setup/*.nsi setup/*.ini setup/*.bat setup/*.sh setup/MAKEALL.PIF tigcc tprbuilder ttpack -x CVS/\*
+zip -9 -r "$ZIPDIR/gcc4tisrc.zip" Readme.txt License.txt a68k archive components doc/doc.zip gcc general hsf2rc ide ld-tigcc pstarter setup/*.nsi setup/*.ini setup/*.bat setup/*.sh setup/MAKEALL.PIF tigcc tools tprbuilder -x CVS/\*
 cd ..
 rm -rf srczip
 

+ 11 - 11
tigcc/setup/CreateZip.bat

@@ -1,11 +1,11 @@
-@ECHO OFF
-
-SET INFOZIPDIR=E:\zip\zip
-SET ZIPDIR=E:\TI-89\tigcc-096
-SET TIGCCCVSDIR=E:\TI-89\tigcccvs
-
-DEL "%ZIPDIR%\tigcc.zip"
-"%INFOZIPDIR%\zip.exe" -j -9 "%ZIPDIR%\tigcc.zip" "%TIGCCCVSDIR%\readme\Readme.txt" "%TIGCCCVSDIR%\License.txt" "Setup.exe"
-DEL Setup.exe
-
-ECHO Finished.
+@ECHO OFF
+
+SET INFOZIPDIR=E:\zip\zip
+SET ZIPDIR=E:\TI-89\tigcc-096
+SET TIGCCCVSDIR=E:\TI-89\tigcccvs
+
+DEL "%ZIPDIR%\tigcc.zip"
+"%INFOZIPDIR%\zip.exe" -j -9 "%ZIPDIR%\tigcc.zip" "%TIGCCCVSDIR%\readme\Readme.txt" "%TIGCCCVSDIR%\License.txt" "Setup.exe"
+DEL Setup.exe
+
+ECHO Finished.