Tcl examples now run during 'make check' and makefile tidyup.

This commit is contained in:
William S Fulton 2013-04-13 23:33:19 +01:00
commit 3489d0db32
16 changed files with 96 additions and 74 deletions

View file

@ -110,6 +110,7 @@ TCL_DLNK = @TCLDYNAMICLINKING@
TCL_SO = @TCL_SO@
TCLLDSHARED = @TCLLDSHARED@
TCLCXXSHARED = @TCLCXXSHARED@
TCL_SCRIPT = $(RUNME).tcl
# -----------------------------------------------------------
# Build a new version of the tclsh shell
@ -159,6 +160,13 @@ tcl_cpp: $(SRCS)
$(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE)
$(TCLCXXSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(TCL_SO)
# -----------------------------------------------------------------
# Run Tcl example
# -----------------------------------------------------------------
tcl_run:
$(RUNTOOL) $(TCLSH) $(TCL_SCRIPT) $(RUNPIPE)
# -----------------------------------------------------------------
# Version display
# -----------------------------------------------------------------

View file

@ -5,15 +5,16 @@ TARGET = example
INTERFACE = example.i
LIBS = -lm
all::
check: build
$(MAKE) -f $(TOP)/Makefile tcl_run
build:
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tcl_cpp
static::
static:
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mytclsh' INTERFACE='$(INTERFACE)' tclsh_cpp_static
clean::
clean:
$(MAKE) -f $(TOP)/Makefile tcl_clean
check: all

View file

@ -5,15 +5,16 @@ TARGET = my_tclsh
DLTARGET = example
INTERFACE = example.i
all::
check: build
$(MAKE) -f $(TOP)/Makefile tcl_run
build:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl
static::
static:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh
clean::
clean:
$(MAKE) -f $(TOP)/Makefile tcl_clean
check: all

View file

@ -6,15 +6,16 @@ DLTARGET = example
INTERFACE = example.i
SWIGOPT =
all::
check: build
$(MAKE) -f $(TOP)/Makefile tcl_run
build:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl
static::
static:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh
clean::
clean:
$(MAKE) -f $(TOP)/Makefile tcl_clean
check: all

View file

@ -5,15 +5,16 @@ TARGET = example
INTERFACE = example.i
LIBS = -lm
all::
check: build
$(MAKE) -f $(TOP)/Makefile tcl_run
build:
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tcl_cpp
static::
static:
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mytclsh' INTERFACE='$(INTERFACE)' tclsh_cpp_static
clean::
clean:
$(MAKE) -f $(TOP)/Makefile tcl_clean
check: all

View file

@ -5,15 +5,16 @@ TARGET = my_tclsh
DLTARGET = example
INTERFACE = example.i
all::
check: build
$(MAKE) -f $(TOP)/Makefile tcl_run
build:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl
static::
static:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh
clean::
clean:
$(MAKE) -f $(TOP)/Makefile tcl_clean
check: all

View file

@ -3,7 +3,10 @@ SWIG = $(TOP)/../preinst-swig
SWIGOPT =
LIBS =
all::
check: build
$(MAKE) -f $(TOP)/Makefile tcl_run
build:
$(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='base' INTERFACE='base.i' tcl_cpp
$(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
@ -14,7 +17,5 @@ all::
LIBS='$(LIBS)' TARGET='spam' INTERFACE='spam.i' tcl_cpp
clean::
clean:
$(MAKE) -f $(TOP)/Makefile tcl_clean
check: all

View file

@ -5,18 +5,18 @@ TARGET = example
INTERFACE = example.i
LIBS = -lm
all:: Example.class
check: build
$(MAKE) -f $(TOP)/Makefile tcl_run
build: Example.class
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' CXX="gcj" \
TCL_CXXSHARED="gcj -fpic -shared Example.class " LIBS="-lstdc++" DEFS='' tcl_cpp
clean::
clean:
$(MAKE) -f $(TOP)/Makefile tcl_clean
rm -f *.class Example.h
check: all
run:
tclsh runme.tcl

View file

@ -5,15 +5,16 @@ TARGET = my_tclsh
DLTARGET = example
INTERFACE = example.i
all::
check: build
$(MAKE) -f $(TOP)/Makefile tcl_run
build:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl
static::
static:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh
clean::
clean:
$(MAKE) -f $(TOP)/Makefile tcl_clean
check: all

View file

@ -5,15 +5,16 @@ TARGET = example
INTERFACE = example.i
LIBS = -lm
all::
check: build
$(MAKE) -f $(TOP)/Makefile tcl_run
build:
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tcl_cpp
static::
static:
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mytclsh' INTERFACE='$(INTERFACE)' tclsh_cpp_static
clean::
clean:
$(MAKE) -f $(TOP)/Makefile tcl_clean
check: all

View file

@ -5,15 +5,16 @@ TARGET = my_tclsh
DLTARGET = example
INTERFACE = example.i
all::
check: build
$(MAKE) -f $(TOP)/Makefile tcl_run
build:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl
static::
static:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh
clean::
clean:
$(MAKE) -f $(TOP)/Makefile tcl_clean
check: all

View file

@ -5,15 +5,16 @@ TARGET = example
INTERFACE = example.i
LIBS = -lm
all::
check: build
$(MAKE) -f $(TOP)/Makefile tcl_run
build:
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tcl_cpp
static::
static:
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mytclsh' INTERFACE='$(INTERFACE)' tclsh_cpp_static
clean::
clean:
$(MAKE) -f $(TOP)/Makefile tcl_clean
check: all

View file

@ -5,15 +5,16 @@ TARGET = my_tclsh
DLTARGET = example
INTERFACE = example.i
all::
check: build
$(MAKE) -f $(TOP)/Makefile tcl_run
build:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl
static::
static:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh
clean::
clean:
$(MAKE) -f $(TOP)/Makefile tcl_clean
check: all

View file

@ -6,15 +6,16 @@ DLTARGET = example
INTERFACE = example.i
LIBS = -lm
all::
check: build
$(MAKE) -f $(TOP)/Makefile tcl_run
build:
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl_cpp
static::
static:
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh_cpp_static
clean::
clean:
$(MAKE) -f $(TOP)/Makefile tcl_clean
check: all

View file

@ -5,15 +5,16 @@ TARGET = my_tclsh
DLTARGET = example
INTERFACE = example.i
all::
check: build
$(MAKE) -f $(TOP)/Makefile tcl_run
build:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl
static::
static:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh
clean::
clean:
$(MAKE) -f $(TOP)/Makefile tcl_clean
check: all

View file

@ -5,15 +5,16 @@ TARGET = my_tclsh
DLTARGET = example
INTERFACE = example.i
all::
check: build
$(MAKE) -f $(TOP)/Makefile tcl_run
build:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl
static::
static:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh
clean::
clean:
$(MAKE) -f $(TOP)/Makefile tcl_clean
check: all