Browse Source

Build system: steps towards better build process automation and tests.
* add support for cross-compilation, mention it in the documentation (Lionel);
* abort on build failure (Patrick & Lionel);
* tests on OpenSolaris 2009.06, Ubuntu 9.04, FreeBSD 7.2, MacOS X.5, Fedora 8 & 11 (Lionel, Patrick, Matthieu, Manoel, Martial), which yields a string of fixes and improvements (mostly Lionel & Patrick).

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

debrouxl 15 years ago
parent
commit
c7edfed5b9

+ 56 - 23
tigcc-linux/INSTALL

@@ -2,8 +2,8 @@ HOW TO COMPILE AND INSTALL GCC4TI FROM SOURCE
 ============================================
 
 Please note: read README.linux first. The instructions below apply only to
-compiling and installing the whole package from source if you need to do that. I
-recommend installing from binaries if possible.
+compiling and installing the whole package from source. I recommend installing
+from binaries if possible.
 
 
 REQUIREMENTS
@@ -13,32 +13,40 @@ You must have the following programs before you attempt
 to install gcc4ti-unix.
 
 REQUIRED:
-	1. gcc 2.95 or later (other compilers might work, but are NOT supported)
+	1. GNU GCC 2.95 or later (other compilers might work, but are NOT supported)
+	   GNU GCC cross-compilers are supported.
 
-	2. binutils 2.8 or later (gnu or equivalent --
-	   ld, ar, as, etc.)
+	2. GNU binutils (ld, ar, as, etc.) 2.8 or later.
+	   Other binutils might work, but are NOT supported.
 
-	3. gnu patch (Solaris patch will NOT work)
+	3. GNU or BSD patch (Solaris patch will NOT work)
 
 	4. bzip2 (to decompress this archive)
 
-	5. tar (gnu tar is best, but Solaris and SGI should be okay)
+	5. tar (all of GNU, BSD and Solaris tar seem to be OK)
 
-	6. gnu make
+	6. GNU make (Solaris make will NOT work)
 
-	7. At least 130 MB of free space (archive expands to over 80,
-	build can take another 30-40 depending upon architecture)
+	7. GNU or BSD install (Solaris install will NOT work)
 
-	8. bison or yacc
+	8. At least 130 MB of free space (archive expands to over 80,
+	   build can take another 30-40 depending upon architecture)
 
-	9. flex
+	9. bison or yacc
+
+	10. flex
 
 OPTIONAL:
-	10. Windows or WINE to compile the documentation from source
+	11. Windows or Wine to compile the documentation from source
 	    (optional: the source distribution includes pre-generated HTML
 	    documentation)
 
-	11. A dialog executable (any of: kdialog, xdialog, gdialog, cdialog or
+	12. Wine or equivalent + binfmt-support with Wine registered, when
+	    cross-compiling, under a *nix host, executables running on Windows
+	    platforms. Without this (or something equivalent), `configure`
+	    aborts early, because the *nix host cannot run Windows executables.
+
+	13. A dialog executable (any of: kdialog, xdialog, gdialog, cdialog or
 	    dialog), if and only if you want to use the wizard (optional: the
 	    wizard now uses plain bash if no dialog executable is available)
 
@@ -93,9 +101,13 @@ to tell the script to use the text-mode (curses) dialog instead of kdialog.
 
 You will be prompted for:
 * the destination directory you want to install GCC4TI to ($TIGCC)
-* the bootstrap compiler ($CC) you want to compile GCC4TI with (usually "gcc")
+* the bootstrap compiler ($CC) you want to compile GCC4TI with (usually "gcc",
+  unless you're cross-compiling, e.g. with "i586-mingw32msvc-gcc").
 * the optimization flags ($CFLAGS) you want to compile GCC4TI with (read the GCC
   documentation or just use the defaults)
+* the host platform of the generated executables ($GCC4TIHOST), leave blank if
+  not cross-compiling. "i586-mingw32msvc" is a value that suits well when
+  CC=i586-mingw32msvc-gcc.
 
 The wizard will ask you whether you want to apply the GCC4TI patch. The answer is
 usually "Yes". It will be "No" only if you are rebuilding the same source for a
@@ -110,6 +122,16 @@ you can also run envreg by hand afterwards.)
 2. Use the install scripts directly
 -----------------------------------
 
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+WARNING: below, a number of places mention appending $TIGCC/bin to the path.
+We _really_ mean appending. This is because $TIGCC/bin contains "gcc" and "as" for
+m68k-coff target, and if $TIGCC/bin appears before /usr/bin in the PATH, the "gcc"
+and "as" in $TIGCC/bin would be used instead of the host system's executables...
+This is definitely not what you want.
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
 2.1. Environment variable settings
 ----------------------------------
 
@@ -170,10 +192,17 @@ files, so compiling it from source should usually not be necessary.)
 And run the installation script...
 
 	export CFLAGS='-Os -s'
+
+If cross-compiling or using another custom compiler for some reason, set the
+CC and GCC4TIHOST environment variables, e.g.
+	export CC=i586-mingw32msvc-gcc
+	export GCC4TIHOST=i586-mingw32msvc
+
+Then launch the installation procedure.
 	cd scripts; ./Install_All
 
 Assuming you have all the required tools, you should have yourself
-a GCC4TI build in 5 - 60 minutes.
+a GCC4TI build (except the Delphi executables) in 5 - 60 minutes.
 
 I hope this installation goes smoothly for you.
 
@@ -181,8 +210,8 @@ I hope this installation goes smoothly for you.
 -----------------------------------
 
 The following is the "hard" way to do step 2.2. It is used primarily for
-development purposes. You can use this if you experience some problems with the
-automated script.
+development purposes. You can use this if you experience some problems with
+the automated script.
 
 At first, you will have to register a variable depending on the location you
 want to install GCC4TI
@@ -196,6 +225,11 @@ Then you must apply the patch supplied with this package:
 
 	./Install_step_1
 
+If cross-compiling or using another custom compiler for some reason, set the
+CC and GCC4TIHOST environment variables, e.g.
+	export CC=i586-mingw32msvc-gcc
+	export GCC4TIHOST=i586-mingw32msvc
+
 Next, compile binutils and gcc. This may take a while...
 
 	./Install_step_2
@@ -205,12 +239,11 @@ compiler. For installing the TIGCC library, simply launch:
 
 	./Install_step_3
 
-If you want to be able to use it, you should add /usr/local/share/gcc4ti to
-your PATH. The compiler is named m68k-coff-gcc, to avoid namecollision with
-your system's gcc. The other utilities follow the same naming.
+If you want to be able to use the tigcc front-end and tprbuilder, you should
+append (not prepend !) $TIGCC/bin to your PATH.
 
 You need the TI-68k Developer Utilities (several are required for using the
-tigcc front-end). Simply do:
+tigcc front-end, most others are useful, well, utilities). Simply do:
 
 	./Install_step_4
 
@@ -264,4 +297,4 @@ cd ../html
 ../converter/dcf2adp # convert the DCF to an Assistant Document Profile (ADP)
 (There is also a script called updatedoc to automate the copying and
 converting of the documentation.)
-WARNING: chm2dcf is slooooow. You have been warned.
+WARNING: chm2dcf is slow (several minutes on a Core 2 @ 2 GHz).

+ 5 - 4
tigcc-linux/Install.sh

@@ -2,6 +2,7 @@
 # Install.sh - GCC4TI binary installation wizard
 #
 # Copyright (C) 2004-2005 Kevin Kofler
+# Copyright (C) 2009 Lionel Debroux
 #
 # 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
@@ -38,12 +39,12 @@ fi
 export TIGCC
 
 # Get current PWD.
-OLDPWD="`pwd`"
+PWDSAVE="`pwd`"
 
 # Unpack the binaries to the destination directory
 mkdir $TIGCC
 cd $TIGCC
-tar -x -j --no-same-owner --same-permissions -f "$OLDPWD/gcc4ti_bin.tar.bz2"
+tar -x -j --no-same-owner --same-permissions -f "$PWDSAVE/gcc4ti_bin.tar.bz2"
 
 # Now offer to install environment variables
 echo -n "Add environment settings (\$TIGCC, \$PATH) to bashrc [Y/n]? "
@@ -87,12 +88,12 @@ fi
 export TIGCC
 
 # Get current PWD.
-OLDPWD="`pwd`"
+PWDSAVE="`pwd`"
 
 # Unpack the binaries to the destination directory
 mkdir $TIGCC
 cd $TIGCC
-tar -x -j --no-same-owner --same-permissions -f "$OLDPWD/tigcc_bin.tar.bz2"
+tar -x -j --no-same-owner --same-permissions -f "$PWDSAVE/tigcc_bin.tar.bz2"
 
 # Now offer to install environment variables
 $DIALOG --title "GCC4TI Installation Wizard" --yesno "Add environment settings ($BACKSLASH\$TIGCC, $BACKSLASH\$PATH) to bashrc?" $DLGSIZE && { $TIGCC/bin/envreg; $DIALOG --title "GCC4TI Installation Wizard" --msgbox "Done. You must restart bash for the new environment settings to take effect." $DLGSIZE; exit 0; }

+ 1 - 1
tigcc-linux/README

@@ -1,5 +1,5 @@
 
-           GCC4TI Cross Compiler for the TI-89 and TI-92 Plus v0.96 Beta 9
+           GCC4TI Cross Compiler for the TI-89 and TI-92 Plus v0.96 Beta 10
           ================================================================
 (based on TIGCC v0.96 Beta 8 + CVS modifications)
 

+ 16 - 10
tigcc-linux/README.linux

@@ -4,7 +4,7 @@ LINUX/UNIX/OS X PLATFORM SPECIFIC NOTES FOR GCC4TI:
 Note
 ----
 
-	The current release SHOULD WORK on all Linux/Unix platforms, including
+	The current release SHOULD work on all Linux/Unix platforms, including
 	MacOS X.
 	Official binaries are provided ONLY for Linux/x86, so you will need to
 	compile GCC4TI from source on other platforms, unless an unofficial
@@ -19,10 +19,10 @@ Copyright of the port:
 
 	  TIGCC for Linux/Unix - GCC port targeting the TI89/89Ti/92+/V200
 	  Copyright (C) 2000 Henri Moilanen
-	  Copyright (C) 2001-2002 Romain Liévin
-	  Copyright (C) 2002-2005 Kevin Kofler
+	  Copyright (C) 2001-2009 Romain Liévin
+	  Copyright (C) 2002-2009 Kevin Kofler
 	  Some parts from John David Ratliff (TechnoPlaza tutorials)
-	  GCC4TI for Linux/Unix - GCC port targeting the TI89/89Ti/92+/V200
+	  GCC4TI for Linux/Unix - GCC port targeting the TI89/89T/92+/V200
 	  Copyright (C) 2008-2009 Lionel Debroux
 
 
@@ -55,12 +55,17 @@ History
 	since I always wanted it to be handled by someone of the TIGCC team, I
 	decided to take over the project. I am planning to work on getting it
 	to run again on platform/*nix combinations other than x86/Linux (now
-	achieved), and to implement all features known from the Win32 version
-	(IDE still missing, everything else done). See
-	http://tigcc.ticalc.org/linux/ for the current status of the project.
+	achieved), and to implement all features known from the Win32 version.
+	See http://tigcc.ticalc.org/linux/ for the current status of the project.
 
 	Lionel Debroux, Patrick Pelissier, Manoel Trapier:
-        This is the *nix version of GCC4TI.
+	This is the *nix version of GCC4TI.
+	Tested on various modern *nixes:
+	    * SimplyMEPIS 8 (~Debian Lenny);
+	    * Ubuntu 9.04;
+	    * OpenSolaris 2009.06;
+	    * FreeBSD 7.2;
+	    * MacOS X 10.5.
 
 
 Installation
@@ -108,7 +113,7 @@ Installation
 	you have those. If you use tcsh or csh, put it in your
 	.cshrc file (or if you use .tcshrc, put it there).
 
-	I've never used korn shell. You're on your own if you do.
+	Korn shell and Z-Shell are untested. You're on your own if you do.
 
 	For bash/sh users
 
@@ -138,7 +143,8 @@ Installation
 	Compiling and installing from source:
 	-------------------------------------
 
-	See the INSTALL file for instructions for building from source.
+	See the INSTALL file for instructions for building from source (this
+	includes cross-compilation).
 	Note that I recommend to use the binary release when possible though.
 
 

+ 34 - 11
tigcc-linux/scripts/Install

@@ -3,6 +3,8 @@
 # (created from TIGCC source installation wizard)
 #
 # Copyright (C) 2004 Kevin Kofler
+# Copyright (C) 2009 Lionel Debroux
+# Copyright (C) 2009 Patrick Pelissier
 #
 # 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
@@ -33,6 +35,8 @@ then TIGCC="/usr/local/share/gcc4ti"
 fi
 echo -n "Destination directory ($TIGCC): "
 read TIGCCnew
+# PpHd: use eval so that the user can enter e.g. $HOME/gcc4ti
+TIGCCnew=`eval echo "$TIGCCnew"`
 if [ ! -z "$TIGCCnew" ]
 then TIGCC="$TIGCCnew"
 fi
@@ -63,23 +67,30 @@ then CFLAGS="$CFLAGSnew"
 fi
 export CFLAGS
 
+echo -n "Host platform for the generated executables ($GCC4TIHOST), leave empty if not cross-compiling: "
+read GCC4TIHOSTnew
+if [ ! -z "$GCC4TIHOSTnew" ]
+then GCC4TIHOST="$GCC4TIHOSTnew"
+fi
+export GCC4TIHOST
+
 # Apply GCC4TI patch if desired
 echo -n "Apply GCC4TI patch [Y/n/c]? "
-read -n 1 ApplyGCC4TIPatch
+read ApplyGCC4TIPatch
 echo
-if [ "$ApplyGCC4TIPatch" = c -o "$ApplyGCC4TIPatch" = C ]
+if [ "x$ApplyGCC4TIPatch" = "xc" -o "x$ApplyGCC4TIPatch" = "xC" ]
 then { echo Install: Canceled by user; exit 1; }
 fi
-if [ -z "$ApplyGCC4TIPatch" -o "$ApplyGCC4TIPatch" = y -o "$ApplyGCC4TIPatch" = Y ]
-then ./Install_step_1
+if [ -z "$ApplyGCC4TIPatch" -o "x$ApplyGCC4TIPatch" = "xy" -o "x$ApplyGCC4TIPatch" = "xY" ]
+then ./Install_step_1 || { echo Patching failed; exit 1; }
 fi
 
 # Complete the installation
-./Install_All_nopatch
+./Install_All_nopatch || { echo Installation failed; exit 1; }
 
 # Now offer to install environment variables
 echo -n "Add environment settings (\$TIGCC, \$PATH) to bashrc [Y/n]? "
-read -n 1 AddEnvSettings
+read AddEnvSettings
 echo
 if [ -z "$AddEnvSettings" -o "$AddEnvSettings" = y -o "$AddEnvSettings" = Y ]
 then { $TIGCC/bin/envreg; echo "Done. You must restart bash for the new environment settings to take effect."; exit 0; }
@@ -113,7 +124,7 @@ if [ -z "$TIGCC" ]
 then TIGCC="/usr/local/share/gcc4ti"
 fi
 TIGCC="`$DIALOG --title "GCC4TI Installation Wizard" --inputbox "Destination directory:" $DLGSIZE $DASHDASH "$TIGCC"`"
-if [ $? != 0 ]
+if [ $? -ne 0 ]
 then { echo Install: Canceled by user; exit 1; }
 fi
 export TIGCC
@@ -121,7 +132,7 @@ if [ -z "$CC" ]
 then CC="gcc"
 fi
 CC="`$DIALOG --title "GCC4TI Installation Wizard" --inputbox "Bootstrap compiler:" $DLGSIZE $DASHDASH "$CC"`"
-if [ $? != 0 ]
+if [ $? -ne 0 ]
 then { echo Install: Canceled by user; exit 1; }
 fi
 export CC
@@ -136,16 +147,28 @@ if [ -z "$CFLAGS" ]
 then CFLAGS="-Os -s -fno-exceptions -fomit-frame-pointer"
 fi
 CFLAGS="`$DIALOG --title "GCC4TI Installation Wizard" --inputbox "Optimization flags:" $DLGSIZE $DASHDASH "$CFLAGS"`"
-if [ $? != 0 ]
+if [ $? -ne 0 ]
 then { echo Install: Canceled by user; exit 1; }
 fi
 export CFLAGS
 
+if [ -z "$GCC4TIHOST" ]
+then GCC4TIHOST="host"
+fi
+GCC4TIHOST="`$DIALOG --title "GCC4TI Installation Wizard" --inputbox "Host platform for the generated executables, enter 'host' if not cross-compiling:" $DLGSIZE $DASHDASH "$GCC4TIHOST"`"
+if [ $? -ne 0 ]
+then { echo Install: Canceled by user; exit 1; }
+fi
+if [ "x$GCC4TIHOST" = "xhost" ]
+then GCC4TIHOST=""
+fi
+export GCC4TIHOST
+
 # Apply GCC4TI patch if desired
-$DIALOG --title "GCC4TI Installation Wizard" --yesno "Apply GCC4TI patch?" $DLGSIZE && ./Install_step_1
+$DIALOG --title "GCC4TI Installation Wizard" --yesno "Apply GCC4TI patch?" $DLGSIZE && { ./Install_step_1 || { echo Patching failed; exit 1; } }
 
 # Complete the installation
-./Install_All_nopatch
+./Install_All_nopatch || { echo Installation failed; exit 1; }
 
 # Now offer to install environment variables
 $DIALOG --title "GCC4TI Installation Wizard" --yesno "Add environment settings ($BACKSLASH\$TIGCC, $BACKSLASH\$PATH) to bashrc?" $DLGSIZE && { $TIGCC/bin/envreg; $DIALOG --title "GCC4TI Installation Wizard" --msgbox "Done. You must restart bash for the new environment settings to take effect." $DLGSIZE; exit 0; }

+ 6 - 6
tigcc-linux/scripts/Install_All

@@ -1,11 +1,11 @@
 #! /bin/sh
 if [ -z $TIGCC ]
- then echo Install_All: error: \$TIGCC not defined;exit 1
+ then echo Install_All: error: \$TIGCC not defined; exit 1
 fi
 mkdir $TIGCC
+if [ "x$GCC4TIHOST" != "x" ]; then
+echo Compiling GCC4TI on custom host $GCC4TIHOST
+export GCC4TIHOST
+fi
 
-./Install_step_1
-./Install_step_2
-./Install_step_3
-./Install_step_4
-./Install_step_5
+(./Install_step_1 && ./Install_step_2 && ./Install_step_3 && ./Install_step_4 && ./Install_step_5) || exit 1;

+ 6 - 5
tigcc-linux/scripts/Install_All_nopatch

@@ -1,10 +1,11 @@
 #! /bin/sh
 if [ -z $TIGCC ]
- then echo Install_All_nopatch: error: \$TIGCC not defined;exit 1
+ then echo Install_All_nopatch: error: \$TIGCC not defined; exit 1
 fi
 mkdir $TIGCC
+if [ "x$GCC4TIHOST" != "x" ]; then
+echo Compiling GCC4TI on custom host $GCC4TIHOST
+export GCC4TIHOST
+fi
 
-./Install_step_2
-./Install_step_3
-./Install_step_4
-./Install_step_5
+(./Install_step_2 && ./Install_step_3 && ./Install_step_4 && ./Install_step_5) || exit 1;

+ 12 - 2
tigcc-linux/scripts/Install_step_1

@@ -3,6 +3,14 @@
 # Apply the patch to the original sources (download directory)
 #
 echo GCC4TI script: Applying patch to original sources...
+isos=`uname -a | grep "opensolaris"`
+if [ "x$isos" = "x" ]; then
+	#Assume GNU or BSD patch
+        patch=patch
+else
+        patch=gpatch
+fi
+
 cd ../download; 
 # Binutils
 echo Patching binutils...
@@ -28,7 +36,7 @@ rm -f -r ld
 rm -f -r opcodes/po
 rm -f -r texinfo
 echo Applying GCC4TI patch
-patch -p1 < ../../sources/gcc/gas-2.16-tigcc-patch.diff
+${patch} -p1 < ../../sources/gcc/gas-2.16-tigcc-patch.diff || exit 1
 cd ..
 # Gcc
 echo Patching GCC...
@@ -54,5 +62,7 @@ rm -f -r include/nlm
 rm -f -r include/regs
 rm -f -r texinfo
 echo Applying GCC4TI patch
-patch -p1 < ../../sources/gcc/gcc-4.1-tigcc-patch.diff
+${patch} -p1 < ../../sources/gcc/gcc-4.1-tigcc-patch.diff || exit 1
 echo Done.
+
+exit 0

+ 13 - 4
tigcc-linux/scripts/Install_step_2

@@ -3,8 +3,17 @@
 # This script completely configures, compiles and installs the patched tools.
 # The download tree must have been patched before doing this.
 #
-mkdir ../build; cd ../build; mkdir binutils; mkdir gcc;
-cd ../scripts; ./launch.binutils; ./launch.gcc;
-rm -Rf ../build
-cd ../scripts; ./launch.a68k; ./launch.ld-tigcc; ./launch.tigcc; ./launch.tprbuilder; ./launch.patcher; ./launch.envreg
+ORG_PWD=$PWD/..
+mkdir $ORG_PWD/build; cd $ORG_PWD/build; mkdir binutils; mkdir gcc;
+(cd $ORG_PWD/scripts && ./launch.binutils && ./launch.gcc) || exit 1
+rm -Rf $ORG_PWD/build
+if [ "x$GCC4TIHOST" != "x" ]; then
+echo Compiling GCC4TI on custom host $GCC4TIHOST.
+fi
+(cd $ORG_PWD/scripts && ./launch.a68k && ./launch.ld-tigcc &&
+./launch.tigcc && ./launch.tprbuilder && ./launch.patcher &&
+./launch.envreg) || exit 1
+
 rm -f $TIGCC/bin/parser
+
+exit 0

+ 5 - 5
tigcc-linux/scripts/Install_step_3

@@ -6,16 +6,16 @@
 #
 echo GCC4TI script: Installing TIGCCLIB...
 rm -Rf $TIGCC/include
-cp -Rf ../tigcclib/include  $TIGCC
-pushd $TIGCC/include/asm >/dev/null
+cp -Rf ../tigcclib/include $TIGCC/
 # only symlink if the file system is case sensitive
-if [ ! -f OS.h ]
-then ln -sf os.h OS.h
+if [ ! -f "$TIGCC/include/asm/OS.h" ]
+then ln -sf $TIGCC/include/asm/os.h $TIGCC/include/asm/OS.h
 fi
-popd >/dev/null
 rm -Rf $TIGCC/lib
 cp -Rf ../tigcclib/lib $TIGCC
 rm -Rf $TIGCC/examples
 cp -Rf ../tigcclib/examples $TIGCC
 
 #cd ../tigcclib/src; make; make clean; cp tigcc.a $TIGCC/include/c
+
+exit 0

+ 18 - 3
tigcc-linux/scripts/Install_step_4

@@ -1,9 +1,24 @@
-#!/bin/sh
+#! /bin/sh
 #
 # Install the TI-68k Developer Utilities
 #
 echo GCC4TI script: Compiling and installing the TI-68k Developer Utilities...
+isos=`uname -a | grep "opensolaris"`
+if [ "x$isos" = "x" ]; then
+	#Assume GNU or BSD install
+        install=install
+else
+        install=ginstall
+fi
+
 cd ../sources/tools/
-./buildall
-mv bin/* $TIGCC/bin
+if [ "x$GCC4TIHOST" != "x" ]; then
+echo Compiling TI-68k Developer Utilities on custom host $GCC4TIHOST.
+fi
+./buildall || exit 1
+${install} -d $TIGCC/bin || exit 1
+${install} bin/* $TIGCC/bin || exit 1
+./clean
 echo Done.
+
+exit 0

+ 27 - 16
tigcc-linux/scripts/Install_step_5

@@ -5,33 +5,44 @@
 #
 echo GCC4TI script: Installing GCC4TI documentation...
 
-mkdir $TIGCC/doc
-cd ..; cp AUTHORS BUGS CHANGELOG COPYING DIRECTORIES HOWTO INSTALL README README.linux README.osX $TIGCC/doc
+isos=`uname -a | grep "opensolaris"`
+if [ "x$isos" = "x" ]; then
+	#Assume GNU or BSD install
+        install=install
+else
+        install=ginstall
+fi
 
-mkdir $TIGCC/doc/a68k
-cd sources/a68k; cp Bugs.txt Doc.txt History.txt ToDo.txt $TIGCC/doc/a68k
+${install} -d $TIGCC/doc || exit 1
+cd ..; ${install} -m 644 AUTHORS BUGS CHANGELOG COPYING DIRECTORIES HOWTO INSTALL README README.linux README.osX $TIGCC/doc || exit 1
 
-mkdir $TIGCC/doc/tigcc
-cd ../tigcc; cp AUTHORS  COPYING  ChangeLog  README $TIGCC/doc/tigcc
+${install} -d $TIGCC/doc/a68k || exit 1
+cd sources/a68k; ${install} -m 644 Bugs.txt Doc.txt History.txt ToDo.txt $TIGCC/doc/a68k || exit 1
 
-mkdir $TIGCC/doc/tprbuilder
-cd ../tprbuilder; cp AUTHORS  COPYING  ChangeLog  README $TIGCC/doc/tprbuilder
+${install} -d $TIGCC/doc/tigcc || exit 1
+cd ../tigcc; ${install} -m 644 AUTHORS COPYING ChangeLog README $TIGCC/doc/tigcc || exit 1
+
+${install} -d $TIGCC/doc/tprbuilder || exit 1
+cd ../tprbuilder; ${install} -m 644 AUTHORS COPYING ChangeLog README $TIGCC/doc/tprbuilder || exit 1
 
 rm -Rf $TIGCC/doc/parser
 
-mkdir $TIGCC/doc/patcher
-cd ../patcher; cp AUTHORS  COPYING  ChangeLog  README $TIGCC/doc/patcher
+${install} -d $TIGCC/doc/patcher || exit 1
+cd ../patcher; ${install} -m 644 AUTHORS COPYING ChangeLog README $TIGCC/doc/patcher || exit 1
 
 rm -Rf $TIGCC/doc/html
 cd ../../tigcclib/doc; cp -Rf html $TIGCC/doc
 rm -Rf $TIGCC/doc/tigcclib
-pushd $TIGCC/doc >/dev/null
-ln -sf html tigcclib
-popd >/dev/null
-cp ../../tigcclib/doc/converter/gcc4tidoc $TIGCC/bin
-
+ln -sf $TIGCC/doc/html $TIGCC/doc/tigcclib
+iswin1=`echo $GCC4TIHOST | grep -E "msys|mingw|cygwin"`
+iswin2=`uname -a | grep -E "msys|mingw|cygwin"`
+if [ "x$iswin1" = "x" -a "x$iswin2" = "x" ]; then
+${install} ../../tigcclib/doc/converter/gcc4tidoc $TIGCC/bin || exit 1
+fi
 
 echo GCC4TI script: Creating GCC4TI projects folder...
-mkdir $TIGCC/projects
+${install} -d $TIGCC/projects || exit 1
 
 echo Done.
+
+exit 0

+ 25 - 5
tigcc-linux/scripts/launch.a68k

@@ -3,17 +3,37 @@
 # Compile and install the A68K assembler
 #
 
-isbsd=`uname | grep "BSD"`
-if [ "$isbsd" = "" ]; then
+isbsd=`uname -a | grep "BSD"`
+isos=`uname -a | grep "opensolaris"`
+if [ "x$isbsd" = "x" -a "x$isos" = "x" ]; then
 	#Assume GNU make
         make=make
 else
         make=gmake
 fi
+if [ "x$isos" = "x" ]; then
+	#Assume GNU or BSD install
+        install=install
+else
+        install=ginstall
+fi
 
 echo Installing a68k assembler...
-cd ../sources/a68k/
-${make} -e
-cp A68k $TIGCC/bin/a68k
+ORG_PWD=$PWD/..
+cd $ORG_PWD/sources/a68k/
+${make} -e || exit 1
+${install} -d $TIGCC/bin || exit 1
+iswin1=`echo $GCC4TIHOST | grep -E "msys|mingw|cygwin"`
+iswin2=`uname -a | grep -E "msys|mingw|cygwin"`
+if [ "x$iswin1" = "x" -a "x$iswin2" = "x" ]; then
+${install} A68k $TIGCC/bin/a68k || exit 1
+else
+${install} A68k $TIGCC/bin/a68k.exe || exit 1
+fi
 ${make} clean
+
+cd $ORG_PWD/scripts
+
 echo Done.
+
+exit 0

+ 33 - 10
tigcc-linux/scripts/launch.binutils

@@ -4,20 +4,33 @@
 # The tree must have been patched before doing this.
 #
 
-isbsd=`uname | grep "BSD"`
-if [ "$isbsd" = "" ]; then
+isbsd=`uname -a | grep "BSD"`
+isos=`uname -a | grep "opensolaris"`
+if [ "x$isbsd" = "x" -a "x$isos" = "x" ]; then
 	#Assume GNU make
         make=make
 else
         make=gmake
 fi
+if [ "x$isos" = "x" ]; then
+	#Assume GNU or BSD install
+        install=install
+else
+        install=ginstall
+fi
 
 echo GCC4TI script: Configuring, compiling and installing binutils...
-mkdir ../build; mkdir ../build/binutils;
-cd ../build/binutils; ../../download/binutils.ti/configure --disable-serial-configure --prefix=$TIGCC --target=m68k-coff --disable-shared --enable-static --disable-multilib --disable-nls --disable-win32-registry
+ORG_PWD=$PWD/..
+mkdir $ORG_PWD/build; cd $ORG_PWD/build; mkdir binutils; cd binutils
+if [ "x$GCC4TIHOST" = "x" ]; then
+../../download/binutils.ti/configure --disable-serial-configure --prefix=$TIGCC --target=m68k-coff --disable-shared --enable-static --disable-multilib --disable-nls --disable-win32-registry
+else
+echo Compiling GCC4TI binutils on custom host $GCC4TIHOST
+../../download/binutils.ti/configure --disable-serial-configure --prefix=$TIGCC --target=m68k-coff --disable-shared --enable-static --disable-multilib --disable-nls --disable-win32-registry --host=$GCC4TIHOST
+fi
 
-if [ $? -ne 0 ]
-    then echo "GCC4TI script: Error while configuring"
+if [ $? -ne 0 ]; then
+    echo "GCC4TI script: Error while configuring binutils"
     exit 1
 fi
 
@@ -68,12 +81,22 @@ echo all: >gas/po/Makefile
 
 #Now this one should really work...
 ${make}
-if [ $? -ne 0 ]
-    then echo "GCC4TI script: Error while making"
+if [ $? -ne 0 ]; then
+    echo "GCC4TI script: Error while making binutils"
     exit 2
 fi
 
-mkdir $TIGCC/bin/
-cp gas/as-new $TIGCC/bin/as
+${install} -d $TIGCC/bin/ || exit 1
+iswin1=`echo $GCC4TIHOST | grep -E "msys|mingw|cygwin"`
+iswin2=`uname -a | grep -E "msys|mingw|cygwin"`
+if [ "x$iswin1" = "x" -a "x$iswin2" = "x" ]; then
+${install} gas/as-new $TIGCC/bin/as || exit 1
+else
+${install} gas/as-new.exe $TIGCC/bin/as.exe || exit 1
+fi
+
+cd $ORG_PWD/scripts
 
 echo Done.
+
+exit 0

+ 25 - 5
tigcc-linux/scripts/launch.envreg

@@ -3,17 +3,37 @@
 # Compile and install the GCC4TI environment registrator
 #
 
-isbsd=`uname | grep "BSD"`
-if [ "$isbsd" = "" ]; then
+isbsd=`uname -a | grep "BSD"`
+isos=`uname -a | grep "opensolaris"`
+if [ "x$isbsd" = "x" -a "x$isos" = "x" ]; then
 	#Assume GNU make
         make=make
 else
         make=gmake
 fi
+if [ "x$isos" = "x" ]; then
+	#Assume GNU or BSD install
+        install=install
+else
+        install=ginstall
+fi
+
+iswin1=`echo $GCC4TIHOST | grep -E "msys|mingw|cygwin"`
+iswin2=`uname -a | grep -E "msys|mingw|cygwin"`
+if [ "x$iswin1" = "x" -a "x$iswin2" = "x" ]; then
 
 echo Installing GCC4TI environment registrator...
-cd ../sources/envreg/src/
-${make} -e
-cp envreg $TIGCC/bin
+ORG_PWD=$PWD/..
+cd $ORG_PWD/sources/envreg/src/
+${make} -e || exit 1
+${install} -d $TIGCC/bin || exit 1
+${install} envreg $TIGCC/bin || exit 1
 ${make} clean
+
+cd $ORG_PWD/scripts
+
 echo Done.
+
+fi
+
+exit 0

+ 34 - 10
tigcc-linux/scripts/launch.gcc

@@ -4,13 +4,20 @@
 # The tree must have been patched before doing this.
 #
 
-isbsd=`uname | grep "BSD"`
-if [ "$isbsd" = "" ]; then
+isbsd=`uname -a | grep "BSD"`
+isos=`uname -a | grep "opensolaris"`
+if [ "x$isbsd" = "x" -a "x$isos" = "x" ]; then
 	#Assume GNU make
         make=make
 else
         make=gmake
 fi
+if [ "x$isos" = "x" ]; then
+	#Assume GNU or BSD install
+        install=install
+else
+        install=ginstall
+fi
 
 echo GCC4TI script: Configuring, compiling and installing gcc...
 
@@ -19,11 +26,17 @@ export CFLAGS_FOR_BUILD
 CC_FOR_BUILD="$CC"
 export CC_FOR_BUILD
 
-mkdir ../build; mkdir ../build/gcc;
-cd ../build/gcc; ../../download/gcc.ti/configure --prefix=$TIGCC --target=m68k-coff --with-gnu-as --disable-nls --disable-multilib --disable-shared --enable-static --disable-threads --disable-win32-registry --disable-checking --disable-werror --disable-pch --disable-mudflap --disable-libssp
+ORG_PWD=$PWD/..
+mkdir $ORG_PWD/build; cd $ORG_PWD/build; mkdir gcc; cd gcc
+if [ "x$GCC4TIHOST" = "x" ]; then
+../../download/gcc.ti/configure --prefix=$TIGCC --target=m68k-coff --with-gnu-as --disable-nls --disable-multilib --disable-shared --enable-static --disable-threads --disable-win32-registry --disable-checking --disable-werror --disable-pch --disable-mudflap --disable-libssp
+else
+echo Compiling GCC4TI gcc on custom host $GCC4TIHOST
+../../download/gcc.ti/configure --prefix=$TIGCC --target=m68k-coff --with-gnu-as --disable-nls --disable-multilib --disable-shared --enable-static --disable-threads --disable-win32-registry --disable-checking --disable-werror --disable-pch --disable-mudflap --disable-libssp --host=$GCC4TIHOST
+fi
 
-if [ $? -ne 0 ]
-    then echo "GCC4TI script: Error while configuring GCC"
+if [ $? -ne 0 ]; then
+    echo "GCC4TI script: Error while configuring GCC"
     exit 1
 fi
 
@@ -31,7 +44,7 @@ fi
 #This keeps us from patching the generated makefile in advance.
 #So we have to call make 3 times to get it to work with our removed directories.
 
-${make}
+CC=$CC ${make}
 echo You should have seen an error. This is normal. GCC4TI installation continues.
 
 # Create dummy libiberty testsuite makefile
@@ -51,8 +64,19 @@ echo You should have seen an error. This is normal. GCC4TI installation continue
 cd ../../scripts
 
 # Finish gcc installation
-mkdir $TIGCC/bin/
-cp ../build/gcc/gcc/cc1  $TIGCC/bin/
-cp ../build/gcc/gcc/xgcc $TIGCC/bin/gcc
+${install} -d $TIGCC/bin/ || exit 1
+iswin1=`echo $GCC4TIHOST | grep -E "msys|mingw|cygwin"`
+iswin2=`uname -a | grep -E "msys|mingw|cygwin"`
+if [ "x$iswin1" = "x" -a "x$iswin2" = "x" ]; then
+${install} ../build/gcc/gcc/cc1  $TIGCC/bin/ || exit 1
+${install} ../build/gcc/gcc/xgcc $TIGCC/bin/gcc || exit 1
+else
+${install} ../build/gcc/gcc/cc1.exe  $TIGCC/bin/ || exit 1
+${install} ../build/gcc/gcc/xgcc.exe $TIGCC/bin/gcc.exe || exit 1
+fi
+
+cd $ORG_PWD/scripts
 
 echo Done.
+
+exit 0

+ 43 - 6
tigcc-linux/scripts/launch.ld-tigcc

@@ -3,16 +3,24 @@
 # Compile and install the GCC4TI linker
 #
 
-isbsd=`uname | grep "BSD"`
-if [ "$isbsd" = "" ]; then
+isbsd=`uname -a | grep "BSD"`
+isos=`uname -a | grep "opensolaris"`
+if [ "x$isbsd" = "x" -a "x$isos" = "x" ]; then
 	#Assume GNU make
         make=make
 else
         make=gmake
 fi
+if [ "x$isos" = "x" ]; then
+	#Assume GNU or BSD install
+        install=install
+else
+        install=ginstall
+fi
 
 echo Installing GCC4TI linker...
-cd ../sources/ld-tigcc
+ORG_PWD=$PWD/..
+cd $ORG_PWD/sources/ld-tigcc
 
 # OS X requires a switch to enable nested functions. ld-tigcc doesn't actually
 # require an executable stack, but Apple's compiler is not clever enough to
@@ -27,8 +35,37 @@ if $CC -v --help 2>/dev/null | grep fnested-functions >/dev/null
 then export CFLAGS="$CFLAGS -fnested-functions"
 fi
 
-${make} -e
-cp ld-tigcc $TIGCC/bin
-cp ar-tigcc $TIGCC/bin
+linkdll=
+iswin1=`echo $GCC4TIHOST | grep -E "msys|mingw|cygwin"`
+iswin2=`uname -a | grep -E "msys|mingw|cygwin"`
+if [ "x$iswin1" != "x" -o "x$iswin2" != "x" ]; then
+linkdll="link.dll"
+fi
+
+${make} -e all ${linkdll} || exit 1
+${install} -d $TIGCC/bin || exit 1
+iswin1=`echo $GCC4TIHOST | grep -E "msys|mingw|cygwin"`
+iswin2=`uname -a | grep -E "msys|mingw|cygwin"`
+if [ "x$iswin1" = "x" -a "x$iswin2" = "x" ]; then
+${install} ld-tigcc $TIGCC/bin || exit 1
+${install} ar-tigcc $TIGCC/bin || exit 1
+else
+if [ -f "ld-tigcc.exe" ]; then
+${install} ld-tigcc.exe $TIGCC/bin || exit 1
+else
+${install} ld-tigcc $TIGCC/bin/ld-tigcc.exe || exit 1
+fi
+if [ -f "ar-tigcc.exe" ]; then
+${install} ar-tigcc.exe $TIGCC/bin || exit 1
+else
+${install} ar-tigcc $TIGCC/bin/ar-tigcc.exe || exit 1
+fi
+${install} link.dll $TIGCC/bin || exit 1
+fi
 ${make} clean
+
+cd $ORG_PWD/scripts
+
 echo Done.
+
+exit 0

+ 25 - 5
tigcc-linux/scripts/launch.patcher

@@ -3,17 +3,37 @@
 # Compile and install the GCC4TI patcher
 #
 
-isbsd=`uname | grep "BSD"`
-if [ "$isbsd" = "" ]; then
+isbsd=`uname -a | grep "BSD"`
+isos=`uname -a | grep "opensolaris"`
+if [ "x$isbsd" = "x" -a "x$isos" = "x" ]; then
 	#Assume GNU make
         make=make
 else
         make=gmake
 fi
+if [ "x$isos" = "x" ]; then
+	#Assume GNU or BSD install
+        install=install
+else
+        install=ginstall
+fi
+
+iswin1=`echo $GCC4TIHOST | grep -E "msys|mingw|cygwin"`
+iswin2=`uname -a | grep -E "msys|mingw|cygwin"`
+if [ "x$iswin1" = "x" -a "x$iswin2" = "x" ]; then
 
 echo Installing GCC4TI patcher...
-cd ../sources/patcher/src/
-${make} -e
-cp patcher $TIGCC/bin
+ORG_PWD=$PWD/..
+cd $ORG_PWD/sources/patcher/src/
+${make} -e || exit 1
+${install} -d $TIGCC/bin || exit 1
+${install} patcher $TIGCC/bin || exit 1
 ${make} clean
+
+cd $ORG_PWD/scripts
+
 echo Done.
+
+fi
+
+exit 0

+ 25 - 5
tigcc-linux/scripts/launch.tigcc

@@ -3,17 +3,37 @@
 # Compile and install the GCC4TI front-end
 #
 
-isbsd=`uname | grep "BSD"`
-if [ "$isbsd" = "" ]; then
+isbsd=`uname -a | grep "BSD"`
+isos=`uname -a | grep "opensolaris"`
+if [ "x$isbsd" = "x" -a "x$isos" = "x" ]; then
 	#Assume GNU make
         make=make
 else
         make=gmake
 fi
+if [ "x$isos" = "x" ]; then
+	#Assume GNU or BSD install
+        install=install
+else
+        install=ginstall
+fi
+
+iswin1=`echo $GCC4TIHOST | grep -E "msys|mingw|cygwin"`
+iswin2=`uname -a | grep -E "msys|mingw|cygwin"`
+if [ "x$iswin1" = "x" -a "x$iswin2" = "x" ]; then
 
 echo Installing GCC4TI front-end...
-cd ../sources/tigcc/src/
-${make} -e
-cp tigcc $TIGCC/bin
+ORG_PWD=$PWD/..
+cd $ORG_PWD/sources/tigcc/src/
+${make} -e || exit 1
+${install} -d $TIGCC/bin || exit 1
+${install} tigcc $TIGCC/bin || exit 1
 ${make} clean
+
+cd $ORG_PWD/scripts
+
 echo Done.
+
+fi
+
+exit 0

+ 29 - 5
tigcc-linux/scripts/launch.tprbuilder

@@ -3,17 +3,41 @@
 # Compile and install the TIGCC project builder
 #
 
-isbsd=`uname | grep "BSD"`
-if [ "$isbsd" = "" ]; then
+isbsd=`uname -a | grep "BSD"`
+isos=`uname -a | grep "opensolaris"`
+if [ "x$isbsd" = "x" -a "x$isos" = "x" ]; then
 	#Assume GNU make
         make=make
 else
         make=gmake
 fi
+if [ "x$isos" = "x" ]; then
+	#Assume GNU or BSD install
+        install=install
+else
+        install=ginstall
+fi
 
 echo Installing GCC4TI project builder...
-cd ../sources/tprbuilder/src/
-${make} -e
-cp tprbuilder $TIGCC/bin
+ORG_PWD=$PWD/..
+cd $ORG_PWD/sources/tprbuilder/src/
+${make} -e || exit 1
+${install} -d $TIGCC/bin || exit 1
+iswin1=`echo $GCC4TIHOST | grep -E "msys|mingw|cygwin"`
+iswin2=`uname -a | grep -E "msys|mingw|cygwin"`
+if [ "x$iswin1" = "x" -a "x$iswin2" = "x" ]; then
+${install} tprbuilder $TIGCC/bin || exit 1
+else
+if [ -f "tprbuilder.exe" ]; then
+${install} tprbuilder.exe $TIGCC/bin || exit 1
+else
+${install} tprbuilder $TIGCC/bin/tprbuilder.exe || exit 1
+fi
+fi
 ${make} clean
+
+cd $ORG_PWD/scripts
+
 echo Done.
+
+exit 0

+ 3 - 3
tigcc-linux/scripts/package_bin

@@ -12,10 +12,10 @@ echo GCC4TI script: Packaging binaries:
 echo clamscan...
 clamscan -ir $TIGCC
 echo tar...
-OLDPWD="`pwd`"
+PWDSAVE="`pwd`"
 cd $TIGCC
-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"
+tar -c --exclude=projects/* --exclude=bin/quill.drv --exclude=lib/quill.drv --exclude=lib/fargo.a -f "$PWDSAVE/$OUTDIR/gcc4ti_bin.tar" bin doc examples include lib projects
+cd "$PWDSAVE/$OUTDIR"
 echo bzip2...
 rm -f gcc4ti_bin.tar.bz2
 bzip2 -9 gcc4ti_bin.tar

+ 6 - 6
tigcc-linux/scripts/updatedoc

@@ -6,7 +6,7 @@
 TIGCCDIR=../../tigcc
 WINDOCDIR=~/.wine/drive_c/docfiles/
 OUTDIR=../gcc4ti-sources
-WINE=~/wine/wine
+WINE=wine
 
 mkdir -p $OUTDIR/tigcclib/doc/html
 
@@ -22,12 +22,12 @@ $WINE $TIGCCDIR/doc/Programs/Update/UpdateIndex.exe
 
 echo Creating documentation source tarball...
 rm -f $OUTDIR/tigcclib/doc/source.tar.bz2
-OLDPWD=`pwd`
+PWDSAVE=`pwd`
 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
+tar -c --exclude='*/.[sS][vV][nN]' -f $PWDSAVE/$OUTDIR/tigcclib/doc/source.tar Programs System
+bzip2 -9 $PWDSAVE/$OUTDIR/tigcclib/doc/source.tar
+cp -R converter $PWDSAVE/$OUTDIR/tigcclib/doc/
+cd $PWDSAVE
 
 echo Copying documentation files...
 echo -n .

+ 1 - 1
tigcc/ld-tigcc/Makefile

@@ -69,7 +69,7 @@ $(LINK_DLL): $(DLL_OBJECTS) $(DLL_AR_OBJECTS)
 	$(CC) -shared --dll $(CFLAGS) $(ARCHFLAGS) $(DLL_OBJECTS) $(DLL_AR_OBJECTS) -o $@
 
 clean:
-	-$(RM) $(RMFLAGS) $(OBJECTS) $(AR_OBJECTS) $(DLL_OBJECTS) $(DLL_AR_OBJECTS) $(ALL_TARGETS)
+	-$(RM) $(RMFLAGS) $(OBJECTS) $(AR_OBJECTS) $(DLL_OBJECTS) $(DLL_AR_OBJECTS) $(LD_TIGCC) $(AR_TIGCC) $(LINK_DLL)
 
 clean_backups:
 	-$(RM) $(RMFLAGS) $(BACKUPS)

+ 5 - 0
tigcc/tools/buildall

@@ -2,4 +2,9 @@
 for a in ttbin2hex ttbin2oth ttbin2str ttextract ttstrip ttarchive ttpack ttunpack tthelp ttinfo ttchecksum ttbin2bin ttsplit ttppggen tttiler ttunarchive tthex2bin ttsetname ; # ttdos2ebk ttebkgen ttunebk
 do
 ./buildone $a
+if [ $? -ne 0 ]; then
+exit 1;
+fi
 done
+
+exit 0

+ 6 - 3
tigcc/tools/buildone

@@ -17,7 +17,7 @@ echo CC environment variable not defined, assuming CC=gcc
 CC=gcc
 fi
 
-if [ -z "`$CC --version | grep mingw`" ] ; then
+if [ -z "`$CC --version | grep mingw`" -a -z "`$CC --version | grep msys`" -a -z "`$CC --version | grep cygwin`" ] ; then
 out=$1
 else
 out=$1.exe
@@ -26,12 +26,13 @@ fi
 echo compiling $1 to $out...
 $CC -Os -Wall -W -Wp,-D_FORTIFY_SOURCE=2 -s -o $out $1.c
 if [ $? -ne 0 ] ; then
+echo compilation failed
 exit 1
 fi
 
-if [ -n `which upx` ] ; then
+if [ type upx >/dev/null 2>/dev/null ] ; then
 echo compressing file
-upx --best $out &>/dev/null
+upx --best $out >/dev/null 2>/dev/null
 else
 echo compression skipped
 fi
@@ -41,3 +42,5 @@ echo moving executable ...
 mkdir -p bin
 mv $out bin/
 fi
+
+exit 0

+ 1 - 6
tigcc/tools/buildone.bat

@@ -13,14 +13,9 @@ REM at the end of the batch script the final executable is moved into
 REM the calctools bin directory
 REM --------------------------------------------------------------------
 echo compiling %1 ...
-lcc -O %1.c
+gcc %1.c -o %1.exe
 @IF ERRORLEVEL 1 goto failed
 
-echo linking %1 ...
-lcclnk %1.obj
-@IF ERRORLEVEL 1 goto failed
-del %1.obj
-
 start /min /wait upx -9 %1.exe > nul
 @IF ERRORLEVEL 1 goto skipped
 goto notskipped

+ 2 - 0
tigcc/tools/clean

@@ -0,0 +1,2 @@
+#!/bin/sh
+rm bin/*

+ 1 - 0
tigcc/tools/clean.bat

@@ -0,0 +1 @@
+del bin/*