--- Makefile.in	2006/01/14 22:38:35	1.1
+++ Makefile.in	2006/01/14 22:50:46
@@ -56,6 +56,12 @@
 # Directory in which to install the include file tcl.h:
 INCLUDE_INSTALL_DIR	= $(INSTALL_ROOT)$(includedir)
 
+# Path to the private tcl header dir:
+PRIVATE_INCLUDE_DIR	= $(includedir)
+
+# Directory in which to (optionally) install the private tcl headers:
+PRIVATE_INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(PRIVATE_INCLUDE_DIR)
+
 # Top-level directory in which to install manual entries:
 MAN_INSTALL_DIR		= $(INSTALL_ROOT)$(mandir)
 
@@ -539,6 +545,28 @@
 		$(COPY) "$$i" "$(SCRIPT_INSTALL_DIR)/encoding"; \
 	done;
 
+# Optional target to install private headers
+install-private-headers: libraries
+	@for i in $(PRIVATE_INCLUDE_INSTALL_DIR); \
+	    do \
+	    if [ ! -d $$i ] ; then \
+		echo "Making directory $$i"; \
+		mkdir -p $$i; \
+		chmod 755 $$i; \
+		else true; \
+		fi; \
+	    done;
+	@echo "Installing private header files";
+	@for i in $(GENERIC_DIR)/tclInt.h $(GENERIC_DIR)/tclIntDecls.h \
+		$(GENERIC_DIR)/tclIntPlatDecls.h \
+		$(WIN_DIR)/tclWinPort.h $(GENERIC_DIR)/tclMath.h; \
+	    do \
+	    $(COPY) "$$i" "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \
+	    done;
+	@sed -e 's#\.\./win/##' $(GENERIC_DIR)/tclPort.h > tclPort.h; \
+	    $(COPY) tclPort.h "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \
+	    rm -f tclPort.h
+
 install-doc: doc
 
 # Specifying TESTFLAGS on the command line is the standard way to pass
