Check-in [a319c993d9]
Overview
Comment:Updated to build Tcc naively
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a319c993d903aaf56c78dfaeb18746553a61b206
User & Date: rkeene on 2014-05-01 23:32:44
Other Links: manifest | tags
Context
2014-05-01
23:35
Corrected call to tcc configure check-in: 013ffc32d5 user: rkeene tags: trunk
23:32
Updated to build Tcc naively check-in: a319c993d9 user: rkeene tags: trunk
23:13
Updated to download TCC check-in: 2631d4cf7d user: rkeene tags: trunk
Changes

Modified Makefile.in from [0567345519] to [87dfad392f].

     1      1   CC = @CC@
     2      2   AR = @AR@
     3      3   RANLIB = @RANLIB@
     4      4   CFLAGS = @CFLAGS@ @SHOBJFLAGS@
     5         -CPPFLAGS = @CPPFLAGS@ -I@srcdir@ @DEFS@
            5  +CPPFLAGS = @CPPFLAGS@ -I@srcdir@ -I@srcdir@/tcc -Itcc @DEFS@
     6      6   LDFLAGS =
     7      7   SHOBJLDFLAGS = @SHOBJLDFLAGS@
     8      8   LIBS = @LIBS@
     9      9   INSTALL = @INSTALL@
    10     10   PACKAGE_NAME = @PACKAGE_NAME@
    11     11   PACKAGE_VERSION = @PACKAGE_VERSION@
    12     12   TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
    13     13   PACKAGE_INSTALL_DIR = $(TCL_PACKAGE_PATH)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
    14     14   TARGETS = @TARGETS@
    15     15   srcdir = @srcdir@
    16     16   
    17     17   all: $(TARGETS)
    18     18   
    19         -tcltcc.o: $(srcdir)/tcltcc.c
           19  +tcc/config.h:
           20  +	if [ "$(srcdir)" = "." ]; then
           21  +		cd tcc && ./configure
           22  +	else
           23  +		mkdir tcc >/dev/null 2>/dev/null || true
           24  +		cd tcc && $(shell cd $(srcdir) && pwd)/tcc/configure
           25  +	fi
           26  +
           27  +tcc/libtcc.a: tcc/config.h
           28  +	$(MAKE) -C tcc libtcc.a
           29  +
           30  +tcltcc.o: $(srcdir)/tcltcc.c $(srcdir)/tcc/tcc.h $(srcdir)/tcc/libtcc.h tcc/config.h
    20     31   	$(CC) $(CPPFLAGS) $(CFLAGS) -o tcltcc.o -c $(srcdir)/tcltcc.c
    21     32   
    22         -tcltcc-shared.@SHOBJEXT@: tcltcc.o
           33  +tcltcc-shared.@SHOBJEXT@: tcltcc.o tcc/libtcc.a
    23     34   	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SHOBJLDFLAGS) -o tcltcc-shared.@SHOBJEXT@ tcltcc.o $(LIBS)
    24     35   
    25         -tcltcc-static.a: tcltcc.o
    26         -	$(AR) rcu tcltcc-static.a tcltcc.o
    27         -	-$(RANLIB) tcltcc-static.a
           36  +tcltcc-static.a: tcltcc.o tcc/libtcc.a
           37  +	cp tcc/libtcc.a tcltcc-static.new.a
           38  +	$(AR) rcu tcltcc-static.new.a tcltcc.o
           39  +	-$(RANLIB) tcltcc-static.new.a
           40  +	mv tcltcc-static.new.a tcltcc-static.a
    28     41   
    29     42   install: $(TARGETS) pkgIndex.tcl
    30     43   	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
    31     44   	$(INSTALL) -m 0644 pkgIndex.tcl "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
    32     45   	$(INSTALL) -m 0755 $(TARGETS) "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
    33     46   
    34     47   clean:
    35     48   	rm -f tcltcc.o
    36     49   	rm -f tcltcc-shared.@SHOBJEXT@ tcltcc-static.a
    37     50   	rm -f tcltcc-shared.@SHOBJEXT@.a tcltcc-shared.@SHOBJEXT@.def
           51  +	-$(MAKE) -C tcc clean
    38     52   
    39     53   distclean: clean
    40     54   	rm -rf autom4te.cache
    41     55   	rm -f config.log config.status
    42     56   	rm -f pkgIndex.tcl
    43     57   	rm -f Makefile
           58  +	-$(MAKE) -C tcc distclean
    44     59   
    45     60   mrproper: distclean
    46     61   	rm -rf __TMP__
    47     62   	rm -rf tcc
    48     63   	rm -f configure aclocal.m4
    49     64   	rm -f config.guess config.sub install-sh
    50     65   
    51     66   .PHONY: all install clean distclean mrproper

Modified tcltcc.c from [f5d4fd88e2] to [07a867c26b].

    13     13    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    14     14    * Lesser General Public License for more details.
    15     15    *
    16     16    * You should have received a copy of the GNU Lesser General Public
    17     17    * License along with this library; if not, write to the Free Software
    18     18    * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    19     19    */
           20  +
           21  +#include <tcl.h>
           22  +#include "tcc.h"
    20     23   
    21     24   static void TccErrorFunc(Tcl_Interp * interp, char * msg) {
    22     25       Tcl_AppendResult(interp, msg, "\n", NULL);
    23     26   }
    24     27   
    25     28   
    26     29   static void TccCCommandDeleteProc (ClientData cdata) {