diff options
author | dgp <dgp@users.sourceforge.net> | 2008-12-17 15:36:57 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2008-12-17 15:36:57 (GMT) |
commit | b7bb2380d4af67cd9c388131d9fa34d478ac8a8c (patch) | |
tree | 1d4a79460fa9bc359744f206eae4b02b00f73523 /unix/Makefile.in | |
parent | d77c012ac73b8e2be7fb8f6da653684273a2d949 (diff) | |
download | tcl-b7bb2380d4af67cd9c388131d9fa34d478ac8a8c.zip tcl-b7bb2380d4af67cd9c388131d9fa34d478ac8a8c.tar.gz tcl-b7bb2380d4af67cd9c388131d9fa34d478ac8a8c.tar.bz2 |
* unix/Makefile.in: Add build support for collections of TEA
* unix/configure.in: packages found under the pkgs directory.
[Patch 1163406]. Still needs porting to Windows.
* unix/configure: autoconf-2.59
Diffstat (limited to 'unix/Makefile.in')
-rw-r--r-- | unix/Makefile.in | 128 |
1 files changed, 95 insertions, 33 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in index 415535c..353b6fb 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.249 2008/12/11 01:21:52 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.250 2008/12/17 15:36:58 dgp Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -218,7 +218,7 @@ AR = @AR@ RANLIB = @RANLIB@ DTRACE = @DTRACE@ SRC_DIR = @srcdir@ -TOP_DIR = $(SRC_DIR)/.. +TOP_DIR = @TCL_SRC_DIR@ BUILD_DIR = @builddir@ GENERIC_DIR = $(TOP_DIR)/generic TOMMATH_DIR = $(TOP_DIR)/libtommath @@ -226,6 +226,7 @@ COMPAT_DIR = $(TOP_DIR)/compat TOOL_DIR = $(TOP_DIR)/tools UNIX_DIR = $(TOP_DIR)/unix MAC_OSX_DIR = $(TOP_DIR)/macosx +PKGS_DIR = $(TOP_DIR)/pkgs # Must be absolute because of the cd dltest $(DLTEST_DIR)/configure below. DLTEST_DIR = @TCL_SRC_DIR@/unix/dltest # Must be absolute to so the corresponding tcltest's tcl_library is absolute. @@ -555,7 +556,7 @@ DTRACE_SRC = $(GENERIC_DIR)/tclDTrace.d SRCS = $(GENERIC_SRCS) $(TOMMATH_SRCS) $(UNIX_SRCS) $(NOTIFY_SRCS) \ $(STUB_SRCS) @PLAT_SRCS@ -all: binaries libraries doc +all: binaries libraries doc packages binaries: ${LIB_FILE} $(STUB_LIB_FILE) $(TCL_BUILD_EXP_FILE) tclsh @@ -592,6 +593,8 @@ tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE} # tcltest executable gets the build directory burned into its ld search path. # This keeps tcltest from picking up an already installed version of the Tcl # library. +SHELL_ENV = @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@} \ + TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}" tcltest: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${BUILD_DLTEST} $(MAKE) tcltest-real LIB_RUNTIME_DIR="`pwd`" @@ -608,10 +611,8 @@ tcltest-real: # tcltest, ie: # % make test TESTFLAGS="-verbose bps -file fileName.test" -test: tcltest - @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ - TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - ./tcltest $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) +test: tcltest test-packages + $(SHELL_ENV) ./tcltest $(TOP_DIR)/tests/all.tcl $(TESTFLAGS) gdb-test: tcltest @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run @@ -622,49 +623,33 @@ gdb-test: tcltest # Useful target to launch a built tcltest with the proper path,... runtest: tcltest - @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ - TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - ./tcltest + $(SHELL_ENV) ./tcltest # Useful target for running the test suite with an unwritable current # directory... ro-test: tcltest - @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ - TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - echo 'exec chmod -w .;package require tcltest;tcltest::temporaryDirectory /tmp;source ../tests/all.tcl;exec chmod +w .' | ./tcltest + echo 'exec chmod -w .;package require tcltest;tcltest::temporaryDirectory /tmp;source ../tests/all.tcl;exec chmod +w .' | $(SHELL_ENV) ./tcltest # This target can be used to run tclsh from the build directory # via `make shell SCRIPT=/tmp/foo.tcl` shell: tclsh - @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ - TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - ./tclsh $(SCRIPT) + $(SHELL_ENV) ./tclsh $(SCRIPT) # This target can be used to run tclsh inside either gdb or insight gdb: tclsh - @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run - @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run - $(GDB) ./tclsh --command=gdb.run - rm gdb.run + $(SHELL_ENV) $(GDB) ./tclsh # This target can be used to run tclsh inside ddd ddd: tclsh - @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run - @echo "set env TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" >> gdb.run - $(DDD) -command=gdb.run ./tclsh - rm gdb.run + $(SHELL_ENV) $(DDD) ./tclsh VALGRINDARGS=--tool=memcheck --num-callers=8 --leak-resolution=high --leak-check=yes --show-reachable=yes -v valgrind: tclsh tcltest - @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ - TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - valgrind $(VALGRINDARGS) ./tcltest $(TOP_DIR)/tests/all.tcl -singleproc 1 $(TESTFLAGS) + $(SHELL_ENV) valgrind $(VALGRINDARGS) ./tcltest $(TOP_DIR)/tests/all.tcl -singleproc 1 $(TESTFLAGS) valgrindshell: tclsh - @LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \ - TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \ - valgrind $(VALGRINDARGS) ./tclsh $(SCRIPT) + $(SHELL_ENV) valgrind $(VALGRINDARGS) ./tclsh $(SCRIPT) # The following target outputs the name of the top-level source directory for # Tcl (it is used by Tk's configure script, for example). The .NO_PARALLEL @@ -716,7 +701,7 @@ gentommath_h: dltest.marker: ${STUB_LIB_FILE} cd dltest ; $(MAKE) -INSTALL_TARGETS = install-binaries install-libraries install-doc @EXTRA_INSTALL@ +INSTALL_TARGETS = install-binaries install-libraries install-doc install-packages @EXTRA_INSTALL@ install: $(INSTALL_TARGETS) @@ -902,12 +887,12 @@ Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in #tclConfig.h: $(UNIX_DIR)/tclConfig.h.in # $(SHELL) config.status -clean: +clean: clean-packages rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \ errors tclsh tcltest lib.exp Tcl @DTRACE_HDR@ cd dltest ; $(MAKE) clean -distclean: clean +distclean: distclean-packages clean rm -rf Makefile config.status config.cache config.log tclConfig.sh \ $(PACKAGE).* prototype tclConfig.h *.plist Tcl.framework cd dltest ; $(MAKE) distclean @@ -1568,6 +1553,83 @@ tclOOStubLib.o: $(GENERIC_DIR)/tclOOStubLib.c .c.o: $(CC) -c $(CC_SWITCHES) $< + +# +# Bundled Package targets +# + +# somehow we need to propagate configure args like --enable-64bit +PKG_CFG_ARGS = @PKG_CFG_ARGS@ +PKG_DIR = ./pkgs + +packages: + @builddir=`pwd`; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ]; then \ + if [ -x $$i/configure ]; then \ + pkg=`basename $$i`; \ + echo "Building package '$$pkg'"; \ + mkdir -p $(PKG_DIR)/$$pkg; \ + if [ ! -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + ( cd $(PKG_DIR)/$$pkg; \ + $$i/configure --with-tcl=$(PWD) --with-tclinclude=$(GENERIC_DIR) $(PKG_CFG_ARGS) --enable-shared --enable-threads; ) \ + fi; \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE); ) \ + fi; \ + fi; \ + done; \ + cd $$builddir + +install-packages: packages + @builddir=`pwd`; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ]; then \ + pkg=`basename $$i`; \ + if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + echo "Installing package '$$pkg'"; \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) install "DESTDIR=$(INSTALL_ROOT)"; ) \ + fi; \ + fi; \ + done; \ + cd $$builddir + +test-packages: tcltest packages + @builddir=`pwd`; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ]; then \ + pkg=`basename $$i`; \ + if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + echo "Testing package '$$pkg'"; \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) "LD_LIBRARY_PATH=$$builddir:${LD_LIBRARY_PATH}" "TCL_LIBRARY=${TCL_BUILDTIME_LIBRARY}" "TCLLIBPATH=$$builddir/pkgs" test "TCLSH_PROG=$$builddir/tcltest"; ) \ + fi; \ + fi; \ + done; \ + cd $$builddir + +clean-packages: + @builddir=`pwd`; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ]; then \ + pkg=`basename $$i`; \ + if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) clean; ) \ + fi; \ + fi; \ + done; \ + cd $$builddir + +distclean-packages: + @builddir=`pwd`; \ + for i in $(PKGS_DIR)/*; do \ + if [ -d $$i ]; then \ + pkg=`basename $$i`; \ + if [ -f $(PKG_DIR)/$$pkg/Makefile ]; then \ + ( cd $(PKG_DIR)/$$pkg; $(MAKE) distclean; ) \ + fi; \ + fi; \ + done; \ + cd $$builddir + # # Target to regenerate header files and stub files from the *.decls tables. # |