summaryrefslogtreecommitdiffstats
path: root/unix/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'unix/Makefile.in')
-rw-r--r--unix/Makefile.in197
1 files changed, 126 insertions, 71 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index d42a0e5..b4a4566 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.282 2009/11/26 07:01:47 nijtmans Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.283 2009/11/26 09:40:32 dkf Exp $
VERSION = @TCL_VERSION@
MAJOR_VERSION = @TCL_MAJOR_VERSION@
@@ -582,6 +582,10 @@ ZLIB_SRCS = \
SRCS = $(GENERIC_SRCS) $(TOMMATH_SRCS) $(UNIX_SRCS) $(NOTIFY_SRCS) \
$(OO_SRCS) $(STUB_SRCS) @PLAT_SRCS@ @ZLIB_SRCS@
+#--------------------------------------------------------------------------
+# Start of rules
+#--------------------------------------------------------------------------
+
all: binaries libraries doc packages
binaries: ${LIB_FILE} $(STUB_LIB_FILE) $(TCL_BUILD_EXP_FILE) tclsh
@@ -610,11 +614,44 @@ tclLibObjs:
# This targets actually build the objects needed for the lib in the above case
objs: ${OBJS}
-
tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE}
${CC} ${CFLAGS} ${LDFLAGS} ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \
${CC_SEARCH_FLAGS} -o tclsh
+Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in
+ $(SHELL) config.status
+#tclConfig.h: $(UNIX_DIR)/tclConfig.h.in
+# $(SHELL) config.status
+
+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: distclean-packages clean
+ rm -rf Makefile config.status config.cache config.log tclConfig.sh \
+ tclConfig.h *.plist Tcl.framework tcl.pc
+ cd dltest ; $(MAKE) distclean
+
+depend:
+ makedepend -- $(DEPEND_SWITCHES) -- $(SRCS)
+
+#--------------------------------------------------------------------------
+# 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
+# line is needed to avoid problems under Sun's "pmake". Note: this target is
+# now obsolete (use the autoconf variable TCL_SRC_DIR from tclConfig.sh
+# instead).
+#--------------------------------------------------------------------------
+
+.NO_PARALLEL: topDirName
+topDirName:
+ @cd $(TOP_DIR); pwd
+
+#--------------------------------------------------------------------------
+# Rules for testing
+#--------------------------------------------------------------------------
+
# Resetting the LIB_RUNTIME_DIR below is required so that the generated
# 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
@@ -659,6 +696,19 @@ runtest: tcltest
ro-test: tcltest
echo 'exec chmod -w .;package require tcltest;tcltest::temporaryDirectory /tmp;source ../tests/all.tcl;exec chmod +w .' | $(SHELL_ENV) ./tcltest
+# The following target generates the shared libraries in dltest/ that are used
+# for testing; they are included as part of the "tcltest" target (via the
+# BUILD_DLTEST variable) if dynamic loading is supported on this platform. The
+# Makefile in the dltest subdirectory creates the dltest.marker file in this
+# directory after a successful build.
+
+dltest.marker: ${STUB_LIB_FILE}
+ cd dltest ; $(MAKE)
+
+#--------------------------------------------------------------------------
+# Rules for running a shell before installation
+#--------------------------------------------------------------------------
+
# This target can be used to run tclsh from the build directory
# via `make shell SCRIPT=/tmp/foo.tcl`
shell: tclsh
@@ -680,55 +730,9 @@ valgrind: tclsh tcltest
valgrindshell: tclsh
$(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
-# line is needed to avoid problems under Sun's "pmake". Note: this target is
-# now obsolete (use the autoconf variable TCL_SRC_DIR from tclConfig.sh
-# instead).
-
-.NO_PARALLEL: topDirName
-topDirName:
- @cd $(TOP_DIR); pwd
-
-# The following target generates the file generic/tclDate.c from the yacc
-# grammar found in generic/tclGetDate.y. This is only run by hand as yacc is
-# not available in all environments. The name of the .c file is different than
-# the name of the .y file so that make doesn't try to automatically regenerate
-# the .c file.
-
-gendate:
- bison --output-file=$(GENERIC_DIR)/tclDate.c \
- --no-lines \
- --name-prefix=TclDate \
- $(GENERIC_DIR)/tclGetDate.y
-
-# yacc -l $(GENERIC_DIR)/tclGetDate.y
-# sed -e 's/yy/TclDate/g' -e '/^#include <values.h>/d' \
-# -e 's?SCCSID?RCS: @(#) ?' \
-# -e '/#ifdef __STDC__/,/#endif/d' -e '/TclDateerrlab:/d' \
-# -e '/TclDatenewstate:/d' -e '/#pragma/d' \
-# -e '/#include <inttypes.h>/d' -e 's/const /CONST /g' \
-# -e '/#define YYNEW/s/malloc/TclDateAlloc/g' \
-# -e '/#define YYENLARGE/,/realloc/s/realloc/TclDateRealloc/g' \
-# <y.tab.c >$(GENERIC_DIR)/tclDate.c
-# rm y.tab.c
-
-# The following target generates the file generic/tclTomMath.h. It needs to be
-# run (and the results checked) after updating to a new release of libtommath.
-
-gentommath_h:
- $(TCL_EXE) "$(TOOL_DIR)/fix_tommath_h.tcl" \
- "$(TOMMATH_DIR)/tommath.h" \
- > "$(GENERIC_DIR)/tclTomMath.h"
-
-# The following target generates the shared libraries in dltest/ that are used
-# for testing; they are included as part of the "tcltest" target (via the
-# BUILD_DLTEST variable) if dynamic loading is supported on this platform. The
-# Makefile in the dltest subdirectory creates the dltest.marker file in this
-# directory after a successful build.
-
-dltest.marker: ${STUB_LIB_FILE}
- cd dltest ; $(MAKE)
+#--------------------------------------------------------------------------
+# Installation rules
+#--------------------------------------------------------------------------
INSTALL_TARGETS = install-binaries install-libraries install-doc install-packages @EXTRA_INSTALL@
@@ -915,23 +919,9 @@ install-private-headers: libraries
$(INSTALL_DATA) tclConfig.h "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \
fi;
-Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in
- $(SHELL) config.status
-#tclConfig.h: $(UNIX_DIR)/tclConfig.h.in
-# $(SHELL) config.status
-
-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: distclean-packages clean
- rm -rf Makefile config.status config.cache config.log tclConfig.sh \
- tclConfig.h *.plist Tcl.framework tcl.pc
- cd dltest ; $(MAKE) distclean
-
-depend:
- makedepend -- $(DEPEND_SWITCHES) -- $(SRCS)
+#--------------------------------------------------------------------------
+# Rules for how to compile C files
+#--------------------------------------------------------------------------
# Test binaries. The rules for tclTestInit.o and xtTestInit.o are complicated
# because they are compiled from tclAppInit.c. Can't use the "-o" option
@@ -1524,9 +1514,11 @@ $(DTRACE_HDR): $(DTRACE_SRC)
$(DTRACE_OBJ): $(DTRACE_SRC) $(TCL_OBJS)
$(DTRACE) -G $(DTRACE_SWITCHES) -o $@ -s $(DTRACE_SRC) $(TCL_OBJS)
+#--------------------------------------------------------------------------
# The following targets are not completely general. They are provide purely
# for documentation purposes so people who are interested in the Xt based
# notifier can modify them to suit their own installation.
+#--------------------------------------------------------------------------
xttest: ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} ${TCL_STUB_LIB_FILE} \
@DL_OBJS@ ${BUILD_DLTEST}
@@ -1542,10 +1534,12 @@ tclXtTest.o: $(UNIX_DIR)/tclXtTest.c
$(CC) -c $(APP_CC_SWITCHES) -I/usr/openwin/include \
$(UNIX_DIR)/tclXtTest.c
+#--------------------------------------------------------------------------
# Compat binaries, these must be compiled for use in a shared library even
# though they may be placed in a static executable or library. Since they are
# included in both the tcl library and the stub library, they need to be
# relocatable.
+#--------------------------------------------------------------------------
fixstrtod.o: $(COMPAT_DIR)/fixstrtod.c
$(CC) -c $(STUB_CC_SWITCHES) $(COMPAT_DIR)/fixstrtod.c
@@ -1603,8 +1597,10 @@ Zuncompr.o: $(ZLIB_DIR)/uncompr.c
Zzutil.o: $(ZLIB_DIR)/zutil.c
$(CC) -c -o $@ $(CC_SWITCHES) -I$(ZLIB_DIR) $(ZLIB_DIR)/zutil.c
+#--------------------------------------------------------------------------
# Stub library binaries, these must be compiled for use in a shared library
# even though they will be placed in a static archive
+#--------------------------------------------------------------------------
tclStubLib.o: $(GENERIC_DIR)/tclStubLib.c
$(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclStubLib.c
@@ -1615,9 +1611,9 @@ tclOOStubLib.o: $(GENERIC_DIR)/tclOOStubLib.c
.c.o:
$(CC) -c $(CC_SWITCHES) $<
-#
+#--------------------------------------------------------------------------
# Bundled Package targets
-#
+#--------------------------------------------------------------------------
# propagate configure args like --enable-64bit to package configure
PKG_CFG_ARGS = @PKG_CFG_ARGS@
@@ -1717,6 +1713,41 @@ dist-packages: configure-packages
fi; \
done
+#--------------------------------------------------------------------------
+# Maintainer-only targets
+#--------------------------------------------------------------------------
+
+# The following target generates the file generic/tclDate.c from the yacc
+# grammar found in generic/tclGetDate.y. This is only run by hand as yacc is
+# not available in all environments. The name of the .c file is different than
+# the name of the .y file so that make doesn't try to automatically regenerate
+# the .c file.
+
+gendate:
+ bison --output-file=$(GENERIC_DIR)/tclDate.c \
+ --no-lines \
+ --name-prefix=TclDate \
+ $(GENERIC_DIR)/tclGetDate.y
+
+# yacc -l $(GENERIC_DIR)/tclGetDate.y
+# sed -e 's/yy/TclDate/g' -e '/^#include <values.h>/d' \
+# -e 's?SCCSID?RCS: @(#) ?' \
+# -e '/#ifdef __STDC__/,/#endif/d' -e '/TclDateerrlab:/d' \
+# -e '/TclDatenewstate:/d' -e '/#pragma/d' \
+# -e '/#include <inttypes.h>/d' -e 's/const /CONST /g' \
+# -e '/#define YYNEW/s/malloc/TclDateAlloc/g' \
+# -e '/#define YYENLARGE/,/realloc/s/realloc/TclDateRealloc/g' \
+# <y.tab.c >$(GENERIC_DIR)/tclDate.c
+# rm y.tab.c
+
+# The following target generates the file generic/tclTomMath.h. It needs to be
+# run (and the results checked) after updating to a new release of libtommath.
+
+gentommath_h:
+ $(TCL_EXE) "$(TOOL_DIR)/fix_tommath_h.tcl" \
+ "$(TOMMATH_DIR)/tommath.h" \
+ > "$(GENERIC_DIR)/tclTomMath.h"
+
#
# Target to regenerate header files and stub files from the *.decls tables.
#
@@ -1790,6 +1821,10 @@ checkexports: $(TCL_LIB_FILE)
| awk '$$2 ~ /^[TDBCS]$$/ { sub("^_", "", $$3); print $$3 }' \
| sort -n | grep -E -v '^[Tt]cl' || true
+#--------------------------------------------------------------------------
+# Distribution building rules
+#--------------------------------------------------------------------------
+
#
# Target to create a Tcl RPM for Linux. Requires that you be on a Linux
# system.
@@ -1964,12 +1999,17 @@ allpatch: dist
mv $(DISTROOT)/tcl${VERSION} $(DISTROOT)/$(DISTNAME)
mv $(DISTROOT)/old $(DISTROOT)/tcl${VERSION}
-#
+#--------------------------------------------------------------------------
# This target creates the HTML folder for Tcl & Tk and places it in
# DISTDIR/html. It uses the tcltk-man2html.tcl tool from the Tcl group's tool
# workspace. It depends on the Tcl & Tk being in directories called tcl8.* &
# tk8.* up two directories from the TOOL_DIR.
#
+# Note that for platforms where this is important, it is more common to use a
+# build of this HTML documentation that has already been placed online. As
+# such, this rule is not guaranteed to work well on all systems; it only needs
+# to function on those of the Tcl/Tk maintainers.
+#--------------------------------------------------------------------------
html: tclsh
$(BUILD_HTML)
@@ -1987,4 +2027,19 @@ BUILD_HTML = \
./tclsh $(TOOL_DIR)/tcltk-man2html.tcl --htmldir="$(HTML_INSTALL_DIR)" \
--srcdir=$(TOP_DIR)/.. $(BUILD_HTML_FLAGS)
+#--------------------------------------------------------------------------
+# The list of all the targets that do not correspond to real files. This stops
+# 'make' from getting confused when someone makes an error in a rule.
+#--------------------------------------------------------------------------
+
+.PHONY: all binaries libraries doc packages tclLibObjs objs tcltest-real test
+.PHONY: test-tcl gdb-test runtest ro-test shell gdb ddd valgrind valgrindshell
+.PHONY: topDirName gendate gentommath_h install install-strip install-binaries
+.PHONY: install-libraries install-tzdata install-msgs install-doc clean dist
+.PHONY: install-private-headers distclean depend xttest configure-packages rpm
+.PHONY: packages install-packages test-packages clean-packages dist-packages
+.PHONY: distclean-packages genstubs checkstubs checkdoc checkuchar dist html
+.PHONY: checkexports alldist allpatch html-tcl html-tk
+
+#--------------------------------------------------------------------------
# DO NOT DELETE THIS LINE -- make depend depends on it.